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
@When("I add a table") | |
public void iAddATable(Table table) { | |
List<List<String>> diffList = new ArrayList<List<String>>(); | |
diffList.add(Arrays.asList("a", "b")); | |
diffList.add(Arrays.asList("1", "2")); | |
table.diffLists(diffList); | |
List<Map<String, String>> hashes = new ArrayList<Map<String, String>>(table.hashes()); | |
Map<String, String> newRow = hashes.get(0); | |
hashes.add(newRow); |
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
[~]> irb | |
irb(main):001:0> {'a' => 1, 'b' => 2} | |
=> {"a"=>1, "b"=>2} | |
irb(main):002:0> {'b' => 2, 'a' => 1} | |
=> {"a"=>1, "b"=>2} | |
[~]> jirb | |
irb(main):001:0> {'a' => 1, 'b' => 2} | |
=> {"a"=>1, "b"=>2} | |
irb(main):002:0> {'b' => 2, 'a' => 1} |
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
~ ruby nokogiri_test.rb | |
got 8 rows, expected 4 on try 289 | |
~ ruby nokogiri_test.rb | |
got 8 rows, expected 4 on try 495 | |
~ ruby nokogiri_test.rb | |
got 8 rows, expected 4 on try 256 | |
~ ruby nokogiri_test.rb | |
got 8 rows, expected 4 on try 256 | |
~ ruby nokogiri_test.rb | |
got 8 rows, expected 4 on try 745 |
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
require 'rubygems' | |
require 'nokogiri' | |
html = <<EOS | |
<html> | |
<head> | |
<title>test</title> | |
</head> | |
<body> | |
<table id="some_id"> |
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
Process: Echofon [583] | |
Path: /Applications/Echofon.app/Contents/MacOS/Echofon | |
Identifier: com.echofon.Echofon | |
Version: 0.98.5 (0.98.5) | |
Code Type: X86 (Native) | |
Parent Process: launchd [196] | |
Date/Time: 2010-02-09 07:00:45.830 -0600 | |
OS Version: Mac OS X 10.6.2 (10C540) | |
Report Version: 6 |
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
no such file to load -- nokogiri/nokogiri (MissingSourceFile) | |
/Users/dholst/Work/geo/cms/vendor/bundler/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' | |
/Users/dholst/Work/geo/cms/vendor/bundler/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' | |
/Users/dholst/Work/geo/cms/vendor/bundler/gems/nokogiri-1.4.1-java/lib/nokogiri.rb:13 | |
/Users/dholst/Work/geo/cms/vendor/bundler/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' | |
/Users/dholst/Work/geo/cms/vendor/bundler/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' | |
/Users/dholst/Work/geo/cms/vendor/bundler/gems/cucumber-rails-0.2.4/lib/cucumber/web/tableish.rb:1 | |
/Users/dholst/Work/geo/cms/vendor/bundler/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' | |
/Users/dholst/Work/geo/cms/vendor/bundler/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' | |
/Users/dholst/Work/geo/cms/features/support/env.rb:14 |
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 PBKDF2(password, salt, num_iterations, num_bytes) { | |
var m_bpassword = str2binb(password); | |
var m_salt = salt; | |
var m_total_iterations = num_iterations; | |
var m_iterations_in_chunk = 100; | |
var m_iterations_done = 0; | |
var m_key_length = num_bytes; | |
var m_hash_length = 20; | |
var m_total_blocks = Math.ceil(m_key_length / m_hash_length); | |
var m_current_block = 1; |
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> | |
var chrsz = 8; | |
var hexcase = 0; | |
function hex2bin(hex_str) | |
{ | |
var char_str = ""; |
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
$("#some_checkbox").click(function() { | |
var checkbox = $(this) | |
checkbox.attr("disabled", true) | |
$.ajax($("form").attr("action"), { | |
type: "POST", | |
data: $("form").serialize(), | |
success: function() { | |
alert("User updated") |
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 org.scribe.builder.api.DefaultApi10a; | |
import org.scribe.model.OAuthConfig; | |
import org.scribe.model.Token; | |
import org.scribe.oauth.OAuthService; | |
public class TwoLeggedApi extends DefaultApi10a { | |
@Override | |
public String getAccessTokenEndpoint() { | |
return ""; | |
} |