AJAX stands for Asynchronous JavaScript And XML and is a technique used by web developers to make their web sites fast and dynamic. The advantage of using AJAX is that you can update a part of your webpage without reloading the whole page. That is you can send and receive data to and from a server without refreshing the page. This enables you to minimize data transfer and hence improve performance. Now in this post, lets see how to start using AJAX on your web application.
Tuesday, 15 May 2012
Monday, 14 May 2012
Tables in HTML
Tables are one of the most common elements that you see on a web page that are used to organize and display data. Using a table, the data can be represented as rows and columns with suitable heading for each. It quite easy to create a table for your web page as it requires the understanding of only a few tags. So, in this post lets see how to create a table in html.
Introduction to Image Maps
Image maps helps us to specify areas in an image that can be clicked and works similar to a hyperlink. This can be used to make web pages more interactive and user friendly. A single image can have a number of regions defined each pointing to a different URL. In this post, all required tags along with examples are given to gain a complete understanding of image maps.
Saturday, 12 May 2012
Add Images To Your Web Page
Images are an important part of every page and adding a few of them will really make your page more attractive. It is quite easy to add an image to a web page, but there are several things to keep in mind while adding images to balance the performance and quality. In this post, I have described how to add an image and also the various parameters that goes along with the <img> tag.
Introduction to HTML Links or Hyperlinks
HTML Links or Hyperlinks are letters, words or images that can be clicked to move from one page on the web to another or to navigate within a single page. These links are responsible for linking one web page to another and make internet browsing easier. In HTML, a hyperlink can be created using the <a> tag. A hyperlink can be made to point to a different section in the same page or to a different page in the same domain or to a different page in another domain. It can also be used to send an email to a specific email address. Continue reading this post to know how all these can be done.
Friday, 11 May 2012
How a Mobile Phone Call is Made
For most of us, a mobile phone is a part of the life, and we use it regularly to make or receive a number of calls. Have you ever wondered how a mobile phone establishes a call or receives a call. If you think yes, then read on. In this post I have tried to explain the steps that occur to establish a mobile phone call. Before jumping to the steps, you need to know some basic terms related to mobile phone communication system which is also given. After that, the steps involved in making and receiving a call is also described.
Wednesday, 9 May 2012
Create JSON from MySQL To use with AJAX
Now a days most websites use the power of AJAX to make their website more lively and productive. To transfer large amount of raw data, that JavaScript can process, the best way is to transfer it as a JSON file. It is quite easy for a PHP script to generate a JSON file from raw data. This data can be received using a suitable AJAX call. As JavaScript can easy parse JSON object, the rest of the processing with the received data can be done using JavaScript.
Saturday, 5 May 2012
Photography - Position Your Subject, Cheat AutoFocus
Do you still take a snap with the subject at the centre of the frame..?? Well, keeping the subject at the centre stage is suitable for stage events and is not always pleasing for a photograph. To make your photograph better, it is sometimes required to move the subject to a side of the frame. There are some simple tricks that you can try to achieve this. Remember, this does not require a costly DSLR, it can be done even with an ordinary point to shoot camera.
Thursday, 3 May 2012
Make a case sensitive MySQL Search
You might have noticed that when you search for a string in MySQL using '=' or 'LIKE' keyword, the search is not case sensitive. That is you will receive all records irrespective of the case (Uppercase or Lowercase). This is advantageous in several cases, but there are situations when you want the search to be case sensitive.
Get the details of an image in PHP
Every image file has a header section in it which describes the size of the image, its type and other parameters. This header can be used to retrieve the image details. It can be helpful in a PHP program either to validate the file type or to prepare the image for output. This function can be used to find the actual file type (GIF, JPEG...) eventhough the file extention provided is different or is not provided. This function can be used along with file upload scripts so that the actual file type can be verified.
Saturday, 28 April 2012
Get Selected Text From a Text Box Using JavaScript
There are times when you need to process the selected text from long text inside a text area or a text box. This can be easily implemented in JavaScript. The starting index and ending index of the selection can be obtained using "selectionStart" and "selectionEnd". The JavaScript function implementation using this is shown in this post.
Guide to Good Programming Habits
From a novice programmer to a veteran, there are a few rules to be followed so that the code you write has a professionalism in it. These might be simple things like adding comments or using proper variable names, but following it in a systematic way will make your code more easy to develop, test, debug and deploy. These rules are applicable to any programming language and making it a habit will help you in the long run. In this post, I will explain a few rules that could be followed.
Sorting Numbers Using Bubble Sort
There are a lot of algorithms available for sorting a set of numbers. Here I will give you the logic behind bubble sort and a c++ function implementing the same. The bubble sort can be used to sort a given set of numbers either in ascending order or in descending order in minimum number of iterations. Bubble sort starts by comparing the first two numbers and arranging them in the correct order, then the next two numbers and again arranging them. This process is repeated for all the numbers in the list a number of times until the list is sorted.
Tuesday, 24 April 2012
Factorial Using Recursion
Recursion can be used instead of looping statements to find the factorial of a number. Recursion can be defined in simple terms as a function calling itself. Factorial of a number is the product of all numbers from 1 to the number itself. Example: Factorial 5 written as 5! = 5*4*3*2*1 = 120. Here let us see a simple program that uses recursion to find the factorial of a number. I will be using C++ syntax, but you may take the logic and change the syntax to suit any programming language. In some programming languages, you might get a stack overflow error if you use too much recursion.
Sum of First n Natural Numbers Using Recursion
Whenever you call a function inside the body of the same function, it is called recursion. This technique can be utilized instead of looping statements to find the sum of first n numbers. In this post, I will show you how to implement this. I will be using C++ syntax, but you may take the logic and change the syntax to suit any programming language. In some programming languages, you might get a stack overflow error if you use too much recursion.
Subscribe to:
Posts (Atom)