twentydays

whatever i study

Jan 8

How to create your own blog :) (just read)

Okay, so you want to create your own blog or sort of personal website. Well, Mostly Freshers, Students & Developers do not have enough money to invest for there personal portfolio website and so you have to flip over to a free blogging website (till you get enough publicity for AdWords ). 

So how to setup your own blog ? Well it just takes four steps -

Step 1 : Choosing the best blogging platform i.e the website. Which one ?

There are many available blogging platforms like Blogger, WordPress, Typepad, Tumblr, and Many more.

Well,  Blogger  was first my choice but updating your posts is damn boring on blogger plus i don’t think it gets so easily publicized. Also I do not find it as easy to update or to apply custom layouts.

About Typepad, I just opened their website, looked at their pricings and just closed the Tab.

Then I tried  WordPress , Well big name in blogging field but the real problem with WordPress is that for Developers like us, it neither allows us custom layouts, nor it allow custom domain mappings for free. Result i created a blog, few hours later i deleted it.

My personal Favorite is Tumblr. Why ? Well because first it allow custom CSS so you can design and try out your own layouts. It allows you free custom domain mappings. So my vote goes for Tumblr as best free blogging website.

Step 2 - How to get the domain name ?

Well, getting a domain name is easy. Just go to any domain selling website and choose “.me” or other cheap domain names. If you want to go for “.com, .org” etc.

then it will cost you much.

Another choice is choosing a co.cc domain name. Remember we are making a personal blog or a small website and since for most of us its not easy to afford the big domain names we can go for co.cc domains.

So, just open co.cc website. Choose a domain name of your choice (if it available)

Register you domain name. and that’s all you have a domain name for free

which reads as yourname.co.cc

Step 3 - How to get your domain name linked to you Tumblr blog ?

a) Settings to do on Tumblr -

       First click on your blog name from the dashboard.

      Click on Settings Button in Right Sidebar.

      In URL Tab, Check the use a custom domain name option and Type your custom co.cc domain in the textbox below. Scroll down the page and Save your Settings.

b) Settings to do on co.cc - 

Login and Open your account. and click on My Domains Link in the left menu

Choose your domain name to set.

A Manage Domain page opens which shows your various domain settings. Here click Setup button

On the Next menu Click Zone Record.  Now you will see a Add a Record box has come.

Leave the TTL option and in the type option choose A.

 In the Value Field Insert this value 72.32.231.8. ?

Click the Setup button below and you are done with you custom free domain forwarding.

If you have done everything correctly then on Manage Domain page the A value must be showing with Tumblr IP address.

It will take few minutes to an hour till your domain forwarding starts.

Step 4 - To completely setup free website with 1.5 Disk storage.

Choose any domain name of your choice from co.cc . 

Now go to the website http://www.000webhost.com/ and SignUP with their service. They will send a email to you with new details

Open co.cc account and now update your Nameserver  from Manage Domain 

with the details given in your registration e-mail.

Click Setup button and If you have done everything okay. you will have a personal website running with 1.5 Storage ( Good for portfolio websites ) 100 MB Monthly transfer all for free. 

If you are having any problems Feel free to ask me.

Thankyou ! ciao :)


Jan 1

JavaBeans

A Bean  is simply a class with a set of functions to perform specific tasks. So if you know what is Java Class, You already know about Java Beans.

Java beans are usually designed to avoid repetitive coding i.e if you are using the same code block (i.e Function) in many files to perform some specific task, Then you can -

- simply create a new class,

- add that function to the class ,

- save and compile the file ,

- the generated .class file can be used as a Bean.


so a bean is as easy to create as easy task it performs.

Beans are highly used in Java Applications like Servlets and JSP pages to speed up the executions and thus display result faster.

Lets take an example of how to create and use beans.

Consider we are making an web application Calculator (Simple & Easy)

Now the Arithmetic Functions to be performed can be easily done by the JSP Page itself but instead we can use a pre-compiled Bean to make our results faster and also this Bean can be used in other applications to reduce repetitive coding.

Lets create a Bean which perform all the arithmetic operations

First create a class arithmetic_function

    public class arithmetic_functions

     {

     }

Now let’s declare the functions of the class

public class arithmetic_functions

     {

        int add ( int a, int b) {

        return a+b;

        }

        int subtract ( int a, int b) {

        return a-b;

        }

        int multiply ( int a, int b) {

        return a*b;

        }

        int divide( int a, int b) {

        if(b==0)

        return 0;

        else

        return a/b;

        }

     }

Save the file as arithmetic_functions.java and Compile it.

A  file is generated with same name with .class extension.

This is our Bean, now we can use it in our applications.

Beans are widely used in JSP pages for handling File uploads, User logon, Database connectivity  etc.

:)