Browsing articles tagged with " Programming"
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 [...]

Pages:«123

Archives

Highslide for Wordpress Plugin