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
package ClassFiles; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("Wat"); | |
} | |
} |
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
<html> | |
<head> | |
<script type="text/javascript" charset="utf-8" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"> | |
</script> | |
</head> | |
<body> | |
Speed: <span id="speed"></span> | |
</body> | |
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
return false if real_account.nil? | |
date = date_from_str('2011-01-01') | |
return true if payments.has_finished? && real_account.created_before? date | |
Trade.has_payments(real_account.login, date) |
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
module Newton | |
module Validator | |
class RepeatsValidator < ActiveModel::EachValidator | |
def initialize(options) | |
@attributes = options[:attributes] | |
super | |
@how_count = options[:how_count] | |
@upto = options[:upto] | |
end |
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
package main; | |
import org.apache.velocity.Template; | |
import org.apache.velocity.VelocityContext; | |
import org.apache.velocity.app.Velocity; | |
import org.apache.velocity.exception.MethodInvocationException; | |
import org.apache.velocity.exception.ParseErrorException; | |
import org.apache.velocity.exception.ResourceNotFoundException; |
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
def vote_yes | |
vote(:up_vote) | |
end | |
def vote_no | |
vote(:down_vote) | |
end | |
private |
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
# Get a URL's content to play with | |
content = contents[contents.keys.first] | |
# => [#<Nokogiri::XML::Element:0x48a9a86 name="p" children=[#<Nokogiri::XML::Text:0x48a9810 "The autobiography of Yohwan Lim, ">, #<Nokogiri::XML::Element:0x48a96ee name="i" children=[#<Nokogiri::XML::Text:0x48a9536 "Crazy As Me">]>, #<Nokogiri::XML::Text:0x48a931a " was released in Korea by BookRoad Publishers in October 25, 2004. This is my translation of the book, except the following four sections which were translated by BinaryStar of Teamliquid.net, which I have made minor changes: \"Hope on the Road Not Taken,\" \"Chapter One: The Game-crazed Kid,\" \"The Birth of the Emperor,\" and \"The Little Prince with Three Sisters.\"">]>, #<Nokogiri::XML::Element:0x48a9194 name="p" children=[#<Nokogiri::XML::Text:0x48a9022 "As of October 4, 2004:">]>, #<Nokogiri::XML::Element:0x48a8e92 name="p">, #<Nokogiri::XML::Element:0x48a8ce4 name="p" children=[#<Nokogiri::XML::Text:0x48a8af0 "The addition of e-sports organizations to major compani |
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
// Most everything left out for clarity. | |
public class RPCRespond<Result> { | |
public RPCRespond() { | |
this.code = 0; | |
this.success = true; | |
this.result = null; | |
} |
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
public class UsesLongRunningCtor { | |
/** Retrieves data and returns processed result. */ | |
public String transformData() { | |
// LongRunningCtor "embedded"; direct reference, like a static utility class. | |
String rawData = LongRunningCtor.instance().fetch(); | |
return rawData.replace("Raw", "Processed"); | |
} | |
} |
OlderNewer