How to prepare bootable flash drive of Windows 7 and Ubuntu

There are bunch of articles and softwares available online to achieve this. So instead of writing another tutorial, I am sharing the available tutorials which I have used often when I needed.

Here are the links:

Make your own bootable Windows 7 Flash Drive

Make bootable Ubuntu using Flash Drive

Actually this is very much easy, and same for all distro. all are free n opensource.

I hope it helps, if you need any help, let me know.

How to install Sun Java JDK/JRE in Ubuntu Maverick

As Sun (Oracle) repos has been removed completely from Ubuntu Partner repos in Ubuntu Maverick, you can’t install Sun Java JDK or JRE any more.

Running sudo apt-get install sun-java6-jdk will produce the following error

Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate

Ubuntu Maverick (beta) repository problem

I used to be a Fedora distro fan, but considering the popularity of Ubuntu, I have decided to try Ubuntu, and downloaded the latest one, Ubuntu Maverick (10.10 beta) .

After installation, first I enabled Ubuntu Multiverse repository then tried to install vlc applying the following command in terminal:

sudo apt-get update

sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc

But I got this error:

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Couldn’t find package vlc

What is the difference between this & this(), super & super()

Well the topic is a basic in OOP, when I first learned my first OO language (C++ back in 2004), I have learned the basic. Few days ago some one asked the question, suddenly I become confused, so I made a quick research, and decided to post 🙂

this and super both are object. this() and super() both are constructors.

this is the object of current class.

this() is the constructor of current class.

super is the object of parent class.

super() is the constructor of parent class.

Example (in java) please check out this nice example provided in this link

I hope this will save someone’s day 🙂

How to generate getter/setter in PHP easily

For one of my current project I need to write getter/setter functions for 20+ variables. You know, how annoying it is! Well, I can use magic quotes, but I don’t like it. More over getter setter will help you later to use the class when your IDE (in my case Netbeans) supports auto complete suggestion. Though all Java development environments allow to generate getter and setter code automatically.
Then I started coding a php script for generating getter/setter for supplied variables, but I was lucky as suddenly I thought “why don’t I look for something like this online” 🙂

And here is the link I got, its quite good., It saved my time.

3 of 6