You Are Viewing Tips and Tricks

Connecting DataBase to Netbeans IDE

Posted By vibhu on July 8th, 2010

http://magicalharsh.com/blog/connecting-database-to-netbeans-ide/

Netbeans is an IDE -a JavA editor provided by Sun Microsystem and it is open source (absolutely free!!)
From last few days i was having problem in my JDBC programming while connecting the ORACLE server to the Netbeans. But finally i have solved it by the help of my senior. But when i was surfing the solution on the internet,it is almost very difficult to search it on Google..and found some forums where where the same problem was discussed but no one tells the appropriate answer.. :( so i thought i should help my friends :) .
Generally in java we use only two database Oracle and Mysql,both vendor provides the jar files which contains classes for the jdbc-driver.I m going to describe both connectivity one by one . :)

ORACLE DATABASE


ORACLE DATABASE is very easy to install . I think you have already installed it i m just going to explain it’s connectivity with Netbeans

    First run the Netbeans IDE .and open the Service window..
    In service window click on Database expand it and the right click on the Driver ,then add new driver. It will demand for jar file .which is oracle14.jar browse it from C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\oracle14.jar
    Then right click on the database and then Add new connection it will pop-up a new window like below.:)

    You can fill the text boxes like shown in image or go to direct URL and paste this url jdbc:oracle:thin:@//localhost:1521/XE
    now click next and and then select the schema .. then OK. Now u will find a new driver by expanding the database. you simply right click on the driver and click connect ,it will ask for the password of the database then you can execute your sql command on the netbeans like this :

    Now it’s time for some jdbc programming , first to use sql queries in your programming you have to import oracle jdbc library to you library folder for this just Right click on the project library folder and then Add new Library, the oracle library will be not there you have to create it :( . for this go to create it will pop a window ,in name put oracle and select class library the add new jar file from C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\oracle14.jar then OK . library has been created select it and the the library will be added to your library folder.
    And to connect it from your program you have to put “jdbc:oracle:thin:@//localhost:1521/XE”; as your URL and “oracle.jdbc.OracleDriver” as your driver it’s simple :)

Now your Netbeans is ready Oracle Database Programming with JAVA

My SQL DATABASE


Now it’s turn for MySql database . it’s very simple to install and many of the student who learns database connectivity opt mysql as their database..is’t connectivity with Netbeans is very simple just few steps :)

    You don’t have to add new driver here ,it is provided by Netbeans. :) Just go to database the right click and add new connection a pop window show as below will appear: :)

    You can fill the boxes ,as shown in figure :) but first you have to create a database in your sql server. Or you cal select direct URL and put the following url jdbc:mysql://localhost:3306/dbforplacement(“dbforplacement” is my database name). Then click ok and it’s over .
    Now for JDBC programming you to Add mysql jdbc library to your library folder of your project for this just go to library right click on this and then Add new library .
    here you will find Mysql-jdbc library as netbeans provide it just add it and then ok :)
    Now in your program you have to use “jdbc:mysql://localhost:3306/dbforplacement”(“dbforplacement” is my database name) as the URL of the Database and “com.mysql.jdbc.Driver” as driver..

Now you are ready with MySql database server connected with Netbeans IDE to learn database programming in JAVA :)

you can comment below for your Queries.. ;)

DropBOx-share File smartly

Posted By vibhu on July 6th, 2010

http://magicalharsh.com/blog/dropbox-share-file-smartly/

DROPBOX is used for online back up file sharing and file synchronizing

    Oh !! I dn’t have the Pen drive ,and i want these file to be with me as i m leaving from the city :( .
    I m working on some project .and i want my partner to get program files in a sync manner and in a very fast way. :)
    I want online back up of my important files ..

The one and the very best solution till now is The DROPBOX. It work like a box in which u can put your files and the box is saved at internet. you are somewhere away from your system and want to work on these files ,now you can just work on it modify it you will found that it was modified on yous system also in a sync manner. :)
It is open source Software and can easily be downloaded at company’s website DropBox.com and easy to install at any Platform Windows ,linux or Mac .

After installing it you will see an icon at your desktop and you can make account of your email id .
it also create a folder as the child of your documents folder like this:-

you can make a new folder rename it and then put right click ,go to dropbox menu and make it share with other users to share it on internet with your partners.

FEATURES-

File Sync
Dropbox allows u to sync file to your computers through internet

    Sync files of any size or type.Automatically syncs when new files or changes are detected.
    Work on files in your Dropbox even if you’re offline. Your changes sync once your computer has an Internet connection again.

File Sharing
sharing of files can easily be done at internet or by your system with other users..

    Shared folders allow several people to collaborate on a set of files.And You can see other people’s changes instantly.
    You can control people to able to access the shared folder and can easily kick them .. ;)

Online backup
Dropbox back up your files automatically when you put those files on the dropbox folder

and tho other more like web access ,security and privacy ,mobile device access..and many more :)

Today many company use this dropbox in their project making and m also having full benefit . Just try it !!!!

More Information about Dropbox see Dropbox.com

Solving Counter Strike + IDM problem

Posted By Harsh Singh on November 2nd, 2009

http://magicalharsh.com/blog/solving-counter-strike-idm-problem/

The reason Counter Strike freezes when you have got IDM installed in your system is due to IEMonitor.exe ( which is used for browser integration )

Solution :

In Internet Download Manager, click Downloading -> Options -> General.

There, you have to uncheck the intergration for IE and IE based browsers and secondly, uncheck the “Run module for monitoring in IE-based browsers (MSN, Avant…)” and press Ok. <– This actually stops launching IEMonitor.exe and hence solves it all.

Remove gphone virus from the system :: Gtalk

Posted By Harsh Singh on June 2nd, 2009

http://magicalharsh.com/blog/remove-gphone-virus-from-the-system-gtalk/

Gphone.exe virus .

This is one of the most frequent virus nowadays that infects your Gtalk and Yahoo messenger by sending automated messages to your friends list .Gphone virus basically is a .exe file which looks like a folder and it can take any name of any other folder .
(more…)

Remove Status messages in Y! Messenger

Posted By Harsh Singh on January 11th, 2009

Remove Status messages in Y! Messenger


Open Registry Editor ( type regedit in Run and pree Enter )

Browse to HKEY_CURRENT_USER Software yahoo pager profiles {yahooID} Custom Msgs

delete everything except default … you are done … Cheers !!!

google talk freezes when using show current music track using winamp 5.5

Posted By Harsh Singh on November 25th, 2008

Google talk freezes when “show current music track”

At times when you use Gtalk with Winamp 5.5 version and set the current status in GTak to show current music track gtalk freezes. here is a solution to this problem.

Whenever you select the Show my current music track, Google talk either freezes or stops responding. This is actually a technical issue with Google talk or Winamp which is yet to be discovered but many users who have upgraded to Winamp 5.5 are facing this problem, so one of simple resolution for fixing this bug :

The solution is:

Step 1: Go to the root directory of Winamp where it is installed which is usually in C:Program FilesWinamp

Step 2: Select Tools->Folder Options->View (Tab) and uncheck the hide extensions for known file types and click Ok.

Step 3: Now create an empty file (Right click the mouse -> New -> Text document), so the default file would be like “New Text Document.txt”.

Step4: Rename the above file to “winamp.m3u” and save.

Step5: Close Winamp and Google Talk. Now open again and Your Show Current music track status should work

Type URL without mouse-click

Posted By Harsh Singh on October 3rd, 2008

Type URL without mouse-click

Press Alt+D on keyboard.

This allows you to enter a URL without the mouse click.

This will be helpful for the laptop users who find it uneasy to use their touchpad every time they want to type a URL.

retrieve password of memory card

Posted By Harsh Singh on August 11th, 2008

Make any icon / folder on your desktop invisible

Posted By Harsh Singh on August 6th, 2008

This is a trick by which you can make any icon invisible and can access it in the invisible state only ….. Its not altering the properties to hidden …… Here are the steps : 1. Locate the icon and then right click ….. go to properties …. then go to customize tab ….. there will be a transparent(invisible) icon as shown in the screenshot …. select it and click on Apply…..

2. Now rename the icon / folder

press ALT + 255 ………. (enter 255 from the right numpad with numlock off) …..

TADAA!!!!!

Speed up the Start Menu

Posted By Harsh Singh on August 6th, 2008

The default speed of the Start Menu is pretty slow, but you can fix that by editing a Registry Key. Fire up the Registry Editor and navigate to the following key:

HKEY_CURRENT_USER Control Panel Desktop MenuShowDelay

By default, the value is 400. Change this to a smaller value, such as 0, to speed it up.

If this doesn’t work for some reason, then you might try the following: Navigate to Display Properties then Appearance then Effects and turn off the option titled Show menu shadow. You will get much better overall performance.