Archive for February, 2010

28
Feb
10

sinatra


I really love Sinatra, the web framework. It’s so lightweight and enjoyable. You should give it a try.

27
Feb
10

Ali Wilson – Pandora

18
Feb
10

generate xml using doxygen


To generate xml using doxygen, use the following steps:

doxygen -g

to generate your properties file ( in case you don’t have one ). Open that property file, and set the GENERATE_XML property to YES, then run doxygen like:

doxygen Doxyfile source_file

If your property file’s name is not Doxyfile, replace that with your file’s name.

11
Feb
10

1 year


This blog just turned 1 today. Happy birthday!

08
Feb
10

less known ruby feature


Using something like ?a will give you a’s ascii code. So, if you’re under Ruby 1.8.6, you can do something like this:


a = "whatever/"
puts a[-1] == ?/ # this will print true, because the code of the last character is the same as the code of ?

02
Feb
10

creating an executable jar out of your Scala code


In the previous post about creating an executable jar from your Scala code, I showed how to create the jar using your favourite compression software.
Today, you’ll see how to do it using jarjar. jarjar can be used to package all of your jars into a single one, thus eliminating external dependencies.
The great part is that it has an ant task, so I’ll show you how to use that:


<project name="jarjar tester">
	<target name="jrjr">
		<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="jarjar-1.0.jar" /> 
		<jarjar destfile="jrjarilo.jar" manifest="Manifest.mf">
			<zipfileset src="scala-library.jar" /> 
			<fileset dir=".">
				<include name="*.class" /> 
			</fileset>
		</jarjar>
	</target>
 </project>

You need to supply it with a manifest, so, you could use the one from here. You need to adjust the paths to your scala-library.jar and to jarjar.jar, and to specify the name you’d like your jar to receive.

If everything goes well ( and it should ), after running this target you should have your own executable jar, containing the Scala runtime.




Blog Stats

  • 215,219 hits