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' | |
gem "rspec", "=1.2.8" | |
require 'selenium/client' | |
require 'selenium/rspec/spec_helper' | |
describe "Login Window" do | |
attr_reader :selenium_driver | |
before(:all) do |
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> | |
</head> | |
<body> | |
<table id="mapping"> | |
<tr> | |
<td>bangkok</td> | |
<td>http://wikipedia.org/wiki/Thailand</td> | |
</tr> | |
<tr> |
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.springframework.beans.factory.InitializingBean | |
import org.zeromq.ZMQ | |
class ParseService implements InitializingBean { | |
def pullSocket | |
def pubSocket | |
def running = true | |
def pollingRate = 200 | |
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 'webrick' | |
include WEBrick | |
def start_webrick(config = {}) | |
# always listen on port 8080 | |
config.update(:Port => 8081) | |
server = HTTPServer.new(config) | |
yield server if block_given? | |
['INT', 'TERM'].each {|signal| |
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 the PayPal <span class="caps">IPN POST</span> | |
def paypal_ipn | |
if @request.method == :post | |
# use the POSTed information to create a call back URL to PayPal | |
@query = ‘cmd=_notify-validate’ | |
@request.params.each_pair {|key, value| @query = @query + ’&’ + key + ’=’ | |
+ value.first if key != ‘register/pay_pal_ipn.html/pay_pal_ipn’ } | |
http = Net::HTTP.start(PAYPAL_URL, 80) |
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 createOrClearSheet2() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets = ss.getSheets(); | |
if (sheets.length == 1) { | |
ss.insertSheet('output'); | |
} | |
var output_sheet = ss.getSheetByName('output'); | |
output_sheet.clear(); | |
copyContentToOutput(sheets[0], output_sheet); |
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
description "Request an interest rate from interest service" | |
before "prepare helper function", { | |
prepareRate = { params-> | |
} | |
date = { 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
db.open(createCollection) | |
function createCollection(err, client) { | |
client.createCollection('docs', insertData) | |
} | |
function insertData(err, col) { | |
for (var i = 0; i < 100; i++) { | |
col.insert({c: i}, function() {}) | |
} |
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
/** | |
* @class Ext.ux.DataView.LabelEditor | |
* @extends Ext.Editor | |
*/ | |
Ext.define('Ext.ux.DataView.LabelEditor', { | |
extend: 'Ext.Editor', | |
alignment: 'tl-tl', |
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
<style> | |
.x-item-selected { | |
background: #eeffaa; | |
} | |
body { | |
padding: 20px; | |
} | |
#todoTxt { | |
margin-bottom: 20px; | |
} |
OlderNewer