Sunday, February 22, 2009

PDF Search Engine



Download PDF



Download E-Books

Free e-Book: Linux Command Line and Shell Scripting Bible



Covering the most popular Linux shells (such as bash, ash, tcsh, ksh, korn, and zsh), this reference book shows how to use commands to create scripts within each shell and demonstrates practical applications for shell scripts (including retrieving information from Web sites and sending automated reports via e-mail). For each shell, the author discusses the commands available and explains how to use these commands to create scripts that can automate common functions and reports. It also features advanced topics such as using a database and Web programming.

Features in a Nutshell

  • Understand the Linux desktop and various command-line parameters
  • Learn filesystem navigation, file handling, and the basics of bash shell commands
  • Write shell scripts to automate routine functions and reports
  • Harness nesting loops and structured commands
  • Monitor programs, master file permissions, and make queries
  • Run scripts in background mode and schedule jobs
  • Use sed, gawk, and regular expressions
  • Explore all alternate shells, including ash, tcsh, ksh, korn, and zsh

Download

[Source: bigdownload.blogspot.com]


Thursday, February 19, 2009

How To Swap Integer (and String) Variables Without Using a Temporary Variable

Say x & y are the integer variables. The challenge is to swap them without using a temporary variable.

The solution is as simple as the problem itself:
x = x + y;
y = x - y;
x = x - y;

Update 1: Jack and Alexey pointed out a typo in my solution which has since been corrected. Please see their comments below.

The simplicity of the solution appeals to me. It clearly demonstrates the meaning of assignment operator ( "=" ).

What if they are Strings?
Note: You can use String methods in Java API.

Here is the solution:
x = x + y;
y = x.substring(0, x.indexOf(y));
x = x.substring(x.indexOf(y) + y.length());

Can you see the similarity?

Can you provide a simpler solution to either of the above?

Update 2: Robert just did (see his comment below). He pointed out that the String solution doesn't work when one string is contained in another. His solution is:

x = x + y;
y = x.substring(0, x.length() - y.length());
x = x.substring(y.length());

Free Java Utility To Touch Files (Cross Platform)

This is a simple commandline Java utility which I wrote down in under 5 minutes to help in checking-in (svn commit) over 500 files which were modified but the dates weren't changed due to an error in our settings. So subversion failed to recognize it. Anyway this simple utility updates the timestamp of any file(s) and directories recursively to current time. It is extremely fast and cross-platform. It does one job and does it well. It is named after the unix utility touch, with similar functionality.


You can run it as follows:
java -classpath . Touch *.html

Replace *.html with file name(s) and directories you want to update. This requires JDK 1.5 or later.







import java.io.File;

/** Super-fast file / directory(recursive) touch.
* It doesn't ask for confirmation.
* Arguments: File / Directories to touch to current time.
*/
public class Touch {
public static void main(String ... args) {
long time = System.currentTimeMillis();
for(String fileName:args) touch(new File(fileName), time);
}

/** Recursively touch file and directories.
* @param File (file or directory) for touching.
*/
public static void touch(File file, long time) {
if(file.isDirectory()) for(File childFile:file.listFiles()) touch(childFile, time);
file.setLastModified(time);
}
}
/** Super-fast file / directory(recursive) touch.
* It doesn't ask for confirmation.
* Arguments: File / Directories to touch to current time.
*/
public class Touch {
public static void main(String ... args) {
long time = System.currentTimeMillis();
for(String fileName:args) touch(new File(fileName), time);
}

/** Recursively touch file and directories.
* @param File (file or directory) for touching.
*/
public static void touch(File file, long time) {
if(file.isDirectory()) for(File childFile:file.listFiles()) touch(childFile, time);
file.setLastModified(time);
}
}
/** Super-fast file / directory(recursive) touch.
* It doesn't ask for confirmation.
* Arguments: File / Directories to touch to current time.
*/
public class Touch {
public static void main(String ... args) {
long time = System.currentTimeMillis();
for(String fileName:args) touch(new File(fileName), time);
}

/** Recursively touch file and directories.
* @param File (file or directory) for touching.
*/
public static void touch(File file, long time) {
if(file.isDirectory()) for(File childFile:file.listFiles()) touch(childFile, time);
file.setLastModified(time);
}
}
/** Super-fast file / directory(recursive) touch.
* It doesn't ask for confirmation.
* Arguments: File / Directories to touch to current time.
*/
public class Touch {
public static void main(String ... args) {
long time = System.currentTimeMillis();
for(String fileName:args) touch(new File(fileName), time);
}

/** Recursively touch file and directories.
* @param File (file or directory) for touching.
*/
public static void touch(File file, long time) {
if(file.isDirectory()) for(File childFile:file.listFiles()) touch(childFile, time);
file.setLastModified(time);
}
}

How To Flip English Text Using Unicode - ǝpoɔıun ƃuısn ʇxǝʇ ɥsılƃuǝ dılɟ oʇ ʍoɥ

Enter Your String and Click On FLIP

How To Split Java String By Newlines



Splitting a String by newline is a common requirement. When processing textual data from files or from web we need to split the data by newline boundaries. The solution aren't hard either. Let's see a simple one liner solution using String.split().

String[] poList = pos.split("\r\n|\r|\n");

What did I do?
I am splitting the String based on a regular expression which looks for carriage return (\r) or line feed (\n) or carriage return immediately followed by line feed. These takes care of all types of newlines you may encounter. It returns, as you can see, a String array of results. Trailing empty strings are not included in the resulting array.

What's interesting?
The following will include a whole bunch of empty Strings in the result.
String[] poList = pos.split("\r|\n|\r\n");

Can you tell why?
How many alternatives can you tell like using StringTokenizer for example?

Java Runtime.Exec() Guide




Everything you ever wanted to know and should know about Java Runtime.exec().

This old but still golden article is an excellent guide to using Runtime.exec(). The key points he discusses are:
1. You need to drain the input stream to prevent because failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.

2. Use waitFor() instead of exitValue() when you want to wait for the process to finish.

3. Runtime.exec() wouldn't directly execute shell commands like dir / ls, copy / cp etc. You need to invoke the shell cmd.exe / bash / sh and pass the shell commands. For example in windows your command array to execute dir would be as follows:
cmd[0] = "cmd.exe" ;
cmd[1] = "/C" ;
cmd[2] = "dir";

Personally I have successfully used Runtime.exec() on several occasions. Any C programmer should quickly find equivalence with fork and system calls in C language. As always RTFM.

AJAX-Javascript File Upload Form



Ext extension UploadForm is a new extension to easily upload multiple files from web interface to a server.

The files are added to a queue first and then uploaded. The live file upload status and statistics are shown. The extension is pretty stable and usable. You can see a demo here. It is based on high quality Ext framework and hence is cross browser compatible.

The server side of the code is not provided. So it is for you to explore and find. A sample server side implementation say in PHP or Java is what is missing from this otherwise excellent piece of work.

Details here.

How To Speedup Java Over 100%



Java is used either for long running server side applications / application servers or for running short scripts. Let's look at how you can speed-up both these type of applications.


How to speed-up server-side Java applications

It is very simple really. Just add -server after the java command like this:
java -server HelloWorld

Replace HelloWorld with your application name. That wasn't so hard was it?


How to speed-up client-side Java applications

Download and install nailgun. You may want to read the quickstart guide for details.

Nailgun is a simple application server which allows you to run Java programs rapidly through the server instance. The nailgun client (ng for linux and ng.exe for windows) is a small c program which works on both windows and linux platforms. To run Java applications you just have to substitute ng (assuming it is in path) for java. ng reduces startup time by running programs from the same instance. However it uses socket connection for communication which can be further optimized.
Let's see how much ng improves the performance for simple client side applications.

Here is a simple HelloWorld program I ran using java:

[angsuman@jaguar project]$ time java HelloWorld
Hello World!

real 0m0.107s
user 0m0.049s
sys 0m0.012s

Here is the same program run using nailgun:

[angsuman@jaguar project]$ time ../software/nailgun-0.7.1/ng HelloWorld
Hello World!

real 0m0.002s
user 0m0.000s
sys 0m0.001s

Can you see the difference?

Here is the result of running helloworld in C (compiled with gcc):

[angsuman@jaguar project]$ time ./hello
Hello World!

real 0m0.001s
user 0m0.001s
sys 0m0.001s

I am using:

[angsuman@jaguar project]$ java -version
java version "1.6.0_01″
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Server VM (build 1.6.0_01-b06, mixed mode)

The Java code is:

public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}

The c code is:

#include
int main(void)
{
printf("Hello World!\n");
}

Let's finally put to rest the myth that "Java is slow".

Fun Java Programming Puzzles

How To Get Java Source Code Line Number & File Name in Code



While debugging code Java programmers often use System.out.println(). It is important to write separate message in each System.out.println() so you can understand from the output where the problem lies.

Now it is time-consuming and somewhat tedious to invent new message for each System.out.println() debug message. What if you could call methods which allows you to print the current file name and line number?

That would automatically ensure unique message in every System.out.println(). Also it will help you to immediately pinpoint the offending code. You can copy-paste something like this anywhere in your code (embellish it with more topical information as needed) and be able to pinpoint its location:

System.out.println(getFileName() + ":" + getClassName() + ":" + getMethodName() + ":" + getLineNumber());

I will show the implementation of getLineNumber() below and leave the rest as an exercise:



/** Get the current line number.
* @return int - Current line number.
*/
public static int getLineNumber() {
return Thread.currentThread().getStackTrace()[2].getLineNumber();
}




Have you noticed the magic number - 2? Can you explain it?

How to suppress unchecked warnings in Java




The best way to suppress unchecked or other warnings is to fix the cause of the warning. However in some rare cases, the warning is incorrect and there is no logical way to solve it without compromising the intended functionality. For such cases there is a simple solution:

Add the following just before the method definition:

@SuppressWarnings("unchecked")

This stops any unchecked warnings from the code within the method.

15 Google Search Features You Must Know



15 Google Search Features You Must Know


Google search is undoubtedly the most helpful and widely used search engine in the world. Whoever you are, if you use internet then you must have used Google every time you have logged in. Such is the utility of the Google that it has become synonymous with the word internet. Did you know that Google search offers many more things than just presenting you with your relevant search topics? You can find almost all the necessary information from Google search. Today, I am going to tell you about 15 features which can help you in numerous ways. They will update you about time zones, tell you about latest weather, football scores, even help you in doing maths. So let's get started.

1. Weather

To see the weather for any city, type "weather" followed by the city and state.

Type weather California to know the weather there. It can prove to be very valuable if you are going for a short trip to some place and you need to know if your trip is going to be brighter or not.


2. Stock Quotes

To see current market data for a given company or fund, type the ticker symbol into the search box. On the results page, you can click the link to see more data from Google Finance.

Type CBS and you can see the stock options of CBS from Google search. An absolute delight for share market followers and financers.


3. Time

You must have known this. To see the time in many cities around the world, type in "time" and the name of the city.

Type time Mumbai and you will be provided with IST at ease.


4. Sports Scores

To see scores and schedules for sports teams type the team name or league name into the search box.

Type san francisco 49ers and see for yourself.

5. Calculator

Now solve any big homework or numerical problem at ease. It even supports basic functions like sqrt and etc.

Type 6*9+10 or whatever, and get the result. A delight for quick accountants and students.

6. Book Search

If you’re looking for results from Google Book Search, you can enter the name of the author or book title into the search box and they return any book content as if your normal web results. You can click through on the record to view more detailed info about that author or title. I suppose you know this for sure.

7.Unit Conversion

Yes, Google support unit conversion as well. You can use Google to convert between many different units of measurement of height, weight, and mass among others. Just enter your desired conversion into the search box and get the result.

Type 32 C in F to convert 32 degree Celsius temperature into Fahrenheit.

8. Dictionary

To see a definition for a word or phrase, simply type the word "define" then a space, then the word(s) you want defined.

type define delusion to get the result.
9. Spell Checker

Yes there is a spell checker option too. It notifies you right at the time when you have made a typo and also suggests you the possible remedy.

type Sttring and you will be suggested with string, which is the right word.

10. Local Search

If you’re looking for a store, restaurant, or other local business you can search for the category of business and the location and it return results right on the page, along with a map, reviews, and contact information. It is very useful if you are new to a place but need places to visit.

Type Continental food 02138 to find the rest.

11. Movie Showtime

To find reviews and showtimes for movies playing near you, type movies or the name of a current film into the Google search box.

Though I am not sure about this option. I tried searching for some movies but without much success about their showtimes.

12. Find Your House

Suppose, you want to find yourself a new house in your locale or to a place you will be shifting soon. So what do you do? Type homes cityname and you will get all the real estate information.

Type homes LA for an experiment

13. Flight Status and Information

If you are at home and want to know about certain flight and status, you can use say american airlines 18 to know about that flight and its status and further information.

14. Currency Conversion

Its not only about unit. You can check your currency converted to other currencies as well.

Type 100 INR to USD and see the result.

15. Plus (+) operator

Google ignores common words and characters such as where, the, how, and other digits and letters that slow down your search without improving the results. Basically most of the conjunctions and prepositions are overlooked and so are the verbs too. If a common word is essential to getting the results you want, you can make sure we pay attention to it by putting a + sign in front of it.

Type He me +and you and every word will be searched, leaving none.

16. Bonus Tip:

Sometimes the best way to ask a question is to get Google to fill in the blank by adding an asterisk (*) at the part of the sentence or question that you want finished into the Google search box.

Type Edison invented * or tendulkar has * test runs to get the exact result.
Conclusion

That is not all. You can also get area codes, maps, related search sites and etc from Google Search. It not only searches for the topics you want to consult but also provides you with handful information within a fraction of a second. Explore it and let us know about anything you wanna add. Happy Googling.

[Source: google.com]

How to Solve: Registry Editing Has Been Disabled By Your Administrator



Registry Editing Has Been Disabled By Your Administrator

if yes then you need not to worry. There are two solutions for this.

Solution-1:

  • Go to Start -> Run –> type gpedit.msc
  • In the left hand menu, go to User Config –> Administrative Templated –> System.
  • Now In the right hand pane, select “Prevent access to registry editing tools”. It will probably be not configured or enabled. If it’s enabled, disable it and if it’s not configured, first enable it, apply settings and then disable it. Most probably the settings have been applied instantly. If not, then run gpupdate in command prompt to apply the group policies.

Solution-2:

This is a very simple trick.

  • Go to Start -> Run -> type
    REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f
  • Press Enter and you are done!

How To Solve- Task Manager has been disabled by your administrator



Task manager is a very strong utility tool for Windows users. You can see the processes, prioritize them, end inactive or non-responding processes and many more things. But suddenly one day you get this error message like,

Task Manager has been disabled by your administrator

Don't worry. There are not 1 but 4 ways to deal with this problem.

Solution-1

Click Start, Run and type this command exactly as given below:
Better copy and paste it to be exact.

Solution- 2:

* Click Start, Run and type Regedit.exe
* Navigate to the following branch:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies\ System

* In the right-pane, delete the value named DisableTaskMgr
* Close Regedit.exe

Solution- 3: (recommended for XP users)

* Click Start, Run, type gpedit.msc and click OK.
* Navigate to this branch:

User Configuration / Administrative Templates / System / Ctrl+Alt+Delete Options / Remove Task Manager

* Double-click the Remove Task Manager option.
* Set the policy to Not Configured.

Solution- 4:

If you find it troublesome to do anything with the registry or settings all by yourself then just download and run this REG fix and double-click it and you are done!

[source: windowsxp.mvps.org]

How to Put Your Name in Windows Properties Page



Do you want to change Windows name to yours. Then follow the trick. This trick will enable you to show your name in the Windows Information page. Whatever you put, will be seen as the properties section of My Computer. Surprise your friends and others with this one.

Trick

  • Open notepad and copy the following lines into it and save it with the name OEMINFO.INI in the c:\windows\system32 directory:

[General]
Manufacturer=Your Name Here
Model=Your Model Here
[Support Information]
Line1=Your Name
Line2=Your Address
Line3=Your Email Address

  • Save the file,
  • Right click on my computer select properties,
  • In the general tab, a button will be highlighted (support information) click on it, you will be able to see the changes.
  • Now if you want to display some more information then simply increase the line in the file.

Ex: Line4=Your Working Hours

How To: 5 Extremely Easy Ways to Convert a Word Document to a PDF File



There have been times when we needed a PDF file to edit. So we have converted that to a word document with the help of hundreds of free software across the internet. But what if you need a word document to be converted to PDF? If you love to read through the computer screen then PDF is always the best option. So is it for print-outs. Here are 5 easy ways to let you convert a word document to a PDF file format.



1. Using Open Office

1. Download OpenOffice from openoffice.org

2. Install it to your computer.

3. Open the Word document you want to convert.

4. From the main menu select File > Export as PDF (There is also an export to PDF button right on the main taskbar.)

5. Choose a filename for your PDF.

6. Choose the options you want, or just hit save/ok.



2. Using Online Converter

1. Go to ExpressPDF

2. Click 'browse' and select the file on your computer.

3. Click 'Convert to PDF' and wait for it to process.

4. They will send the link to your PDF file to your e-mail inbox.

5. There are also printpdf.com and doc2pdf.net. You can try them too. But I chose it only because its fast, secure and more importantly supports upto 20 MB of file size to convert to PDF which others don't.



3. Using Google Docs

1. Backup your file

2. Go to docs.google.com

3. Click upload

4. Click browse

5. Select the file you would like to convert

6. Click the upload button

7. Under the file menu; on the far left, under the Google logo select save as PDF. Though there have been complaints that the saved file differs from the actual. The conversion is not centpercent error free.



4. Using Media Convert

1. Go to media-convert.com

2. Click 'browse' and find the file you want to change to a PDF.

3. Leave the input as auto detect.

4. Go down to output and select PDF.

5. Click Convert and wait for it to process.

6. Download your freshly created PDF.



5. Use a Utility like PDF995

1. There are 2 little files to download and install, a printer driver and the converter.

2. Download from pdf995.com/download.html

3. Save to your favorite downloads location, such as c:/downloads

4. Double click on each zip file to uncompress and install

5. To use it, you open any document, and choose PDF995 as the printer.

6. So, in Word, do File> Print. then change the printer to PDF995.

7. This will actually print to a file, so choose the save location.

So here are 5 extremely easy ways to convert a doc to a PDF. Did you like it? Do you have more to share? Please feel free to do so.


How To Lock Your Folder without a Software



Windows makes every thing too personal to be comfortable sometimes. Linux is still not an option to consider for many. So, is there a way to make your private information really private? Do you wanna lock and password protect some files inside a computer that can not be viewed by others? Of course you have software for that. But why would you like to have a software which can easily be done by a few tweaks. Here is a simple trick.

Trick

1.Suppose you have a folder named mhm in D:\mhm

2.In the same drive next to the folder create a new notepad file with the exact statement
ren mhm mhm.{21EC2020-3AEA-1069-A2DD-08002B30309D}

3.Now save this text file as loc.bat

4.Create another notepad file and type
ren mhm.{21EC2020-3AEA-1069-A2DD-08002B30309D} mhm

5.Save this as key.bat

6.Now there are two batch files . Double click loc.bat and your folder will change into Control Panel and the contents inside the folder will not be obtainable simply.

7.To open the folder double click key.bat and you get back your original folder .

8. If you want, keep the file key.bat at some other place. Whenever you need to access that folder just copy and paste the file at the previous location and double click.

Isn't it simple but effective?

How to Recover Windows Vista and XP Product Key if Forgotten or Lost

Windows users are used to formatting and re-installing Windows Vista or Windows XP. But a genuine problem may arise if you lose or forget the product key you are given. Windows don't actually save the key you enter in its crudest form. Its encrypted and hidden inside the registry and you can not hunt it down unless you know how. So you must be wondering, HOW? Here is how.

  1. First download Magical Jelly Bean Keyfinder. Its a freeware open source utility that retrieves your Product Key (cd key) used to install Windows from your registry. It allows you to print or save your keys for safekeeping.
  2. Run the key finder program. Follow any instructions provided by the software.
  3. The numbers and letters displayed by the program represent the Windows Vista product key. The product key should be formatted like xxxxx-xxxxx-xxxxx-xxxxx-xxxxx - five sets of five letters and numbers.
  4. Write this key code down exactly as the program displays it to you for use when reinstalling Windows Vista.

So you got the lost or forgotten product key, right? Keep it safe.

How To: Launch Any Windows Application Through Keyboard Shortcuts


Do you frequently need a calculator for applications you do in your Windows?

Do you find it annoying enough to hunt down the audio recorder every time from the Start Menu?

-Well don't worry. You have used Windows+E to launch the explorer, now you will do it for all the appications too. Here is a very simple trick which will allow you to launch any Windows application at the touch of a button.

Setting up a keyboard shortcut for any application in your start menu is fast and simple. Steps below explain how to create program shortcuts in Windows:

  • Navigate the start menu to the application you want to shortcut. In this example, we will create a shortcut for the Calculator (one that I use all the time).
  • Right-click on the application, and click on Properties.






  • field titled Shortcut key. Go to that field and type the letter C (or any other key you wish to use to launch the Calculator).
  • Click OK

Now, whenever you want to quickly launch Calculator, just hit Ctrl-Alt-C (or whatever key you chose). I use application launch shortcut keys all the time for Calculator and Notepad. You can use it for those programs you constantly use and are sick of navigating through the Start menu to launch.

[Source: stupidsite.org]

How to Hide A File inside an Image



How about a simple trick that hides a file in an image? Yes I will give you a simple tip which will hide a file inside an image. So much so that the image file will be a JPEG, look and act like a JPEG too. You can fool your friends or anyone with this trick.

Trick

1. Gather the file you wish to bind, and the image file. Place them in the same folder.

Please note:

* I will be using C:/ New Folder for an e.g.
* Lets say the image file name is image.jpg
* The text file is named as text.txt

2. Add the file/files you will be injecting into the image into a WinRar .rar or .zip. Let's say the RAR file is trick.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 typing
cd location [ex: cd C:\New Folder]

5. Type copy /b image.jpg + trick.rar image.jpg

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.
How to View/ Extract the File Again

* Change the file extension from image.jpg to image.rar, then open and your file is there
* Leave the file extension as it is
* Right click, open with WinRar and your file is there.

Cool?

How to: Two Ways to Protect Your Pen Drive from Viruses



You must have had some annoying moments with USB pen drives viruses at some point of your life. Its so frequent that its considered to be normal by some. So how can we protect ourselves from this chronic irritation? I know nothing is fool proof but, with better tactics and preventions, you can save a lot of time and important data inside your pen drive once and for all. So here are two ways.

1. Make Use of Software Restriction Policy

Use software restriction policy in group policy. This one can only be used in WINXP Pro and Vista Permium and the higher. You can restrict the access of all the programs or executable files in USB pendrive through this policy.

When you want to access the executable files you are sure of no harm, you can turn off the restriction. This is a wonderful way to protect your pen drive from viruses.

2. Force Folder

Use the "Force Folder" feature in Sandboxie. This feature will make all the program / executable files in the folder you have chosen to run in Sandbox. For example, the drive of your USB pendrive in your computer is F:. Then you can set F: as force folder, and all the programs in F drive will be run in Sandbox. To know more about Sandboxie, please pay them a visit.

[Source: greatskills.blogspot.com]

How to Recover MySQL Root Password



Do you want to recover the MySQL root password. its by no means, easy. But its quite simple if you follow the procedure. You will have to follow this step-by-step processes.

  1. Step 1: Stop the MySQL server process.
  2. Step 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for a password.
  3. Step 3: Connect to the MySQL server as the root user.
  4. Step 4: Set a new root password.
  5. Step 5: Exit and restart the MySQL server.

Here are the commands you need to type for each step (log in as the root user):

Step 1 : Stop the MySQL service:

# /etc/init.d/mysql stop

Output:

Stopping MySQL database server: mysqld.

Step 2: Start the MySQL server w/o password:

# mysqld_safe --skip-grant-tables &

Output:

[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started

Step 3: Connect to the MySQL server using the MySQL client:

# mysql -u root

Output:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Step 4: Set a new MySQL root user password:

mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

Step 5: Stop the MySQL server:

# /etc/init.d/mysql stop

Output:

Stopping MySQL database server: mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6186]: ended

[1]+ Done mysqld_safe –skip-grant-tables

Now Start the MySQL server and test it:

# /etc/init.d/mysql start
# mysql -u root -p

[MySQL command sources: howtoforge.com, Million thanks to them]

How to Install Windows 7 using USB Memory Stick



Windows 7 is doing really good with the netbooks. With me using HP Mini 2140 running on VIsta, Windows 7 beta was a welcome chance. What mattered was, how I replaced the pre-installed Vista to install the Windows 7 Beta. The real concern was that my machine lacked a built in media drive or even I didn't have an external USB DVD drive. But I got it done with a simple hack. Take this.The trick was simple.

Step 1

To begin with I had my 4GB USB 2.0 reformatted to FAT 32.

Step 2

The next step was to copy the contents of the Windows 7 Beta ISO image to the memory stick using

xcopy :\*.* :\ /e /f

(e:was my DVD drive and f: the removable drive )

The installation was not just easy but as quick that I could have clocked the time. It was much faster than those DVD installations on Desktops.

I must add, with Windows 7 it was a better netbook experience than previous operating systems.

How To Prevent Spam Mails from Orkut



I am sure that you usually get at least one spam mail a day from Orkut. Even GMail which perhaps has the best filtering capability of spam mails, stands helplessly in front of such backdoor attacks. People target your friends and friends' friends through orkut message box automatically to send spam mails which are redirected to your (usually Gmail id) mail inbox. That surely doubles your annoyance. How do we prevent spam mails? Here is a simple solution.

1. Changing Primary Email

  • Go To Edit Profle Page of your profile,
  • then click on Contact tab and change your Primary Email address to some other id, which you don't use much.
  • Your login id will remain same but your friends will see your other email id and mails will be sent there.

2. Using Fake EMail id

It is the most effective way of hiding email id, but it requires a new account, If you have some larger communities and want safety, then follow this method:

  • Create a new Orkut account, On the Sign Up page enter any id which does not exist like yourname@yourname.com, me@orkutaccount.com etc.
  • Then after entering other details, you will be redirected to your home and with a message Verify Your Email, Just igonore it and do as stated below
  • Now Go to google.com, you will see your fake id on the top-right corner yourname@yourname.com, You can see My Account Option there.
  • Go To My Account Page and create a gmail id from there. (You can see it under Try Some More)
  • Done! You have your new login id but your friends will still see your fake id.

So enjoy a clean and spam free orkut account. tell us if it worked for you and if you have any other suggestion.

[Source: itecharena.blogspot.com]

How to Disable Autoplay of USB Drives and CDs in Windows



Sometimes its really annoying to have the autoplay feature of audio CDs and USB drives. Suppose you wanted to play a track with your favorite music player, the autoplay option doesn't give you that option and starts playing it with the inherent audio player. To stop it you need to know just more than ALT+F4. Again same with USB drives. You don't really need a plug and play facility always caring too much about you. So how do you get yourself away from this unwanted care? Here is your answer.



  • Type gpedit.msc in the Start Search box (or Start -> Run if you are using Windows XP), and then press ENTER to open the Group Policy Editor.
  • Under Computer Configuration, expand Administrative Templates, expand Windows Components > click Autoplay Policies.
  • In the RHS Details pane, double-click Turn off Autoplay to open the Properties box.
  • Click Enabled, and then select All drives in the Turn off Autoplay on box to disable Autorun on all drives.
  • Restart.

Wednesday, February 18, 2009

How To Play A Song Inside MS Word Document



I know Microsoft Word is the most reliable document creator for most of us. Be it office work or personal attachments, using MS word is inevitable. However, all work and no play makes anyone dull. So why don't we try this cool trick to insert sound clips to a MS word document. may be you can impress your boss with a light hearted presentation or your friends with this cool trick.

  • Select where you want to insert your sound.
  • Go to Insert -> click object option
  • Object -> create from file
  • Browse and select your sound file
  • Press OK
  • To hear your sound ,double click your sound icon

Its just so simple.

How To Recover Folder Options Missing From Windows - Solution



Windows explorer with its inexplicable bugs have annoyed and irrirated millions of us. One of the most common source of irritation is to find that the Folder Options under Tools of Menu Bar has gone missing. You don't know why and you need it right now. So what is the solution? Let me tell you the simplest one.

1. Go to Run, Type regedit, press enter.
2. Navigate to [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer].
3. At right panel, look for an entry called NoFolderOptions. Right click on it and Delete.
4. Navigate to [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer].
5. Repeat step 3 to delete NoFolderOptions entry.


Top 6 Online PDF to Word Converter Websites



1. http://pdfundo.net/convert/
2.http://www.freepdftoword.org/gtos.htm?step=1&reset
3.http://www.freepdfconvert.com/convert_pdf_to_source.asp
4.http://www.pdfonline.com/pdf2word/
5.http://www.convertpdftoword.net/
6.http://www.zamzar.com/

Microsoft to Launch MyPhone for FREE!



Technology is real fun sometimes. You can't but laugh at unexpected turn of events. I mean, who could ever think that Microsoft is going to make an application web service for FREE (yes, I am not dazed) quite similar to another that Apple sells for $0.99! Microsoft is developing an Application for Mobiles called My phone which synchronizes with your address books, calendars and to-do lists at absolutely no cost. You may ask, what is the high point? You can easily do that with your desktop and any free mobile synchronization app. Here is the catch. It will also give you 200 MB space to back up your data, a system restore privilege and many more but for Windows Mobile currently.

Microsoft Takes On Google and Apple

Apple has an incredibly useful app for its iPhone i.e. MobileMe which keeps the former in sync with your desktop as your email, contacts, and calendar stay the same wherever you check them, no matter what device you use. But the pain is it costs you $ 0.99.

Google has a GoogleSync running for iPhone but the problem is, quite uncharacteristically Googlesync has some bugs inside it. So we don't recommend it as yet fully. If you insist, make sure to take a backup before you use it.

How Microsoft MyPhone is Going to Work

Microsoft® My Phone syncs information between your mobile phone and the web, enabling you to:

  • Back up and restore your phone's information to a password-protected web site
  • Access and update your contacts and appointments through your web account
  • Share photos on your phone with family and friends

What Microsoft MyPhone Can not Do!!!

  • If you have an active connection with Microsoft Exchange server (which is frequently used for corporate e-mail), My Phone will not synchronize your contacts, calendar appointments, or tasks.
  • If you have an external memory card and selected My Phone's recommended settings, information on the external memory card will not be synchronized.
  • If you store contacts on the SIM card provided by your mobile operator, My Phone will not synchronize these contacts.
  • If you have any documents stored outside the My Documents folder on your phone, My Phone will not synchronize these documents.

My question: Then what is it worth?

Conclusion

This may just be the beginining of Microsoft's realization of moving towards more freebies and approach an Open Source Desktop Strategy. Considering its Microsoft, we can not expect much and most certainly with so many features not included in the list, MyPhone is supposedly not going to create any storm yet. But we will see how Microsoft takes this FREE product service and as far as Open Source is concerned, I don't think Microsoft will ever think that they are ready. Anyway, free will do for now.