PHP Database Abstraction: Abstraction is a technique which simplifies something complex. It does this by removing non-essential parts of the object, allowing us to concentrate on the important parts. PEAR’s DB classes are one such database abstraction layer, and inContinue reading… Introduction to PHP’s PEAR classes : Comparing normal Database connections with PEAR classes.
Category: Programming
Difference between String str=”abc” and str=new String(”abc”)?
1) using new operator:- String st=new String(“abc”); 2) Without using new operator:- String st=”abc”; Once string object is created with or without new operator contents of string object cannot be modified. But we can modify String reference variable. when youContinue reading… Difference between String str=”abc” and str=new String(”abc”)?
Difference between require and use ?
Perl offers several different ways to include code from one file into another. Here are the deltas between the various inclusion constructs: 1) do $file is like eval `cat $file`, except the former: 1.1: searches @INC and updates %INC. 1.2:Continue reading… Difference between require and use ?
Bubble Sort
The source code for bubble sort. #include #define NUM 6 void swap(int arr[], int i, int j) { int tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; } main() { int arr[NUM],i,j; // start reading nums for(i=0;i
Shell Sort
Source code for shell sort is provided below. #include #define NUM 6 main() { int arr[NUM],i,j, incr=2; // start reading nums for(i=0;i
Insertion Sort
Source code for Insertion sort in C language. #include #define NUM 6 main() { int arr[NUM],i,j; // start reading nums for(i=0;i
Selection Sort
The code for the selection sort in C lang is provided below. #include #define NUM 6 void swap(int arr[], int i, int j) { int tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; } main() { int arr[NUM],i,j; //Continue reading… Selection Sort
File upload code in Jsp : using apache’s commons-upload.jar
Please follow the below steps before coding the upload script in jsp. 1. Download the commons-upload.jar from Apache’s website. 2. Put that jar file into the classpath, i.e in WEB-INF/lib/ directory. 3. Then create a jsp file with the followingContinue reading… File upload code in Jsp : using apache’s commons-upload.jar
File upload code in Jsp : other methods ….
On the client side, the client’s browser must support form-based upload. Most modern browsers do, but there’s no guarantee. For example, <FORM ENCTYPE=’multipart/form-data’ method=’POST’ action=’/myservlet’> <INPUT TYPE=’file’ NAME=’mptest’> <INPUT TYPE=’submit’ VALUE=’upload’> </FORM> The input type “file” brings up a buttonContinue reading… File upload code in Jsp : other methods ….
Reading and Writing Excel Files with POI
In this article we’ll show you how to read and write Excel files and how to read any Microsoft file’s document properties. Conventions The POI project is nearing a 2.0 release and is in a stage of rapid development, withContinue reading… Reading and Writing Excel Files with POI