Monday, November 29, 2010

Fix ant task Wscompile cannot be found in NB 6

The bug seems to be in /nbproject/project.properties:
Change:
wscompile.classpath=${wscompile.tools.classpath}:${j2ee.platform.wscompile.classpath}
To:
wscompile.classpath=${wscompile.tools.classpath}:${j2ee.platform.wscompile.classpath}:${javac.classpath}

Thursday, July 8, 2010

Jruby warble calendar_date_select

If you are trying to pack up a jruby rails app that uses calender_date_select.

and you get undefined method 'calendar_date_select_includes'

remember to add public to your directorys in your warble.rb file.

Took me ages to figure out that this was the problem

Wednesday, June 23, 2010

Jruby warble tomcat RoutingError

Took me while to figure this one out you need to add

config.action_controller.relative_url_root = '/{appname}'

to environments/production.rb

or environments/development.rb

Tuesday, June 22, 2010

Rails Mysql data types

Rails Migration Symbol MySQL Data Type
:binary blob
:boolean tinyint(1)
:date date
:datetime datetime
:decimal decimal
:float float
:integer int(11)
:string varchar(255)
:text text
:time time
:timestamp datetime

Wednesday, May 12, 2010

Tuesday, January 19, 2010

Convert String to Float function in java

public static float string2float(String input) {
float output = 0;
try {
output = Float.valueOf(input.trim()).floatValue();
}
catch (NumberFormatException ex) {
System.out.println("NumberFormatException: " + ex.getMessage());
}
return output;
}