How to Copy and Paste in the Windows Command Prompt

Sometimes it is convenient to copy something from a document or file and paste it into the Windows command line. Long commands are easily mistyped and a copy-and-paste operation is often the best way to proceed, The usual keyboard shortcutCtrl+V doesn’t work but there is an easy way to enable copying and pasting into the command line. Here is the procedure:

  • Open a command prompt.
  • Click the little icon in the upper left corner of the command prompt window (outlined in white in example figure on right)
  • In the menu that opens, choose “Properties” (Example shown in figure on right)
  • In the dialog box that opens, make sure the "Options" tab is selected and then place a check by “QuickEdit Mode” (Shown in figure below)
  • Click the “OK” button (not shown in figure)

Now whenever you want to paste some text into the command prompt, copy it to the clipboard the usual way and then right-click on the desired location in the command line. The copied text will be pasted.

This tip applies to Windows XP, Vista, 7, 8. And there you have it - no more struggling with trying to type long complicated commands.

7 Wi-Fi Tweaks to Increase Your Speed

Chances are if you have a wireless internet connection at your home, you have had some trouble with the speed of the connection at least once before. That being said, a slow wireless connection can be frustrating to deal with. You are probably paying good money to your internet service provider, so slow speed is something you should not have to deal with, right? Well, the truth is wireless speed can be affected by a number of things. Luckily there are some Wi-Fi tweaks you can try that should help boost your speed and get you rolling in no time.

1. Reposition Your Router

The position of your wireless router plays a major role in the speed and strength of your wireless connection. If you are having trouble, you should try to reposition your router in a centrally located area, where the signal can equally reach each wireless device in your house. If your router is near an outside wall, try to move it closer to the middle of your house. Routers that are placed near outside walls can send some of the signal outside, which can risk your wireless connection’s strength and speed.

2. Purchase a Wireless Signal Repeater

Adding a wireless signal repeater to your home network can greatly increase the speed of your connection. A repeater works by extending your signal without having to add any additional wires. All you have to do is simply place the wireless repeater in a location that is between your router and your wireless device(s). It will instantly boost the wireless signal that is sent from the router to your devices, meaning faster speeds for you.

3. Install a New Antenna

Most wireless routers come standard with an omnidirectional antenna, meaning it broadcasts the wireless signal in a circular radius to reach various places in your home. If your router is in a perfectly centered location between all of your wireless devices, this is probably fine. But if your router isn’t perfectly centered among devices, you should think about replacing the existing antenna with a stronger one, known as a high-gain antenna. You can usually remove your old antenna and replace it with one of these stronger antennas to boost your signal strength, therefore increasing the speed of your connection. Another perk of a high-gain antenna is its ability to focus the wireless signal in any direction you prefer.

4. Use One Brand of Equipment

You may not think that using different brands of equipment can reduce the speed of your wireless connection, but in reality it can. If you use different brands of equipment, your components may not work as efficiently. This is because many manufacturers of wireless networking equipment pre-install enhancements in all of their products. These enhancements can boost speed, but will only work if products from the same manufacturer are used simultaneously. If you are using various brands of equipment and your speed is suffering, this is definitely worth a try.

5. Reduce Frequency Interference

Many household electronics, such as cordless telephones and baby monitors, run at the same frequency as wireless routers. This means that these electronic devices can interfere with the wireless signal that is being broadcast from your router, which can affect the speed and performance of your connection. Check the box of your router to see what frequency it runs at, and try to avoid using other electronic devices that operate at the same frequency. You can also try to change the channel on your router to avoid frequency interference.

6. Check for Firmware or Driver Updates Regularly

The manufacturers of wireless routers and network adapters often release firmware or driver updates that can improve the function of your wireless connection. You can find and download these updates at the manufacturers’ websites. Updates are usually done to fix issues, add features, and strengthen your equipment’s performance. Check for these updates on a regular basis to make sure your firmware and drivers are always kept up to date.

7. Secure Your Wireless Network

If your network is not properly secured, neighbors could be using your signal. This can reduce the speed of your connection because you are in a sort, sharing the wireless signal. Set up secure passwords and some sort of wireless encryption that will prevent anyone else from accessing your wireless network. All of these Wi-Fi tweaks can greatly boost the speed of your wireless connection. If one of them does not seem to do the trick, try another or even a multitude of options. It may take a little time and patience, but once you figure out what works to speed up your connection, you will be happy you put forth the effort.

SCJP - Last Minute Revision Notes

1. Check for any obvious complier errors first like two else statements , accessing ofprivate variable/method , accessing a variable declared in a for loop outside the for loop.

2. If you try to unbox a null Integer value to int , it will result in a NullPointerException.

3. If method having the same name as Class name and having a return type is not a constructor but a ordinary method.

4. Map is the only interface that does not extend Collection. List , Set and Queue extends the Collection interface.

Collection is a interface ,
Collections is Class which extends Object class.

Map: key , value pair
Hashtable , HashMap , LinkedHashMap , TreeMap

Set : unique values
HashSet , TreeSet , LinkedHashSet

List : List of values allows duplicates, accessed by index
ArrayList , Vector , LinkedList

Queue : stack or queue. to-do list. priority queue is sorted based on the natural order or based on the object of Comparator or Comparable.LinkedList , PriorityQueue
The twins clases.

a. The Hashtable and HashMap: Both are atmost same except that Hashtable methods are synchronized and it does not allow null key/value, whereas HashMap allows one null key and many null values and its methods are not synchronized . The Hashtable is oldest class in java. The t in Hashtable is indeed a small letter rather than capital letter.

b. The Vector and ArrayList have same functionalities except that Vector Methods are synchronized , while ArrayList methods are not. Both ArrayList and Vector implementes RandomAccess interface (which is marker interface having no methods) as of java 5

c. The LinkedList can be used to access values in insertion order. The LinkedHashMap can be used access values in insertion or access order. The LinkedList implements Queue(as of java 5) and List. The LinkedList now implements queue methods like offer, poll and peek.

d. The TreeSet , TreeMap and PriorityQueue sorts the values.

e. The HashSet , Hashtable and HashMap are unordered and unsorted. if you add n values in these Collection objects , iteration will not give you a particular ordering ie no insertion or access or natural order. It iterates in a random order.

f. The LinkedHashSet is ordered form of HashSet , The LinkedHashMap is the ordered form of HashMap.

g. the offer() method adds a element in queue. the poll method returns the first method and removes it from queue. the peek just returns the first method from queue. The higgest priority is stored first in PriorityQueue. if you poll each value from PriorityQueue then values returned will be of Higgest proririty to lowest priorirty.

h. The Object of class which need to be added in HashSet , Hashtable , LinkedHashSet or HashMapt must override the below methods
The exception are all Wrapper classes. The class Number , StringBuffer and StringBuilder.

For example object of Student class need to be added in LinkedHashSetA student class contains id , name. As id is a primaray key , we should not have rwo students with the same id. if the Student class does not override the above methods then

Student d = new Student(44); //44 is id
Student d 1= new Student(44); //44 is id
public int hashCode(){}
public boolean equals(Object o){}
public boolean equals(Object o { if (o instanceof Student) {
Student t= (Student) o;
if(o.getId() ) {
return true;
} //if
} //ifreturn false;
} //method
public int hashCode() {
//use any of the below
return id*4;
return id;
return 1038; //any constant
//do no use any of the below
Random r =new Random(44);
return r.nextInt();
//here t is transient variable
return t*id;
if above method is implemented then d and d1 will be same object.
both d and d1 are different object accoring to the LinkedHashSet , as a result both will be added to the Set

i. The Object of class which need to be added in TreeMap , TreeSet and PriorityQueue must implement Comparable or Comparator interface

j. java.lang.Comparabl e declaresompareTo( ) and accepts one Object as argument.k. java.util.Comparato r declares compare() which accepts 2 Object as argument.

l. in generics if you declare a variable it must be instantiated with the same type or no type at all


Listlisto1 =new ArrayList ();
List listo2 =new ArrayList();
List listo3 =new ArrayList ();
List list3 =new ArrayList();
m1(list01);/ /error
m2(list01);/ /ok
m1(list02);/ /error
m2(list02);/ /ok
m1(list03);/ /ok
m2(list03);/ /ok
m1(list3);// ok
m2(list3);// error


List listo =new ArrayList(); //compiler error

// functions
static void m1( a) {}
static void m2( a) {}

//The argument that Child class can be applied to a parent class i s not at all applicable to generics . if you specified a type in the variable declaration it must be followed while instantiating also.

In the Exam , there will be drag-drop quetion . in which there will be 4 variable instanciated with the genreic and passed as arguemnt to a function. you have drag and drop , if the code compiles or not.

public class {} and
public class {}
are invalid syntax and leads to compiler error

but it can be defined as

public class {} or
public class {}
public class {} public class {}
public T getObject() {} //correct
public T computeArrays( Y y) {}
//correct, the font-size of s is increased to differentiate from the interface Collection
//here Y is the argument and T is the return type.

5. For garbage collection , you must focus on the value and its reference . there may be a question . which is earliest line in which the value referred by object in line 5(some line) is eligible for garbage collection . The reference variable will be given other values in the consecutive steps but focus if the value which was created/defined in line 5 (example) is referenced by any other variable. The variable can be instance or local variable. if it is a local variable , its scope will be till the method ends but except in the situation the value is returned.
For example below :

Object o= new Object//line 5
Object s =o;//line 6
// the value created in line 5 is referred by s

case 1 .

o = new Object(); //7 //o is set to different value
s=null; //8 s is null or
s = new Object(); // s is set to a new value
so old value has no reference.

here the value created in line 5 will be eligible for gc after line 5

case 2.

o= new Object();//5
Object s =o;//6
o = new Object();//7
return s;//8 }
The value created in line 5 will not be eligible for garbage collection even after the method has ended as it is returned.

case 3:

private Object o;
public void data() {
Object o = new Object();//1
doSomething( o);//2
o = new Object();//3
doSomething( null);//5
Object s = new Object();//6
Object nothing = new Object();//7
return s;//8

In the above example value created in line 1 is eligible for garbage collection after the line 5. The value created in the line 3 is eligible for garbage collection after the line 4.

The value created in line 6 will not be eligible for garbage collection even after the method ends as the value is returned. The value created in line 7 is eligible for garbage collection after the line 9.

public void doSomething( Object obj) {
o= obj;

JavaScript Tricks: Edit Websites in Browser (Live)

Imagine a world where you are a God and have ultimate control on what happens and more importantly, how it happens. Seems too good a dream. Now it has come true, at least for the online world.

Edit Websites Browser

Using this trick, you will be able to edit any webpage live in your browser as if it was a Wiki and change the details according to your wish. Yes, you read that right. You can edit Google or even Facebook for that matter right in your browser and that too without requiring any technical know-how or getting deep into hacking and cracking.

Here is an example picture demonstrating the Google Homepage edited by me to say that I own Google.

This is just an example. You can use it for anything like showing wrong traffic stats or for fooling people by showing that someone said something about them on Facebook or Twitter. It depends only on your creativity. But I would advise you to stay ethical and use it for entertainment purposes only.

(Mozilla Firefox does not support this. If you use Firefox, you can use the bookmarklets given at the end of this post. If you use Google Chrome and the code does not seem to work, precede it with "javascript:" without quotes.)

To use this trick, all you need to do is just copy the code given below and paste it in your address bar [make sure its in single line] after you have opened the website you wish to edit. And start editing.


You can capture a screenshot by pressing the Print Screen key or by using the Snipping Tool if you use Windows 7 or Windows Vista. If you wish to again make the website non-editable to give a more authentic look, copy and paste the code given below in the address bar [make sure its in single line] after you are done editing (does not work in Firefox).


Or, alternatively you can use the following bookmarklets by dragging them to your Bookmarks bar.
The editing that you do will however be temporary as it is not server-sided. You can also save the modified website through your browser by File>Save. This works on all common web browsers including Chrome, Firefox, Opera and Internet Explorer.