Posts

Showing posts from 2013

Java Programs : Star Pyramid, Number Pyramid using Array, Constructor Sample Program

Image
Simple Java Program First of all, how to configure command prompt This image helpful to configure command prompt. 1. STAR PYRAMID program: class Star { public static void main(String args[]) { int a,b; for(a=1;a<=5;a++) { for(b=a;b<=5;b++) System.out.print("*"); System.out.println(); } } } Output: 2. Number Pyramid using Array class Darray { public static void main(String args[])throws Exception { int abc[][]=new int[4][5]; int i,j,k=0; for(j=0;j<5 j="" p=""> { for(i=0;i { abc[i][j]=k; k++; } } for(j=0;j<5 j="" p=""> { for(i=0;i { System.out.print(abc[i][j]+" "); k++; } System.out.println(); } } } Output: 3. Constructor Sample Program: class Box { double l; double w; double h; double vol; Box(double x, double y, double z) { l=x; w=y; h=z; } double Boxvol() { vol=l*w*h; re

Technical Interview Question/Programs On C & C++

Que. a=5, b=3, c=a,b          d=(a,b)          Printf(c,d) Ans: c=5, d=3 Ques. int *f1()       { int n; return(n) } int *f2() { int *p; *p=3; return p; } int *f3() { int *p; p=malloc(); return p; } Ans: No Error Que: *p+=1      *p++      are these two same? Ans: Not Same Que: func(int i) { static int count; count = count+i; } Ans: 1+2+3..      (Count values does not go after function call) Que: int num[3];      num[3]=2; Ans: First statement deals with SIZE      Second statement deals with ELEMENT Que: j=4;      for(int i=0;i<5 i="" p="">     {       j++;       ++j;       }       Output of j=? Ans: 14 Que: Brace "{" used in C for what? Ans: CONVENTION Que: Parameter in C passed by? Ans: VALUE Que: When An array is passed it is by? Ans: Pointer Que: Scanf can read? Ans: any data type Que: which can't be passed to subroutine? Ans: Preprocessor Dire

Pop up Message/Notifcation appear in web page C#

Image
Pop Up Message / Notification appear in C# web application. This is using AJAX tool kit . under HEAD tag coding is, under BODY   tag coding is, HEAD tag code call in our actual code page (aspx.cs) ScriptManager.RegisterStartupScript(this, this.GetType(), "SetAlert", "setAlert('" + LblInfo.Text + "');", true); LblInfo.Text =  I am passing pop up informaton/Message in to Label. Output: Pop up message showing in web page is follows, Run Time Example, Thank You.

How to find out Second Highest Salary from the EMPLOYEE Table

Image
DataBase Name : Prac Table Name : Emp_Sal I already added a four tuples into a "Emp_Sal" table. I used SELECT query on "Emp_Sal" table. Result is, We have to find out Second highest salary from " Emp_Sal " table, this table include four tuples and clearly shows that Employee name "PQR" is Second highest salary.  So, Query is  this query shows, i used two variable "MainTable" And "Auxillary". I compare one table using two variable. I get appropriate result, OUTPUT: I am changing variable name, Instead of "MainTable" variable and "Auxillary" variable I used "e1" and "e2" variable respectively, Query is, This query successfully execute or not, let us see. I  find out second highest salary from "EMPLOYEE" table.

How to Add Video from Local Hard-Disk or Memory in Web Application ( C# 3.5 & HTML ) And this Video run in Web Application ( Web Page )

Image
How to add video from Local Hard-Disk or Memory in Your web Application and also run in your Web Page. Following query used in C# (3.5) & HTML platform. Query is, This query generate run video from Local Hard-Disk or Memory in your page.  "WinRAR.mp4" name of video clip which is store in Local Hard-disk OR Memory. Parameter "LOOP" value "true" = This Video clip is in LOOP. When finish video then automatically start from staring point. Parameter "QUALITY" value "high" = Define Video QUALITY   Paramerter "AUTOSTART" value "False" = automatically start video playing when page load or refresh page events. Stop that automatically plating video then This parameter define in "object" tag. All parameter call in "embed" tag. Important point : in "embed" tag contain type, am playing "mp4" video that's why I am use type= "application/mp4" when I retriv

How to Add Youtube Video in Web Application ( C# 3.5 & HTML ) And Video run in Web Application ( Web Page )

Image
How to add Youtube video in Your web Application and also run in your Web Page. Following query used in C# (3.5) & HTML platform. Query is ,                     This query generate run Youtube video in your page. Output :