Vertor is any dynamic array and A simple way to go over all elements in a Vector is to use a ListIterator. The advantage of an iterator is that it it can be used with other data structures, so that if you later change to using a linked list for example, you won't have to change your code. Here is an example of using an iterator to print all elements (Strings) in a vector. The two most useful methods are hasNext(), which returns true if there are more elements, and next(), which returns the next element.
ListIterator iter = v.listIterator();
while (iter.hasNext()) {
System.out.println((String)iter.next());
}
Last year Microsoft's vactions has been cancelled by the GMail. Omar Shahine from Hotmail's team has blogs about working 80 hour weeks and canceling vacations in order to match Google's Gmail offering. .
>>
As the Firefox spread world wide and here is a simple tip for enabling Firefox. The SVG 3.0 library is incompatible with Firefox 1.0 so an upgrade to SVG 6.0 (Beta) is needed. Steps are as follows:
Simply download the latest SVG 6.0 Beta binaries from
http://www.adobe.com/svg/viewer/install/beta.htmland install SVG, Next
Navigate to the installed directory, on Win2k that would be "C:\Program Files\Common Files\Adobe\SVG Viewer6.0\Plugins" and copy the files NPSVG6.dll NPSVG6.zip
Paste the files into the plugins directory for firefox. This directory on Win2k is "C:\Program Files\Mozilla Firefox\plugins".
Simply restart Firefox and your ready to use SVG graphics.
Dr. Mark Jacobs, a specialist with Atlantic Cardiology Associates at Portsmouth Regional Hospital, says the implantable cardioverter defilbrillator could potentially be vulnerable to interference from computer hackers. Although praised by doctors for their convenience, the emerging technology of remote-from-home defibrillators (pacemakers) has caused some to fear that hackers could someday interfere with a patient’s treatment for heart ailments. They admit that the data is encrypted, but I think still…. Oh NO :( !
I found a very good small tutorial on Developing XML Solutions with JSP Technology, good for starters. It also covers how to use XSL, XSLT.
download tutorial
I am really happy :) to welcome my Friend Prashanth Mohan
http://prashmohan.blogspot.com/ for joining the blogging community and I hope we will find lots of nerdy interesting posts [like him ;)] in his blog. That's a good start Prashanth :) and I will start continue to read your blogs regularly.
Yesterday night, I upgraded my Tomcat server at home from 4 to version 5.0.29 [although version 5.5.7 is the latest] and I have to check out what are the new features are in the cat. As usual Installation and set up is very simple.
>>
Connect to Art is a collection of modern art for your mobile Nokia phone. This new media of art is innovative and inspiring. Connect to Art represents art from known and established artists as well as interesting new comers. New exhibitions open up frequently. This website is an introduction to the mobile art collection. The works are designed to work currently on Nokia 3230, Nokia 6260, Nokia 6600, Nokia 6620, Nokia 6630, Nokia 6670, Nokia 7610 and Nokia 7710 mobile phones.
>>
A good interesting Benchmark to find Java is faster than C plus plus. It’s for the people who call java slower.
>>
Java Get Powered logo is available to Java technology enthusiasts everywhere. It's Free unlimited right to use on blogs and websites. All you do is just take a quiz [only three questions]. If you LOVE JAVA, you must place it in your website or blog or anywhere you think.
>>
I came across this ipod cover in ebay, a cover made for my mini model - the Marlboro cover. Two or more cigarettes hold the player so you can listen and smoke when out and about. Current bid is US $5.00.
>>
In Java 5.0 release, life for the Swing developer has gotten easier. While the content pane still exists, you almost never need to work with it directly. Calls to setLayout(), add(), and remove() are now forwarded on to the content pane. In other words, instead of getting the content pane of a high-level container like a JFrame with getContentPane() and then manipulating that, you instead call setLayout(), add(), and remove() directly on the frame object as below:
...
jframe.setLayout(layout);
jframe.add(label);
jframe.add(button);
...
In JFrame, whose contents you wanted to be resized as you resize the Container. By default, when a Container is resized the contents of that Container are not resized until the resizing of the Container is done. This can be done using
Toolkit.getDefaultToolkit().setDynamicLayout(true);This will cause the contents of the Container to be resized while the Container is being resized.
The JavaLobby has great presentation by Ben Galbraith on Threading issues with Swing. It is in the form of a flash movie. Ben discusses the problems related to a "slow" or "non-responsive" Swing application and how to solve them.
>>
Autoboxing, introduced in Java 5, is the automatic conversion that Java makes between the primitive (basic) types and their corresponding object wrapper classes (eg, int and Integer, boolean and Boolean, etc).
Without Autoboxing
int i;
Integer j;
i = 1;
j = new Integer(2);
i = j.valueOf();
j = new Integer(i);
With Autoboxing
int i;
Integer j;
i = 1;
j = 2;
i = j;
j = i;
The ADEX (pronounced "A DEX") would be an immersive environment. Instead of sitting in front of a PC staring at a display it would ideally use some form of Virtual Reality type display so you would find yourself inside a 3 dimensional generated world. You would also wear parts or all of a suit which would produce tactile feedback - when your virtual hand touches something you would feel it.The ADEX would use these and other techniques to represent a "world". You and others would be able to interact with each other and with objects within the world. A group of friends could play virtual football using a virtual ball in a world.
>>
JNode has a new release JNode 0.1.10. JNode is an effort to create a Java Operating System.
>>Here is the release notes:
Ported to AMD64
Improved ACPI structure
Improved BIOS structure
Renamed jnodesys.gz bootable image to jnode32.gz / jnode64.gz
Added classpath command
Added onheap command
Added JIFS JNode information filesystem
Lots of GNU Classpath patches
Addition of kernel debugger
Change in method calling approach (improves performance)
Developer.com, announced the WINNERS for the "Developer.com Product of the Year" 2005 contest! and Hey look JAVA and OpenSource technologies takes it all.
>>And the Winners Are...
Technology of the Year
Java 2 Standard EditionTM 5.0 From Sun Microsystems Inc. Enterprise Development Tool of the Year
Java J2EETM From Sun Microsystems Inc. Runner Up: Microsoft® Visual Studio® .Net From Microsoft® Corporation
Wireless/Mobile Development Product of the Year
J2METM Wireless Toolkit 2.2 From Sun Microsystems Inc. Web Service or Related Tool of the Year
Java Web Service Developer Pack From Sun Microsystems Inc. Java Tool of the Year
Sun JavaTM Studio Creator From Sun Microsystems Inc. Open Source Tool of the Year
NetBeans IDE From NetBean.orgDevelopment Tool of the Year
Eclipse From The Eclipse FoundationRunner Up: Sun JavaTM Studio Creator From Sun Microsystems Inc.
Development Utility of the Year
Firefox 1.0 From Mozilla Runner Up: Altova XMLSpy® 2005 From Altova
JamPod an iPod accessory, little device turns your iPod into a portable private amplifier. Plug it into your iPod, a guitar or other guitar-level instrument into it, and you’ve got the ability to mix in your signal with what’s playing on the pod
http://www.dvforge.com/ .
You can create any color with values for red, green, and blue (the RGB system) between 0-255. You could do it this way:
Random r = new Random();
Color c = new Color(r.nextInt(256), r.nextInt(256), r.nextInt(256));
the three calls to nextInt(256) look the same, each will return an random number.
An InformationWeek report states that Sun's Java Desktop System is an affordable, easy-to-use, secure enterprise-grade desktop solution. It consists of a fully integrated client environment based on open-source components and industry standards. It includes a well-defined, integrated look and feel, familiar desktop themes, as well as interoperability with Microsoft Windows and Linux/Unix, at a fraction of the price of a Microsoft Windows desktop.
I found an interesting article about Installing Debian/GNU Linux on the Mac Mini. Apple's Mac Mini is something which a lot of Linux users have been waiting for: An inexpensive, readily available PowerPC system in a small, quiet and attractive chassis. Debian is very popular on Intel i386 compatible systems. Due to the open source nature of the Linux kernel and the Debian operating system, it is possible to build the same software to run on the PowerPC processor found inside the Mac Mini. I think It will be useful for all the Mac/Linux users.
http://www.sowerbutts.com/linux-mac-mini/
Most versions of the Java 2 Platform Standard Edition have an internal code or project name, as listed below. Starting with Tiger, each version has two version numbers: an internal number, such as 1.5.0, and an external number, such as 5.0.The dates listed are the final product release dates (following any beta releases).
JDK 1.1.4 Sparkler Sept 12, 1997
JDK 1.1.5 Pumpkin Dec 3, 1997
JDK 1.1.6 Abigail April 24, 1998
JDK 1.1.7 Brutus Sept 28, 1998
JDK 1.1.8 Chelsea April 8, 1999
J2SE 1.2 Playground Dec 4, 1998
J2SE 1.2.1 (none) March 30, 1999
J2SE 1.2.2 Cricket July 8, 1999
J2SE 1.3 Kestrel May 8, 2000
J2SE 1.3.1 Ladybird May 17, 2001
J2SE 1.4.0 Merlin Feb 13, 2002
J2SE 1.4.1 Hopper Sept 16, 2002
J2SE 1.4.2 Mantis June 26, 2003
J2SE 5.0 (1.5.0) Tiger released 2004
Future Releases
J2SE 5.1 (1.5.1) Dragonfly (dragon) Not yet released
J2SE 6.0 (1.6.0) Mustang Not yet released
To convert something to a string is to concatenate it with a string with no characters in it (""). For example, to convert the value in int x to a String and assign it to the String s:
int x;
String s;
s = "" + x; // converts x to String
You can shutdown Windows from a Java program, using Runtime class and call the “rundll32.exe” like bellow:
Runtime.getRuntime().exec("rundll32.exe user.exe,exitWindowsExec");
This Week, ILUGC meet was highly informative and demo based, on GNU/Hurd Installation, by Shakthi. Keep it up, you did a great job. I just love such informative sessions. Here are the steps
GNU/Hurd from CD, with grub installed to hard disk
1/ Use fdisk to recreate partition:
/dev/hdb1 fat32 7 GB
/dev/hdb2 swap 256 MB
/dev/hdb3 Linux 1 GB (hurd partition)
/dev/hdb4 Linux 30 GB
2/ Boot from K8 CD
3/ Select keyboard layout
4/ Activate swap
5/ Initialize Hurd partition
6/ Install base system
7/ Reboot into grub prompt
8/ At grub prompt,
/*
(to find, "find /boot/gnumach.gz")
root=(hd0,2)
*/
kernel (hd0,2)/boot/gnumach.gz root=device:hd1s3 -s
module (hd0,2)/hurd/ext2fs.static
--multiboot-command-line=${kernel-command-line}
--host-priv-port=${host-port}
--device-master-port=${device-port}
--exec-server-task=${exec-task} -T typed ${root}
$(task-create) $(task-resume)
module (hd0,2)/lib/ld.so.1 /hurd/exec $(exec-task=task-create)
boot
12/ Run native-installer
13/ Reboot
14/ Enter Hurd, run native-installer again
15/ Reboot
16/ Remove -s in kernel entry in /boot/grub/menu.lst and boot
Enter GNU/Hurd system!
>login root
#
For CDROM:
settrans -g /cdrom /dev/iso9660fs /dev/hd2
settrans -gp /cdrom (remove)
Gordon Moore made his famous observation in 1965, the doubling of transistors every couple of years, has been maintained, and still holds true even today
1. Colin McRae Rally 2005
2. Star Trek: Birds of Prey
3. Vans Skate & Slam featuring Geoff Rowley
4. Jamdat Sports NBA 2005
5. OP15: Rising Threat
6. Deer Hunter
7. Prince of Persia: Warrior Within
8. Rolling Stone 20 Questions
9. The Mummy
10. Gauntlet
Wireless ePay is USA ePay's solution to processing transactions wirelessly with a merchant's existing Java-based phone over any provider's wireless network. In the past merchants who wanted to process cards outside in the field would either have to take the card and call it into their office, take an imprint of the card and process it when they get back to the office or buy an expensive wireless unit; Wireless ePay is the solution to these problems. Wireless ePay works with your existing Java-based (J2ME) phone and allows merchants to process credit cards wirelessly while keeping their retail / swiped rates.
Maps are great for getting around, but online maps could be a lot better. So Google decided to make dynamic, interactive maps that are draggable — no clicking and waiting for graphics to reload each time you want to view the adjacent parts of a map. Want to be able to type in the name of a region or neighborhood and see any part of it as easily as with a regular street map? Now you can with Google Maps.
Radio Frequency Identification Tag (RFID) technology is cropping up in more and more places, mostly because it is an excellent system for tracking things. That is why it will make its way into everything from warehouses to clothing shops. At McCarran International Airport in Las Vegas, it is being used to track bags. The $100 million monitoring solution is still being tested, but later this year the airport hopes to be the first in the US to put an airport-wide Radio Tag system into full time operation. Each piece of luggage is identified with a familiar looking baggage label, but it also contains a tiny transponder, a small bump that is barely noticeable. Each tag has a unique ID number that can be picked up by a RFID reader and sent along the appropriate conveyer belt.
Google India Code Jam 2005, Powered by TopCoder. Conducts Code Jam 2005 in the region for a share of Rs. 16,00,000 in Cash Prizes!
1st Place - Rs. 3,00,000
2nd Place - Rs. 2,00,000
3rd Place - Rs. 1,25,000
4th Place - Rs. 75,000
5th Place - Rs. 50,000
6th to 50th Place will share Rs. 8,50,000
My Friend Rajkumar has sent me this very Funny Java Q & A … [read it only if you have time!]
Q. What is the difference between an Abstract class and Interface?
A. Terms are different ... nothing more
Q. What is JFC ?
A. Jilebi, Fanta & Coffee
Q. Explain 2 tier and 3 -tier Architecture ?
A. Two wheelers like scooters will have 2 tyres and autorickshaws will
have 3 tyres.
Q. I want to store more than 10 objects in a remote server ? Which
methodology will follow ?
A. Send it through courier.
Q. Can I modify an object in CORBA ?
A. As you wish , I do not have any objections.
Q. How to communicate 2 threads each other ?
A. Non living things can't communicate.
Q. What is meant by flickering ?
A. Closing and opening of eyes at girls.
Q. Explain RMI Architecture?
A. I am a computer professional not an architect student.
Q. What is the use of Servlets ?
A. In hotels, they can replace servers.
Q. What is the difference between Process and Threads ?
A. Threads are small ropes. Make a rope from threads is an example for
process.
Q. When is update method called ?
A. Who is update method?
Q. What is JAR file ?
A. File that can be kept inside a jar.
Q. What is JINI ?
A. A ghost which was Aladdin's friend.
Q. How will you call an Applet from a Java Script?
A. I will give invitation.
Q. How you can know about drivers and database information ?
A. I will go and enquire in the bus depot.
Q. What is serialization ?
A. Arranging one after the other from left to right.
Q. What is bean ? Where it can be used ?
A. A kind of vegetable. In kitchens for cooking they can be used.
Q. Write down how will you create a binary Tree ?
A. When we sow a binary seed , a binary tree will grow.
Q. What is the exact difference between Unicast and Multicast object ?
A. If in a society, if there is only one caste, then it is Unicast, else
it is multicast.
My Webblog has been listed as "Favorite Bloggers" of Sun Microsystems Blog. I am the only non-Sun Microsystems employee in that blog, I am really proud and great to be in the list.
Yesterday, I attended :) the Extramural Lecture by Richard Stallman [RMS] - GNU Founder, at HSB, IIT-Madras who explained about software patents and its causes. RMS came to chennai for startup of FSF- chennai. I am highly impressed by the lecture of Richard Stallman, who launched the development of the GNU operating system in 1984.
Richard Stallman will explained about software patents obstruct software development. Software patents are patents that cover software ideas. They restrict the development of software, so that every design decision brings a risk of getting sued. Patents in other fields restrict factories, but software patents restrict every computer user.
Economic research shows that they even retard progress.
He explained about the threats posed by software patents. How individual Developers /Companies /and the people of India will be affected if patents come to existence in India. About the difference between Copyright Law, Patents and Trademark laws. He explained that these Laws were formulated to aid the people, but instead these things [patents] have started troubling people[individual developers, Medium scale companies]. In 1984 a "program compress" was written but it died unfortunately before release. The reason was the implementation of lzw algorithm in the program [software] which was patented. Now "gz" is becoming the standard and we all have to adopt it for compression. This "gz" implements another powerful algorithm that is free from patents and has more advantages [performance based] when compared to lzw algorithm. GIF format has become the defacto standard for images. But, it has an implementation of lzw algorithm in it. Surely we will be sued one day for implementing lzw algorithm [he told so]. And also he advised to adopt "png" format in applications because it doesn’t have lzw implementation in it.
A magazine in US has described patent as a "LOTTERY".If a person has a patent then he can start pointing out people and demand for the implementation of his patents in their application. A Linux user has calculated that Linux has some 280 patent infringements. Stallman told that Linux is just the kernel and that it is 0.5% of the whole GNU system. He told that GNU softwares as a whole would roughly have some 40,000 patent infringements [assumption].
He instructed people to spread this talk to all developers/companies and fight against patent. He advised the people in the Hall to take the needed
steps to fight patents being authorized in India.
CNet have an interesting interview with Dieter Gundel, head of racetrack electronics at Ferrari. Here are some interesting bits of information:
- PCs use Microsoft (Windows) XP company wide. Office products are standard Microsoft. PCs for the majority of work. Workstations for design and component simulations. Control software for the car is C and assembler.
- Analysis and simulation is mainly done with Matlab. Other projects are written in object-oriented languages (C++, Delphi and Visual Basic, depending on preference).
- Data logged is roughly 1GB for an average race that lasts about one and a half hours All design work is done using CAD and CAM tools.
- The structural and kinematical analysis is entirely computer-based Some years ago the car would have been sent out without data logging working if there was a problem.
- Today the car will not leave the garage if data logging is not OK. There is no point in running the car without the IT-based tools operation operating at an optimum level.
- Amazing how much IT has influenced motorsport.
- Java :)
- C
- C++
- PHP
- VB
- Perl
- Delphi
- Python
- SQL
- JavaScript
I love visiting technical newsgroup as there are many good topics on programming. I find one: Most common two-word phrase uttered while programming. It's true that developers usually shout out similar words when getting bugs/ compiling errors. Here are some:
- That's weird
- Uh-oh
- It worked yesterday
- Come on
- It's hardware
- cuppa time
- More Coffee
- Stupid computer
- ^#$%^& Microsoft
To make my application reside on the System Tray , I worked with 'SysTray for Java' an API written to enable Java applications access the system tray. The coding is simple and good and supports the creation of submenus, checkable menus, and allows modification of everything during runtime.
Yesterday, ILUGC meet was really informative and highly interative and It helped me alot to have a good and better understanding about the GNU/ HURD. I would like to extend my BIG thanks to Anand Babu. :)
Haa! Haa! :) , Here is the prize I have received a java tiger-keychain gift [look above] along with some java powered stickers and java badges from Sun Microsystems, for my contribution to the early versions of Java Platform.
I found a diagnostic guide for J2SE 5.0, help trouble-shoot problems. The document provides a description of the tools, command line options, and other items that can be used when analyzing a problem. The document also provides guidance on how to approach some general issues like memory resource issues. You can download that pdf from
here.
Changing Firefox's icon default icon is relatively simple. Yesterday, I tried that and did it. Look above the icon I have changed the default icon to Java coffee cup.
How to change:
- Go to the Firefox folder in (e.g. C:\Program Files\Mozilla Firefox\) and then go to the subfolder chrome.
- In chrome, create a new subfolder called icons, then go to that folder and create yet another subfolder called default. The full path to this folder could be C:\Program Files\Mozilla Firefox\chrome\icons\default\.
- Choose the .ico you want to use and then place it in this folder and rename it to main-window.ico, and restart the Firefox.
As everyone is checking their nerd level from wxplotter website. I too took up the test and checked about my nerd level and I could get only this Low Score ;) and the result states me as "Supreme Nerd God!" and I am nerdier than 99% of all people. I believe Nerd Quiz is not big enough to calculate our Nerd thing.
Artificial Life in Hong Kong has developed a new game called Virtual Girlfriend. The game is due for launch at the 3G World Conference in Hong Kong on November 15, but has already created a storm of interest, especially in South America, Europe and Asia. Virtual Girlfriend players establish a relationship with a "girlfriend" and progress to new levels as the relationship evolves. The artificial girlfriend needs a lot of attention and likes gifts such as chocolates and flowers. To get "boyfriends" playing the game as often as possible, the company has designed play so that the girlfriend needs a visit every day. She has secrets the boyfriend needs to discover to get to the next level. She reveals the secrets little by little. The game uses technologies such as streaming, video and live chat. It has a natural language processor, text-to-speech voices, including English, German, Chinese, Korean and Japanese. Unlike most other games, the user can chat live with the artificial girlfriend," Schoneburg says. The user can follow and interact with the girlfriend during different activities, such as when she is shopping, when she is out for a coffee with her friends, at the workplace or at her virtual home.