Recent Notes

Displaying keyword search results 1 - 6
Created by freyo on September 07, 2011 16:46:14    Last update: September 07, 2011 19:23:00
The Android unit test framework is based on JUnit 3 , not JUnit 4. Test cases have to extend junit.framework.TestCase or a subclass (such as android.test.InstrumentationTestCase ). Tests are identified by public methods whose name starts with test , not methods annotated with @Test (as in JUnit 4). An Android test suite is packaged as an APK, just like the application being tested. To create a test package, first you need to identify the application package it is testing. Google suggests to put the test package source in a directory named tests/ alongside the src/ directory of the main application. At runtime, Android instrumentation loads both the test package and the application under test into the same process. Therefore, the tests can invoke methods on...
Created by meiu on July 21, 2011 09:34:10    Last update: July 21, 2011 11:00:42
Click Project -> Properties Select "Builders" Click "New", select "Ant Builder", click "OK" Select the Buildfile, set the Base Directory Set targets You may or may not want the default "Java Builder". Uncheck it if you don't want to run the default builder.
Created by meiu on February 09, 2010 03:26:14    Last update: March 31, 2011 09:00:19
Simple JDBC code for Oracle. import java.sql.*; public class JDBCHelloWo...
Created by Fang on August 16, 2010 22:00:05    Last update: August 16, 2010 22:12:25
The tags <sql:update> Executes SQL INSERT , UPDATE , DELETE statements, or SQL DDL statements. Syntax: <sql:update sql="sqlUpdate" [dataSource="d... or, put the SQL within the element body: <sql:update [dataSource="dataSource"] [v... Attributes: Name Dynamic? Type Description sql true String SQL update statement. dataSource true javax.sql.DataSource or String Data source associated with the database to update. A String value represents a relative path to a JNDI resource or the parameters for the JDBC DriverManager class. var false String Name of the exported scoped variable for the result of the database update. The type of the scoped variable is java.lang.Integer . scope false String Scope of var. Defaults to "page". <sql:transaction> Establishes a transaction context for <sql:query> and <sql:update> subtags. Syntax: <sql:transaction [dataSource="dataSource"] ... where...
Created by Fang on August 16, 2010 21:44:41    Last update: August 16, 2010 22:01:46
The tags <sql:query> Queries a database. Syntax: <sql:query sql="sqlQuery" var="varName" [scope... or, put the query within the element body: <sql:query var="varName" [scope="{page|req... Attributes: Name Dynamic? Type Description sql true String SQL query statement. dataSource true javax.sql.DataSource or String Data source associated with the database to query. A String value represents a relative path to a JNDI resource or the JDBC parameters for the DriverManager class. maxRows true int The maximum number of rows to be included in the query result. If not specified, or set to -1, no limit on the maximum number of rows is enforced. startRow true int The returned Result object includes the rows starting at the specified index. The first row of the original query result set is at index...
Created by meiu on February 10, 2010 20:53:27    Last update: February 10, 2010 20:53:27
Step by step procedure to setup OC4J server for Eclipse. Version used is Galileo for Java EE Developers. Initialize OC4J You'll be asked to create a password the first time you run the standalone OC4J server. You need to remember this password and use it in the Eclipse setup. In the following C:\jdev1013_5 is where the JDeveloper suite is installed. cd C:\jdev1013_5\j2ee\home java -jar oc4j.jar Add Server Runtime Environment Go to Windows menu, bring up the Preferences dialog. Select Server -> Runtime Environments, click Add. Select Oracle OC4J Standalone 10.1.3.n, click Next. Enter J2EE home and click Finish. Add a server for OC4J Go to Windows menu, select Show View -> Servers. If Servers menu is not visible, select Other and enter "servers" in the...