Wednesday, April 28, 2010

Cyberlink Power Dvd 8 CD key

Key for Delux: 4ZZTQ-FTJTG-LHS8V-THAWB-N6SPK-D3ZF5 NZRCQ-V9BCY-A9FPJ-69SGW-4KWD8-NME5H

Tuesday, April 27, 2010

JDBC interview questions

JDBC interview questions

a) OBDC is for Microsoft and JDBC is for Java applications.

b) ODBC can’t be directly used with Java because it uses a C interface.

c) ODBC makes use of pointers which have been removed totally from Java.

d) ODBC mixes simple and advanced features together and has complex options for simple queries. But JDBC is designed to keep things simple while allowing advanced capabilities when required.

e) ODBC requires manual installation of the ODBC driver manager and driver on all client machines. JDBC drivers are written in Java and JDBC code is automatically installable, secure, and portable on all platforms.

f) JDBC API is a natural Java interface and is built on ODBC. JDBC retains some of the basic features of ODBC.


what is the role of Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");


when we call forName() method on Class class what happen is1)initially the class is loaded into the memory2)then it calls the static method forName()3)the static forName() method contains a static block.That static block regiser the loaded driver class with the DriverManager class

Sunday, April 25, 2010

What are the different scopes for Java variables?

What are the different scopes for Java variables?

The scope of a Java variable is determined by the context in which the variable is declared. Thus a java variable can have one of the three scopes at any given point in time.

1. Instance : - These are typical object level variables, they are initialized to default values at the time of creation of object, and remain accessible as long as the object accessible.

2. Local : - These are the variables that are defined within a method. They remain accessbile only during the course of method excecution. When the method finishes execution, these variables fall out of scope.

3. Static: - These are the class level variables. They are initialized when the class is loaded in JVM for the first time and remain there as long as the class remains loaded. They are not tied to any particular object instance.

Wednesday, April 14, 2010

win zip 12 activation code

user: TEAM ViRiLiTY

reg code: UW37E-E5UAV-9FNVH-NWQ9Z-DWXJW-087L6

Monday, April 5, 2010

How to Shutdown your Windows 7 & Vista Computer at a particular time.

Here are a few ways in which you can make your Windows Computer shutdown (or Restart) at a particular time. This can prove to be especially useful at times !

1) First, as was mentioned elsewhere on this site, you can create a shortcut, programmed to shutdown after a particular period of time as follows:
Right click on an empty area on your desktop.
Select New > Shortcut.
In the first box of the Create Shortcut Wizard, type
Shutdown -s -t 3600
Click Next. Name the shortcut : Shutdown, and click Finish.
Then select an appropriate icon for it !
Here 3600 is 3600 sec's or 60 min's or 1 hr. You can change the figure to what you wish. After the specified period of time the Computer will automatically initiate a shutdown without a warning.
2) Alternatively, Open Run and type:
at 21:30 shutdown -s
A black window will pop up and disappear.

A warning dialog box will then appear and your PC will start shutdown. Do note that the timings have to be mentioned in the 24 hr format here.

3) Using the Windows Vista Task Scheduler also offers a way to shutdown your computer at particular times.
Click Start > All Program > Accessories > SystemTools > Task Scheduler.
On the RHS, in the Actions column, click on Create Basic Task.
Give it a name like Shutdown and some add a Description too.
Click Next. Here select the Trigger. Lets say you want it to shutdown just One time, then select that option and click Next. It will ask you for the date and the time. Click Next.
In the Actions section, select Start a program. Click Next.
Here under Program/script, type:
C:\Windows\System32\shutdown.exe
and under Add arguments, type:
/s
Click Next.

You will now be presented with a Summary. Click Finish. Your Vista will now shutdown at the pre configured time.


4) You can also use a bat file for achieving this. To create a .bat file, copy paste the following in a notepad:
@echo off
title Scheduled Shutdown Batch
color A
echo Enter Time To Shutdown (Use 24 hr format, eg 21:35)
set /p stime=
cls
at %stime% ""shutdown -s -t 00"" >nul
echo Your PC Will Auto Shutdown At %stime%
echo Press Any Key To Exit
pause >nul
exit
Then in the Notepad, from the File menu on top LHS, select Save As. Save the file as Shutdown.bat

When you click the Shutdown.bat, a black box will appear, asking you to fill in the time you want the computer to shutdown. Type the time in the 24 hr format, separating the hr from the minutes by a ':' and hit enter. Thats it, your computer will shutdown at the desired time ! If you wish, you can download the ready-to-use .bat file from here.

If you wish to display a message, you can also add
-c "desired message" at the end of the shutdown command.
Like, for example:
shutdown -s -t 60 -c "Enough gaming buddy-Time to sleep"

You can also use this command to schedule your PC's Restart using the following code instead:
shutdown -r -t 60 -c "Restarting Computer" . Thanks Jerin.

5) Finally, the easiest way, is to download this freeware WinOFF. It is an utility designed to schedule the shut down of Windows computers, with several shut down modes and is fully configurable.

Some of its features are: Scheduled shut downs, either at a set time (e.g. 12:30 PM) or after a period of time (e.g. 1 hour and 25 minutes); Perform a shut down when the CPU becomes idle; Several types of shut down (shut down, restart, close session, power off, administrative shut down/restart, suspend, hibernate and lock computer, etc, etc. Worth a checkout ! Similarly, you can also try Windows Reboot Utility.

Saturday, April 3, 2010

Understanding Increment and Decrement operators in C

Understanding Increment and Decrement operators in C



Almost all programmers who work in C-based languages use the ++ and -- operators .Let's look at some interesting aspects of these operators in C.Increment/decrement operators are good examples to explain the curt (concise)syntax of


C language :

void strcpy(char *t,const char *s){
while(*t++=*s++);
}



In this strcpy function,the while loop continues copying characters from source to target ,till it reaches the end of the string ('\0' character ).

Here is another example ;can you guess the output of this code segment?

char str[]="oh",*p=str;
while(*p)
++*p++;
printf(str);


How is the expression ++*p++ treated? The postfix increment/decrement is a part of the operators with highest precedence ;the dereference and prefix increment/decrement is at the next precedence level and their associativity is from right to left .So ,the expression is treated as:(++(*(p++))).p is a pointer to string "oh".In the while loop,p++ is executed first,but it's effect does not take place till the statement execution completes.The result of p++(which is still the value of p) is dereferenced with *.For the first character it is 'o'
Now ,Prefix ++ increments the character value ,so its value is 'p' .The same happens for the next character ,'h'
,which becomes 'i'.Now the end of the character is reached ,so the while loop terminates .The printf now prints the modified string .which is "pi" .



we can use ++/-- operators to illustrate the 'maximum munch ' rule in C lexical analysis .Simply stated ,the lexical analyser (lexer ) looks for a match for the longest token .For example ,consider the expression a+b
,where a and b are integer varables.Given this as input in a C program ,the lexer might give VARIABLE (a),PLUS(+),VARIABLE(B) as output ,which is a valid sequence of tokens for compilation to succeed .

Now ,how about the expression a++b? .It is treated as a++b ,and not (a+(+b)),and results a compiler error.How about a+++b ?. It becomes ((a++)+b),so it's fine.Expression a++++b?.It is ((a++) (++b)),so it is a compiler error .Hmm how about a+++++b?.It is ((a++)++)(+b)),which is again compiler error .Note that,in all these cases ,if we use explicit white space or parenthesis ,we can get valid expressions .Note that ,in all these cases ,if we use explicit white-space or parenthesis ,we can get valid expressions :(a+(+b)),((a++)+b),
((a++) + (+b)),and ((a++) + (++b).If we try adding more +s after this ,we cannot get a valid expression for integer arguments.
Today,C-based languages (C++,Java ,etc) rule the programming world;because of this ,almost all programmers are aware of the ++ and -- operators and how powerful they are in expressing operations .What even experienced programmers do not know is that the C family was the first to introduce ++ and -- operators ! KEN THOMPSAN ,while implementing the B compiler ,noticed that increment operations generate more compact code than adding 1 to a variable and storing it back .In other words ,an increment was one instruction while adding 1 and and storing it back was more than one instruction .
So he implemented the prefix ++ (and --)operators ,and generalised it by adding a postfix version .Interestingly ,this short code -generation advantage is still true for recent languages .For example,in java ,integer increment would generate one instruction compared to the four instructions for adding 1 to the varable and storing it back .

This is the best book that I prefer to study while doing my Programming in C languge .If you want this the it is given below ,I have selected from my Amazon wish List: