Wednesday, October 29, 2014

Plandrome Checker

Hi. I remember during first year of university when I was studying introduction to computer science course. It was a nice course where our professor taught us the basics of C++. The real fun was in solving problems related to numbers. There were few types of numbers that I was not aware of such as: palindromic numbers, perfect numbers. We were assigned to create simple looping programs where the user enters a number and the program has to check wether the number satisfies the conditions related to its type. Here I will share my code that checks wether an entered number is palindromic number or not. First, let's check the meaning of Palindrome in dictionary, and here what it says:

palindrome |ˈpalɪndrəʊm|
noun
a word, phrase, or sequence that reads the same backwards as forwards, e.g. madam or nurses run.
DERIVATIVES
palindromic |-ˈdrɒmɪk| adjective,
palindromist noun

ORIGIN early 17th cent.: from Greek palindromos ‘running back again’, from palin ‘again’ + drom- (from dramein ‘to run’).

The following program was coded in Visual C++, .NET Framework 3.5 using Visual Studio 2010. If you are looking for a code in a different language, at least you can understand the concept of this code that I will explain directly after the following code:



The nice thing here is that I didn't use a variable to copy the entered number. The code starts pulling each digit from the right and append them to the left of the reversed number in each loop iteration

I hope that I brought something useful, or provided you with a solution for your homework. See you next time with more number types.

Monday, September 12, 2011

Create HTML Form with File-Upload

Hi there. In this tutorial, I will show you a simple template of a file-upload form using HTML. Many new HTML developers think that a form with a file-upload input is the same as a normal form with few text fields and drop-down menus. Well, it is a little bit different. You need to add few extra details in the form, so that the file gets uploaded to the server without any problem. At the end of this tutorial, you will learn how to create a form with file-upload input like the following:

Friday, September 9, 2011

Insert iframe in HTML Page

Hello. In this tutorial, I will show you how to include iframe inside HTML page. iframe is an HTML element that can display an external document inside HTML page. Check the following links, and notice how the below iframe content gets changed regarding the the link that you click on.

Wednesday, September 7, 2011

Make Link Opens a Page in New Window or Tab

Hello. In this tutorial I will show you a small tip in HTML that opens the link on a new window or tab when the user clicks on it. Sometimes, you view a page, and that page has some links to other pages. You want to view the other pages without leaving the current page, but when you click on the link, it moves you from the current page to the new page. The leading browsers including (Firefox, Chrome, IE, Safari and Opera) add a feature that you can right-click on the link and choose whether you want to view it in a new window or new tab. What if you forget to right-click on the link and choose to open it in a new tab, then the browser will take you from the current page to the new page.

Sunday, September 4, 2011

Make Parts of an Image Work Like Links

Hello everyone. In this tutorial I will show you an example that will teach you how to make parts of an image work as links like in the following image.

Friday, September 2, 2011

Disable Auto-complete Feature of HTML Form in Web Page


Hello everyone. In this tutorial, I will show you how you can disable auto-complete feature in HTML form. Sometimes, you look to disable this feature for forms that contain very sensitive information relative to the user.

Wednesday, August 24, 2011

Get SelectedValues from Listbox Control in VB.NET


Hi. In this tutorial I will show you how to get the selected values in ListBox control in VB.NET. Many VB.NET developers might wonder why there's no (SelectedValues) property for ListBox control while there's (SelectedItems) property. Same I ask. Well, (SelectedValues) property is not provided in VB.NET assuming that you can get the selected values in the ListBox control from (SelectedItems) property. Using the (SelectedItems) property to get the selected values is not a clear approach.