SmartFaucet from iHouse – New Gadget in Your Bathroom

GadgTechWorld.blogspot.comInternet and high-tech gadgets have already penetrated in our life to an unbelievable level: cameras in belts, Bluetooth watches, electronic car keys finders and high technology is coming to our kitchens and bathrooms

Smartbuyglasses giveaway winner

The winner of the SmartBuyGlasses giftvoucher of 150 euro is Denise. Congratulations Denise, SmartBuyGlasses will contact you about your price.

More Flatbabies

Well we're getting down to the wire now...I think the mail is moving pretty well this year though so hopefully everyone will be getting these in time for the holidays, at least folks in the US at any rate.

Monday, October 25, 2010

How To Create An Executable JAR File

Today I will show you how to create an executable jar file. I do not know whether this topic is introduced by any other member. Using this method one can build graphical user interface program with java which will behave similar to Executable files i.e., the program can be started with double clicks. It is an easy alternative. Otherwise to run a java program one has to run it through comand prompt(in windows) using java command or by creating java executalbes which are very difficult to make. So lets begin:
Frist of all, we will create a simple java application using java foundation class popularly known as java Swing. Let the file name be JarExample.


CODE
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class JarExample {

private static void createAndShowGUI() {
JFrame.setDefaultLookAndFeelDecorated(true);

JFrame frame = new JFrame("Window");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

JLabel emptyLabel = new JLabel("");
emptyLabel.setPreferredSize(new Dimension(175, 100));
frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);

frame.pack();
frame.setVisible(true);
}

public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
}


Now compile the java file. JDK will produce two class files namely (a)JarExample.class ( JarExample$1.class.
All the years we have been doing this.Your question might be what new? Its coming.
Now we will create a Manifest File. If you have done java beans then you are quite familiar with the term.
Let write our Manifest File:-
The name of the file is :- jex.mf

CODE
Manifest-Version: 1.0
Main-Class: JarExample

We are now ready to create our JAR file.
create a folder, keep the class files (JarExample.class,JarExample$1.class) and the manifest file in that folder.
Now open command prompt. Say for example your folder name is jar and you have kept it in C DRIVE. Now change directory using CD jar command.
Now we will create jar file using following command.
c:\jar>jar cfm jarex.jar jex.mf *.class
It will create jarex.jar .
I wish you will be able to create jar file using this method.

Some Of The Use ful Info About JAVA &J2EE

  • What is JAVA ?
Java is a pure object oriented programming language, which has derived C syntax and C++ object oriented programming features. Is a compiled and interpreted language and is platform independent and Can do graphics, networking, multithreading. It was initially called as OAK.

  • Encapsulation : Nothing but data hiding, like the variables declared under private of a particular class are accessed only in that class and cannot access in any other the class.

  • Inheritance : Is the process in which one object acquires the properties of another object, ie., derived object.

  • Polymorphism: One method different forms, ie., method overriding and interfaces are the examples of polymorphism.


  • What are Java Buzzwords ?
Simple : Easy to learn.
Secure : Provided by firew alls between networked applications.
Portable : Can be dynamically downloaded at various platforms in internet.
OOP : Four Corner stones.
Multithread : Can perform more than one task concurrently in a single program.
Robust : overcomes problems of de-allocation of memory and exceptions.
Interpreted : Convert into byte code and the executes by JVM.
Distributed : Concept of RMI.
Dynamic : Verifying and accessing objects at run time.

  • Scope and lifetime of variables ?
scope of variables is only to that particular block lifetime will be till the block ends.

  • Explain about Static ?
When a member is declared as static it can be accessed before any objects of its class are created and without any reference to any object. these are global variables, no copy of these variables can be made. static can also be declared for methods. and cannot refer to this or super.

  • method overloading : same method name with different arguments.
  • method overriding : same method name and same number of arguments

  • How Exception handling is done in Java ?
Is managed via 5 keywords :
try : statements that you want to monitor the exceptions contain in try block.
catch : the exception thrown by try is catched by this.
throw : to manually throw exception we go for this.
throws : Exception that is thrown out of a method must be specified by throws after the method declaration.
finally : This block is executed whether or not an exception is thrown. and also it is executed just before the method returns. and this is optional block.

  • What is the use of bin and lib in JDK?
Bin contains all tools such as javac, appletviewer, awt tool, etc., whereas lib contains API and all packages.

  • What is the difference between superclass and subclass?
A super class is a class that is inherited whereas sub class is a class that does the inheriting.

  • What is the difference between exception and error?
The exception class defines mild error conditions that your program encounters.
Ex: Arithmetic Exception, FilenotFound exception
Exceptions can occur when
- try to open the file, which does not exist
- the network connection is disrupted
- operands being manipulated are out of prescribed ranges
- the class file you are interested in loading is missing
The error class defines serious error conditions that you should not attempt to recover from.
In most cases it is advisable to let the program terminate when such an error is encountered.
Ex: Running out of memory error, Stack overflow error.

  • What is adapter class?
An adapter class provides an empty implementation of all methods in an event listener interface. Adapter classes are useful when you want to receive and process only some of the events that are handled by a particular event listener interface. You can define a new class to act listener by extending one of the adapter classes and implementing only those events in which you are interested.

  • What is meant by controls and what are different types of controls in AWT?
Controls are components that allow a user to interact with your application and the AWT supports the following types of controls:
Labels, Push Buttons, Check Boxes, Choice Lists, Lists, Scrollbars, Text Components.
These controls are subclasses of Component.

  • What is Bootstrapping in RMI?
Dynamic loading of stubs and skeletons is known as Boot Strapping.

  • What is servlet tunnelling?
Used in applet to servlet communications, a layer over http is built so as to enable object serialization.

  • What is the frontend in Java?.Also what is Backend?.
Frontend: Applet
Backend : Oracle, Ms-Access(Using JDBC).

  • What are theTools provided by JDK
(i) javac - compiler
(ii) java - interpretor
(iii) jdb - debugger
(iv) javap - Disassembles
(v) appletviewer - Applets
(vi) javadoc - documentation generator
(vii) javah - ' C' header file generator

  • What are the Java Primitive Data Types ?
Byte-8-bit, short-16-bit, int-32-bit, Long-64-bit, Float-32-bit floating point, Double-64-bit floating point, Char-16-bit Unicode

  • What are the packages in JDK?
There are 8 packages
(i) java.lang
(ii) java.util
(iii) java.io
(iv) java.applet
(v) java.awt
(vi) java.awt.image
(vii) java.awt.peer
(viii) java.awt.net

  • What is runnable?
Its an Interface through which Java implements Threads.The class can extend from any class but if it implements Runnable,Threads can be used in that particular application.

  • What is synchronization?.
Two or more threads trying to access the same method at the same point of time leads to synchronization.If that particular method is declared as synchronized only one thread can access it at a time. Another thread can access it only if the first thread' s task is complete.

  • What is a Skeleton ?
Skeletons are server side proxies and stubs are client side proxies. True

  • Who introduced Jscript ?
Netscape introduced JScript language

  • What is MIME ?
MIME(Multipurpose Internet Mail Extension) is a general method by which the content of different types of Internet objects can be identified.

  • What are different ways of Session-Tracking?.
(i) User-Authorization
(ii) Hidden Files
(iii) Persistant Cookies
(iv) URL Rewriting.

  • What are the four components in URL ?
http:// www. yahoo .com : 8080 / index.html
http: --- > is protocol
www. yahoo .com --- is IP address
8080 -- port number and is a pointer to memory location.
index.html -- file path to be loaded

  • What is a StringTokenizer ?
String Tokenizer provide parsing process in which it identifies the delimiters provided by the user , by default delimiters are spaces, tab, newline etc. and separates them from the tokens. Tokens are those which are separated by delimiters.

  • What are macros and Inline functions ? Which is best and Difference ?
Inline functions do Parameter passing, where as Macros do Text Substitution.
Its better to go for Inline functions than macros, else you may get different results.

  • What is Serialization ?
The process of writing the state of an object to a byte stream. and can restore these objects by using deserialization.Is also need to implement RMI, which allows a java object of one machine to invoke java object of another machine.ie., the object is passed as an argument by serializing it and the receiving machine deserializes it.

  • What is the difference between CGI and Servlet ?
CGI suffered serious performance problems. servlets performance is better.
CGI create separate process to handle client request. and Servlets do not.
CGI is platform dependent, whereas Servlet is platform-independent b’cauz written in java.
Servlets can communicate with applets, databases and RMI mechanisms.

  • What are Vector, Hashtable, LinkedList and Enumeration?
Vector : The Vector class provides the capability to implement a growable array of objects.
Hashtable : The Hashtable class implements a Hashtable data structure. A Hashtable indexes and stores objects in a dictionary using hash codes as the object' s keys. Hash codes are integer values that identify objects.
LinkedList : Removing or inserting elements in the middle of an array can be done using LinkedList. A
LinkedList stores each object in a separate link whereas an array stores object references in consecutive locations.
Enumeration : An object that implements the Enumeration interface generates a series of elements, one at a time.
It has two methods, namely hasMoreElements( ) and nextElement( ). HasMoreElemnts( ) tests if this enumeration has more elements and nextElement method returns successive elements of the series.

  • What is the difference between an applet and a servlet?
Servlets are to servers what applets are to browsers.
Applets must have graphical user interfaces whereas servlets have no graphical user interfaces.

  • What is the difference between doPost and doGet methods?
a) doGet() method is used to get information, while doPost( ) method is used for posting information.
b) doGet() requests can' t send large amount of information and is limited to 240 -255 characters. However, doPost( )requests passes all of its data, of unlimited length.
c) A doGet( ) request is appended to the request URL in a query string and this allows the exchange is visible to the client, whereas a doPost() request passes directly over the socket connection as part of its HTTP request body and the exchange are invisible to the client.

  • What is the life cycle of a servlet?
Each Servlet has the same life cycle:
a) A server loads and initializes the servlet by init () method.
b) The servlet handles zero or more client' s requests through service( ) method.
c) The server removes the servlet through destroy() method.

  • What are the different servers available for developing and deploying Servlets?
a) Java Web Server
b) JRun
g) Apache Server
h) Netscape Information Server
i) Web Logic

  • How do servlets handle multiple simultaneous requests?
The server has multiple threads that are available to handle requests. When a request comes in, it is assigned to a thread, which calls a service method (for example: doGet(), doPost( ) and service( ) ) of the servlet. For this reason, a single servlet object can have its service methods called by many threads at once.


  • What is the difference between TCP/IP and UDP?
TCP/IP is a two-way communication between the client and the server and it is a reliable and there is a confirmation regarding reaching the message to the destination. It is like a phone call. UDP is a one-way communication only betw een the client and the server and it is not a reliable and there is no confirmation regarding reaching the message to the destination. It is like a postal mail.

  • What is RMI and steps involved in developing an RMI object?
Remote Method Invocation (RMI) allows java object that executes on one machine and to invoke the method
of a Java object to execute on another machine.
The steps involved in developing an RMI object are:
a) Define the interfaces
b) Implementing these interfaces
c) Compile the interfaces and their implementations with the java compiler
d) Compile the server implementation with RMI compiler
e) Run the RMI registry
f) Run the application

  • What is RMI architecture?
a) Application layer ---- contains the actual object definition
b) Proxy layer ---- consists of stub and skeleton
c) Remote Reference layer ---- gets the stream of bytes from the transport layer and sends it to the proxy layer
d) Transportation layer ---- responsible for handling the actual machine-to-machine communication

  • What are Predefined variables or implicit objects?
To simplify code in JSP expressions and scriptlets, we can use eight automatically defined variables, sometimes called implicit objects. They are request, response, out, session, application, config, pageContext, and page.

Some Of The Useful Links Here

USEFULL SITES HERE:

Free sms to India :

SEND FREE SMS
CLICK HERE


Free Games Site 4u :
CLICK HERE1
CLICK HERE2
CLICK HERE3


FOR Free Webhosting :
CLICK HERE

FOR ONLINE TIPS :
CLICK HERE

Hackers' Black Book :
DOWNLOAD HERE

FOR ALL EBOOK :
CLICK HERE

FOR PC SOFTWARE :
CLICK HERE1
CLICK HERE2

FOR WALLPAPER :
CLICK HERE

List of e-Papers in India (English) :



The New Indian Express

http://epaper.newindpress.com/

The Telegraph

http://epaper.telegraphindia.com/default.aspx?xb=true

Times Ascent

http://timesascent.in/

Times Of India / The Economic Times

http://epaper.timesofindia.com/

The Pioneer

http://70.86.150.130/pioneer/login.aspx

MINT
http://epaper.livemint.com/

Mid-Day (a Mumbai Daily)
http://epapers2.mid-day.com/midday/index.htm

Mail Today
http://mailtoday.in/

Hindustan Times
http://epaper.hindustantimes.com/login.aspx

DNA (Daily News & Analysis)
http://digital.dnaindia.com/

Deccan Herald
http://deccanheraldepaper.com/

Deccan Chronicle
http://www.dc-epaper.com/deccanchronicle/Login.aspx

IP Address Tracking Program

http://aruljohn.com/track.pl

Some websites for mobile phones...

www.phonearena.com

www.mobiledia.com

Related to Computer Security:

http://staysafeonline.org/basics/resources.htmlhttp://www.onguardonline.gov/socialnetworking.html

Mobile Phones Comparison & Expert Comments

http://www.gsmarena.com/

AUTOMATED MALWARE PROFILE, ANALYSIS, REMOVAL AND SIGNATURE INFORMATION: DEFINITION OF: COMBO FIX.EXE

* Safety Rating: Known malware, do not run

* Protection: Prevx provides powerful security products that you can use to detect, remove and protect you from COMBO FIX.EXE and safeguard your PC against viruses, trojans, worms, spyware, rootkits and adware

* IT RESOLVE THE DOUBLE CLICK PROBLEM, OPENWITH PROBLEM, ALL FLASH DRIVE OPENING PROBLEMS.





DOWNLOAD LINK : http://info.prevx.com/download.asp?grab=prevxcsi
SIZE : 603 KB
VERY VERY LOW SIZE BUT IT IS A VERY EFFECTIVE TOOL

Sunday, October 24, 2010

Topshop block heels

Image and video hosting by TinyPic
Image and video hosting by TinyPic
Wow, you gotta love these Topshop boots!

Saturday, October 23, 2010

Flash Drive Combination Lock


Keeping your data secure on your flash drive is always a worry and if you feel that 256 bit hardware encryption might not be enough. You can always add a combination lock to the end of a USB drive. I don’t think we’ll keep out the most determined of data thieves and still looks funky.

Spy Watch

If you are a fan of the famous agent James Bond you will definitely like this gadget that will make you feel like a secret agent. The spy watch is a high class surveillance DVR wrist watch, that can record up to 7 hours of video footage thanks to the 4gb internal flash memory that comes with it.