Subscribe

Subscribe To Mail

Powered By

I Love:
Blogger

Powered by Blogger

How to work with Java

Hi Friends,
Yesterday I was struggling with programming in Java and searched a lot of sites to know about it. Each and every site confused me and so now that I have written for you in easy steps so that you can work with java easily.

Step 1: write the Java code using Notepad.

The java program for eg: hello.java should be typed in notepad first . Now save it in the format(.java) in the location>> C:\Program Files\Java\jdk1.6.0_07\bin.
Remember: You need to save it under jdk\bin . The location of the same can be found where you have installed java. I have installed java in c drive under program files.

step 2: working with command prompt

Now that you have written the java code and you need to run to get the output.
So, go to start >> Run >> type cmd.
Now command prompt opens up.
type cd..
type cd..
Now you have changed the directory to c drive
c:\>
Now you must go to the location C:\Program Files\Java\jdk1.6.0_07\bin.
So, from c:\> what commands should I type to move to bin directory?

Step 3: Moving to Bin Directory

c:\>
cd [space] program files

Now it has moved to
c:\program files\>
Similarly you must type
c:\program files\> cd[space] java
and so on till bin reaches.
c:\program files\Java\jdk1.6.0_07\bin>


Step 4 Debugging the program.

So, once the bin is reached type
c:\program files\Java\jdk1.6.0_07\bin> javac [space] hello.java
This will check whether if there are some errors in it. If there are no errors then it will come back to the same bin location
c:\program files\Java\jdk1.6.0_07\bin>

step5: Running the Program

Now type the following command to run the program
c:\program files\Java\jdk1.6.0_07\bin> java[space] classname
whats classname?
In the java program type the classname which contains the code for output.

Now you can get the output!! cool !!

Small Tips to make quick load of page

When I clicks the page links, I find that a lot of time is taken by the site to open it quickly. These tips can alert you the smaller mistakes and so that you ca improve them better. Since if the page takes longer time to load , I may lose the interest to look at the page and just click cancel. So, now you must have understood the importance of the page loading time.The load time of websites is one of the most important factors affecting its usability; most Internet users will just skip a site altogether if it fails to load within a couple of seconds. Below you will find the summary of the “Speed Up Your Site” series. Those are simple yet effective ways to make sure that your website is running fast. You can click on each point to read the article with comments from the readers.
Format for Images:The Images are the one which takes long time to load. Thus careful attention must be done when images are used. Always use .Jpeg format for images like photographs. For Logos and Banners it’s good to use .Gif Format. Also you can use .Png format which is same as .Gif but with some colors features.
Using the http and slash : When you email or hyperlink your website to some of your friends or readers, just make sure that you use the http and also a slash at the end of the url. E.g. when a user opens a link of this type “http://www.advaithas.blogspot.com/about” the server will need to figure what kind of file or page is contained on that address. If you include a slash (/) at the end of the link the server will easily find out that its an directory page and thus reduce the loading time.                                                                                                                            Like this: “http://www.advaithas.blogspot.com/about/”
Add a Page Breaker: When I type a url of the page. I get a lot of time to wait for the page to load the all old crap Posts which were written years over. Just make sure that you place 5 post of maximum in a page and add a Page Breaker.
Using Flash: Flash is the file used for animation presentations in the site. But too much usage of flash in the page will take a lot of loading time. So, Flash must be used at minimum or must be used only if compulsory needed without excuse. 

Comment other Blogs to improve yours

Comment is what makes a Blogger Happy. We write some Posts expecting some Comments back. Its good that we expect but if we ask our self, how many blogs we commented the answer would be silence for most of them. The best thing to get traffic to your Blog is to comment and appreciate others blog. If so, they may sure take interest to look what’s in your blog and may comment if they liked. Thus you can make some friends and also get some traffic.
Easy is it. So, why are you waiting? Start right now

How to earn Money online from Adsense

I am sure Adsense is the best way to earn money online. Though there are a lot more stuffs to make money online, adsense is the most trustworthy and a large set of people use Adsense. However the truth is not many people earn money from Adsense. Mere having a blog and adsense account doesn’t help gain Money.
Note that to earn money from adsense, traffic is not most important. More than traffic the page rank of the Blog is important. But what is Page Rank?
Page Rank is the rank given by Google based on the content and number of links the blog has. The Page Rank 1 is the starting rank to rank your blog. The blogs with page rank 10 are the best and its utmost difficult to get page rank 10. Now, based on the page rank your blog will show the adds. If a click of add made with a higher page rank and lower page rank differs with the amount of money. So, note that to earn money from adsense you need to have good page rank.
How to improve the page rank?
Though many people tell different ideas. The simplest idea is to write posts which are of one kind. If you start write about Life for example. Make sure that your post has a tag Life in it. So that when Life is typed in goggle search your blog pops up in the list at first pages.

Types of post methods to Highlight Your Blog’s Content

You have just opened a Blog and You have no idea of what to publish or how to publish. Then I am sure this post can better help you. Just see the points below and choose your won style. You can also choose a mixed of styles in your Blog
1. Your Experience and post what you see
A good way to start and continue Blogging for a long period of time. You write post based on your experience and what you see. Your everyday experience, the software you have worked, your life with friends, a tour you went. All adds credit and may interest others to know your Life. Technically you can write about the projects you have done and your presentations or competitions you won and on..
2. The History Post
No idea what to write. Just go back to the History. A lot and lot of events have occurred. Just pick an event and give life to it where the people would have forgotten. Just like Did we really Land in the moon? Give your points of what you think. It must also be valuable points and not just craps.
3. Interesting links
 An Indexing service. All you need to do is to just write posts about the blogs you visited and make a review of it. This is a Best site for articles on Dot-net and you can find such and such information in this site and give a hyperlink to that site. So, simple.
4. Ask Questions to the readers
You don’t have any good thought of what to post. No worries. All you need to do is to think of a good and controversial question. May be like what is the ultimate aim of Life? Since each people have different opinions and aims, they can add value to your blog too. You can take a look at my blog and you too can join to participate. It also encourages the readers to think of the topic. Finally it’s good if you too join the conversation along with the readers.
Example: Get Rich Slowly
5. Summary post
Now you don’t have any post to write. No worries. Just think of the word Summary. Now that your blog has got few posts over last week. Try to summarize what you have posted with all those links and make a summary. By this way the readers can find easy as to what topic to choose based on their interest. It’s also good to add a few points of Upcoming events and posts here.
6. Image and Video Review:
This of course will be the easiest of the all. You have got a lot of pictures and Videos available in the web. What not you add those in your blog which interests you and make a review of it. Just like the beautiful Place on the earth with few pics of hill station pics. Also try, the most horror scene in the film and add some words like dare to watch this clip. Sure it will interest the readers.

The Gadgets that your blog doesn’t need

If you are a starter of Blog, many things will interest you. You visit some other blogs and find something new Gadgets or stuff and you try to add those into your Blog. At the end you will have wanted and unwanted Gadgets filled in your blog side bar. All you need is to write a better post which can bring traffic to your Blog. People won’t come to your blog to see the Gadgets you have!
So, just avoid these stuffs
  1. Shout Box
  2. Social bookmarking buttons
  3. Google Ad Sense insertions (when your blog has low traffic)
  4. The Really Big Blog roll
  5. Unrequested media (i.e. Background music)
  6. Funny Gadgets
  7. Guest Page to sign (not needed)
  8. Calendar (We don’t write post on date basis for people to search a post based on the date you wrote a post)
  9. Video and Image Gadgets
  10. The Blog stat and Visitors details are not much needed though try to place those stuffs at the bottom (I have least interest to know that I am 756th  visitor)

Ticket Puzzle

Ticket Puzzle:
Hidden data puzzles are commonly asked in Interviews. These puzzles make us analyze the hidden data in the questions.
Question:
There are N stations on a railway. After adding X stations 46 additional tickets, have to be printed. Find N and X?
Answer:
Total Tickets = (Total Stations)*(Total Stations- Boarding Station)
So,
N (N-1) = t
After adding X stations
(N+X) (N+X-1) = (t+46)
Solve: X=2, N=11

..