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
{"source":"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }","language":"Solidity","languageVersion":"0.2.1","compilerVersion":"0.2.1","compilerOptions":"--bin --abi --userdoc --devdoc --add-std --optimize -o /tmp/solc206349014","abiDefinition":[{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"type":"function"}],"userDoc":{"methods":{}},"developerDoc":{"methods":{}}} |
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
// if 2nd arg is 'latest', everything is fine | |
var event = book.NewRecord(null, 'latest'); | |
//event.get(function(err, results) { | |
// console.log(results); | |
//}); | |
event.watch(function(err, result) { | |
if(err) { | |
console.log("error:", err); | |
} else { | |
console.log(result); |
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
setInterval(function() { Array.prototype.slice.call(document.querySelectorAll('[data-reactid]')).forEach(function(element) { element.style.background = 'rgba(255,0,0,0.1)'; }) }, 500) |
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
Verifying myself: My Bitcoin username is +janx. https://onename.io/janx |
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
In simple applications the Domain Model (116) is an uncomplicated structure that actually corresponds pretty | |
closely to the database structure, with one domain class per database table. Such domain objects often have | |
only moderately complex business logic. In this case it makes sense to have each domain object be | |
responsible for loading and saving from the database, which is Active Record (160) (see Figure 3.3). Another | |
way to think of the Active Record (160) is that you start with a Row Data Gateway (152) and then add domain | |
logic to the class, particularly when you see repetitive code in multiple Transaction Scripts (110). | |
... | |
As the domain logic gets more complicated and you begin moving toward a rich Domain Model (116), the simple |
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
m = Member.find_by_email '[email protected]' | |
market = Market.find :btccny | |
puts "Ready ..." | |
a = m.get_account(:cny) | |
puts "balance: #{a.balance.to_s('F')}" | |
puts "locked: #{a.locked.to_s('F')}" | |
gets | |
puts "Started." |
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
m = Member.find_by_email '[email protected]' | |
market = Market.find :btccny | |
ask = OrderAsk.new( | |
source: 'debug', | |
state: Order::WAIT, | |
member_id: m.id, | |
ask: market.target_unit, | |
bid: market.price_unit, | |
currency: market.id, |