Browsing articles in "Programming"
Nov
28
2008

C++ Program for Linear search

C++ Program for Linear search /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program for Linear search. ***************************************************************/ #include; #include; void main() { int array[100],n,found=0,i,find; clrscr(); cout>n; cout

Nov
28
2008

C++ Program for Insertion sort

C++ Program for Insertion sort /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program for Insertion sort. ***************************************************************/ #include<conio.h> #include<iostream.h> int main() { int array[100],n,i,j,key; clrscr(); cout>n; cout

Nov
28
2008

C++ Program to create a graph and use Depth First Search(DFS)

C++ Program to create a graph and use Depth First Search(DFS). /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to create a graph and use Deapth First Search(DFS) and Breadth First Search(BFS) Traversal. ***************************************************************/ #include #include #include void create(); // For creating a graph void dfs(); // For Deapth First Search(DFS) Traversal. void bfs(); // For Breadth First Search(BFS) Traversal. struct node // Structure for elements in the graph { int data,status; [...]

Nov
28
2008

C++ Program to evaluate a postfix expression

C++ Program to evaluate a postfix expression. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to evaluate a postfix expression. ***************************************************************/ #include; // For isdigit() #include; // For clrscr() #include; // For exit() #include; // For gets() #include; // To find the power # define MAX_STACK 150 class stacks { int value,item,top; int stack[MAX_STACK]; public: stacks()// Constructor { top=(-1); } void push(float); float pop(); }; // Function to PUSH the vale to [...]

Nov
28
2008

C++ Program to implement a doubly linked list.

C++ Program to implement a doubly linked list. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to implement a doubly linked list. ***************************************************************/ #include<iostream.h> #include<conio.h> #include<process.h> // Creating a NODE Structure struct node { int data; // data struct node *next,*back; // link to next node and previous node }; // Creating a class LIST class list { struct node *root,*end; public: void create(); // to create a list void insert(); // [...]

Mar
28
2008

C++ Program to perform the array operations

C++ Program to perform the following array operations. Insertion Deletion Traversing Merge two arrays /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: Program to perform the following array operations. a) Insertion b) Deletion c) Traversing d) Merge two arrays ***************************************************************/ #include<iostream.h> #include<conio.h> #include<process.h> void main() { int array1[150],array2[150],array3[300],i,j,n1,n2,position; int element,choice,n3; clrscr(); coutn1; cout

Feb
27
2008

File extension validation Javascript

You can use this function to validate the extension of a file, for client side file upload checkes. // You can specify the file type in the code “valid_extensions = /(.doc|.pdf)$/i;” . //If you want to add .docx supprt simply add |.docx (ex:(.doc|.pdf |.docx| .your-extension) ) var valid_extensions = /(.doc|.pdf)$/i; function CheckExtension(fld) { if(fld.value) { if (valid_extensions.test(fld.value)){ return true; } else { return false; } } else { return true; } }

Feb
26
2008

What is Struts?

What is Struts? Struts is a free open-source framework for creating Java web applications. Web applications differ from conventional websites in that web applications can create a dynamic response. Many websites deliver only static pages. A web application can interact with databases and business logic engines to customize a response. Web applications based on JavaServer Pages sometimes commingle database code, page design code, and control flow code. In practice, we find that unless these concerns [...]

Feb
26
2008

Javascript for validating a date

Javascript for validating a date. Pass month, day, year as parameters. This function will return true if the date is valid. // Author: arunmvishnu.com function validDate(month, day, year){ if(month ==’0′ || day ==’0′ || year==’0′){ return false; } switch(month){ case ’1′: //** jan case ’3′: //** March case ’5′: //** May case ’7′: //** July case ’8′: //** Aug case ’10′: //** Nov case ’12′: //** Dec if(day >=1 && day =1 && day =1 [...]

Sep
23
2007

Yellow background problem caused by Google Toolbar

Browsers with Google Toolbar AutoFill function enabled, display a yellow background on some of the form input elements. The yellow input fields can be quite confusing. Most users who have the Google Toolbar installed do not use AutoFill feature and they do not disable it. While they are filling a form containing yellow input fields, the colour may cause problem like difficulty see what they are writting etc. The toolbar applies the style while the [...]

Pages:«123

Archives

Highslide for Wordpress Plugin