Java J2ME JSP J2EE Servlet Android

Using SVN

To use svn you need an svn client. You can download a good svn client from http://tortoisesvn.tigris.org/ you can also add an cvs client for eclipse named subclipse from the following eclipse update site

          Name: Subclipse 1.4.x (Eclipse 3.2+)
URL: http://subclipse.tigris.org/update_1.4.x


Name: Subclipse 1.2.x (Eclipse 3.2+)
URL: http://subclipse.tigris.org/update_1.2.x


Name: Subclipse 1.0.x (Eclipse 3.0/3.1)
URL: http://subclipse.tigris.org/update_1.0.x


 

To checkout and import a project from and to SVN use the following parameters..

url: svn://<hostname><repository> eg. svn://localhost/usr/svn/svnroot


 

If you use authenticated access instead of anonymous access you need user name and password eg. user1 and pass1

This post was published to Silicon Magic at 5:22:42 PM 3/28/2009

[Enter Post Title Here]


 


 

  1. Create repository

    Create a svn repository by the command

    $ svnadmin create /usr/svn/svnroot


 

  1. Edit for authentication

    Edit [general] section of svnroot/conf/svnserve.conf file as

    [general]

    anon-access = write


     

    This will allow anonymous user to checkout and commit svn server. To restrict access to user do the following

    1. Edit the [general] section of svnserve.conf as

      [general]

      anon-access = none

      auth-access = write

      authz-db = authz

      password-db = passwd

    2. Edit the [/] section of authz file as

      [/]

      user1 = rw

      user2 = r

      * =

          c. Edit the [user] section of passwd file as

     [user]

     user1 = pass1

              user2 = pass2


 

  1. Start SVN repository

    Start/Initiate repository by the following command

    $ svnserve -d -r /usr/svn/svnroot


     


 

SVN Installation (on Unix/Linux)

  1. Prerequisites Installing
    1. autoconf
    2. libtool
    3. a reasonable C compiler (gcc, Visual Studio, etc.
    4. libapr
    5. libapr-util
    6. libz
    7. libserf
    8. OpenSSL

    Install above prerequisites properly if your system missing any of the above list. If you have tarbal file(XXXX.tar.gz) install as

    $ tar xzvf XXXX.tar.gz

    $ cd XXXX

    $ ./configure

    $ make

      $ make install

Otherwise if you have rpm(YYYY.rpm) for the above listed prerequisites, install them by the command

    $ rpm –i YYYY.rpm


 

  1. SVN Installing

    Down load SVN tarball file from http://subversion.tigris.org/getting.html#source-release


     

    $ tar xzvf subversion-1.x.x.tar.gz

    $ cd subversion-1.x.x

    $ ./autogen

    $ ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr

    $ make

    $ make install

Print a part of a webpage using javascript

We can easily print a part of a webpage by calling window.print() .

Here is an example to print a <div>


 

<html>

<head>

</head>

<body>

    <div style = "width:100%;height:100" id="myDiv">

        This is to print<br/>

        Testing

    </div>

    <div style = "width:100%;height:100">

        This is not to print<br/>

        Testing

    </div>

    <br/>

    <span onClick="printIt();">Click here</span>

<script type = "text/javascript">

function printIt(){

    user_pref("print.print_footercenter","");

user_pref("print.print_footerleft","");

user_pref("print.print_footerright","");

user_pref("print.print_headerleft","");

user_pref("print.print_headercenter","");

user_pref("print.print_headerright","");

    wi = window.open('', 'p');

    wi.document.open();

    element=document.getElementById("myDiv");

    wi.document.write(element.innerHTML);

    wi.print();

    wi.document.close();

    wi.close();

}

</script>

</body>

</html>

Print a part of a webpage using javascript

We can easily print a part of a webpage by calling window.print() .

Here is an example to print a <div>


<html>

<head>

</head>

<body>

<div style = "width:100%;height:100" id="myDiv">

This is to print<br/>

Testing

</div>

<div style = "width:100%;height:100">

This is not to print<br/>

Testing

</div>

<br/>

<span onClick="printIt();">Click here</span>

<script type = "text/javascript">

function printIt(){


wi = window.open('', 'p');

wi.document.open();

element=document.getElementById("myDiv");

wi.document.write(element.innerHTML);

wi.print();

wi.document.close();

wi.close();

}

</script>

</body>

</html>

Eclipse plug-in for android development

Eclipse is now a days popular IDE for software developers. Google provides a plug-in for eclipse to ease android development. Follow the following steps to add android plug-in into your eclipse IDE.

1. Click help from eclipse menue



2. Click on Software Updates...



3. A new window will come. Click on Add sites



4. Type http://dl-ssl.google.com/android/eclipse/ in location field then press OK.



5. Now check the ckeck boxes left to new android update site name. And press Install



6. Check all check boxex in new popup window and click Finish.


7. Next follow the normal installation steps to complete installation.

Now your eclipse is ready for android software development.

Android : What is android?

Android:

Android is a Software Development platform as well as an Operation System for mobile devices based on Linux karnel. Android is developped by Open Handset Aliance (first by Google). It was releasen on november 2007. Android is developped in C.

Android software development tool is Java Programming Language, controlling the device by java libraries developped by google.