Posts Tagged ‘technology’

There may be times when you have installed Windows 7 and then you felt the need of Windows XP also. So finally you decide to dual boot windows 7 with windows xp. If you install windows xp, then there won’t be any option to boot into windows 7. So now you’ll need to restore the bootloader of Windows.

Follow these steps (with acute care):

  1. Install Windows XP in a different partition (other than Windows 7)
  2. After installing, bootloader will be gone. Don’t worry, that’s bound to happen. Because Windows XP writes its bootloader over Windows 7.
  3. Insert Windows 7 DVD and boot from it and click on “Repair my computer”.
  4. In the next step, click on “Command Prompt”
  5. Type these commands:

bootrec /fixmbr (press enter)
Bootrec /fixboot (press enter)

So that’s done. Restart the Computer and you will see that the Windows 7 bootloader will be restored. If not, then install EasyBCD.

  1. Install EasyBCD and start this utility
  2. Click on Add New Entry
  3. Now simply select the type and change the name as per your wish and click on Add Entry and then click on Save


This is an amazing utility, which can help you very much in this. Through this, you can even change the timeout to show operating systems, select the default OS, move up and down entries and much more. What’s more, this is just 1.3 MB in size. Go ahead and use this nifty utility. After doing this, just restart the PC and you will be able to see two options, XP and 7 🙂

The J2EE platform uses a multitiered distributed application model. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multitiered J2EE environment to which the application component belongs. Figure 1-1 shows two multitiered J2EE applications divided into the tiers described in the following list. The J2EE application parts shown in Figure 1-1 are presented in J2EE Components.Client-tier components run on the client machine.

Web-tier components run on the J2EE server.

  • Client-tier components run on the client machine.


  • Web-tier components run on the J2EE server.


  • Business-tier components run on the J2EE server.


  • Enterprise information system (EIS)-tier software runs on the EIS server.

Although a J2EE application can consist of the three or four tiers shown in Figure 1-1, J2EE multitiered applications are generally considered to be three-tiered applications because they are distributed over three different locations: client machines, the J2EE server machine, and the database or legacy machines at the back end. Three-tiered applications that run in this way extend the standard two-tiered client and server model by placing a multithreaded application server between the client application and back-end storage.

Figure 1-1 Multitiered Applications

When it comes to downloading videos from Youtube, the first tool that most Linux users think of would be youtube-dl. Youtube-dl is actually a very powerful tool but many people prefer using tools with a graphic user interface, and the best video downloading application for Linux with a GUI in my opinion is ClibGrab. ClibGrab has many useful and interactive features with a very easy-to-use interface. Besides Youtube, ClipGrab also supports other popular video hosting sites, namely,, and More than that, the new version of ClibGrab comes with the YouTube search function integrated so you can search for your favorite videos directly on ClibGrab, without going to youtube to copy-paste the url links as with the older versions. ClipGrab also has the converting options for you to choose the format and quality of the video.

Since it has a very intuitive interface, it’s very easy to use ClibGrab. You can either search for youtube video directly on ClipGrab or just copy-paste the video url into the link box, choose the desired video format and quality then just hit ” Grab this clip” and the downloading process will begin. ClipGrab will auto assign the name of the video to the video file name so it will be easier for you to manage your video library ( if you use youtube-dl, you will need to include the output option to change the name of the downloaded video file). ClipGrab also supports parallel download, means that you can download many videos at the same time. After the downloading finishes, there will be a notification appearing on the system tray.

If you use Arch Linuxhere is the AUR package for ClipGrab. If you use Ubuntu or other Debian-based distros, you can use the following commands to install ClipGrab:

sudo add-apt-repository ppa:clipgrab-team/ppa 
sudo apt-get update 
sudo apt-get install clipgrab 



After importing a package, you can refer to the names it exports.

In Go, a name is exported if it begins with a capital letter.

Foo is an exported name, as is FOO. The name foo is not exported.

Run the code. Then rename math.pi to math.Pi and try it again.

Example :

package main

import (

func main() {


prog.go:9: cannot refer to unexported name math.pi
prog.go:9: undefined: math.pi

after renaming math.pi to math.Pi

package main

import (

func main() {



This tour is also available as a stand-alone program that you can use without access to the internet.

The stand-alone tour is faster, as it builds and runs the code samples on your own machine. It also includes additional exercises not available in this sandboxed version.

To run the tour locally first install Go, then use go get to install gotour:

    go get

and run the resultant gotour executable.

* Q1. How could Java classes direct program messages to the system console, but error messages, say to a file?


A. The class System has a variable out that represents the standard output, and the variable errthat represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed:


Stream st = new Stream(new FileOutputStream(“output.txt”)); System.setErr(st); System.setOut(st);


* Q2. What’s the difference between an interface and an abstract class?


A. An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.


* Q3. Why would you use a synchronized block vs. synchronized method?


A. Synchronized blocks place locks for shorter periods than synchronized methods.


* Q4. Explain the usage of the keyword transient?
A. This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).

* Q5. How can you force garbage collection?



A. You can’t force GC, but could request it by calling System.gc(). JVM does not guarantee that GC will be started immediately.


* Q6. How do you know if an explicit object casting is needed?


A. If you assign a superclass object to a variable of a subclass’s data type, you need to do explicit casting. For example:


Object a; Customer b; b = (Customer) a;

When you assign a subclass to a variable having a supeclass type, the casting is performed automatically.



* Q7. What’s the difference between the methods sleep() and wait()


A. The code sleep(1000); puts thread aside for exactly one second. The codewait(1000), causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in the class Object and the method sleep() is defined in the class Thread.


* Q8. Can you write a Java class that could be used both as an applet as well as an application?


A. Yes. Add a main() method to the applet.


* Q9. What’s the difference between constructors and other methods?


A. Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.


* Q10. Can you call one constructor from another if a class has multiple constructors


A. Yes. Use this() syntax.


* Q11. Explain the usage of Java packages.


A. This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.


* Q12. If a class is located in a package, what do you need to change in the OS environment to be able to use it?


A. You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let’s say a class Employee belongs to a package; and is located in the file c:\dev\com\xyz\hr\ In this case, you’d need to add c:\dev to the variable CLASSPATH. If this class contains the method main(), you could test it from a command prompt window as follows:




* Q13. What’s the difference between J2SDK 1.5 and J2SDK 5.0?


A.There’s no difference, Sun Microsystems just re-branded this version.

* Q14. What would you use to compare two String variables – the operator == or the method equals()?

A. I’d use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.

* Q15. Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?

A. Yes, it does. The FileNoFoundException is inherited from the IOException. Exception’s subclasses have to be caught first.

* Q16. Can an inner class declared inside of a method access local variables of this method?
A. It’s possible if these variables are final.
* Q17. What can go wrong if you replace && with & in the following code:

String a=null; if (a!=null && a.length()>10) {…}

A. A single ampersand here would lead to a NullPointerException.

* Q18. What’s the main difference between a Vector and an ArrayList

A. Java Vector class is internally synchronized and ArrayList is not.

* Q19. When should the method invokeLater()be used?

A. This method is used to ensure that Swing components are updated through the event-dispatching thread.

* Q20. How can a subclass call a method or a constructor defined in a superclass?
A. Use the following syntax: super.myMethod(); To call a constructor of the superclass, just write super(); in the first line of the subclass’s constructor.

For senior-level developers:

** Q21. What’s the difference between a queue and a stack?
A. Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule
** Q22. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?

A. Sometimes. But your class may be a descendent of another class and in this case the interface is your only option.
** Q23. What comes to mind when you hear about a young generation in Java?
** Q24. What comes to mind when someone mentions a shallow copy in Java?
A. Object cloning.
** Q25. If you’re overriding the method equals() of an object, which other method you might also consider?
A. hashCode()
** Q26. You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use:
ArrayList or LinkedList?
A. ArrayList
** Q27. How would you make a copy of an entire Java object with its state?
A. Have this class implement Cloneable interface and call its method clone().
** Q28. How can you minimize the need of garbage collection and make the memory use more effective?
A. Use object pooling and weak object references.
** Q29. There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it?
A. If these classes are threads I’d consider notify() or notifyAll(). For regular classes you can use the Observer interface.
** Q30. What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access it?
A. You do not need to specify any access level, and Java will use a default package access level.

Amidst so many things said and heard, Business insider has collected some crazy facts about Facebook that have made the company a treat for the readers.

Let’s take a look at 26 such facts that kept the giant social network in the news.

1. Facebooks Worth would be more than eBay, Yahoo, Groupon, LinkedIn, Netflix, IAC, AOL, Zynga and Pandora combined, when

it goes public


2. Eduardo Saverin, the Brazilian co founder of Facebook has renounced his US citizenship and is now investing billions in startups at Singapore.

3. Of all the incredible talents that Zuckerberg is bestowed with, his greatest and what seems to be his favorite is Firing People.

4. About 60 percent of the voting power at Facebook is controlled by Zuckerberg.

5. The big shot media company Viacom had offered to acquire Facebook, but was rejected by Mark Zuckerberg.

6. After agreeing to an acquisition offer from Yahoo while it was led by Terry Semel, Facebook staepped down from the deal when there were talks of lowering the offer price.

7. The Microsoft CEO, steve Ballmer had offered to buy Facebook. Steve has invested $240 million in Facebook till date.

8. Facebook interviewed Yahoo executive Ellen Siminoff, Apple veteran Bud Colligan, and former OpenTable CEO Jeff Jordan for the position of COO which is now held by Sheryl Sandberg.

9. Steve jobs had to cancel the presentation that he had offered Facebook for the iphone application in 2008. Jobs, who had expected Zuckerberg to do the presentation was disappointed by the audition of the engineer who was selected by the Facebook CEO.

10. Maintaining his reputation of having a a bad fashion sense, Zuckerberg wore a hoodie to the meeting with wall street investors.

11. In 2005, Mark Zuckerberg took CEO lessons to improve his managerial skills.

12. Mark Zuckerberg is said to be a big time Glee fan.

Whenever I open Run and type regedit and press enter a messageprompt appears saying Registry editing has been disabled by your administrator“.

Let’s see how can we fix it.Here i got 3 Methods to fix this Problem which i have collected them from Net.

Method 1:

You can use a simple UnHookExec.inf to enable registry editing.

1. Download UnHookExec.inf
2. Right click on the downloaded file and select install.

Method 2:

For enabling you can also use the remove restrictions tool(RRT) by, if the method 1 doesn’t work for you.

1. First Download Remove Restrictions Tool
2. Run and check the registry tools and click apply.

Method 3:

If the above two methods does not work for you , you can also try executing a small vbscript which I found on major geeks.

1. First Download EnableRegEdit.vbs
2. Double click on the downloaded file to enable registry editing.

I hope at least one of the above will help to fix the trouble.

Google is testing a long-awaited full-text search API (application programming interface) for the Google App Engine, the company said on Tuesday.

The App Engine lets developers build Web applications hosted on Google’s infrastructure, and developers have long complained that the current search API is inadequate.

[ Keep up with software development issues and trends with InfoWorld‘s Fatal Exception blog. | Master the latest in Java development with our JavaWorld Enterprise Java newsletter. | Follow the cloud with InfoWorld’s Cloud Computing blog andCloud Computing Report newsletter. ]

“Beside the cruel irony [of] not having full-text search I am starting to wonder why it would take Google so long to implement this,” a developer wrote in the App Engine forum last month.

Google released the full-text search API in “experimental” mode and warned it could make changes in future versions that might be incompatible with the current API.

The API will allow users to search by keyword and delineate specific fields and ranges, Google said. The new capabilities also include scoring and snippeting.

Developers can use the API for free up to 20,000 calls a day or a total index size of 250 megabytes.



Java Developer Kit contains tools needed to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc…


Compiler converts java code into byte code. Java application launcher opens a JRE, loads the class, and invokes its main method.


You need JDK, if at all you want to write your own programs, and to compile the m. For running java programs, JRE is sufficient.


JRE is targeted for execution of Java files


i.e. JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries.


JDK is mainly targeted for java development. I.e. You can create a Java file (with the help of Java packages), compile a Java file and run a java file



Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system


The Java Virtual Machine provides a platform-independent way of executing code; programmers can concentrate on writing software, without having to be concerned with how or where it will run.


If u just want to run applets (ex: Online Yahoo games or puzzles), JRE needs to be installed on the machine.



As we all aware when we compile a Java file, output is not an ‘exe’ but it’s a ‘.class’ file. ‘.class’ file consists of Java byte codes which are understandable by JVM. Java Virtual Machine interprets the byte code into the machine code depending upon the underlying operating system and hardware combination. It is responsible for all the things like garbage collection, array bounds checking, etc… JVM is platform dependent.


The JVM is called “virtual” because it provides a machine interface that does not depend on the underlying operating system and machine hardware architecture. This independence from hardware and operating system is a cornerstone of the write-once run-anywhere value of Java programs.


There are different JVM implementations are there. These may differ in things like performance, reliability, speed, etc. These implementations will differ in those areas where Java specification doesn’t mention how to implement the features, like how the garbage collection process works is JVM dependent, Java spec doesn’t define any specific way to do this.