JDBC driver for SQLite. It comes in two flavours, a 100% Pure Java driver based on NestedVM or a native JNI library. The pure java driver is compatible, you can follow the Java dream and use it anywhere with no worries. The native driver is fast, and I recommend it wherever possible. Binaries are provided for Windows and Mac OS X.
import java.sql.*; public class Test { public static void main(String[] args) throws Exception { Class.forName("org.sqlite.JDBC"); Connection conn = DriverManager.getConnection("jdbc:sqlite:test.db"); Statement stat = conn.createStatement(); stat.executeUpdate("drop table if exists people;"); stat.executeUpdate("create table people (name, occupation);"); PreparedStatement prep = conn.prepareStatement( "insert into people values (?, ?);"); prep.setString(1, "Gandhi"); prep.setString(2, "politics"); prep.addBatch(); prep.setString(1, "Turing"); prep.setString(2, "computers"); prep.addBatch(); prep.setString(1, "Wittgenstein"); prep.setString(2, "smartypants"); prep.addBatch(); conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(true); ResultSet rs = stat.executeQuery("select * from people;"); while (rs.next()) { System.out.println("name = " + rs.getString("name")); System.out.println("job = " + rs.getString("occupation")); } rs.close(); conn.close(); } }
Run with:
java -cp .:sqlitejdbc-v044-native.jar -Djava.library.path=. Test
| Posted On: 27 April, 2009 |
PHP is gaining positive reputation for its system administration and client-side application development capabilities. This administration and development is accomplished using the PHP-GTK extension. You can take advantage of client-side applications by implementing language bindings for the GTK (the GIMP Toolkit) library for creating cross-platform graphical user interfaces.
Pro PHP-GTK acts as both a definitive reference and a hands-on tutorial to the PHP-GTK extension.
| Posted On: 27 April, 2009 |
In just a few years PHP has rapidly evolved from a small niche language to a powerful web development tool. Now in use on over 14 million Web sites, PHP is more stable and extensible than ever. However, there is no documentation on how to extend PHP; developers seeking to build PHP extensions and increase the performance and functionality of their PHP applications are left to word of mouth and muddling through PHP internals without systematic, helpful guidance.
| Posted On: 27 April, 2009 |
It hasn't taken Web developers long to discover that when it comes to creating dynamic, database-driven Web sites, MySQL and PHP provide a winning open source combination. Add this book to the mix, and there's no limit to the powerful, interactive Web sites that developers can create.
| Posted On: 27 April, 2009 |
As a PHP developer, you have some great tools for developing web applications. Ruby on Rails is another key tool to add to your web development toolbox. Rails is a high-level web development framework that emphasizes high productivity and clean code. However, the Ruby language and Rails framework take a different approach from the way many PHP developers write applications.
| Posted On: 27 April, 2009 |
Taking care to focus solely on those topics that will have the most impact on experienced PHP developers, Pro PHP is written for readers seeking to take their understanding of both PHP and sound software development practices to the next level. Advanced object¨Coriented features, documentation, debugging, software patterns, and the Standard PHP Library are just a few of the topics covered in extensive detail.
| Posted On: 27 April, 2009 |
Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition covers every step of the design and building process involved in creating powerful, extendable e¨Ccommerce web sites. Based around a real¨Cworld example involving a web site selling t¨Cshirts, you¡¯ll learn how to create and manage a product catalog, build and integrate a shopping cart, and process customer accounts and PayPal/credit card transactions.
| Posted On: 27 April, 2009 |
Beginning PHP and MySQL: From Novice to Professional, Third Edition offers a comprehensive introduction to two of the most prominent open source technologies on the planet: the PHP scripting language and the MySQL database server. Updated to introduce the features found in MySQLs most significant release to date, readers learn how to take advantage of the latest features of both technologies to build powerful, manageable, and stable web applications.
| Posted On: 27 April, 2009 |
This book for beginners to intermediate users of PHP5 covers core object-oriented programming (OOP) features as applied to PHP in simple language with many examples; comprehensively documents the Standard PHP Library (SPL) with working examples; and covers advanced topics such as Reflection, Unit Testing with PHPUnit, using Design Patterns to simplify coding, the improved MySQLi API for MySQL, PHP Data Objects (PDO), using the Active Record and Object-Relational Mapping (ORM) patterns in PHP, processing XML in PHP with SimpleXML and DOMDocument, using and building frameworks to implement the Model-View-Controller (MVC) pattern. Some basic objected-oriented features were added to PHP3; full support for object-oriented programming was added with PHP5.
| Posted On: 27 April, 2009 |
This practical tutorial has detailed, carefully explained case studies using PHP to build new, effective mashup applications, which combine data from multiple external online sources into an integrated Web 2.0 experience.
| Posted On: 27 April, 2009 |
/*
Java Hello World example.
*/ public class HelloWorldExample{ public static void main(String args[]){ /*
Use System.out.println() to print on console.
*/ System.out.println("Hello World !"); } } /*
OUTPUT of the above given Java Hello World Example would be :
Hello Wolrd !
*/
| Posted On: 27 April, 2009 |
/*
Java Class example.
This Java class example describes how class is defined and being used in Java language.
Syntax of defining java class is,
<modifier> class <class-name>{
// members and methods
}
*/ public class JavaClassExample{ /*
Syntax of defining memebers of the java class is,
<modifier> type <name>;
*/ private String name; /*
Syntax of defining methods of the java class is,
<modifier> <return-type> methodName(<optional-parameter-list>) <exception-list>{
...
}
*/ public void setName(String n){ //set passed parameter as name name = n; } public String getName(){ //return the set name return name; } //main method will be called first when program is executed public static void main(String args[]){ /*
Syntax of java object creation is,
<class-name> object-name = new <class-constructor>;
*/ JavaClassExample javaClassExample = new JavaClassExample(); //set name member of this object javaClassExample.setName("Visitor"); // print the name System.out.println("Hello " + javaClassExample.getName()); } } /*
OUTPUT of the above given Java Class Example would be :
Hello Visitor
*/
| Posted On: 27 April, 2009 |
/*
Java Interface example.
This Java Interface example describes how interface is defined and being used in Java language.
Syntax of defining java interface is,
<modifier> interface <interface-name>{
//members and methods()
}
*/ //declare an interface interface IntExample{ /*
Syntax to declare method in java interface is,
<modifier> <return-type> methodName(<optional-parameters>);
IMPORTANT : Methods declared in the interface are implicitly public and abstract.
*/ public void sayHello(); } } /*
Classes are extended while interfaces are implemented.
To implement an interface use implements keyword.
IMPORTANT : A class can extend only one other class, while it can implement n number of interfaces.
*/ public class JavaInterfaceExample implements IntExample{ /*
We have to define the method declared in implemented interface,
or else we have to declare the implementing class as abstract class.
*/ public void sayHello(){ System.out.println("Hello Visitor !"); } public static void main(String args[]){ //create object of the class JavaInterfaceExample javaInterfaceExample = new JavaInterfaceExample(); //invoke sayHello(), declared in IntExample interface. javaInterfaceExample.sayHello(); } } /*
OUTPUT of the above given Java Interface example would be :
Hello Visitor !
*/
| Posted On: 27 April, 2009 |
Do while loop executes group of Java statements as long as the boolean condition evaluates to true.
It is possible that the statement block associated with While loop never get executed because While loop tests the boolean condition before executing the block of statements associated with it.
In Java programming, sometime it's necessary to execute the block of statements at least once before evaluating the boolean condition. Do while loop is similar to the While loop, but it evaluates the boolean condition after executing the block of the statement.
Do While loop syntax
Do{
<Block of statements>;
}while();
Block of statements is any valid Java code. Boolean condition is any valid Java expression that evaluates to boolean value. Braces are options if there is only one statement to be executed.
| Posted On: 27 April, 2009 |
/*
While loop Example
This Java Example shows how to use while loop to iterate in Java program.
*/ public class SimpleWhileLoopExample { public static void main(String[] args) { /*
* Syntax of while loop is
*
* while( <condition> )
* <loop body>
*
* where <condition> is a boolean expression. Loop body is executed as long
* as condition is true.
*
* Loop body may contain more than one statments. In that case it should be
* enclosed in a block.
*/ int i = 0; while(i < 5) { System.out.println("i is : " + i); i++; } /*
* The following code will create an infinite loop, since j < 5 will always
* evaluated to true
*/ //int j = 0; //while(j < 5) // System.out.println("j is : " + j); } } /*
Output would be
i is : 0
i is : 1
i is : 2
i is : 3
i is : 4
*/
| Posted On: 27 April, 2009 |
Break statement is one of the several control statements Java provide to control the flow of the program. As the name says, Break Statement is generally used to break the loop of switch statement.
Please note that Java does not provide Go To statement like other programming languages e.g. C, C++.
Break statement has two forms labeled and unlabeled.
| Posted On: 27 April, 2009 |
In this article I want to show you to write a simple hello world example using Java & NetBeans IDE 6.
| Posted On: 27 April, 2009 |
"How do I make an .EXE file from my Java application?", "Need help converting jar to exe", "Is it possible to create a Windows executable using Java?" --- these and similar questions are among the most popular topics on Java developer forums. Should you start such a topic today, you are likely to encounter the following three types of replies:
| Posted On: 27 April, 2009 |
One question that a lot of beginning programmers have is: "Now that I've created my application in the IDE, how do I get it to work from the command line outside of the IDE." Similarly, someone might ask, "How do I distribute this application to other users without having to give them the whole IDE as well?"
The answers to these questions are relatively simple, but not necessarily obvious. This document addresses those questions by taking you through the basics of using NetBeans IDE 5.0 to prepare your applications for distribution and then deploying those applications. In addition, this document provides information that you might need to configure your system (or which you might need to pass on to the users of your application). We will show a few different approaches for deploying an application, so that users can access the application by:
- Double-clicking the application's Java Archive (JAR) file.
- Calling the application from the command line.
- Calling the application from a script file.
Along the way, we will cover some basics of JAR file structure and how JAR files are dealt with inside IDE projects.
| Posted On: 27 April, 2009 |
Introduction
Many times when we get a chance to work on a small project, one thing we intend to do is to put all java files into one single directory. It is quick, easy and harmless. However if our small project gets bigger, and the number of files is increasing, putting all these files into the same directory would be a nightmare for us. In java we can avoid this sort of problem by using Packages.
| Posted On: 27 April, 2009 |
» Introduction to jQuery
» Building a simple AJAX login form
» The jQuery behaviours
» Putting it all together
» Further reading
| Posted On: 27 April, 2009 |
- » Introduction
- » What is AJAX?
- » Accessibility benefits of AJAX
- » Accessibility issues caused by AJAX
- » Recommendations for AJAX and accessibility
| Posted On: 27 April, 2009 |
» Introduction
» AJAX Overview
» GWT to the Rescue
» Installing GWT
» Running Sample Applications
» Resources
| Posted On: 27 April, 2009 |


