Sunday, October 19, 2008

Java on Ubuntu

Ubuntu has GCJ installed by default. A different version of Java can be installed using the Synaptic Package Manager. Sun's Java 1.5 and 1.6 are available through the package manager.

The problem is, even after installing Sun's Java, GCJ is the default.
The default version of java can be changed using the update-java-alternatives command.
update-java-alternatives -l will give the list of all installed java packages.

example output:
java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun
java-gcj 1042 /usr/lib/jvm/java-gcj

update-java-alternatives -s java-1.5.0-sun will set Sun's java as the default.
For some applications like Ant, Tomcat to run, you nee to set the JAVA_HOME environment variable like below
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun

The above export can be put in /etc/bash.bashrc (for all users) or /home//.bashrc (for a particular user) so that JAVA_HOME is available on logon.

Friday, October 17, 2008

To remove shortcut icon arrows.

If you want to remove shortcut icon arrows. Then go to the Registry and do the follwoing activity.

Go to {HKEY_CLASSES_ROOT\LNKFILE], and delete IsShortcut.
Go to [HKEY_CLASSES_ROOT\PIFFILE], and delete IsShortcut.

Wednesday, October 15, 2008

Keys for formatting data

CTRL+SHIFT+^ - Apply the Exponential number format with two decimal places CTRL+SHIFT+# - Apply the Date format with the day, month, and year

CTRL+SHIFT+@ - Apply the Time format with the hour and minute, and indicate A.M. or P.M.

CTRL+SHIFT+! - Apply the Number format with two decimal places, thousands separator, and minus sign (–) for negative values

CTRL+SHIFT+& - Apply the outline border
ALT+' (apostrophe) - Display the Style dialog box

CTRL+1 - Display the Format Cells dialog box

CTRL+SHIFT+~ - Apply the General number format

CTRL+SHIFT+$ - Apply the Currency format with two decimal places (negative numbers appear in parentheses)

CTRL+SHIFT+% - Apply the Percentage format with no decimal places

Friday, October 10, 2008

Memory Allocation of JVM

While googling i found the below information which i want to share it here.

The follwoing code is to print Total,Free and Max memory allocated to JVM. it differs depends on the Java Environment.
Please have a look -


public class Memory {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println("The Memory Allocation to JVM ");
long totalMemory = ((Runtime.getRuntime().totalMemory()/1024)/1024);
long freeMemory = ((Runtime.getRuntime().freeMemory()/1024)/1024);
long maxMemory = ((Runtime.getRuntime().maxMemory()/1024)/1024);
System.out.println("Total Memory::"+totalMemory+"MB");
System.out.println("Free Memory::"+freeMemory+"MB");
System.out.println("Max Memory::"+maxMemory+"MB");
}
}

Friday, October 03, 2008

DJ Java Decompiler

DJ Java Decompiler is Windows 95/98/Me/NT/2000/XP decompiler and disassembler for Java that reconstructs the original source code from the compiled binary CLASS files (for example Java applets). DJ Java Decompiler is able to decompile complex Java applets and binaries, producing accurate source code.
DJ Java Decompiler is a stand-alone Windows application; it doesn't require having Java installed! DJ Java Decompiler is not just Java decompiler and disassembler but it is also a fully featured Java editor using the graphic user interface with syntax-coloring. Using DJ Java Decompiler is easy. Select Open and load your desired class file, or just double-click the CLASS file you want to decompile. DJ Java Decompiler supports drag-and-drop functions for OLE. You will see the source code instantly! In Windows Explorer Right mouse-button pop-up menu available too.
You can decompile or disassembler a CLASS files on your computer hard disk or on a network drive that you have a connection to (you must have a full access rights or just change the default output directory for .jad files). You don't need to have the Java Virtual Machine or any other Java SDK installed. But this latest release is able to compile, run, create JAR archives and run applets outside of the context of a Web browser when JDK is installed. With DJ Java Decompiler you can decompile more than one java class file at one time.

Friday, September 19, 2008

Increase ur internet Speed by another tricks

Increse ur internet Speed by another tricksFollow the step:-

Go to desktop->My computer-(right click on)->properties->then go HARDWARE tab->Device manager->Now u see a window of Device manager then go to Ports->Communication Port(double click on it and Open).



After open u can see a Communication Port properties.

Go the Port Setting:—-and now increase ur "Bits per second" to 128000 and "Flow control" change to Hardware.

Apply and see the result..

Monday, September 15, 2008

How to hide a file in image

How to hide a file in image -
1. Gather the file you wish to bind, and the image file, and place them in a folder. I will be using C:\New Folder-The image will hereby be referred to in all examples as fluffy.jpg-The file will hereby be referred to in all examples as New Text Document.txt
2. Add the file/files you will be injecting into the image into a WinRar .rar or .zip. From here on this will be referred to as (secret.rar)
3. Open command prompt by going to Start > Run > cmd
4. In Command Prompt, navigate to the folder where your two files are by typingcd location [ex: cd C:\New Folder]
5. Type [copy /b fluffy.jpg + secret.rar fluffy.jpg] (remove the brackets)
Congrats, as far as anyone viewing is concerned, this file looks like a JPEG, acts like a JPEG, and is a JPEG, yet it now contains your file.
In order to view/extract your file, there are two options that you can take
a) Change the file extension from fluffy.jpg to fluffy.rar, then open and your file is there.
b) Leave the file extension as is, right click, open with WinRar and your file is there

Speed Up Shutdown Time for WinXP

XP clear your paging file (pagefile.sys) of its contents whenever you shut down for security reasons. Your paging file is used to store temporary files and data, sensitive information, such as unencrypted passwords etc.
So if extreme security isn't required, then shut down XP without clearing your paging file by :-
1. Run the Registry Editor ( type regedit in Run and enter)
2. Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
3. Change the value of ClearPageFileAtShutdown to 0.
4.Close the Registry and restart your computer.
Now on while turning off XP , the paging file won't be cleared, and shut down will be more quickly.

Thursday, September 11, 2008

Difference between JDK and JRE

The "JDK" is the Java Development Kit. I.e., the JDK is bundle of software that you can use to develop Java based software. The "JRE" is the Java Runtime Environment. I.e., the JRE is an implementation of the Java Virtual Machine which actually executes Java programs.

Typically, each JDK contains one (or more) JRE's along with the various development tools like the Java source compilers, bundling and deployment tools, debuggers, development libraries, etc.

Tuesday, September 09, 2008

Determine when the web-page last updated

You can determine when the web-page was last updated.
To find this date and time, type the following script in the Internet Explorer's address bar and press enter key.
javascript:alert(document.lastModified)

Friday, August 15, 2008

Move mouse cursor without touching mouse

Do u feel hard to handle your mouse? Or your mouse wheel is not rotating well?
You can move your mouse cursor with keyboard itself.
To activate this Press Alt + Shift + Numlock.
You will get a mouse keys dialog.
You can do the settings(Configure your mouse speed,etc) in this box and click Ok button.
Use number pad keys 1,2,3,4,5,6,7,8,9 to control the mouse cursor.
For example, pressing numberpad key 5 will do the left-click
Pressing the + key will do double click
Pressing insert key will hold the mouse cursor
Pressing delete key will release the mouse cursor
To deactivate moving mouse cursor using keyboard , just press numlock.

Tuesday, August 05, 2008

Uses of F4 key

Below are the uses of F4 key.
1) Pressing F4 key will move the keyboard cursor to the address bar(Both in windows explorer and Internet explorer) and also drop down the address combo box.
2) Pressing Alt + F4 will close the application. If no application is opened, the shutdown dialog box will be opened.
3) Pressing Ctrl + F4 will close only the currently opened document in the application. (For example, if you have opened two pdf document in the acrobat reader, only the currently viewing pdf document will be closed and not the acrobat reader application).

Wednesday, July 30, 2008

Locate ATMs at ur location

ATMLocator is a free service from VISA that lets you instantly locate nearby ATM Cash Machines in almost any country worldwide. It's quite straightforward, just select the country from drop-down menu, then enter a city name, and a zipcode (optional). ATMLocator will locate nearby ATM machines and list address details for each of them.


To use this service, please click the link below.
http://visa.via.infonow.net/locator/global/

Monday, July 21, 2008

WORK INDEPENDENTLY WITHOUT MOUSE (RARE WINDOWS SHORT-CUTS)

I have given below some rare windows shortcuts. With this we need not always depnd on mouse.
To open the below programs, we can type the following commands in the run window.

Add or Remove Programs - appwiz.cpl
Add New Hardware - hdwwiz.cpl
Adjust date and time - timedate.cpl
Add environment variables - sysdm.cpl
Add fonts - fonts
Open Visual Studio.Net - devenv
Open Visual Studio - msdev
Open internet options - inetcpl.cpl
Open desktop properties - desk.cpl
Open paint - mspaint
Open MSWORD - winword
open MSEXCEL - EXCEL
open MSPOWERPOINT - POWERPNT
open MSACCESS - MSACCESS
open infopath - INFOPATH
Mouse properties - main.cpl
keyboard properties - main.cpl keyboard
User Accounts - nusrmgr.cpl
Internet explorer - iexplore
Windows explorer - explorer
Sounds and Audio devices - mmsys.cpl
Regional and Language options - intl.cpl
PowerOptions - powercfg.cpl
Phone and Modem options - telephon.cpl
Network Connections - ncpa.cpl
Accessibility Options - access.cpl

Saturday, July 12, 2008

Use Alt + D to go to address bar

In internet explorer, while viewing a page, normally we will use mouse to go to the address bar for changing the address.
Now try pressing ALT + D, the control will go to the address bar, and the link in the address bar get selected. So without moving mouse and then typing the new address, just we can type ALT + D and then type the new address.

Monday, July 07, 2008

Web Site Certificates

Can you please go over what Web site certificates are?
First of all, if a certain company or organization wants their Web site to use encryption and be secure, they must obtain a site (or host) certificate. If they don't, they will not be registered as a secure Web site. So, how do you tell if a site is secure or not? Well, we've gone over this before, but let's cover it one more time, just to be sure we're all on the same page. There are two things you can check on to find out if a site is secure or not. The first is a little yellow padlock in the bottom right corner of your Web browser. The padlock should be closed (locked) as well. The second is how the Web site's URL reads. On a secure site, the very beginning part will always be "https," rather than just "http." That extra "s" makes all the difference when it comes to security.
So, if you're visiting a site and you see either of those things, the site will have a certificate. You can view the certificate by double clicking the yellow padlock. Once you do that, a certificate dialogue box will pop up and you can read all about it. It will tell you the purpose of the certificate, who it's issued to, who it was issued by and when it expires. (If the site you're on just uses the "https" method, just double click in the area where the padlock usually sits. Doing that will bring up the same certificate box for you). For example, when you purchase something from online software store, the checkout page is secure. If you double click the padlock on that page, you will be able to see our certificate.
Another way you can view a site's certificate is through your browser's menu options. In Internet Explorer, go to File, Properties and then click on the Certificates button. The same dialogue box will then come up for you. In Firefox, go to Tools, Page Info and then click on the Security tab. You can then click on the View button to see that site's certificate. That may be an easier way for you to access the certificate information.

source: From internet.

Tuesday, June 17, 2008

Regular expression

A regular expression is a pattern describing a certain amount of text or a regular expression is a set of characters that specify a pattern. Regular expressions are used, when you want to search for specify lines of text containing a particular pattern. A regular expression matches specific word or string of characters. You can search for words of a certain size. You can search for a word with four or more vowels that end with an "s."

There are three important parts to a regular expression. Anchors are used to specify the position of the pattern in relation to a line of text (like ^ indicates the character(after ^) should be at the beginning of string and $ indicates character(before $) should be at the end of string ). Character Sets match one or more characters in a single position like [a-z] means any single alphabet(lower case) and [0-9] any digit between 0 to 9 .

Modifiers specify how many times the previous character set is repeated like * represents zero or more times and ? means one or more times.

For example:^AD*B$ matches a string that starts with ‘A’ and ends with ‘B’ and should contain zero or more ‘D’s like AB, ADB, ADDB, ADDDB…..

Regular expressions are case sensitive.

There are some operators like:
\w - Matches a word character
\W - Matches a non word character
\s - Matches a space, a new line character or a tab
\d - Matches a digit character

References:
http://www.regular-expressions.info/tutorial.html http://www.grymoire.com/Unix/Regular.html http://www.2150.com/regexfilter/Documentation/regular_expressions.asp

Wednesday, June 11, 2008

Motherboard Cleaning Tips

Motherboard is the main part of your computer that contains all hardware components. Your computer motherboard could fry, if you do not keep it clean on periodically basis. Dust is the main cause to heat up your system and heat link to hardware failure. You can save your computer maintenance cost if you clean your computer on the regular basis. This will improve the cooling and performance of the motherboard components.

  • To clean your motherboard first unplugs your system power from the electrical outlet.
  • Using the screwdriver remove the side covers of your computer case and put them to one side.
  • Check all data and power cables connections. Inspect all motherboard PCI and AGP slots.
  • Remove all add-on card of your motherboard for example RAM, modem, VGA, sound card and LAN card.
  • Now blow the air around all the motherboard sides and keeping away your blower nozzle 4 to 5 inches away from main board components. You can use vacuum cleaner also for this purpose but compressed air is the better solution to clean a system.
  • At the end assemble back all cards, cables and side covers of your system.
  • I recommend you doing this after every three months if you want to save your system life.

Source: Gathered from Internet, while browsing through a Site.

Wednesday, April 30, 2008

Speed up your slow internet connection

Today a special tip for those who are still using any slow dial-up internet connection due to unavailability of any broadband connection in their area. The Web Accelerator application designed to provide the full acceleration for your routine web sites browsing. With the help of Web Accelerator you can browse your internet 4 to 6 times faster than normal dial-up connection. Basically this services compressing the website text data, images and heavy graphics to open or download this data with high speed.

This technique is more useful for static websites and for email applications but don't accelerate with secure and downloading audio or video files. Some good web accelerator retains your system cache to reuse websites with faster speed and can also block windows pop-up. If you are using FTP sites and downloading any program using dial-up, then web accelerator is not for you. There are various web accelerator software are free available on internet, visit and download it to enjoy your connection.

Wednesday, April 16, 2008

Wheel Mouse Tricks

Have you ever found yourself on a web page with a font so tiny it was almost unreadable? Well, don't strain your eyes a moment longer.
Next time you visit a page like that, hold down your CTRL key and roll the wheel on your wheel mouse. You'll find that you can increase / decrease the font size as fast as your finger can spin that little wheel.
Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory