Posts

Showing posts with the label GNE

Command line arguments in java

Image
class P_08_CLA { public static void main(String[] args) { for (int i=0;i<args.length ;i++ ) { System.out.println("[args] = "+i+" : "+args[i]); } } } Output

Concept of recursion using factorial in java

Image
public class P_07_recursion_factorial {      static int factorial(int n)     {                if (n == 1)                  return 1;                else                  return(n * factorial(n-1));          }        public static void main(String[] args) {  System.out.println("Factorial of 5 is: "+factorial(5));  }  } Output  :

Explicit type casting in java

Image
class P_06_explicit {     public static void main(String[] args)     {         double d = 100.04;         long l = (long)d;         int i = (int)l;         System.out.println("Double value "+d);         System.out.println("Long value "+l);         System.out.println("Int value "+i);     } } Output

Implicit type casting in java

Image
class P_06_implicit {     public static void main(String[] args)     {         int i = 100;         long l = i;         float f = l;         System.out.println("Int value "+i);         System.out.println("Long value "+l);         System.out.println("Float value "+f);     } } Output

Handling datatypes in java

Image
class P_05_datatypes {     public static void main(String args[])     {         char a = 'G';         int i=89;         byte b = 4;         short s = 56;         double d = 4.355453532;         float f = 4.7333434f;         System.out.println("char: " + a);         System.out.println("integer: " + i);         System.out.println("byte: " + b);         System.out.println("short: " + s);         System.out.println("float: " + f);         System.out.println("double: " + d);     }  } Output

Fibonacci Series in java

Image
CODE  : a) WHILE LOOP public class P_04_fibb_while_loop { public static void main(String[] args) { int a=1,temp=0,b=0; System.out.println(a); while (a<10) { temp=a+b; b=a; a=temp; System.out.println(temp); temp++; } } } b) DO WHILE LOOP public class P_04_do_fibb_while_loop { public static void main(String[] args) { int a=1,temp=0,b=0; System.out.println(a); do{ temp=a+b; b=a; a=temp; System.out.println(temp); temp++; }while (a<10); } } c) FOR LOOP public class P_04_fibb_for_loop { public static void main(String[] args) { int a=1,temp=0,b=0; System.out.println(a); for(;a<10;temp++) { temp=a+b; b=a; a=temp; System.out.println(temp); } } } Output  :

To print days of week using switch case in java

Image
CODE  : class P_03_print_day_switch_case_part3 { public static void main(String[] args) { int a=1; switch (a) { case 0: System.out.println("Today is Monday"); break; case 1: System.out.println("Today is Tuesday"); break; case 2: System.out.println("Today is Wednesday"); break; case 3: System.out.println("Today is Thursday"); break; case 4: System.out.println("Today is Friday"); break; case 5: System.out.println("Today is Saturday"); break; case 6: System.out.println("Today is Sunday"); break; default: System.out.println("You are doomed"); } } } Output  : 

To check greatest of three numbers in java

Image
CODE  : public class P_03_greatest_3_no_part2 { public static void main(String[] args) { int a=1,b=2,c=3; if (a>b && a>c) { System.out.println("A is greatest"); } else if (b>c && b>a) { System.out.println("B is greatest"); } else{ System.out.println("C is greatest"); } } } Output  :

To check whether number is even or not

Image
CODE  : public class P_03_even_odd_part1 { public static void main(String[] args) { int a=5; if (a%2==0) { System.out.println("No. is Even"); } else { System.out.println("No. is Odd"); } } } Output  :

To multiply 2D array in java

Image
CODE  : public class P_02_2dArrayMultiplication{ public static void main(String[] args) {         int n = 2;         int[][] a = {{1,2},{4,5}};         int[][] b = {{2,1},{5,6}};         int[][] c = new int[n][n];         for (int i = 0; i < n; i++)         {             for (int j = 0; j < n; j++)             {                 for (int k = 0; k < n; k++)                 {                     c[i][j] = c[i][j] + a[i][k] * b[k][j];                 }             }         }         System.out.println("The product is:");     ...

To sort Array in java

Image
CODE : import java.util.Arrays; public class P_01_Array{ public static void main(String[] args) { int arr[]={33,3,4,5,90,10,12,42}; Arrays.sort(arr);         System.out.printf("Modified arr[] : %s",Arrays.toString(arr)); } };    Output :

IT-14408 Web Technologies Laboratory Output

Image
Practical Output : 14 Practicals Print them and Enjoy!

To implement the various components of HTML5 Canvas

Image
 Canvas Line   Source Code: <!DOCTYPE html> <html> <head>     <title>Canvas Line</title> </head> <body> <canvas id="Line" width="200" height="100" style="border:1px"> </canvas> <script type="text/javascript">     var c= document.getElementById('Line');     var ctx=c.getContext("2d");     ctx.beginPath();     ctx.moveTo(0,0);     ctx.lineTo(200,100);     ctx.stroke(); </script> </body> </html > Output: Canvas Circle Source Code: <!DOCTYPE html> <html> <head>     <title>Canvas Circle</title> </head> <body> <canvas id="Circle" width="200" height="100" style="border:1px"> </canvas> <script type="text/javascript">     var c= document.getElementById('Circle');     var ctx=c.g...

To setup IIS and Apache Web Server on computer system.

Include the following source Code in Document Environment in your LaTeX File Source Code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Practical 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newpage \section{\emph{To setup IIS and Apache Web Server on computer system.}} \textbf{Setup of IIS Server} \\Internet Information Services (IIS) is an extensible web server created by  Microsoft for use with Windows NT family. IIS supports HTTP, HTTPS, FTP, FTPS, SMTP and NNTP. It has been an integral part of the Windows NT family since  Windows NT 4.0, though it may be absent from some edition and is not active by default.\\ \textbf{Steps for Setting IIS Server} \begin{enumerate} \item To open the Windows Features dialog box, click Start, and then click Control Panel \begin{figure}[h] \centering \includegraphics[scale=0.7]{p4} \end{figure} \item In...

Internet Methodologies Practical File Made in LaTeX

Image
All The Lab Practicals will be Done in LaTeX. This is Lab File For GNDEC IT Dept. students.All the codes are written in easiest way.You can copy.Get output and enjoy! ! Point to be noted: Copy The Source code As it is......But Do Remember 😜  to change name and roll no. on front page. I have Commented{in  RED  with %}  in the code Where you have to do Changes so enjoy with a few changes!! Practical 3 and Practical 4 only 1st page is made ,so rest get it printed from practical 3 and 4 pdfs. Download all images  (Given Below)in the same folder,where you have saved the copy of source code i.e. (.tex) file  TeXworks used for compiling!! HTML FILES !! TeX File !! Output at end Keep iView-ing!! Source Code: \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{multicol} \usepackage{caption} \usepackage{subcaption} \usepackage{transparent} \usepackage{multirow} \usepackage{eso-pic} \usepackage[utf8]{in...