This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
public class RomanNumeral | |
{ | |
private static final Map<Integer, String[]> romanCharsByDecimalPlace = new HashMap<Integer, String[]>() | |
{ | |
{ | |
put( 0, new String[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a comparison between Haskell and Groovy based on some simple problems found in the following | |
// Haskell Introduction: | |
// http://learnyouahaskell.com/starting-out#ready-set-go | |
// Ex 1. If we have two lists, [2,5,10] and [8,10,11] and we want to get the products of all the possible | |
// combinations between numbers in those lists, here's what we'd do. | |
/* HASKELL */ | |
[ x*y | x <- [2,5,10], y <- [8,10,11]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Added the following extra packages to OSGI to enable JavaFX 2.2 (JRE 7 update 13) | |
# Extra packages appended after standard packages | |
org.osgi.framework.system.packages.extra=javafx.application;version=0.0.0, \ | |
com.sun.browser.plugin; version=0.0.0, \ | |
com.sun.deploy.uitoolkit.impl.fx; version=0.0.0, \ | |
com.sun.deploy.uitoolkit.impl.fx.ui; version=0.0.0, \ | |
com.sun.deploy.uitoolkit.impl.fx.ui.resources; version=0.0.0, \ | |
com.sun.deploy.uitoolkit.impl.fx.ui.resources.image; version=0.0.0, \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creates an empty OSGi Blueprint project using the Maven archetype | |
// http://karaf.apache.org/manual/2.2.6/developers-guide/archetypes.html | |
def MAVEN_HOME = 'C:/Program Files/Maven/apache-maven-3.0.3/bin' | |
def cli = new CliBuilder() | |
cli.with { | |
g args: 1, 'GroupId of the artifact being created' | |
a args: 1, 'ID of the artifact being created' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var chars = "abcdefghijklmnopqrstuvxzwyABCDEFGHIJKLMNOPQRSTUVXZWY0123456789~`!@#$%^&*()-_=+{[}]|\\;:'\"<,>.?/"; | |
/** | |
* Get a random char according to the optionsl options given. | |
* @param options can be one of: | |
* <ul> | |
* <li><b>'alpha'</b>: only returns alphabetic chars</li> | |
* <li><b>'lowercase'</b>: only returns alphabetic chars</li> |
NewerOlder