Tuesday, March 31, 2009

How to Backup Registry??

1. Click on Start and then Run….
2.In the text box in the Run window, type regedit and click OK. This will open the Registry Editor program.
3.Navigate to the very top of the registry key branches until you reach Computer.
4.Highlight Computer by clicking on it once.
5.From the Registry Editor menu, choose File and then Export….
6.In the Export Registry File window that appears, choose a location to save the file in.
Note: I recommend choosing your desktop or the C:\ drive. Both are very easy to access if you run into problems later and need to use the file.
7.Locate the File name: text field and enter a name for the backup file.
Note: This name is for you to remember what the exported registry file is for. Since you're backing up the entire Windows XP Registry, I would recommend calling this file Registry Backup or something like that.
8.Click the Save button.
A Registration File with an REG file extension will be created in the location you chose in Step 6 and with the file name you chose in Step 7. Continuing the example from the last step, the file would be named Registry Backup.reg.
9.You can now make as many changes to any area of the registry that you want.
10.If after making your registry changes, you realize that they did not give you the results you were looking for, you can simply restore the entire Windows XP registry back to the point at which you backed it up.

Source: http://pcsupport.about.com/od/windowsxp/ht/backupxpreg.htm

Sunday, March 29, 2009

How to check whether the dataset is empty in rexx..

using a macro we can check whether the dataset is empty or not.
this is the main program calling the macro CHKSZ.

/*REXX*/
ADDRESS ISPEXEC "VIEW DATASET ('aaa.dataset')"
"MACRO(CHKSZ)"
ADDRESS ISPEXEC "VGET (SZ1) PROFILE"
IF SZ1 = 0
THEN SAY "EMPTY DATASET"
ELSE SAY "NONEMPTY DATASET" EXIT


MACRO(CHKSZ):
/*REXX*/
ADDRESS ISPEXEC "ISREDIT MACRO"
"ISREDIT (SZ1) = LINENUM .ZL"
ADDRESS ISPEXEC "VPUT (SZ1) PROFILE" "ISREDIT CANCEL"

Friday, March 27, 2009

New Twist in the Story

A man is flying in a hot air balloon and realizes he is lost. He reduces height and spots a man down below. He lowers the balloon further and shouts, 'Excuse me, can you help me? I promised my friend I Would meet him half an hour ago, but I don't know where I am.'
The man below says, 'Yes. You are in a hot air balloon, Hovering approximately 30 feet above this field. You are between 40 and 42 degrees North latitude, and between 58 and 60 degrees West Longitude.'
'You must be a programmer,' says the balloonist.
'I am,' replies the man. 'How did you know?'
'Well,' says the balloonist, 'everything you have told me is Technically correct, but I have no idea what to make of your Information and the fact is I am still lost.'
The man below says, "You must be a project manager."
'Yes, I am,' replies the balloonist, 'but how did you know?'
'Well,' says the man, 'you don't know where you are, or where You are going. You have made a promise which you have no idea how to Keep, and you expect me to solve your problem.'

Wednesday, March 25, 2009

Remove Flashing in Applet

Generally double buffering is used for removing the flashing. But is does not solves the problem 100%. Following tricks can be used to solve the flashing problem in animation.

1.Use Media Tracker for downloading the images.
2.Use double buffering.
3.Change the default background colour of the applet to the colour of you Canvas by using setBackground(Colour of the Canvas) in the init method of the applet.
4.In an animation if you are updating only part of a area use repaint(x1,y2,x2,y2) instead of repaint().

source: java-tips.org

Monday, March 23, 2009

Using execio to find a empty dataset

This is a simple program to find out the empty dataset.

/*rexx*/
INPUT = "AAA.DSN"
INPUT = STRIP(INPUT)
IF SYSDSN("'"INPUT"'") = "OK" THEN
DO
"ALLOC FI(INDD) DA('"INPUT"') SHR REUSE" "EXECIO * DISKR INDD (FINIS STEM X."
IF X.0 = 0 THEN SAY "DATASET IS EMPTY"
IF X.0 \= 0 THEN SAY "DATASET IS NOT EMPTY"
END
ELSE SAY "INPUT DATASET DOESNOT EXIST"

Saturday, March 21, 2009

Automatic Deployment in OC4J

The Application needs to be redeployed each time a change is done to the deployed archive for the changes to reflect. Redeployment can happen either manually or by restarting the entire instance. OC4J eliminates the need to manually redeploy or restart for the changes made to the deployed archive. This is done by OC4J Polling or Automatic Deployment.
Automatic deployment, or OC4J Polling is a task management feature that automatically checks for changes made to currently deployed applications and modules, and reloads those files that have been modified. This functionality is a tremendous benefit for developers, eliminating the need to go through the deployment process every time code is updated.
Configuration and Limitations are explained in the link :
http://download.oracle.com/docs/cd/E12524_01/web.1013/e12289/autodeploy.htm

Thursday, March 19, 2009

JAVA IDE JDK SDK

IDE: IDE is the acronym for Integrated Development Environment which is used for coding debugging and running our code.They also include GUI(Graphical User Interface) based drag and drop elements for form designing and also contains wizards for the shells of common form of code.
JDK: JDK is the acronym for Java Design Kit which is a command line based interface to JVM.We are responsible for our own editors to creating a code for GUI elements.Most of the IDE ’s come with JDK and also their own JVM and Class Libraries.
SDK: SDK is the acronym for Software Development Kit , typically a set of development tools that allows us to create applications for a certain software package, software framework, hardware platform, computer system and video game console.

Tuesday, March 17, 2009

Use Keyboard For Right Click !!!

If you are used to using the keyboard, and try to avoid moving your hands off the keyboard to the mouse, then you will love this tip!
You can bring up the context menu on any selected item by pressing "Shift-F10".
This is exactly the same as right-clicking with the mouse, and should work almost anywhere that right-clicking works.

Sunday, March 15, 2009

Info about the Process running on your System

Do you wanna know about the process that are running in your system.
For information about the process, please refer the below URL:
http://www.processlibrary.com/

Friday, March 13, 2009

Run java through batch file

While working with console based java compiler…its very tedious to write javac filename.java and then to run java filename each time you want to see the output.

A simpler(& very simpler) 'fix' to this is to create a batch file with parameters:
1) Goto Start - run - "cmd"(enter)
2) c:\>Documents and Settings\(ur employee ID)> (Now if u want to store your .java files here then skip goto step 5)
3) c:\>Documents and Settings\(ur employee ID)> copy con s.bat (enter)
cd\
e:
cd
(press Ctrl+Z) to save the file.
4) c:\>Documents and Settings\(ur employee ID)> s (enter)
5) e:\>(foldername)> copy con j.bat (enter)
javac %1.java
java %1
(press Ctrl+Z) to save the file.
And there u go. Each time you want to runa .java file again….
just follow the below steps:

1)Goto cmd - s(enter)
e:\>(foldername)> j filename (enter)
The file runs. Very simple….and yet effective!!!

Wednesday, March 11, 2009

Create a Shortcut to Lock Your Computer!!

To create a shortcut on your desktop to lock your computer:
Right-click the desktop.Point to New, and then click Shortcut.

The Create Shortcut Wizard opens. In the text box, type the following:
  • rundll32.exe user32.dll,LockWorkStation
  • Click Next.
  • Enter a name for the shortcut. You can call it "Lock Workstation" or choose any name you like.
  • Click Finish.
  • You can also change the shortcut's icon (my personal favorite is the padlock icon in shell32.dll).
  • To change the icon:Right click the shortcut and then select Properties.
  • Click the Shortcut tab, and then click the Change Icon button.In the Look for icons in this file text box, type:Shell32.dll.
  • Click OK.
  • Select one of the icons from the list and then click OK


You could also give it a shortcut keystroke such CTRL+ALT+L.
This would save you only one keystroke from the normal command, but it could be more convenient.


Note: If You still Find this as Difficult then Simply use the Key Stroke "Windows+L" to lock the computer.

Monday, March 09, 2009

Detect IP Address and Name in Java

java.net.InetAddress Class has a static method getLocalHost method which returns Object of localHost Then GetHostAddress Method Returns the IP address string in textual presentation. So in Your program use following line to print IP Address.

import java.net.*;
public class IPAdress {
public static void main(String[] args) {

try {
System.out.println(InetAddress.getLocalHost().getHostName());
System.out.println(InetAddress.getLocalHost().getHostAddress());
}
catch (UnknownHostException e) {
e.printStackTrace();
}
}
}

source: java-tips.org

Friday, March 06, 2009

Clean-up the RAM

Clean-up the RAM to make your system perform good
1.Open a notepad and type FREEMEM=SPACE(64000000).
2.Save the file as RAM.vbs and run the script.

Tuesday, March 03, 2009

Save your Nokia battery life

Do you guys know that there is a trick which may seem quite simple but is an effective way of saving your battery life.

First of all you have to lock your keypad and then you can click the left soft key or the red button(anyone or both may work). Doing so will immediately switch off the backlight of your cell phone.
Although this may seem so simple, it saves about 10% of your battery every time and this decreases the no. of times that you will have to recharge your batteries thereby increasing your battery life…

This works in all smaller handsets upto 6233.

Sunday, March 01, 2009

Converting URI to URL

This is a sample program to convert URI (Uniform Resource Identifiers) to URL (Uniform Resource Locator).

import java.net.*;
public class DemoConvertURItoURL {
public static void main(String[] args) {

URI uri = null;
URL url = null;
String uriString = "http://www.google.co.in/";
try {
uri = new URI(uriString);
}
catch (URISyntaxException e) {
e.printStackTrace();
}
try {

url = uri.toURL();
}
catch (IllegalArgumentException e) {
e.printStackTrace();
}
catch (MalformedURLException e) {
e.printStackTrace();
}
System.out.println("Original URI : " + uri);

System.out.println("Converted URL : " + url);
}

}

source: java-tips.org
Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory