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
| (define (cubert x) | |
| (define (improve guess x) | |
| (/ | |
| (+ (/ x (* guess guess)) (* 2 guess)) | |
| 3) | |
| ) | |
| (define (cube x) | |
| (* x x x)) | |
| (define (good-enough? guess x) |
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
| >> Redis::VERSION | |
| Redis::VERSION | |
| => "2.0.1" | |
| >> r = Redis.new | |
| r = Redis.new | |
| => #<Redis:0x8777470 @client=#<Redis::Client:0x877740c @host="127.0.0.1", @password=nil, @timeout=5, @sock=nil, @logger=nil, @db=0, @port=6379>> | |
| >> redis.set "test1", "foo" | |
| redis.set "test1", "foo" | |
| >> r.set "test1", "foo" | |
| r.set "test1", "foo" |
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
| >> Redis::VERSION | |
| Redis::VERSION | |
| => "2.0.1" | |
| >> r = Redis.new | |
| r = Redis.new | |
| => #<Redis:0x8777470 @client=#<Redis::Client:0x877740c @host="127.0.0.1", @password=nil, @timeout=5, @sock=nil, @logger=nil, @db=0, @port=6379>> | |
| >> redis.set "test1", "foo" | |
| redis.set "test1", "foo" | |
| >> r.set "test1", "foo" | |
| r.set "test1", "foo" |
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 File.dirname(__FILE__) + '/../test_helper' | |
| class JSpecTest < ActionController::IntegrationTest | |
| include Capybara | |
| def setup | |
| @wait_time = Capybara.default_wait_time | |
| Capybara.default_wait_time = 15 | |
| 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
| <script> | |
| function runSuites() { | |
| // uncomment when we move away from the grammar | |
| //JSpec.preprocess = function(code) { return code; } | |
| var matches = /.*\?test=(.*)/.exec(document.URL); | |
| if (matches) | |
| { | |
| JSpec | |
| .exec(matches[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
| class GotsController < ApplicationController | |
| def new | |
| @got = Got.new | |
| end | |
| def create | |
| @got = Got.new(params[:got]) | |
| @got.user = current_user | |
| if @got.save |
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
| %div | |
| .content-title | |
| %h2.secondary Profit Over Last 3 Months | |
| .widget_container | |
| #no_data_pnl | |
| %div | |
| %div{ :style => "margin-left: 120px;"} | |
| %h3 | |
| You have no transactions in Outright. | |
| %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
| require 'java' | |
| java_import javax.xml.XMLConstants | |
| java_import javax.xml.transform.Source | |
| java_import javax.xml.transform.stream.StreamSource | |
| java_import javax.xml.validation.SchemaFactory | |
| java_import javax.xml.validation.Schema | |
| java_import javax.xml.validation.Validator | |
| schema_factory = SchemaFactory.new_instance(XMLConstants::W3C_XML_SCHEMA_NS_URI) |
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
| class FooView extends Backbone.View | |
| id: "taxonomy-tree" | |
| events: | |
| "move_node.jstree": "moveNode" | |
| moveNode: -> | |
| debugger | |
| new FooView() |
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
| jasmine.Fixtures.prototype.loadTemplate_ = function(template) { | |
| var templateUrl = "/backbone/templates/" + template; | |
| var self = this; | |
| $.ajax({ | |
| async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded | |
| cache: false, | |
| dataType: 'html', | |
| url: templateUrl, | |
| success: function(data) { | |
| $('#' + self.containerId).append(data); |
OlderNewer