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
{ | |
"width": 500, | |
"height": 200, | |
"padding": "auto", | |
"data": [ | |
{ | |
"name": "table", | |
"values": [ | |
{"x": 0, "y": 28, "c":0}, {"x": 0, "y": 55, "c":1}, | |
{"x": 1, "y": 43, "c":0}, {"x": 1, "y": 91, "c":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
date | close | |
---|---|---|
2-May-12 | 65.07 | |
1-May-12 | null | |
30-Apr-12 | null | |
29-Apr-12 | 60.05 | |
28-Apr-12 | null | |
27-Apr-12 | 67.00 | |
26-Apr-12 | 89.70 | |
25-Apr-12 | 99.00 | |
24-Apr-12 | 130.28 |
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
# Match [ [1,2,3], [4,5,6], ... ] | |
class Matrix | |
constructor(@rows) -> null | |
Matrix: [ | |
o 'LEFT_BRACKET (MatrixRow)+ RIGHT_BRACKET', -> | |
new Matrix($2) | |
] |
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 class WebBase : NancyModule | |
{ | |
private ExponentiallyDecayingSample _sample; | |
public WebBase() | |
{ | |
Setup(); | |
Get["/sampling"] = param => | |
{ |
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
<h1 id="header"></h1> | |
<ul id="list current-name"> | |
<li class="item current"><strong></strong></li> | |
<li class="item"><a href="#" class="link"></a></li> | |
</ul> | |
<p id="empty">The list is empty.</p> |
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
<html> | |
<head> | |
<title>My Web Page</title> | |
</head> | |
<body> | |
<h1>Welcome to my web page</h1> | |
<p>This is my web page, and stuff</p> | |
</body> | |
</html> |
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
module MyModule | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
def my_method | |
@myvar ||= 0 | |
end | |
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
# | |
# This is probably a decent interview assignment | |
# | |
# Pivot Function | |
# | |
# The pivot function takes the unique values of a table column and turns them into | |
# columns of a new table, with the values of the new cells being chosen from a column | |
# in the original table | |
# | |
# Example: |
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
event_msg = Protopuffs::Message::Event.new(:id => "4e09c87fc4d4468783d4a42a8ed72969", | |
:user_id => user_id, | |
:created_at => Time.now.utc.to_i) | |
response_body = event_msg.to_wire_format | |
content_length = response_body.length | |
response_code = '201 Created' | |
event_response = ERB.new(File.read(Rails.root.join("features/step_definitions/response_templates/response.erb")), nil, '-').result(binding) | |
FakeWeb.register_uri(:post, "http://api.rupture.com/events", :response => event_response) |
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
{rpapi_web,dispatch_request,'POST',"/events",catastrophic_error, | |
{function_clause, | |
[{rpcore_event,create, | |
[{event,"ccb2bdf42ad947d2b03e3fc215199fb5", | |
"b9e42eb1f6bbd08c1a2da170d8b5f809", | |
"6e4cfc5c-13ee-11de-8dd3-ce2c6fab0d3d","challenge", | |
"official_challenge","rupture_internal","Rupture", | |
"Challenges","watching the attempt","challenge",undefined, | |
undefined,undefined,undefined,undefined,undefined,undefined, | |
undefined,undefined,undefined,undefined,undefined,"Dalaran", |
NewerOlder