This file contains hidden or 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
public interface ActionListener { | |
void onAction(String actionName, boolean flag, long tgf); | |
} |
This file contains hidden or 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
RAGEL=ragel | |
JAVAC=javac | |
default: generate | |
generate: lexer_java.rl | |
$(RAGEL) -J lexer_java.rl -o LexerJava.java | |
compile: LexerJava.java |
This file contains hidden or 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
rails new myapp -m http://railswizard.org/3a09d68c754ac1488573.rb -J -T |
This file contains hidden or 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.weblogism.cucumberjvm</groupId> | |
<artifactId>java-example</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<name>Cucumber-jvm Java Example</name> |
This file contains hidden or 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
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>build-helper-maven-plugin</artifactId> | |
<version>1.7</version> | |
<executions> | |
<execution> | |
<id>add-source</id> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>add-test-source</goal> | |
</goals> |
This file contains hidden or 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 org.dbunit.IDatabaseTester; | |
import org.dbunit.JdbcDatabaseTester; | |
import org.dbunit.dataset.IDataSet; | |
import org.dbunit.dataset.xml.FlatXmlDataSetBuilder; | |
import org.junit.Before; | |
import org.junit.Test; | |
import static org.junit.Assert.assertTrue; | |
public class LoadDataTest { |
This file contains hidden or 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
require 'tempfile' | |
class File | |
def self.prepend(path, string) | |
Tempfile.open File.basename(path) do |tempfile| | |
# prepend data to tempfile | |
tempfile << string | |
File.open(path, 'r+') do |file| | |
# append original data to tempfile |
This file contains hidden or 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
f = File.open(ARGV[0]) | |
committers = Hash.new{ |h,k| h[k] = 0 } | |
IO.readlines(f).each do |word| | |
if word =~ /^(r[0-9]+) \| ([^|]+) \|/ | |
committers[$2] += 1 | |
end | |
end | |
committers.each{ |k,v| puts "#{k}: #{v}" } |
This file contains hidden or 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
require 'java' | |
require 'ojdbc-6.jar' | |
java_import "java.sql.Types" | |
java_import "oracle.jdbc.OracleTypes" | |
USER_ID = "12345" | |
WORKSPACE_ID = "222" | |
DOMAIN_ID = "X_1_1" | |
This file contains hidden or 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
require 'java' | |
%w(JPanel JTextField JLabel JFrame JButton Timer).each { |c| java_import "javax.swing.#{c}"} | |
%w(Rectangle Insets Color BasicStroke Dimension Canvas image.BufferStrategy BorderLayout GridBagLayout GridBagConstraints Font).each { |c| java_import "java.awt.#{c}" } | |
WORLD_WIDTH = 800 | |
WORLD_HEIGHT = 600 | |
DELAY = 50 | |
G = 9.81 |