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
const transferNodes = | |
transfers.map(tid => | |
<TransferRow {...{ | |
transfer: transfersById[tid], | |
key: `transfer-${tid}`, | |
toggleSelected: () => actions.toggleSelected(transfersById[tid]), | |
approveTransfer: () => actions.transferActionRequested(transfersById[tid], 'approve'), | |
cancelTransfer: () => actions.transferActionRequested(transfersById[tid], 'cancel'), | |
isLoading, | |
isSelected: some(selectedTransfers, stid => stid === tid) |
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
import React, { Component } from 'react'; | |
export default class CircleProgress extends Component { | |
static defaultProps = { | |
strokeWidth: 6, | |
strokeColor: '#3FC7FA', | |
trailWidth: 6, | |
trailColor: '#D9D9D9', | |
}; |
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
[101] pry(main)> h = {date: Date.parse("06.04.2016"), sourceCurrency: "USD", targetCurrency: "EUR"} | |
=> {:date=>Wed, 06 Apr 2016, :sourceCurrency=>"USD", :targetCurrency=>"EUR"} | |
[102] pry(main)> result = client.call(:get_currency_rates, message: { :getCurrencyRates => [h,h] }) |
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 CurrencyRateRequestBeanContainer < WashOut::Type | |
type_name 'currencyRateRequestBean' | |
map :currencyRateRequest => { | |
date: :datetime, | |
sourceCurrency: :string, | |
targetCurrency: :string | |
} | |
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
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://v1.currency.integration.commons.tain.se" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="currency_rate_service_soap" targetNamespace="http://v1.currency.integration.commons.tain.se"> | |
<types> | |
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://v1.currency.integration.commons.tain.se"> | |
<xsd:complexType name="getCurrencyRates"> | |
<xsd:sequence> | |
<xsd:element name="currencyRatesRequest" type="tns:currencyRateRequestBean"/> | |
</xsd:sequence> | |
</xsd:complexType> | |
<xsd:complexType name="currencyRateRequestBean"> | |
<xsd:sequence> |
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
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://v1.currency.integration.commons.tain.se" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="currency_rate_service_soap" targetNamespace="http://v1.currency.integration.commons.tain.se"> | |
<types> | |
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://v1.currency.integration.commons.tain.se"> | |
<xsd:complexType name="getCurrencyRates"> | |
<xsd:sequence> | |
<xsd:element name="currencyRatesRequest" type="tns:currencyRateRequestBean"/> | |
</xsd:sequence> | |
</xsd:complexType> | |
<xsd:complexType name="currencyRateRequestBean"> | |
<xsd:sequence> |
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
commit 074a79b95e66d999abe500051c5337805575ea3f | |
Author: Jake Craige <[email protected]> | |
Date: Tue Apr 7 10:14:29 2015 -0700 | |
Add testing infastructure for React components | |
diff --git a/app/controllers/components_controller.rb b/app/controllers/components_controller.rb | |
new file mode 100644 | |
index 0000000..4ffc308 | |
--- /dev/null |
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
state = { | |
offset: 0, | |
items: [], | |
itemsVisible: 4, | |
width: 800, | |
height: 100, | |
}; | |
componentDidMount() { | |
this.setState({items: initialItems}) |
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
# Optimized for writes, sort on read | |
# LVC | |
redis.hset("bonds|1", "bid_price", 96.01) | |
redis.hset("bonds|1", "ask_price", 97.53) | |
redis.hset("bonds|2", "bid_price", 95.50) | |
redis.hset("bonds|2", "ask_price", 98.25) | |
redis.sadd("bond_ids", 1) | |
redis.sadd("bond_ids", 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
// Выборка смыканий из базы | |
`SELECT time, type, duration, rnum, den | |
FROM (SELECT time, type, duration, | |
row_number() over(ORDER BY time ASC) rnum, | |
((select count(*) from clamps where device_id = ${deviceId}) / 200) den | |
FROM clamps | |
WHERE clamps.device_id = ${deviceId} | |
AND (clamps.time BETWEEN '${s}' AND '${e}') | |
ORDER BY time ASC) full_clamps |