Archive for the ‘Java’ Category

Moving the blog to my new website

May 22, 2013

Hello everyone,

I regret the inconvenience caused all of the blog followers and the visitors due to the movement of a lot of contents to my new website. I would like you all to visit my new website http://blog.manoharbhattarai.com.np/ and follow for more interesting and helpful contents.

Please visit http://blog.manoharbhattarai.com.np/ to subscribe and follow the blog there to get updates on my new posts. Would love to see your presence there with your valuable comments.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई)
Personal Website : http://www.manoharbhattarai.com.np/
Personal Blog : http://blog.manoharbhattarai.com.np/
Website : http://www.logicinterpreter.com/

Advertisements

The “Java Life” Rap Music Video

October 5, 2011

Hi frens,

This is a rap music video. I liked it and am sharing with you all. I took the link from Java’s youtube channel. I found it from a tweet by @java. Enjoy! and CODE HARD!

The lyrics is as follows :

The “Java Life”

SPOKEN:
In the cubicles representin’ for my JAVA homies…
In by nine, out when the deadlines are met, check it.

CHORUS:
We code hard in these cubicles
My style’s nerd-chic, I’m a programmin’ freak
We code hard in these cubicles
Only two hours to your deadline? Don’t sweat my technique.

Sippin’ morning coffee with that JAVA swirl.
Born to code; my first words were “Hello World”
Since 95, been JAVA codin’ stayin’ proud
Started on floppy disks, now we take it to the cloud.

On my desktop, JAVA’s what’s bobbin’ and weavin’
We got another winning app before I get to OddEven.
Blazin’ code like a forest fire, climbin’ a tree
Setting standards like I Triple E….

Boot it on up, I use the force like Luke,
Got so much love for my homeboy Duke.
GNU Public Licensed, it’s open source,
Stop by my desk when you need a crash course

Written once and my script runs anywhere,
Straight thuggin’, mean muggin’ in my Aeron chair.
All the best lines of code, you know I wrote ‘em
I’ll run you out of town on your dial-up modem.

CHORUS:
‘Cause…
We code hard in these cubicles
Me and my crew code hyphy hardcore
We code hard in these cubicles
It’s been more than 10 years since I’ve seen the 404.

Inheriting a project can make me go beeee-serk
Ain’t got four hours to transfer their Framework.
The cleaners killed the lights, Man, that ain’t nice,
Gonna knock this program out, just like Kimbo Slice

I program all night, just like a champ,
Look alive under this IKEA lamp.
I code HARDER in the midnight hour,
E7 on the vending machine fuels my power.

Ps3 to Smartphones, our code use never ends,
JAVA’s there when I beat you in “Words with Friends”.
My developing skills are so fresh please discuss,
You better step your game up on that C++.

We know better than to use Dot N-E-T,
Even Dan Brown can’t code as hard as me.
You know JAVA’s gettin’ bigger, that’s a promise not a threat,
Let me code it on your brain

WHISPERED:
so you’ll never forget.

CHORUS:
We code hard in these cubicles,
it’s the core component…of what we implement.
We code hard in these cubicles,
Straight to your JAVA Runtime Environment.

We code hard in these cubicles,
Keep the syntax light and the algorithm tight.
We code hard in these cubicles,
Gotta use JAVA if it’s gonna run right.

We code hard in these cubicles
JAVA keeps adapting, you know it’s built to last.
We code hard in these cubicles,
Robust and secure, so our swag’s on blast

CODE HARD

Original link

Come on Java lovers lets start the rap!


Regards,
Manohar Bhattarai (मनोहर भट्टराई)
http://about.me/manoharbhattarai
http://www.facebook.com/pages/Manohar-Bhattarai/130973796914160
Blogs:
https://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/mhrbhattarai
Identi.ca :- http://identi.ca/manoharbhattarai

Only 24 super techies out of 5000 cracked it so far – Techgig’s online coding contest

October 3, 2011

Hi friends,

Just wanted to share something with you. Sorry if you don’t find something about Linux or Java in this post.

I am in a good mood today. It is because I was featured in the Techgig.com’s ad with headline “Only 24 super techies out of 5000 cracked it so far” on today’s (i.e. October 3, 2011) newspaper Times Of India, Mumbai edition, page number 26. I was one of them.

Techgig's super techies

Techgig's super techies

I would not have known it as I live in New Delhi and Delhi’s edition din’t have the same. I came to know about this only someone(Edit : Nanda Kshirsagar) posted on my facebook page https://www.facebook.com/pages/Manohar-Bhattarai/130973796914160. The post was like this “Congratulation!!! SUPER TECHIES out OF 5000 ON CODING CONTEST”. I was surprised by the post because I dint have the slightest idea.

I participated in the Techgig.com’s online coding contest few days back. Just wanted to exercise my brain a bit because I had time. I was not too serious while coding. The “Easy” level was solved at once when I wrote the code in “Java” on the editor provided by the website. I din’t even try it on my computer before submitting. But “Medium” level took a while to solve. But finally got it right. And then I did the “Expert” level.

Please comment below on how you liked this post as in this post I am just sharing what I felt. Hoping to get a well paid job soon.

Edit : Thanks “Nanda Kshirsagar” for posting on my facebook page and letting me know.


Regards,
Manohar Bhattarai (मनोहर भट्टराई)
http://about.me/manoharbhattarai
http://www.facebook.com/pages/Manohar-Bhattarai/130973796914160
Blogs:
https://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/mhrbhattarai
Identi.ca :- http://identi.ca/manoharbhattarai

How to Create Translucent and Shaped Windows in java.

September 4, 2011

Hi all,

I am back after a long time. This time I want to tell you all how I set a window as translucent in java. It was a very cumbersome thing to do before recently. From JDK 6 update 10, java has this facility to set the window as translucent  and its very easy.

Recently I did this in one of my projects and wanted to share it with you all.

As of the Java Platform, Standard Edition 6 (Java SE 6) Update 10 release, we can add translucent and shaped windows to our Swing applications.

The translucent and shaped window API was first added to the Java SE 6 Update 10 release as a private API. This functionality was moved to the public AWT package in the JDK 7 release.

Here is an example :

import java.awt.*;
import javax.swing.*;
import static java.awt.GraphicsDevice.WindowTranslucency.*;

public class MyWindow extends JFrame {
    public MyWindow() {
        super("MyWindow");
        setLayout(new GridBagLayout());

        setSize(300,200);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        add(new JButton("Just a Button"));
    }

    public static void main(String[] args) {
        // Determine if the GraphicsDevice supports translucency.
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
 GraphicsDevice gd = ge.getDefaultScreenDevice();

        //If translucent windows aren't supported, exit.
        if (!gd.isWindowTranslucencySupported(TRANSLUCENT)) { 
 System.err.println( "Translucency is not supported"); 
 System.exit(0); 
 }

        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                MyWindow tw = new MyWindow();

		// Set the window to 55% opaque (45% translucent).
                tw.setOpacity(0.55f);

		// Display the window.
		tw.setVisible(true);
	    }
        });
    }
}

To learn more please check this link.

 

Here is how you can select which methods to use according to your JDK version.

 


Regards,
Manohar Bhattarai (मनोहर भट्टराई)
http://about.me/manoharbhattarai
http://www.facebook.com/pages/Manohar-Bhattarai/130973796914160
Blogs:
https://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/mhrbhattarai
Identi.ca :- http://identi.ca/manoharbhattarai

Java SE 7 is officially here.

July 28, 2011

Hi all,

Java SE 7 is officially released today i.e. July 28, 2011(07.28.2011)! After nearly five years of collaboration within the worldwide Java community, Java Platform, Standard Edition is ready for download! It’s an important step in Java’s evolution.

The major features of Java SE 7 are:
•    Project Coin- many small language changes that add up to a big boost in productivity for developers
•    The Fork/Join Framework –  facilitates parallelism for mulit-core processors
•    The New File System API (NIO.2) – provides the ability to perform many basic file system operations natively
•    InvokeDynamic – makes it easier to run other languages on the JVM

To learn more about these features, you can view the technical presentations from Oracle’s global event on July 7.

Download Java Platform, Standard Edition (Java SE) 7 

Here is my previous blog : https://manoharbhattarai.wordpress.com/2011/07/12/java-7-is-here/


Regards,
Manohar Bhattarai (मनोहर भट्टराई)
http://about.me/manoharbhattarai
http://www.facebook.com/pages/Manohar-Bhattarai/130973796914160
Blogs:
https://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/mhrbhattarai
Identi.ca :- http://identi.ca/manoharbhattarai

Java 7 is here.

July 12, 2011

Hi all,

Java 7 (codename Dolphin) is an upcoming major update to Java, releasing on July 28, 2011(07.28.2011). The following links might help you know more about Java 7 :

Webcast on Java 7 : http://www.oracle.com/us/corporate/events/java7/index.html

Wiki on Java 7 : http://wikis.sun.com/display/JDK7/Home

Java se 7 : http://jdk7.java.net/

JDK 7 features : http://openjdk.java.net/projects/jdk7/features/

JDK 7 Java Docs : http://download.java.net/jdk7/docs/api/

I am looking forward to it. So stay tuned.


Regards,
Manohar Bhattarai (मनोहर भट्टराई)
http://about.me/manoharbhattarai
http://www.facebook.com/pages/Manohar-Bhattarai/130973796914160
Blogs:
https://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/mhrbhattarai
Identi.ca :- http://identi.ca/manoharbhattarai

How to add spring capabilities to Eclipse IDE using SpringSource Tool Suite from the Release Update Site

July 9, 2011

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

 

Regards,
Manohar Bhattarai (मनोहर भट्टराई)

How to Create an executable JAR file

April 7, 2011

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई) 

Execute java program in ubuntu from terminal

September 23, 2010

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई) 


%d bloggers like this: