Saturday, 19 May 2012

Make bootable pendrive for ubuntu(in windows platform)

It is very easy. First download Universal-USB-Installer. Just fix the locations of pendrive and ISO image. Click create button. That's it. Download Universal- USB-Installer from here                                              ...

Thursday, 17 May 2012

A method to make one click buttons in php

Here is a method to make buttons which will disabled automatically after click. This is useful when you dealing with php scripts.There also other methods for this. Here is only the logic not complete code. <?php mysql_select_db("sample", $p); $z1=$z2=0; $r=mysql_query("SELECT * FROM sampletable"); while($rows=mysql_fetch_array($r)) { $take=$rows['samples2']; if($take=='a1') $z1=1; if($take=='a2') $z2=1; } if($z1==1) echo "<input type='submit' value='a1'  name='opt' disabled >"; else echo "<input type='submit' value='a1'  name='opt'...

Validation of name fields using javascipt

The following code can be used for validating name like fields.(Useful when dealing with html forms) This code uses two built in functions 1)charAt()2) indexOf() charAt()- Returns the character at the specified index in a string. Ex: charAt(5)-->  character at 6th position(Starting with 0) indexOf() - Returns the position of the first occurrence of a specified value in a string and return -1  if  not found. Bellow code has a variable not_needed. You can simply specify the unwanted character inside the double quotes. <script...

Wednesday, 2 May 2012

Sorting of matrix elements-C++ program

#include<iostream> using namespace std; #include<conio.h> int main() {     int a[20][20],n,b[20],m,i,j,k=0,t;     cout<<"Enter the order\n";     cin>>m>>n;     cout<<"Enter the elements\n";     for(i=0;i<m;i++)     {     for(j=0;j<n;j++)     {     cin>>a[i][j];     b[k++]=a[i][j];      }      }      for(i=0;i<(m*n);i++)      {    ...

No third variables and pointers-C++ swapping program

#include<iostream> using namespace std; #include<conio.h> int main() {     int a,b;     cout<<"Enter two number:\t";     cin>>a>>b;     cout<<"\nBefore swapping:\t";     cout<<a<<"\t"<<b;         a=a+b;     b=a-b;     a=a-b;     cout<<"\nAfter swapping:\t";     cout<<"\t"<<a<<"\t"<<b;     getch(); ...

Page 1 of 2712345Next
Twitter Delicious Facebook Digg Stumbleupon Favorites More