Skip to content

Instantly share code, notes, and snippets.

View gist:701748
* Instantiates a java object of the given class and applies the values from the given JSONObject.
* @param <E> The type to create
* @param json The JSONObject to convert
* @param objectClass Class of the type to create
* @return An instance of the specified class
public static <E> E objectFromJSON( JSONObject json, Class<E> objectClass ) {
try {
View Controller.m
#import "Controller.h"
@implementation Controller
- (IBAction)fetch:(id)sender {
NSMutableArray *fetchedItems = [NSArray arrayWithContentsOfURL:[NSURL URLWithString:@"" ]];
items = fetchedItems;
for( NSDictionary *d in items ) {
for( NSString *key in [ d allKeys ] ) {
NSTableColumn *column = [table tableColumnWithIdentifier:key ];
View gist:1393080
* Create a callable statement from procedure string and parameters
* @param procedure String format for oracle procedure( i.e. {call VERE.Owner.OWNE_INSX ( ?, ... ) } )
* @param parameters NSArray containing the parameters in the same order the procedure expects them
* @throws SQLException
public static CallableStatement createCallableStatementWithParametersFromArray( String procedure, NSArray parameters ) throws SQLException {
// We use the connection information in the Ekja EOModel.
View gist:1393084
* Call VERE_SP_3302 to get the transaction number for the operator
* @param username String username of the user that calls the procedure
* @param permno String permno of the vehicle
* @param startdate NSTimestamp date when the operator was registered
* @param enddate NSTimestamp date to set as last date of operator
* @param persidno String persidno of the operator to remove
* @param operserno int serial number of the operator( in the OPER table )
* @param mainoper String is the operator the main operator( 1 or 0 )
hugith / gist:1497082
Created Dec 19, 2011
View gist:1497082
package is.landsvirkjun.admin.util;
import java.util.HashMap;
import java.util.Map;
import org.apache.cayenne.CayenneDataObject;
import org.apache.cayenne.DataObjectUtils;
import org.apache.cayenne.ObjectContext;
import org.apache.tapestry5.ValueEncoder;
View gist:6551480
1. Innsetja Eclipse 4.3 EE
2. Innsetja WOLips
3. Innsetja WebObjects
java -jar WOInstaller2013_08_10.jar 5.4.3 c:\Apple
4. Setja inn properties-skjal (
package informix;
import java.util.Date;
import com.webobjects.eoaccess.EOEntity;
import com.webobjects.jdbcadaptor.JDBCAdaptor;
import com.webobjects.jdbcadaptor.JDBCExpression;