Friday, July 6, 2007

BarCamp the night before

And so finally it comes - BarCampPune3.

My desktop is cleaned(less icons),
My wallpaper is set to its logo!
My Slides are almost done!



and I feel good about it!

There are some really cool sessions which I'm really looking forward to attend:

Wishlist includes:

MySQL using JRuby - Priyank Kapadia
Microsoft Silverlight, A new dimension to build rich UI applications by Aditya Thatte
Indian Technology Laws, Indian laws on cyberspace, copyright, trademark and patents by Gokul Narayan
Self Hosting - Is it the future ? by Milind Pandit

I'm disappointed I'll miss sessions by Abdul Qabiz. I don't know why he has cut his name!

So see you guys tomorrow at BarCampPune3!

Tuesday, June 26, 2007

BarCamp3 Preview

Finally BarCamp3 is here and I'm already excited.

The event will take place at Persistent System Pvt. Ltd, Pune on 7th July(Sat) 2007.

I will be speaking on two topics:

1. Mobile Visualization.
2. How to make a Flash Widget.


BarCamp Pune 3

Wednesday, June 20, 2007

Free Software Song by RMS

Recently I found the lyrics of The Free Software Song by Richard Stallman.

Before the lyrics here a short history of the song: Richard Stallman was attending some get together where everyone had to either sing or perform something. He knew his turn was coming so he quickly scribbled this song. He also thought of the tune that very moment. When he sung the song, people said it sounded like an anthem and one lady said that he should show it to Richard Stallman. He replied that he was Richard Stallman!

Join us now and share the software;
You'll be free, hackers, you'll be free.

Hoarders may get piles of money,
That is true, hackers, that is true.
But they cannot help their neighbors;
That's not good, hackers, that's not good.

When we have enough free software
At our call, hackers, at our call,
We'll throw out those dirty licenses
Ever more, hackers, ever more.

Join us now and share the software;
You'll be free, hackers, you'll be free



Original Posting : http://www.gnu.org/music/writing-fs-song.html
Wikipedia Entry : http://en.wikipedia.org/wiki/Free_Software_Song

Thursday, June 7, 2007

VB6 and IE7 problem

One may no longer be able to use the ieframe.dll when using IE7 with VB6's Web Browser Control

Here's a quick tip:
On your component selection dialog box, Point the Microsoft Internet Controls to SHDOCVW.dll instead of ieframe.dll and bingo!

Thursday, May 31, 2007

Add external deployable files to Java EE projects on netbeans

Ever wondered how you'd deploy external CSS/JavaScript with servlets or JSPs?
This article will guide you on how to add a CSS/JavaScript (.css, .js) or any file in your project so that it gets inside your .WAR file too!

Here's how to:

1) Start your netbeans: I am using 5.5
2) Goto Tools>Template Manager
3) Select or Expand "Other"
4) Click "Add..." and select the file which you want to include.
5) After selecting the file will appear in your "Others" list
6) In your project navigator, add a new file of this type.
7) Give a name to this file and feel excited!

Monday, May 14, 2007

Netbeans - My Favorite IDE

Netbeans is my favourite IDE when it comes to Java. Although its too slow but the way it arranges stuff for me is quite COOL!

Some facts that I have noticed so far:

1. It takes request from doGet or doPost and sends it to another method. So it doesn't matter if the parameters come from GET or POST, you simple work with them! (Really cool for beginners)

2. It creates a dist directory for each project which means you don't have to explicitly make any such deployment folder. You'll never want a WAR file unless really required. Just copy the contents of this folder and paste it to your deployment folder.

3. It has also got this feature of starting and stopping the bundled Apache Tomcat server as and when required. You can even configure server's port with a GUI which netbeans provides.


4. Netbeans mobility pack is just so awesome. Just drag and drop all basic components(reminds me of VB6).

5. Netbeans generates codes for such UML style drag drop behind the scene. Its got this wonderful feature called as Lazy Initialized. This feature is a coding style where the main thread will not initialize all the form elements instead call methods as an when the form/component is required.
I personally find this very interesting as when I program in J2ME, Its really good to initialize the forms as and when the user needs them. For example: Why would you initialize a form which contains About & Version infomation. It will use up unnecessary space if that form was never visited!

6. Netbeans can also adhere to different Mobile environments and JDKs. For example, If you have a Black Berry's JDE installed, you can make netbeans to compile/run/use Black Berry's APIs. Which means you work with your favourite editor even if the platforms differ.
My Netbeans is configured with mobility pack which has configured sun's WTK 2.2, Black Berry JDE 4.1 & JDE 4.2.

7. If you're connected to the internet, netbeans' welcome page displays latest happennings with Blogs, articiles posted daily. I always make a point to check out whats the latest there!

8. The overall look and feel is quite good. I have been using it since v.4.x and it has improved a lot.


Although Netbeans is slow(Tell me which one is not!), I'll still give it preference over any other IDE available for the complete Java Technology I.e Java SE, Java EE and Java ME platform. I wont give preference to Eclipse (from where netbeans has derived!).

Friday, April 13, 2007

Flash and JavaScript Integration

Flash and JavaScript Integration

Follow these easy steps to make flash communicate with JavaScript code and vice versa.

a) Flash to JavaScript: Making Flash call a JavaScript function

JavaScript Function Code. To be put in the HTML

<script language="JavaScript">
function alertMe(){
alert("Hello, world");
}
</script>

Flash Code. To be put in any event of button, frame, where ever required:

import flash.external.ExternalInterface;
function callJavaScript(){
ExternalInterface.call("alertMe");
}

Please note that due to default security these codes will not work if the flash is loaded locally.
To test this, you will either need to upload your .swf and .html to a server and request the files from the server.
OR you will need to set the global security settings( Google it to know how!)


b) JavaScript to Flash : Making JavaScript call a Flash Function.

Flash function code that needs to be called:

import flash.external.ExternalInterface;
function startPlaying(){
play();
}
ExternalInterface.addCallback("startPlaying", this, startPlaying);

Java Script code to call the method in the flash:

<script language="JavaScript">
var myflashref;
function getReference(){
if (navigator.appName.indexOf("Microsoft") != -1 )
myflashref = window.flashObject;
else
myflashref = window.document.flashObject;
}
function playFlash(){
getReference(); //getting the flash reference.
myflashref.startPlaying(); //call the method in the flash
}
</script>

Well, I leave it up to you now to do some R&D and make data pass through flash and JavaScript and vice-versa!

Feel free to leave clarification requests.