Introduction
$ curl -i https://api.buttercoin.com/v1/ticker HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 X-Rate-Limit-Limit: 120 X-Rate-Limit-Remaining: 119 X-Rate-Limit-Reset:<PHONE_NUMBER>341 { "currency": "USD", "last": 239.69, "bid": 239.85, "ask": 240.09 }
Buttercoin provides developers with a simple and powerful REST API to integrate your applications with our Marketplace, enabling you to deposit and withdraw funds from your account and execute trades without going through the web interface.
All API access is over HTTPS, and accessed at the https://api.buttercoin.com
domain. All data is sent and received as
JSON - application/json
.
Sandbox Environment
To help you test your more complicated workflows, we’ve created a sandbox environment that uses testnet bitcoins and fake funds. Each Buttercoin API Client allows you to include a sandbox environment parameter during initialization. Please see the API Client documentation for details.
The web interface for the sandbox is available at https://www-sandbox.buttercoin.com/.
The API endpoint for the sandbox is https://sandbox.buttercoin.com
API Clients
// Add this dependency to your project's POM file: <dependency> <groupId>com.buttercoin</groupId> <artifactId>buttercoin-java</artifactId> <version>1.0.0</version> </dependency>
# Add to your Gemfile gem 'buttercoin', '~> 0.0.3' # Or install RubyGems: gem install buttercoin
pip install buttercoin
npm install buttercoin-node
// Using Composer php composer.phar require buttercoin/buttercoin-php:~0.0.3
We’ve built the following officially supported API Clients:
- Java/Scala - Returns data as Java objects
- Node.js - Returns data in JSON format
- PHP - Returns data in Array format
- Ruby - Returns data as Hashie::Mash objects
- Python - Returns data in JSON format
Authentication
All clients support the environment variables
BUTTERCOIN_API_KEY
andBUTTERCOIN_API_SECRET
.
import com.buttercoin.api.*; Buttercoin buttercoin = Buttercoin.newBuilder() .apiKey("pzovcp0kkxmchkuj3smej2wmtjwlare6") .apiSecret("KQvYkSZyt0EpJMeKLvMd1sPb1SdrxBqD") .build();
require 'buttercoin' client = Buttercoin::Client.new( :public_key => '<public_key>', :secret_key => '<secret_key>' )
from buttercoin.client import ButtercoinClient client = ButtercoinClient( api_key='<api_key>', api_secret='<api_secret>' )
var buttercoin = require('buttercoin-node') var client = buttercoin( '<api_key>', '<api_secret>', '<environment>', '<version>' );
<?php require 'vendor/autoload.php'; use Buttercoin\Client\ButtercoinClient; $client = ButtercoinClient::factory([ 'publicKey' => '<public_key>', 'secretKey' => '<secret_key>', 'environment' => '<environment>' ]); ?>
The client will automatically sign your requests with the proper headers. If you are not using a client, authenticated requests should include the X-Buttercoin-Access-Key, X-Buttercoin-Signature and X-Buttercoin-Date headers.
The Buttercoin API provides publicly accessible endpoints to get the current ticker price, the current order book, and the trade history. All other API calls require a valid API Key and API Secret.
You must always keep your API Keys secure to make sure no one can access your account. If you think a key might be compromised, simply revoke your API key here.
Building an HMAC Signature with SHA-256
- Concatenate the timestamp, request URL and parameters into a UTF-8 String:
- Convert the message to Base64
- Sign the message using HMAC with SHA-256 and your API Secret Key
- Convert to Base64 once again
Encode a get request like this:
1403755197367https://api.buttercoin.com/v1/orders?status=filled&orderType=limit
Encode a post request like this:
1403755197367https://api.buttercoin.com/v1/orders{"instrument":"BTC_USD","side":"buy","orderType":"limit","quantity":1,"price":600.01}
HTTP Headers
X-Buttercoin-Access-Key: <your API Key>
X-Buttercoin-Signature: <the HMAC signature>
X-Buttercoin-Date: <the current date epoch
Still not sure? Find code examples in Node.js, PHP, Python, and Ruby.
Public
These endpoints do not require authentication.
Get the ticker
curl -i https://api.buttercoin.com/v1/ticker
import com.buttercoin.api.*; Buttercoin buttercoin = Buttercoin.newBuilder().build(); Future<Ticker> t = buttercoin.getTicker(); BigDecimal last = t.get().getLast();
client.get_ticker()
client.getTicker(function (err, ticker) { console.log("ticker err", err); console.log("ticker", ticker); });
<?php client->getTicker(); ?>
client.get_ticker()
# Dict Object { "currency": "USD", "last": 404.12, "bid": 403.98, "ask": 404.22 }
// JSON Object { "currency": "USD", "last": 404.12, "bid": 403.98, "ask": 404.22 }
<?php // Array Object [ "currency" => USD, "last" => 589.67, "bid" => 584.95, "ask" => 589.67 ] ?>
# Hashie::Mash Object ticker.ask # 589.67 ticker.bid # 584.95 ticker.last # 589.67 ticker.currency # "USD"
Get the last trade price, current ask, and current bid.
HTTP Request
GET /v1/ticker
Get the orderbook
curl -i https://api.buttercoin.com/v1/orderbook
import com.buttercoin.api.*; Buttercoin buttercoin = Buttercoin.newBuilder().build(); Future<OrderBook> t = buttercoin.getOrderBook();
client.get_order_book()
client.get_order_book()
client.getOrderbook(function (err, orderBook) { console.log("order book err", err); console.log("order book", orderBook); });
<?php $client->getOrderBook(); ?>
# Hashie::Mash Object examples # get the highest bid price orderbook.bid.first.price # 402.87 # get the quantity of the lowest ask orderbook.ask.first.quantity # 1.35 # loop through all bids orderbook.bid.each do |order| order.price order.quantity end
# Dict Object { "bid": [ { "price": 402.87, "quantity": 1.3 }, { "price": 404.21, "quantity": 1.25 } ], "ask": [ { "price": 423.58, "quantity": 1.3 }, { "price": 425.25, "quantity": 1.35 } ], "price_currency": "USD", "quantity_currency": "BTC"
// JSON Object { "bid": [ { "price": 402.87, "quantity": 1.3 }, { "price": 404.21, "quantity": 1.25 } ], "ask": [ { "price": 423.58, "quantity": 1.3 }, { "price": 425.25, "quantity": 1.35 } ], "price_currency": "USD", "quantity_currency": "BTC" }
<?php // Array Object [ "bid" => [ [ "price" => 402.87, "quantity" => 1.3 ], [ "price" => 404.21, "quantity" => 1.25 ] ], "ask" => [ [ "price" => 423.58, "quantity" => 1.3 ], [ "price" => 425.25, "quantity" => 1.35 ] ] ] ?>
Get all the orders in the book on both the bid and ask sides
HTTP Request
GET /v1/orderbook
Get trade history
curl -i https://api.buttercoin.com/v1/trades
import com.buttercoin.api.*; Buttercoin buttercoin = Buttercoin.newBuilder().build(); Future<TradeHistory> t = buttercoin.getTradeHistory();
client.get_trade_history()
client.get_trade_history()
client.getTradeHistory(function (err, trades) { console.log("trades err", err); console.log("trade history", trades); });
<?php $client->getTradeHistory(); ?>
# Hashie::Mash Object examples # get the most recent trade trades.first.spent # 0.05 trades.first.spentCurrency # BTC trades.first.earned # 30 trades.first.earnedCurrency # USD trades.first.timestamp #<PHONE_NUMBER>481 # loop through all trades trades.each do |trade| trade.spent trade.earned end
# Dict Object [ { spent: 0.02, spentCurrency: 'BTC', earned: 12, earnedCurrency: 'USD', timestamp:<PHONE_NUMBER>687 }, { spent: 0.02, spentCurrency: 'BTC', earned: 12, earnedCurrency: 'USD', timestamp:<PHONE_NUMBER>743 }, { spent: 0.01, spentCurrency: 'BTC', earned: 6, earnedCurrency: 'USD', timestamp:<PHONE_NUMBER>739 } ]
// JSON Object { trades: [ { spent: 0.02, spentCurrency: 'BTC', earned: 12, earnedCurrency: 'USD', timestamp:<PHONE_NUMBER>687 }, { spent: 0.02, spentCurrency: 'BTC', earned: 12, earnedCurrency: 'USD', timestamp:<PHONE_NUMBER>743 }, { spent: 0.01, spentCurrency: 'BTC', earned: 6, earnedCurrency: 'USD', timestamp:<PHONE_NUMBER>739 } ] }
<?php // Array Object [ [ "spent" => 0.02, "spentCurrency" => 'BTC', "earned" => 12, "earnedCurrency" => 'USD', "timestamp" =><PHONE_NUMBER>687 ], [ "spent" => 0.02, "spentCurrency" => 'BTC', "earned" => 12, "earnedCurrency" => 'USD', "timestamp" =><PHONE_NUMBER>743 ], [ "spent" => 0.01, "spentCurrency" => 'BTC', "earned" => 6, "earnedCurrency" => 'USD', "timestamp" =><PHONE_NUMBER>739 ] ] ?>
Get the last one hundred trades
HTTP Request
GET /v1/trades
Key
Get information about the API key you are using
Get permissions
client.get_key()
client.getKey(function (err, ticker) { console.log("key err", err); console.log("key", ticker); });
<?php client->getKey(); ?>
client.get_key()
# Hashie::Mash Object key.permissions.each do |permission| permission end
# Dict Object (Array) [ "get-account", "create-buy", "create-sell", "cancel-order" ]
// JSON Object (Array) [ "get-account", "create-buy", "create-sell", "cancel-order" ]
<?php // Array Object [ "get-account", "create-buy", "create-sell", "cancel-order" ] ?>
Get all the permissions associated with this key
HTTP Request
GET /v1/key
Account
Retrieve data specific to your Buttercoin account
Get account balances
client.get_balances()
client.getBalances(function (err, ticker) { console.log("balances err", err); console.log("balances", ticker); });
<?php client->getBalances(); ?>
client.get_balances()
# Hashie::Mash Object balances.BTC # 5.44423312 balances.USD # 1413.56
# Dict Object { "BTC": 5.44423312, "USD": 1413.56 }
// JSON Object { "BTC": 5.44423312, "USD": 1413.56 }
<?php // Array Object [ "BTC" => 5.44423312, "USD" => 1413.56 ] ?>
This endpoint retrieves the account balances in all currencies held.
 We support market and limit orders.
Get all orders
query = { "status" => "opened" } client.get_orders(query)
query = {'status': 'filled'} client.get_orders(body=query)
var query = { side: 'sell' }; client.getOrders(query, function (err, orders) { console.log("orders err", err); console.log("orders", orders); });
<?php $query = [ "status" => "canceled", "side" => "sell" ]; $client->getOrders($query); ?>
# Hashie::Mash Object orders.each do |order| order.orderId order.events end
# Array of Dict Objects [ { "orderId": "886313e1-3b8a-5372-9b90-0c9aee199e5d", "side": "buy", "orderType": "limit", "status": "open", "price": 600.12, "priceCurrency": "USD", "quantity": 1.234567, "quantityCurrency": "BTC", "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" }, { "eventType": "filled", "eventDate": "2014-05-06T13:15:32Z" "offered": "33.21", "received": "0.2" } ] } ]
// JSON Array of Objects [ { "orderId": "886313e1-3b8a-5372-9b90-0c9aee199e5d", "side": "buy", "orderType": "limit", "status": "open", "price": 600.12, "priceCurrency": "USD", "quantity": 1.234567, "quantityCurrency": "BTC", "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" }, { "eventType": "filled", "eventDate": "2014-05-06T13:15:32Z", "offered": "33.21", "received": "0.2" } ] } ]
<?php // Array of Array Objects [ [ "orderId" => "886313e1-3b8a-5372-9b90-0c9aee199e5d", "side" => "buy", "orderType" => "limit", "status" => "open", "price" => 600.12, "priceCurrency" => "USD", "quantity" => 1.234567, "quantityCurrency" =>: "BTC", "events" => [ [ "eventType" => "created", "eventDate" => "2014-05-06T13:15:30Z" ], [ "eventType" => "filled", "eventDate" => "2014-05-06T13:15:32Z", "offered" => "33.21", "received" => "0.2" ] ] ] ] ?>
This endpoint retrieves all orders based on the given query.
HTTP Request
GET /v1/orders
Query Parameters
| Parameter | Description |
|---|---|
page |
Integer |
pageSize |
Integer |
status |
enum: ['opened', 'partial-filled', 'filled', 'canceled'] |
side |
enum: ['buy', 'sell'] |
orderType |
enum: ['market', 'limit'] |
id |
e.g. '886313e1-3b8a-5372-9b90-0c9aee199e5d' |
dateMin |
format: ISO-8601, e.g. '2014-05-06T13:15:30Z' |
dateMax |
format: ISO-8601, e.g. '2014-05-06T13:15:30Z' |
Paging
Use page
and pageSize
parameters to retrieve additional order results. The default page
parameter value is 1 if not provided. The default pageSize
parameter value is 20 if not provided.
The response will include an X-Next-Page-Url
header with the URL to request the next page of order results.
Querying Multiple Order Statuses
To search for multiple order statuses, use comma separated values:
'opened,partial-filled'
Querying Multiple Order IDs
To search for multiple orders by ID, use comma separated values:
'886313e1-3b8a-5372-9b90-0c9aee199e5d,3f002e80-62c6-4274-a2d7-3f191923be09'
Calculate Price
To calculate the price you paid for each order, you can check filled
events in the response. The offered
field corresponds to the total amount paid in priceCurrency
, while received
corresponds to the total quantityCurrency
received. Each filled
event is executed separately, and could have different prices depending on availability in the order book.
Get a single order
# Get order with the ID order_id = 'e3afed81-4a9c-4480-a78a-e0872408b95a' client.get_order_by_id(order_id) # For convenience, you can also get order by full URL url = 'https://api.buttercoin.com/v1/orders/3f002e80-62c6-4274-a2d7-3f191923be09' client.get_order_by_url(url)
# Get order with the ID order_id = 'e3afed81-4a9c-4480-a78a-e0872408b95a' client.get_order_by_id(order_id) # For convenience, you can also get order by full URL url = 'https://api.buttercoin.com/v1/orders/3f002e80-62c6-4274-a2d7-3f191923be09' client.get_order_by_url(url)
// Get order with the ID var orderId = 'e3afed81-4a9c-4480-a78a-e0872408b95a'; client.getOrderById(orderId, function (err, order) { console.log("order err", err); console.log("order", order); }); // For convenience, you can also get order by full URL var url = 'https://api.buttercoin.com/v1/orders/3f002e80-62c6-4274-a2d7-3f191923be09'; client.getOrderByUrl(url, function (err, order) { console.log("order err", err); console.log("order", order); });
<?php // Get order with the ID $orderId = 'e3afed81-4a9c-4480-a78a-e0872408b95a'; $client->getOrderById($orderId); // For convenience, you can also get order by full URL $url = 'https://api.buttercoin.com/v1/orders/3f002e80-62c6-4274-a2d7-3f191923be09'; $client->getOrderByUrl($url); ?>
# Hashie::Mash Object order.orderId # "886313e1-3b8a-5372-9b90-0c9aee199e5d" order.status # "open" order.events.each do |event| event.eventType event.eventDate end
# Dict Object { "orderId": "886313e1-3b8a-5372-9b90-0c9aee199e5d", "side": "buy", "orderType": "limit", "status": "open", "price": 600.12, "priceCurrency": "USD", "quantity": 1.234567, "quantityCurrency": "BTC", "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" } ] }
// Json Object { "orderId": "886313e1-3b8a-5372-9b90-0c9aee199e5d", "side": "buy", "orderType": "limit", "status": "open", "price": 600.12, "priceCurrency": "USD", "quantity": 1.234567, "quantityCurrency": "BTC", "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" } ] }
<?php // Array Object [ "orderId" => "886313e1-3b8a-5372-9b90-0c9aee199e5d", "side" => "buy", "orderType" => "limit", "status" => "open", "price" => 600.12, "priceCurrency" => "USD", "quantity" => 1.234567, "quantityCurrency" =>: "BTC", "events" => [ [ "eventType" => "created", "eventDate" => "2014-05-06T13:15:30Z" ] ] ] ?>
This endpoint retrieves a single order with the given ID.
HTTP Request
GET /v1/orders/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the order to retrieve |
Create an order
# a limit order to buy bitcoin at a specified price order = { :instrument => "BTC_USD", :side => "buy", :orderType => "limit", :quantity => "0.05", :price => "623.12" } # Flip the instrument to buy US $500 worth of bitcoin at market price order = { :instrument" => "USD_BTC", :side" => "sell", :orderType" => "market", :quantity" => "500.00" } client.create_order(order)
# a limit order to buy bitcoin at a specified price order = { "instrument": "BTC_USD", "side": "buy", "orderType": "limit", "quantity": "0.05", "price": "623.12" } # Flip the instrument to buy US $500 worth of bitcoin at market price order = { "instrument": "USD_BTC", "side": "sell", "orderType": "market", "quantity": "500.00" } client.create_order(order)
// a limit order to buy bitcoin at a specified price var order = { "instrument": "BTC_USD", "side": "buy", "orderType": "limit", "quantity": "0.05", "price": "623.12" } // Flip the instrument to buy US $500 worth of bitcoin at market price var order = { "instrument": "USD_BTC", "side": "sell", "orderType": "market", "quantity": "500.00" } client.createOrder(order, function (err, msg) { console.log("cancel order err", err); console.log("cancel order", msg); });
<?php // a limit order to buy bitcoin at a specified price order = { "instrument" => "BTC_USD", "side" => "buy", "orderType" => "limit", "quantity" => "0.05", "price" => "623.12" } // Flip the instrument to buy US $500 worth of bitcoin at market price order = { "instrument" => "USD_BTC", "side" => "sell", "orderType" => "market", "quantity" => "500.00" } $client->createOrder($order); ?>
A successful order creation returns the url location of the new order in the response location header with HTTP Response Code of 202.
# string 'https://api.buttercoin.com/v1/orders/3f002e80-62c6-4274-a2d7-3f191923be09'
# string 'https://api.buttercoin.com/v1/orders/3f002e80-62c6-4274-a2d7-3f191923be09'
// string 'https://api.buttercoin.com/v1/orders/3f002e80-62c6-4274-a2d7-3f191923be09'
<?php // string 'https://api.buttercoin.com/v1/orders/3f002e80-62c6-4274-a2d7-3f191923be09' ?>
Create a new order with the given params
HTTP Request
POST /v1/orders
| Parameter | Description |
|---|---|
instrument |
enum: ['BTC_USD, USD_BTC'] |
side |
enum: ['buy', 'sell'] , required true |
orderType |
enum: ['limit', 'market'] , required true |
price |
string , required false |
quantity |
string , required false |
More about Instruments
You can think of the instrument you specify as the first currency priced in terms of the second. For example, for an instrument type of BTC_USD
, you are pricing bitcoin in terms of US Dollars. You can see code examples to the right.
Note: We do not currently support market orders for the buy side BTC_USD
instrument type, meaning you cannot create a market order to buy a specific amount of bitcoin. We do, however, support a sell side market order of this type.
Cancel an order
order_id = 'e3afed81-4a9c-4480-a78a-e0872408b95a' client.cancel_order(order_id)
order_id = 'e3afed81-4a9c-4480-a78a-e0872408b95a' client.cancel_order(order_id)
var orderId = 'e3afed81-4a9c-4480-a78a-e0872408b95a'; client.cancelOrder(orderId, function (err, msg) { console.log("cancel order err", err); console.log("cancel order", msg); });
<?php $orderId = 'e3afed81-4a9c-4480-a78a-e0872408b95a'; $client->cancelOrder($orderId); ?>
The above command returns an HTTP response with status code 204
# Hashie::Mash Object response.status # 204 response.message # "This operation has completed successfully"
# Dict Object { "status": 204, message: "This operation has completed successfully" }
// JSON Object { status: 204, message: "This operation has completed successfully" }
<?php // Array Object [ "status" => 204, "message" => "This operation has completed successfully" ] ?>
Cancel a single order with the given ID.
HTTP Request
DELETE /v1/orders/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the order to cancel |
Transactions
Transactions are deposits and withdrawals of fiat currency and bitcoin.
Get all transactions
query = { "status" => "opened" } client.get_transactions(query)
query = {'status': 'filled'} client.get_transactions(body=query)
var query = { side: 'sell' }; client.getTransactions(query, function (err, transactions) { console.log("transactions err", err); console.log("transactions", transactions); });
<?php $query = [ "status" => "canceled", "side" => "sell" ]; $client->getTransactions($query); ?>
# Hashie::Mash Object transactions.each do |transaction| transaction.transactionId # "538bdc82848a604c007ceac6" transaction.status # "open" transaction.events.each do |event| event.eventType event.eventDate end end
[ { "transactionId": "538bdc82848a604c007ceac6", "transactionType": "deposit", "currency": "USD", "amount": 500.98, "method": "wire", "status": "funded", "fundingInfo": { "source": "External Customer Bank" }, "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" } ] } ]
[ { "transactionId": "538bdc82848a604c007ceac6", "transactionType": "deposit", "currency": "USD", "amount": 500.98, "method": "wire", "status": "funded", "fundingInfo": { "source": "External Customer Bank" }, "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" } ] } ]
<?php [ { "transactionId": "538bdc82848a604c007ceac6", "transactionType": "deposit", "currency": "USD", "amount": 500.98, "method": "wire", "status": "funded", "fundingInfo": { "source": "External Customer Bank" }, "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" } ] } ] ?>
This endpoint retrieves all transactions based on the given query.
HTTP Request
GET /v1/transactions
Query Parameters
| Parameter | Description |
|---|---|
page |
Integer |
pageSize |
Integer |
status |
enum: ['pending', 'processing', 'funded', 'canceled', 'failed'] |
transactionType |
enum: ['deposit', 'withdrawal'] |
dateMin |
format: ISO-8601, e.g. '2014-05-06T13:15:30Z' |
dateMax |
format: ISO-8601, e.g. '2014-05-06T13:15:30Z' |
Paging
Use page
and pageSize
parameters to retrieve additional transaction results. The default page
parameter value is 1 if not provided. The default pageSize
parameter value is 20 if not provided.
The response will include an X-Next-Page-Url
header with the URL to request the next page of transaction results.
Get a single transaction
# Get transaction with the ID transaction_id = '538bdc82848a604c007ceac6' client.get_transaction_by_id(transaction_id) # For convenience, you can also get transaction by full URL url = 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6' client.get_transaction_by_url(url)
# Get transaction with the ID transaction_id = '538bdc82848a604c007ceac6' client.get_transaction_by_id(transaction_id) # For convenience, you can also get transaction by full URL url = 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6' client.get_transaction_by_url(url)
// Get transaction with the ID var transactionId = '538bdc82848a604c007ceac6'; client.getTransactionById(transactionId, function (err, transaction) { console.log("transaction err", err); console.log("transaction", transaction); }); // For convenience, you can also get transaction by full URL var url = 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'; client.getTransactionByUrl(url, function (err, transaction) { console.log("transaction err", err); console.log("transaction", transaction); });
<?php // Get transaction with the ID $transactionId = '538bdc82848a604c007ceac6'; $client->getTransactionById($transactionId); // For convenience, you can also get transaction by full URL $url = 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'; $client->getTransactionByUrl($url); ?>
# Hashie::Mash Object transaction.transactionId # "538bdc82848a604c007ceac6" transaction.status # "open" transaction.events.each do |event| event.eventType event.eventDate end
# Dict Object { "transactionId": "538bdc82848a604c007ceac6", "transactionType": "deposit", "currency": "USD", "amount": 500.98, "method": "wire", "status": "funded", "fundingInfo": { "source": "External Customer Bank" }, "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" } ] }
// Json Object { "transactionId": "538bdc82848a604c007ceac6", "transactionType": "deposit", "currency": "USD", "amount": 500.98, "method": "wire", "status": "funded", "fundingInfo": { "source": "External Customer Bank" }, "events": [ { "eventType": "created", "eventDate": "2014-05-06T13:15:30Z" } ] }
<?php // Array Object [ "transactionId" => "538bdc82848a604c007ceac6", "transactionType" => "deposit", "currency" => "USD", "amount" => 500.98, "method" => "wire", "status" => "funded", "fundingInfo" => { "source": "External Customer Bank" }, "events" => [ [ "eventType" => "created", "eventDate" => "2014-05-06T13:15:30Z" ] ] ] ?>
This endpoint retrieves a single transaction with the given ID.
HTTP Request
GET /v1/transactions/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the transaction to retrieve |
Create a deposit
deposit = { :method => "wire", :currency => "USD", :amount => "500" } client.create_deposit(deposit)
deposit = { method: "wire", currency: "USD", amount: "5002" } client.create_deposit(deposit)
var deposit = { method: "wire", currency: "USD", amount: "5002" }; client.createDeposit(deposit, function (err, msg) { console.log("cancel transaction err", err); console.log("cancel transaction", msg); });
<?php $deposit = [ "method" => "wire", "currency" => "USD", "amount" => "500" ]; $client->createDeposit($deposit); ?>
A successful deposit transaction creation returns the url location of the new transaction in the response location header with HTTP Response Code of 202.
# string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
# string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
// string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
<?php // string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6' ?>
Create a new deposit with the given params
| Parameter | Description |
|---|---|
method |
enum: ['wire'] , required true |
currency |
enum: ['USD'] , required true |
amount |
string , required true |
HTTP Request
POST /v1/transactions/deposit
Create a withdrawal
withdrawal = { :method => "us_ach", :currency => "USD", :amount => "500" } client.create_withdrawal(withdrawal)
withdrawal = { "currency": "USD", "amount": "30020.30", "method": "us_ach" } client.create_transaction(withdrawal)
var withdrawal = { "currency": "USD", "amount": "30020.30", "method": "us_ach" }; client.createWithdrawal(withdrawal, function (err, msg) { console.log("cancel transaction err", err); console.log("cancel transaction", msg); });
<?php $withdrawal = [ "method" => "us_ach", "currency" => "USD", "amount" => "500" ]; $client->createWithdrawal($withdrawal); ?>
If you have the security setting requiring confirmation for withdrawal, you will see this message requiring further action with HTTP Response Code of 201:
# Hashie::Mash response.status # 201 response.message # This operation requires email confirmation
{ "status": 201, "message": 'This operation requires email confirmation' }
{ status: 201, message: 'This operation requires email confirmation' }
<?php [ 'status' => 201, 'message' => 'Withdraw request created, but email confirmation is required' ] ?>
A successful withdrawal transaction creation returns the url location of the new transaction in the response location header with HTTP Response Code of 202.
# string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
# string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
// string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
<?php // string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6' ?>
Create a new withdrawal with the given params
| Parameter | Description |
|---|---|
method |
enum: ['us_ach'] , required true |
currency |
enum: ['USD'] , required true |
amount |
string , required true |
HTTP Request
POST /v1/transactions/withdraw
Send bitcoins
trxn = { :currency => "BTC", :amount => "100.231231", :destination => "<bitcoin_address>" } client.send_bitcoin(trxn)
txn = { "currency": "BTC", "amount": "0.30", "destination": "<bitcoin_address>" } client.send_bitcoin(txn)
var txn = { "currency": "BTC", "amount": "0.30", "destination": "<bitcoin_address>" }; client.sendBitcoin(txn, function (err, msg) { console.log("send bitcoin err", err); console.log("send bitcoin", msg); });
<?php $trxn = { "currency" => "BTC", "amount" => "100.231231", "destination" => "<bitcoin_address>" }; $client->sendCrypto($trxn); ?>
If you have the security setting requiring confirmation for bitcoin withdrawal, you will see this message requiring further action with HTTP Response Code of 201:
# Hashie::Mash response.status # 201 response.message # This operation requires email confirmation
{ "status": 201, "message": 'This operation requires email confirmation' }
{ status: 201, message: 'This operation requires email confirmation' }
<?php [ 'status' => 201, 'message' => 'Send request created, but email confirmation is required' ] ?>
A successful withdrawal transaction creation returns the url location of the new transaction in the response location header with HTTP Response Code of 202.
# string 'http://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
# string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
// string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6'
<?php // string 'https://api.buttercoin.com/v1/transactions/538bdc82848a604c007ceac6' ?>
Send bitcoins to the given address with the following params params
| Parameter | Description |
|---|---|
currency |
enum: ['BTC'] , required true |
amount |
string , required true |
destination |
address to which to send currency string , required true |
HTTP Request
POST /v1/transactions/send
Cancel a transaction
transaction_id = 'e3afed81-4a9c-4480-a78a-e0872408b95a' client.cancel_transaction(transaction_id)
transaction_id = 'e3afed81-4a9c-4480-a78a-e0872408b95a' client.cancel_transaction(transaction_id)
var transactionId = 'e3afed81-4a9c-4480-a78a-e0872408b95a'; client.cancelTransaction(transactionId, function (err, msg) { console.log("cancel transaction err", err); console.log("cancel transaction", msg); });
<?php $transactionId = 'e3afed81-4a9c-4480-a78a-e0872408b95a'; $client->cancelTransaction($transactionId); ?>
The above command returns an HTTP response with status code 204
# Hashie::Mash Object response.status # 204 response.message # "This operation has completed successfully"
# JSON Object { "status": 204, message: "This operation has completed successfully" }
// JSON Object { status: 204, message: "This operation requires email confirmation" }
<?php // Array Object [ "status" => 204, "message" => "This operation has completed successfully" ] ?>
Cancel a single transaction with the given ID.
HTTP Request
DELETE /v1/transactions/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the transaction to cancel |
Rate Limiting
Rate limiting happens on a rolling basis.
| Period | Limit |
|---|---|
| Minute | Maximum of 120 requests |
rate limiting is considered on a per-IP basis.
Requests exceeding the limit will receive a ‘429 Too Many Requests’ response. Rate limiting is considered on a per-IP basis.
HTTP Response Headers
The following headers are applied per minute to public and authenticated requests:
| Header | Description |
|---|---|
X-Rate-Limit-Limit |
The number of requests you can send within your rate limit window |
X-Rate-Limit-Remaining |
The number of requests that you can send before you will exceed your rate limit |
X-Rate-Limit-Reset |
When your next rate limit window will be reset (in UTC epoch milliseconds) |
Bursting
We allow temporary bursting up to 600 requests per minute. After you submit your first request, you’ll find that your X-Rate-Limit-Remaining
will gradually increase (at 120/minute minus your usage) until it reaches a total of 600. If you do not submit any requests within one hour, it will reset again to 120 requests per minute.
Errors
Here is an example API error in JSON Format:
{ "status": 400, "errors": [ { "message": "Bad Request" } ] }
The Buttercoin API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request – Your request was malformed in some way |
| 401 | Unauthorized – The supplied authentication is invalid |
| 403 | Forbidden – The supplied authentication is not authorized to access this resource |
| 404 | Not Found – The specified endpoint could not be found |
| 405 | Method Not Allowed – You tried to access an endpoint with an invalid HTTP method |
| 406 | Not Acceptable – You requested a format that isn’t json |
| 415 | Unexpected Content Type – There was a problem with the request’s Content-Type |
| 420 | Enhance your calm – We don’t actually throw this error, it just seems like good advice |
| 429 | Too Many Requests – You have exceeded your request limit |
| 500 | Internal Server Error – Unexpected error handling API request. Please try again. |
| 503 | Service Unavailable – We’re temporarily offline for maintenance. Please try again later. |


| Staff | Contact | |
|---|---|---|
| Managing Editor | 982515334 |<EMAIL_ADDRESS>|
| Features Editor | 986524124 |<EMAIL_ADDRESS>|
| Photo/Graphics Editor | 954251347 |<EMAIL_ADDRESS>|
| Advertising Manager | 954213647 |<EMAIL_ADDRESS>|
| Staff | Contact | |
|---|---|---|
| Managing Editor | 982515334 |<EMAIL_ADDRESS>|
| Features Editor | 986524124 |<EMAIL_ADDRESS>|
| Photo/Graphics Editor | 954251347 |<EMAIL_ADDRESS>|
| Advertising Manager | 954213647 |<EMAIL_ADDRESS>|


When thinking of the times when I had to deal with conflict, I realized that there are definitely recognizable patterns.
How I typically respond
There is a strong correlation in how I deal with conflict and who the conflict is with. It’s clear to me that if the other person is someone with authority or in a professional setting, I tend to be more reserved. When the other person is someone close to me, I will tend to be more vocal.
My first instinct is to be very defensive. I think “what did I do to deserve this?” or “I’m right, and they’re wrong!” The initial emotions always overtake my reasoning skills, so I get really quiet.
This is good and bad. It’s great that I actually pause and think about the situation before acting. It’s bad, because I tend to think more negatively than if I was in a good mood. Of course, a conflict means that the mood is already on edge, so the thoughts often veer in that negative direction.
Learning to cope
I am now learning to be more thoughtful and more positive. I have found myself in situations where I am about to release my temper again, but instead I take a few deep breaths, and I try to speak after I get more perspective on the situation.
For example, when my significant other said something that made me upset, I ask, why am I upset? What did he say that made me feel this way? Often times, the reason is good enough to communicate to the other person. The reason could be “that hurt my feelings” or “I feel kind of left out” or whatever it may be.
By being honest with yourself and the other person, it has diverted the attention to resolving the conflict instead of escalating it.
I’m still not perfect, of course. There are still many instances where I wish I had been less quick to speak or act, and instead been more level-headed.
Main source of conflict
The biggest culprit of conflicts is probably the lack of communication, or miscommunication. Communication is extremely difficult. The message sent and the message received between two parties is never perfect. The sender and the target have different viewpoints, perspectives, thoughts, feelings, languages even.
Emails, text messages, and even phone conversations are the most likely mediums for communications that go awry. It is during one of these types of conversations that I often misinterpret the meaning of something and things escalate quickly.
At times like these, it’s best to give the other person the benefit of the doubt. It’s also not advisable to have a complicated conversation without at least being able to see the other person, because body language can help convey the true meaning much more effectively.
If you’re on the phone, try to arrange an in person meeting or at least a webcam session. If you’re texting, and the message is complicated, make the phone call instead.
Your mileage may vary
I’m trying to describe many different situations, because when thinking back to conflicts I have had in the past, it’s clear that the way in which the conflicts arose vary greatly and should be handled in different ways.
What applies to all situations is this: Pause. Take a few seconds (or as long as you need) to digest your thoughts, be mindful of your own feelings and the other person’s as well. Then act in a way that is trying to resolve the situation and not escalate it further.
We can all learn to get along in this world. It’s all about understanding.


Forest of the Lost [aq62], forest, in Imperia, peasants: 129
Last updated Turn #108_bad
Forest of the Lost [aq62], forest, in Imperia, peasants: 129
------------------------------------------------------------------------
4: Limerick [p4x], refugee, with one skirmisher, arrived from the south.
7: Limerick [p4x], refugee, with one skirmisher, went north.
9: Stack of nazgul [cn7p], nazgul, arrived from the south.
11: Wild men [iv9i], savages, number: 37, went south.
11: Stack of nazgul [cn7p], nazgul, went north.
26: Pack of wolves [ja7l], wolves, number: 4, arrived from the west.
28: Pack of wolves [ja7l], wolves, number: 4, went south.
30: The population grows by one peasant.
Routes leaving Forest of the Lost:
North, forest, to Forest of the Lost [ap62], 8 days
East, forest, to Forest of the Lost [aq63], 8 days
South, forest, to Forest of the Lost [ar62], 8 days
West, forest, to Forest of the Lost [aq61], 8 days
Inner locations:
Graveyard [ac9h], graveyard, 1 day
Yew grove [ad9b], yew grove, 1 day, owner:
Minotaur [fx6r], minotaurs, number: 27
Harpie [fv6u], harpies, number: 7
Seen here:
Stack of nazgul [bt4d], nazgul, number: 5
Pack of wolves [ja7l], wolves, number: 4


Code taken from Paul Robert's Blog, and then heavily edited for Express version 4.x so it will work. Not all the routes in either app.js or Article.js work correctly.


'The Real Housewives of Salt Lake City' in Works at Bravo
Andy Cohen unveiled the 10th “Real Housewives” series at BravoCon
by Jeremy FusterBravo is adding a 10th version of their runaway hit reality series “The Real Housewives” that will take place in Salt Lake City, the franchise’s executive producer and host Andy Cohen announced at the network’s first ever BravoCon this weekend.
“We’ve always tried to choose a city that has completely unique personalities and we also try to throw a little curveball now and then. Pick somewhere you weren’t expecting,” Cohen said.
“You didn’t see it coming but I have to tell you, in Utah, you have the majesty of the mountains, the Mormon religion, an exclusive community of people who have very successful businesses who live in their own universe,” he added. “It is gorgeous and I think you’re going to be really surprised and intrigued by the group of women we’ve found.”
Also Read:
Since its launch with “The Real Housewives of Orange County” in 2006, Bravo has launched versions of the show in New York, Atlanta, Beverly Hills and other U.S. cities. Only two versions — Miami and Washington D.C. — have been canceled, while “Orange County” has reached 14 seasons. Other countries have created their versions of the show in places like Sydney, Vancouver, Bangkok, Athens and Johannesburg.
Also Read:
“‘The Real Housewives of Salt Lake City’ takes viewers into an undiscovered world that is about so much more than religion, although the Mormon church is undeniably ingrained in the culture,” the official announcement of the new series reads.  They hold themselves and each other to an extremely high standard and never hold back when things go sideways, but lord knows they are always there for each other when they need it most.”
An official premiere date for the show has not been set.
It's virtually impossible to speak of the reality television world without including Bravo in the discussion, but with successful hit shows like "The Real Housewives" and "Queer Eye for the Straight Guy," there's also some misses.
View In Gallery


Samples Screen Shots 2
hopalong
This sample plots points using the hopalong algorithm by Barry Martin presented in the September 1986 Scientific American.
minimal
This is about as basic as you can make your application. For those of us who like to 're-use' code this is a good base to build on. Add items one by one to this minimal PythonCard app to make it easier to understand what is going on.
proof
This application implements the proof of concept statement of requirements as specified here. It is pretty basic but it does show all of the different widget types you can use. This example also demonstrates the use of an image as a canvas background.
samples
The samples launcher provides a convenient way to try each sample, browse the readme, source code and layout description for each sample.
searchExplorer
This sample demonstrates just how easy it is to develop quite useful applications using the PythonCard framework. To use this application, just enter a search string in the first text item, select where you would like to perform the search from the 'Sites' list and then press the 'Search' button. As you perform searches they are saved in the 'Past Searches' list, a bit like web page URLs in your browser. To re-run a search select it from the list and press the 'Search' button.
sounds
Another really simple but powerful application is this example which will play a sound file.
SourceForgeTracker
SourceForgeTracker downloads XML from SourceForge in order to display Bug Reports and Feature Requests for a variety of Python SF projects.
textEditor
A basic text editor.
textIndexer
Dan Winkler's original PythonCard test converted from tkinter to PythonCard.
textRouter
TextRouter is a generic weblogging and text "routing" client. It's main use is for posting to Blogger and/or Manila maintained weblogs. More screen shots are available at http://simon.kittle.info/stories/storyReader$116. Simon Kittle maintains a page for TextRouter that includes a standalone binary installer for Windows.
Noughts and Crosses (tictactoe)
When I was young we used to call this game noughts and crosses. Some of you may know it as Tic Tac Toe. The best way to see what this sample application does is to run it. If anyone would like to write a more advanced algorithm for the computer player then please go ahead. When you have finished you can post it to the mailing list.
widgets
This sample application is designed to demonstrate some of the events that are associated with particular widgets. The buttons and check boxes on the right hand side of the screen are active and have code associated with them. Again, the best way to find out what the various controls do is to try them out.
worldclock
Last, but certainly not least, is the world clock. A rather natty application that shows you where in the world currently has daylight and where is dark. You will need to be connected to the internet for this to function properly as the different map images are downloaded from http://www.time.gov/. Can you tell when this screen shot was taken?
The next page of screenshots are here.
$Revision: 1.12 $ : $Author: kasplat $ : Last updated $Date: 2004/07/26 15:35:31 $


The Spirit of our business is bringing people and books together. Whether it is a paperback written by your favorite author, or a collectible item whose spirit moves you! We have what you need. To have you walk out thrilled with what you find, drives us to deliver you the best experience a used book store can provide.
We offer our services to the great community of Brandon/Tampa, FL area with a shop open to the public for over 27 years. We claim the title, for one of the longest running used book stores that deal with both hardcover and paperback books in the Brandon/Tampa area!
We carry collectibles and rare books, more than half of our inventory is of the gently used variety. Our mission to you, is to provide a consistent price, we sell our gently used books for half of the original cover price. That is our price every day, all day.
We are a lover of books! We proudly call ourselves Book-o-Holics. It is more than just a business, it is an addiction we share with our customers.
Novels: We carry Science Fiction, Horror, Fantasy, Mysteries, Thrillers, Teen Fiction and Manga in both hardcover and paperback. Non-Fiction: We have both hardcover and paperback books in all genres of this category; from Cookbooks to Zoology. We have something for everyone!
Our book buyer: Michael, is available to you typically Thursday to Saturday. Please always call ahead to confirm he is working, if you plan on selling your books. He is the only buyer, all other staff will not be able to assist in the purchasing of books, so please call ahead of time to make sure he is in the office.
728 W Lumsden Road
Brandon FL, 33511
813-684-1133
We are open to serve you, Monday to Saturday, from 11 AM to 6 PM. If you are in the area, please come and say hello. Take a look at our offerings!
Michael is a fanatic collector of books on the Titanic disaster, though he does enjoy the occasional action/adventure novel. Current favorites include James Rollins and the writing duo Preston & Child.
Tory’s first love is natural history books, especially 19th century and earlier, although she also reads a lot of mystery fiction.
Charlene enjoys books on crystals and healing (main stream and alternative).


SMART COSMOS is an RFID-centric platform purposefully built to be an application's contextual data store, and if you are
developing a solution that is either not Java based or you'd simply prefer to operate using standard JavaScript
Object Notation (JSON) and REST web service calls, please refer to the public REST endpoint documentation at
http://docs.smartcosmosobjects.apiary.io.
Entity Clients
Overview
Entity clients are Java classes that are intended to fully encapsulate and hide the RESTful architecture of the platform
from the developer. They were built in such a way to reduce the underlying transport (REST calls over HTTP/S) and
its HTTP status codes to an afterthought. Instead of worrying about the subtleties of a 200, 201, 204, or 409 HTTP
status code, the developer just looks at a boolean value, the size of a collection, or interprets a simple and easy to
use ResponseEntity
that contains a Result
code that can be switch
ed.
Usage
The general pattern is the same for every single SMART COSMOS entity client:
// Define your server context
ServerContext context = new ServerContext(USERNAME, PASSWORD, SERVER_URL);
// Create an instance of your target entity client
ISpecificClient client = SpecificClientFactory.createClient(serverContext);
// Do something with the client
client.doSomething();
The following provides a realistic example of using the IObjectClient to locate a specific entity instance, update its
properties, and then save those changes back to the cloud:
//Define a server context that will connect to the default platform endpoint with the specified username, password.
ServerContext context = new ServerContext(USERNAME, PASSWORD, SERVER_URL);
//Create an instance of an IObject client using the server context
IObjectClient client = ObjectFactory.createClient(context);
//Use one of the search methods to find a very specific IObject instance
IObject entity = client.findByExactObjectUrn(YOUR_ARBITRARY_OBJECT_URN);
// Update the name and moniker values of the object
entity.setName("Updated RFID Tag Name");
entity.setMoniker("foo-moniker");
// Save those changes back to the cloud
client.update(entity);


One of the more curious examples of differences between Ruby and Javascript is the Hash data structure. While Ruby officially supports a Hash structure, the same can't be said of Javascript. Instead, the implementation of Objects in Javascript serves the same function, though phrased and with slightly different features.
Hashes in Ruby are an explicit data structure, storing values within it that correspond to specific keys. every key can be something different, like a string, an integer, an object, and so on. each key maps to a value, and the data structure as a whole can be traversed and iterated over using different Hash or enumerable methods.
Javascript Objects work somewhat similarly, where Objects hold a collection of properties that each have their own value associated with it. This essentially works the same way as the key-value pairs in Ruby Hashes, where the value doesn't exist in the object until its assigned a valid property. Objects are slightly different though, in that they can incorporate their own methods as well as the data it includes. This means you can call included methods within the object if it doesn't need to be used with any other data structures or elsewhere in the program, so long as its associated with the Object itself. The Object can also easily be traversed and iterated over using their own methods, such as ForEach, or In, which iterate over property within the Object.


{% extends "layout.html" %} {% block content %}
Right now your job is in the queue. You will receive an email shortly when the superimposition is calculated, or you can refresh the page if you feel lucky!
{% elif job.is_completed() %}Here are the results of the superimposition you requested.
There has been an error processing your job. The system administrators have been informed of the situation.
{% endif %} {% endblock %}


graphql-crystal
An implementation of GraphQL for the crystal programming language inspired by graphql-ruby & go-graphql & graphql-parser.
The library is in beta state atm. Should already be usable but expect to find bugs (and open issues about them). pull-requests, suggestions & criticism are very welcome!
Find the api docs here.
Installation
Add this to your application's shard.yml
:
dependencies:
graphql-crystal:
github: ziprandom/graphql-crystal
Usage
Complete source here.
Given this simple domain model of users and posts
class User
property name
def initialize(@name : String); end
end
class Post
property :title, :body, :author
def initialize(@title : String, @body : String, @author : User); end
end
POSTS = [] of Post
USERS = [User.new("Alice"), User.new("Bob")]
We can instantiate a GraphQL schema directly from a graphql schema definition string
schema = GraphQL::Schema.from_schema(
%{
schema {
query: QueryType,
mutation: MutationType
}
type QueryType {
posts: [PostType]
users: [UserType]
user(name: String!): UserType
}
type MutationType {
post(post: PostInput) : PostType
}
input PostInput {
author: String!
title: String!
body: String!
}
type UserType {
name: String
posts: [PostType]
}
type PostType {
author: UserType
title: String
body: String
}
}
)
Then we create the backing types by including the GraphQL::ObjectType
and defining the fields using the
field
macro
# reopening User and Post class
class User
include GraphQL::ObjectType
# defaults to the method of
# the same name without block
field :name
field :posts do
POSTS.select &.author.==(self)
end
end
class Post
include GraphQL::ObjectType
field :title
field :body
field :author
end
Now we define the top level queries
# extend self when using a module or a class (not an instance)
# as the actual Object
module QueryType
include GraphQL::ObjectType
extend self
field :users do
USERS
end
field :user do |args|
USERS.find( &.name.==(args["name"].as(String)) ) || raise "no user by that name"
end
field :posts do
POSTS
end
end
module MutationType
include GraphQL::ObjectType
extend self
field :post do |args|
user = USERS.find &.name.==(
args["post"].as(Hash)["author"].as(String)
)
raise "author doesn't exist" unless user
(
POSTS << Post.new(
args["post"].as(Hash)["title"].as(String),
args["post"].as(Hash)["body"].as(String),
user
)
).last
end
end
Finally set the top level Object Types on the schema
schema.query_resolver = QueryType
schema.mutation_resolver = MutationType
And we are ready to run some tests
describe "my graphql schema" do
it "does queries" do
schema.execute("{ users { name posts } }")
.should eq ({
"data" => {
"users" => [
{
"name" => "Alice",
"posts" => [] of String
},
{
"name" => "Bob",
"posts" => [] of String
}
]
}
})
end
it "does mutations" do
mutation_string = %{
mutation post($post: PostInput) {
post(post: $post) {
author {
name
posts { title }
}
title
body
}
}
}
payload = {
"post" => {
"author" => "Alice",
"title" => "the long and windy road",
"body" => "that leads to your door"
}
}
schema.execute(mutation_string, payload)
.should eq ({
"data" => {
"post" => {
"title" => "the long and windy road",
"body" => "that leads to your door",
"author" => {
"name" => "Alice",
"posts" => [
{
"title" => "the long and windy road"
}
]
}
}
}
})
end
end
Automatic Parsing of JSON Query & Mutation Variables into InputType Structs
To ease working with input parameters custom structs can be registered to be instantiated from the json params of query and mutation requests. Given the schema from above one can define a PostInput struct as follows
struct PostInput < GraphQL::Schema::InputType
JSON.mapping(
author: String,
title: String,
body: String
)
end
and register it in the schema like:
schema.add_input_type("PostInput", PostInput)
Now the argument post
which is expected to be a GraphQL InputType PostInput
will be automatically parsed into a crystal PostInput
-struct. Thus the code in the post
mutation callback becomes more simple:
module MutationType
include GraphQL::ObjectType
extend self
field :post do |args|
input = args["post"].as(PostInput)
author = USERS.find &.name.==(input.author) ||
raise "author doesn't exist"
POSTS << Post.new(input.title, input.body, author)
POSTS.last
end
end
Custom Context Types
Custom context types can be used to pass additional information to the object type's field resolves. An example can be found here.
A custom context type should inherit from GraphQL::Schema::Context
and therefore be initialized with the served schema and a max_depth.
GraphQL::Schema::Schema#execute(query_string, query_arguments = nil, context = GraphQL::Schema::Context.new(self, max_depth))
accepts a context type as its third argument.
Field resolver callbacks on object types (including top level query & mutation types) get called with the context as their second argument:
field :users do |args, context|
# casting to your custom type
# is necessary here
context = context.as(CustomContext)
unless context.authenticated
raise "Authentication Error"
end
...
end
Serving over HTTP
For an example of how to serve a schema over a webserver(kemal) see kemal-graphql-example.
Development
run tests with
crystal spec
Contributing
- Fork it ( https://github.com/ziprandom/graphql-crystal/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- ziprandom - creator, maintainer


CssUserAgent was started back in 2006 as a less chaotic solution to fixing browser-specific quirks when polishing up web app UIs. Originally, it was part of a larger Ajax framework that has since been modularized into smaller independent libraries.
The intention is to build valid standards-based cross-plaform CSS and sparingly use CssUserAgent to finish the job. Test your code in many browsers as early and frequently as you can. Don't just design for your favorite browser and once finished look at it in everything else. This tends to create more workarounds then are necessary.
Chill, buddy. It's just a tool. If you don't need it, don't use it. The fact is there are tons of people out there writing cryptic CSS hacks and this gives them a better option.
UserAgent-sniffing, in all its various forms, gets lots of flak in the web UI community. Typically this is because it is abused by those new to the trade. L337 haxors tend to love to bash any pragmatic shortcuts which trade code purity for time.
The reality is, as in all of life, there are trade-offs to be made. Beware "always" and "never" statements; choose wisely and use shortcuts sparingly. Deep breaths. It's going to be okay.
CssUserAgent actually predates Modernizr by a couple years; however, this is a valid point as Modernizr is a great tool. The existence of both is further evidence that browser differentiating layout is indeed a problem in need of a solution.
These two tools serve slightly different but complimentary purposes. Modernizr uses feature detection to allow differentiating layout. This works well for feature-oriented differences but some layout differences aren't necessarily the result of missing features or cannot be detected through feature testing. See the "Undetectables" topic in Modernizr's docs for specific examples. Sometimes you just need a slightly different padding or font size for one browser.
Modernizr may or may not be the right tool for the job. Keep in mind, Modernizr is also about 4x larger and requires more complex DOM testing logic on each page load. Again choose your tools based upon your needs.
As mentioned earlier, CSS hacks have been the traditional solution. These techniques rely upon bugs within various browser implementations to be able to target specific browsers. CSS hacks have many downsides, not the least of which is they typically employ invalid CSS syntax which could be misinterpreted by CSS compaction utilities. Another common issue is their behavior is largely unknown for future browsers.
Since Internet Explorer typically is the greatest deviant in web design, another common solution uses different stylesheets for IE by using IE-only conditional comments to include or exclude certain <link/> or <style/> tags. This only applies to IE, and tends to become difficult to maintainable in larger applications. Even worse is that seemingly valid uses of conditional comments can drastically slow down page load in IE-8.
Another solution which only targets Internet Explorer uses IE-only conditional comments to apply classes to the HTML tag. This clever solution has the advantage of not requiring CSS Hacks or JavaScript, but only works with IE and makes your markup ugly as sin.
The most important caveat to know is that CssUserAgent requires JavaScript. This typically isn't an issue for most users. But be warned not to rely upon browser-specific CSS classes for the accessibility of your content. As mentioned earlier, this is intended for layout fixes and polish not core business logic.


This is the haXe conversion of the MochiAds Mochi API version 3.02. This is an independent conversion done by myself and is unrelated with Mochi Media. It might (and possibly) contain bugs that might break your game - so make sure you test the provided functionality well! And if you find any bug, please contact me (but first check to see if there is a new version).
This haXe conversion provides everything that the ActionScript 3 version of the Mochi API 3.02 provides. If something is missing, then consider it as a bug and report it to the email address mentioned above.
If you report any bug or missing feature, please include source code so i can test the issue faster.
To use the Mochi API you should make the mochi.haxe package available to your program. This can be done in a variety of ways, but the easiest one is to drop the mochi directory in your project's source code directory. An alternative method is to put the mochi directory inside the std directory of your haXe installation. This will make the mochi.haxe package available to all haXe programs.
Most of the AS3 code for Mochi API is the same for haXe. The major difference is the package name which is set to mochi.haxe instead of mochi.as3 so calls to mochi.as3.MochiAd.blah are mochi.haxe.MochiAd.blah (or just add a import mochi.haxe; line and use MochiAd.blah).
Another difference is that in haXe you must provide a custom MovieClip, like:
or else the ads won't be shown.var mc:MovieClip = new MovieClip(); flash.Lib.current.addChild(mc); MochiAd.showPreGameAd({clip:mc, id:"xxxxxx", res:"512x384"});
Of course other differences lie on the language type system. In Mochi API where Object is required Dynamic should be used and where a direct field is assigned (like mc.something = foo;) the Reflect methods should be used (like Reflect.setField(mc, "something", foo); to write and Reflect.field(mc, "something"); to read).
Read the official readme file for more information about the API itself.
When using Leaderboards, Mochi provides some code to call it. This code is incompatible with haXe, so i'll explain how to convert it to haXe code from the ActionScript 3 code provided by Mochi. The code provided usually looks like this:
var o:Object = { n: [<a bunch of numbers>] }, f: function (i:Number,s:String):String { if (s.length == 16) return s; return this.f(i+1,s + this.n[i].toString(16));}}; var boardID:String = o.f(0,""); MochiScores.showLeaderboard({boardID: boardID, score: playerscore});
This code needs some modifications to be usable in haXe. First of all, this has not the same meaning in haXe and AS3, so you cannot use it. To access the object in haXe from the local function you have to define the variable o before the function is defined and assign it a default value so the compiler won't complain about using uninitialized values. So
var o:Dynamic = null;
See that Dynamic there? This is the AS3-to-haXe conversion i mentioned above. We also assigned a null to it so it has something to reference to. Next we need to define the object. The object definition is done the same way as in AS3, but we have to replace Number with Int (usually Number is replaced with Float but here what the code does actually requires Int, not Float). Also we replace all references to this with references to o. So
o = { n: [<the same bunch of numbers>], f: function(i:Int,s:String):String { if (s.length == 16) return s; return o.f(i+1,s + o.n[i].toString(16)); } };
The rest is the same
var boardID:String = o.f(0,""); MochiScores.showLeaderboard({boardID: boardID, score: playerscore});
So the final code is
var o:Dynamic = null; o = { n: [<the same bunch of numbers>], f: function(i:Int,s:String):String { if (s.length == 16) return s; return o.f(i+1,s + o.n[i].toString(16)); } }; var boardID:String = o.f(0,""); MochiScores.showLeaderboard({boardID: boardID, score: playerscore});
The trace function behaves differently in haXe and Flash - in haXe the trace messages are displayed in the Flash movie. So we cannot keep them around. However this also means that the messages that would normally been displayed by Mochi API are not displayed. To avoid losing these messages, i simply commented out all calls to trace. So if your code does not seem to work, the first step would be to uncomment the calls to trace in the mochi/haxe/*.hx files. Note that in some cases i added empty brackets like
these brackets should be removed with the comment, so the above line will beif (something) {}//trace("error...");
if (something) trace("error...");
Note that the warning traces for leaderboard IDs are not commented out. This is done in purpose: if you provide an invalid leaderboard ID you *do* want to see the traces no matter what.
So far at least. I don't know if i'll keep updating this conversion forever or even for each new version of the official Mochi API. Of course i accept contributions, although the best move would be for Mochi Media to take over it and make sure it stays in sync with the AS2/AS3 version. The code and directory layout is kept almost the same so it can be a fit-in with the layout used in the released zip files.
A note: in the source code there is some documentation in a JavaDOC-like format. I have a tool called SlashDOC which creates JavaDOC-like API documentation and these days i hacked some haXe support. However i didn't added default argument values and it chokes with the current code. So i left the comments in until i add support for default argument values in SlashDOC.
For anything contact me.
Kostas "Bad Sector" Michalopoulos


Conversations
78,643
Mentions
567,099
Tweets
1,200,349
Audience
900,432
Activity Volume Report
Tweet Volumes: 26 Apr, 2015 - 30 Apr, 2015
Tweet Origins
Topic-Sentiment Classification
Overall Sentiment
Audience Demographics
Female
514,200
Since 26th April
Male
1,130,050
Since 26th April


Complementary Filters Shaping Using \(\mathcal{H}_\infty\) Synthesis
Dehaeze Thomas, Verma Mohit and Collette Christophe
Abstract:
For many applications, large bandwidth and dynamic ranges are requiring to use several sensors, whose signals are combined using complementary filters. This paper presents a method for designing these complementary filters using \(\mathcal{H}_\infty\) synthesis that allows to shape the filter norms. This method is shown to be easily applicable for the synthesis of complex complementary filters.
Matlab Scripts (link)
All the Matlab code that was used for the paper are accessible so that all the results are reproducible.
Poster (link)
The poster has been created using the tikzposter package for beamer.
Presentation (link)
The presentation for the ICCMA 2019 conference has been created using the beamer package.
Cite this paper
To cite this paper use the following bibtex code.
@inproceedings{dehaeze19_compl_filter_shapin_using_synth, author = {Dehaeze, Thomas and Vermat, Mohit and Collette Christophe}, title = {Complementary Filters Shaping Using $\mathcal{H}_\infty$ Synthesis}, booktitle = {7th International Conference on Control, Mechatronics and Automation (ICCMA)}, year = {2019}, language = {english}, doi = { }, }
You can also use the formatted citation below.
Dehaeze T., Vermat M., and Collette C., “Complementary Filters Shaping Using ℋ∞ Synthesis,” 2019 7th International Conference on Control, Mechatronics and Automation (ICCMA), Delft, Netherlands, 2019, pp. 459-464.


September 19th, 2019 - Derek Rodriguez
I'm one of those people who constantly likes change. That change is often in the name of optimization. A new Vim keybind for a command I execute often while working. A new shell alias to get to a config file I find myself editing often. Working at the speed of thought is a very satisfying thing. When it came to building a personal website, I took a similar approach by stealing hints from all my favorite CSS layouts and gluing them together to make my own. Here is the list:
This website, which speaks for itself.
58 Bytes of CSS looks great everywhere is another example in the same vein, but less extreme.
HackerNews because I stare at it so much the design is somewhat etched in my brain.
This Guy for being another evangelist on the topic of website obesity.
The Older YouTube landing pages get an honorable mention because they have a nice homey feel to them. Maybe this is just me realizing that I'm not a kid anymore.


ChyF Pilot Demo
About the CHyF Pilot...
Nexuses
Find by ID:
E. Flowpaths
Find by ID:
Upstream Of ID
Downstream Of ID
Flows From Point
Upstream Of Point
Downstream Of Point
Name
Type
Rank
FD Certainty
Strahler Order
Horton Order
Hack Order
Length (m)
=
<
>
Find by Filter
E. Catchments
Find by ID:
Upstream Of ID
Downstream Of ID
Containing Point
Upstream Of Point
Downstream Of Point
Drainage Areas
Remove Holes
Upstream Of Point
Downstream Of Point
Clear Selection


| I l@ve RuBoard |
Python can integrate a variety of disparate systems; you may hear it referred to as a glue language, because it's a powerful way to glue systems together. We have broken the basic integration technologies available on Windows into five groups: files, DLLs, COM, networking, and distributed objects. We'll take a quick look at the Python features that support each one.
The most fundamental technique for making systems talk is working with files. They are at the foundation of every operating system, and huge and reliable systems can be built and maintained by batch-processing files. Every programming language can work with files, but some make it easier than others. Here are some key features:
Python can read a file into a string (or read a multiline text file into a list of strings) in one line. Strings have no limitations on what they can hold: null bytes and non-ASCII encodings are fine.
Python can capture and redirect its own standard input and output; subroutines that print to standard output can thus be diverted to different destinations.
It provides a platform-independent API for working with filenames and paths, selecting multiple files, and even recursing through directory trees.
For binary files, Python can read and write arrays of uniform types.
A variety of text-parsing tools are available, ranging from string splitting and joining operations and a pattern-matching language, up to complete data-driven parsers. The key parts of these are written in C, allowing Python text-processing programs to run as fast as fully compiled languages.
When generating output, Python allows you to create multiline templates with formatting codes and perform text substitutions to them from a set of keys and values. In essence, you can do a mailmerge in one line at incredibly high speeds.
Chapter 17, provides a comprehensive introduction to these features.
Windows uses dynamic link libraries extensively. DLLs allow collections of functions, usually written in C or C++, to be stored in one file and loaded dynamically by many different programs. DLLs influence everything that happens on Windows; indeed, the Windows API is a collection of such DLLs.
Python is written in ANSI C, and one of its original design goals was to be easy to extend and embed at the C level. Most of its functionality lives in a DLL, so that other programs can import Python at runtime and start using it to execute and evaluate expressions. Python extension modules can also be written in C, C++, or Delphi to add new capabilities to the language that can be imported at runtime.
The Win32 extensions for Python, which we cover throughout this book, are a collection of such libraries that expose much of the Windows API to Python.
The basic Python distribution includes a manual called Extending and Embedding the Python Interpreter, which describes the process in detail. Chapter 22, shows you how to work with Python at this level on Windows.
The Component Object Model (COM) is Microsoft's newest integration technology and pervades Windows 95, 98, NT, and 2000. The DLL lets you call functions someone else has written; COM lets you talk to objects someone else has written. They don't even have to be on the same computer!
Windows provides a host of API calls to get things done, but using the calls generally requires C programming expertise, and they have a tortuous syntax. COM provides alternative, easier-to-use interfaces to a wide range of operating-system services, and it lets applications expose and share their functionality as well. COM is now mature, stable, and as fast as using DLLs, but much easier to use, and so opens up many new possibilities. Want a spreadsheet and chart within your application? Borrow the ones in Excel. To a programmer with a COM-enabled language (and most of them are by now), Windows feels like a sea of objects, each with its own capabilities, standing by and waiting to help you get your job done.
Python's support for COM is superb and is the thrust for a large portion of this book.
The fourth integration technology we'll talk about is the network. Most of the world's networks now run on TCP/IP, the Internet protocol. There is a standard programming API to TCP/IP, the sockets interface, which is available at the C level on Windows and almost every other operating system. Python exposes the sockets API and allows you to directly write network applications and protocols. We cover sockets in Chapter 19.
You may not want to work with sockets directly, but you will certainly have use for the higher-level protocols built on top of it, such as Telnet, FTP, and HTTP. Python's standard library provides modules that implement these protocols, allowing you to automate FTP sessions or retrieval of data from email servers and the Web. It even includes ready-made web servers for you to customize. Chapter 14, and Chapter 15, cover these standard library features.
The most sophisticated level of integration yet seen in computing is the field of distributed objects: essentially, letting objects on different machines (and written in different languages) talk to each other. Many large corporations are moving from two-tier applications with databases and GUIs to three-tier applications that have a layer of business objects in the middle. These objects offer a higher level of abstraction than the database row and can represent tangible things in the business such as a customer or an invoice. The two main contenders in this arena are COM, which is a Windows-only solution and Common Object Request Broker Architecture (CORBA), which is multiplatform. Python is used extensively with both. Our focus is on COM, and we show how to build a distributed Python application in Chapter 11. Building a distributed application is absurdly easy; COM does all the work, and it's a matter of configuring the machine correctly.
Python's support for all five technologies and the fact that it runs on many different operating systems are what makes it a superb integration tool. We believe that Python can be used to acquire data easily from anything, anywhere.
You are of course free to fall in love with Python, switch over to it for all your development needs, and hang out extolling its virtues on Usenet in the small hours of the morning: you'll find good company, possibly including the authors. However, if you have so far escaped conversion, we have tried to identify the areas where Python fits into a corporate computing environment. Home users are a more varied bunch, but what follows should give you an idea of what the language is good for.
A standard corporate computing environment these days involves Windows NT 4.0 and Microsoft Office on the desktop; networks using TCP/IP; developers building systems tools and business objects in C and C++; GUI development in Visual Basic; and relational databases such as Oracle, Sybase, and SQL Server. It may involve legacy systems predating relational databases and Unix boxes in the back office running databases and network services. It undoubtedly involves a dozen applications bought or developed over time that need to be kept talking to each other as things evolve. More sophisticated environments are moving from two- to three-tier architectures and building distributed object systems with COM and CORBA, with libraries of C++ business objects in between the database and the GUI.
Maintaining the diversity of skills necessary to support such an environment is a challenge, and IT managers won't allow a new development tool unless it offers clear business benefits. Arguments that Language X is twice as productive as Language Y just don't suffice and are impossible to prove. The following areas are ones in which you may not be well served at present, and in which Python can supply a missing piece of the puzzle:
If we had to pick one killer feature, this would be it. You can use Python to add a macro language or scripting capability to existing applications, and it's simple enough for user-level scripting with a minimum of training. If a useful application starts growing more and more features, needing larger and larger configuration files and more options screens and GUIs to do its job, it may be time to add a macro language. All those configuration screens can be replaced with short scripts that do exactly what they say and can be adapted easily. The problem is that most people don't have a clue where to start. Developing a new language is often thought of as a task for the big boys in Redmond and no one else. You might be vaguely aware that Visio Corporation licensed Visual Basic for Applications, but this choice is undoubtedly going to (a) be expensive, and (b) require enormous resources and levels of skill in making your applications work just like Microsoft Office. Python is an off-the-shelf macro language you can plug in to your existing tools at a variety of levels. In Part II we'll show you how easy it is and how far it can take you.
Designing software in C++ is expensive and time-consuming, although superb results can be achieved. As a consequence, many companies try to design object models using data-modeling languages and graphical tools, or at least by writing and criticizing design documents before allowing their developers to start writing code. But these tools don't run, and they can't tell you much. You can create objects in Python with fewer lines of code and fewer hours than any other language we know, and there is full support for inheritance (single and multiple), encapsulation, and polymorphism. A popular approach is to prototype a program in Python until you're sure the design is right, and only then move to C++. An even more popular approach is to profile the Python application and rewrite just the speed-critical parts in C++. There is, however, a risk that the prototype will work so well you may end up using Python in a production environment!
New programs and code libraries need testing. Experienced developers know that building a test suite for a new function or program saves them time and grief. These test suites are often regarded as disposable and thus a low-risk place to introduce and start learning about Python. If a program works with files as its input and output, Python scripts can generate input, execute the program, look at the output, and analyze it. If the data is the issue, you can write disposable scripts to check identities in the data. If you are building a general-purpose C++ component or library, it's quite likely that only a small proportion of its functionality will be used in its early days, and bugs could lurk for a long time. By exposing the component or library to Python, you can quickly write test scripts to exercise functionality and prove it works correctly, then rerun the scripts every time the C++ source changes. We'll show you how later on.
You may need to move data from an old to a new database, refreshing daily for months during a changeover, or build interfaces to let data flow between incompatible systems. This can be a tedious and error-prone process when done by hand, and you always miss something and have to redo it later. Python's native support for lists and dictionaries makes complex data transformations easy, and the interactive mode lets programmers view the data at each stage in the process. Scripts can be written to transform data from source to destination and run as often as needed until they do the job right.
Incompatible systems often need to be tied together, and processes need to be automated. Python supports all the key technologies for integration; it's equally happy working with files, network protocols, DLLs, and COM objects, and it offers extensive libraries to help you get at almost any kind of data. It's well suited to controlling other packages, doing system-administration tasks, and controlling the flow of data between other systems.
| I l@ve RuBoard |


--- layout: page title: About header-img: "img/about-bg.png" ---
I am a freelance writer, editor, marketing professional and comedian from Sydney, Australia now based put of New York City. With a B.A in Communications and Media majoring in Journalism from the University of Notre Dame Australia, I've developed a passion for the written word. After a short stint working in tech for a social media startup, I learned just how under-represented women are in the industry. I was motivated to learn to program by my former colleagues and became obsessed with the challenge.


Bring your own device or RaspberryPi hardware in education
The problem? School’s are facing dwindling education budgets and yet increasing expectations for children’s attainment in their knowledge. They are expected to deliver a better educational experience for less money (per head). How could they possibly do this, knowing that even now they are challenged with their budgets?
When people pick up new technology they usually have to learn how to use the device - this is included in new operating systems that are released. By forcing them to use a particular device in school, we may be putting some children at an disadvantage if they are already used to a different operating system at home. However, if the learning objective is to learn a new device, then this should be allowed (children shouldn’t become dependent on just one form of device).
The solution? By allowing children to bring their own device to school, you remove the barrier to the actual learning and allow everyone to develop the learning in the topic (not limited by the device they are learning).
Some schools are allowing children to bring in a device as long as it is a particular device (e.g. Apple iPad). This is still not a great solution to the problem. Not as many children own a specific device - some may own an Android tablet. Some children may not have any device wherein the school loans them one - this again forces children to learn something that they may not be interested in (e.g. learning how to use an Apple device when there is a very small chance that they will ever own one in their childhood due to family economics). Schools that offer this as a solution should offer a range of devices - the technology market is now moving so quickly that to teach children a particular set of devices will limit their future education (they will need to be adaptable in their next education setting and eventually workplace).
Moreover, schools that do allow children to bring in their own devices seem to have better attainment results. Research shows that children do better in this situation - however, I would advocate more research in this area, especially within the UK.
However, some schools would rather provide the hardware and not expect children’s parents to purchase new hardware - that’s understandable. In this case, schools can invest in low-cost hardware which allows them to deliver open lessons instead of closed lessons. Raspberry Pi hardware allows schools to provide very cheap hardware and allows children to experiment with different setups, instead of being forced to use particular hardware.


Loading
.
.
.
Updating
.
.
.
Team Summary For X
Team
Call Sign
Team
Members
Team
Status
Tasking
Active | Completed
Team
Latest Update
Team Filter
×
Select teams to display:
Select All
Unselect All


MISS JULIE
Reviewed by Harvey Karten United Artists/Moonstone Entertainment Director: Mike Figgis Writer: Helen Cooper, Mike Figgis, play by August Strindberg Cast: Saffron Burrows, Peter Mullan, Maria Doyle Kennedy
Since conflict is the quintessential aspect of novels, theater and movies, it makes sense that some of the most intriguing tales put people of two different worlds into the same room and watch them try to mesh--inevitably to fail. Such stories do not necessarily have the bloodshed endemic to yarns about people of the same class who battle each other-- Hamlet vs. his uncle; Clytemnestra vs. Agamemnon; Richard III vs. his own family. But they can make for absorbing melodrama. Consider the two recent examples. In "Mansfield Park," a girl brought up in poverty is placed into the eponymous Mansfield Park and is shunned by most of her fabulously wealthy relatives. In "Cotton Mary," a woman who is half Indian, half British, looks with scorn on those who are full-bloodied East Indians.
Similarly, August Strindberg's play, "Miss Julie," pits two self-destructive people against each other in an ambivalent relationship, both using their partners for their own neurotic and selfish ends. The conclusion is inevitably melodramatic. But one wonders why Mike Figgis, best known for the wonderfully imaginative fall-of-grace movie "The Loss and Sexual Innocence" and the compelling tale of an alcoholic determined to commit suicide via the bottle, "Leaving Las Vegas," would dedicate himself to the Strindberg work. True, "Julie" and "Vegas" have similar themes, but "Miss Julie"'s stage origins are so manifest in this production, so restricting (and yet so necessary to bring out the vigor of the text), that the project comes across to a movie audience as static. Nowadays I suspect that productions of the play are the domain of college repertory companies, community groups and of some commercial stages such as those off-off- Broadway. While the Figgis version is not marred so much by a period-piece atmosphere, it is impaired by a claustrophobic aura. Most of the action takes place in a kitchen, and the one outside vista looks like a production design rather than a natural habitat. More important, the story, written by Strindberg in 1884, should not expect to have much impact on a contemporary audience notwithstanding the free translation from the Swedish given it by Helen Cooper.
Essentially a two-character drama, an extended conversation between people who are both sympathetic and off-putting, "Miss Julie" centers on a neurotic bond established during a festive summer holiday between the daughter of a wealthy count and a footman who is one of the count's servants. While the owner of the estate is away, Julie takes advantage of the particular holiday in which servants are encouraged to socialize and dance freely with their employers to begin her own dance of seduction. Under the disapproving eye of the cook, Christine (Maria Doyle Kennedy), who is the fiance of the footman, Jean (Peter Mullan), Julie (Saffron Burrows) flirts openly with Jean, forcing him to dance repeatedly with her. She thereby stimulates gossip among the servants about an alleged mutual attraction and, in one instance, the domestics dance about singing an obscene ditty about their house mistress. Jean, born into poverty-stricken family of ten, has contempt for his "betters" while he is determined to rise above his station. He is intent on persuading Julie to steal her father's money so that he and Julie and Christine can escape from the stifling estate and become partners in a hotel around Lake Como. For her part Julie, the product of a cold, man- hating mother, has become incapable of relating to others in a healthy way and, while striving to keep her independence, is bent on running away with Jean--whom she considers a strong male figure. As Julie and Jean spill out more than they should about their childhoods, they are forced at one point to hide, at which time they physically consummate their desires in a swift, brutal sexual union. While Jean then taunts the mistress, calling her a whore, Julie becomes increasingly suicidal. The story plays out as a testimonial to the destruction that can be wrought when impossible dreams clash with an impervious reality.
While the performances of the three principals are satisfactory, with Saffron Burrows alternately weeping, cajoling, and expressing her anxieties with wide eyes while the handsome and dignified Peter Mullan drives her on toward destruction, the movie fails to make Strindberg's dated play come to life on the screen. It's not that the subject matter is obsolete. Class distinctions are a nasty reality even in democratic states like the U.S. today and naive, stubborn maidens are led astray throughout the world every day of the year. But the particular way in which the story is translated to the screen is relatively inert notwithstanding the use of two handheld 16mm cameras to give the production a grainy edgy look and the use of a split screen technique during some of Jean and Julie's most intimate moments. Nor does Figgis's rendition contribute much that is new or in any way superior to the 1972 film of the same name starring Helen Mirren in the title role.
Rated R. Running Time: 97 minutes. (C) 1999 Harvey Karten
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Evil Zergs are attacking your base! Defend it at any cost!
Your goal is to have yourself (the green triangle) and your base (the blue circle) survive for the longest amount of time in spite of the onslaught of the Zergs (red squares).
You (and the base) lose health by battling (via touching) Zergs, who lose health from the battle as well. You can restore your health by touching the base; the base itself does not regenerate.
The following key bindings are defined:
| ↑→↓← | — | Move around the game area. |
| F1 | — | View this page. |
| F2 | — | View game statistics. |
| F3 | — | View highscores. |
| Escape | — | Quit (at any time). |


I am a student at Guru Nanak Dev University.I'm pursing btech in computer science and engineering.
I am an active learner and believes in smart work. i am learning different prograaming languages to enchance my knowledge.
I love to try new recipes. Making new dishes nd experimenting them not only makes me happy but also refreshes me.


RATING: 9/10
This is one of the most funny and entertaining comedies of the year and it just happens to be animated. There are some great voice over commentaries from Hollywood's most famous celebrities, some fabulous animation and a compelling story. This is the best we've seen from Disney since "Beauty and the Beast" (1996).
This film begins an unspecified time following the happily-ever-after conclusion to Toy Story. In the aftermath of their earlier adventures, Buzz (voice of Tim Allen) and Woody (voice of Tom Hanks) are now fast friends and all the toys live in perfect harmony, content with their "lives".  Woody is now officially discarged and worthless, left with his nightmares, where he lies in a trash can with the other discards. Later Andy's mother decides to have a yard sale, and she collects a few old toys from her son's room. Since one of these discards is a member of the moving toy gang, Woody goes to the rescue, leaving the safety of the house for the uncertainty of the front lawn in order to bring the toy back. Although his mission is successful, he is placed in a serious predicament when a toy collector named Al (voice of Wayne Knight) spies Woody while hunting through the wares available at the sale. The cowboy toy represents the final collectible needed to complete his collection of merchandise from the old TV series, "Woody's Roundup." If he can acquire Woody, Al can ship everything to a toy museum in Japan for a huge profit. So, after Andy's mother refuses to sell the wooden cowboy, Al steals him, and it's up to the other toys, led by Buzz, to go into the city to save their friend. And so, Buzz, Rex (voice of Wallace Shawn), Hamm (voice of John Ratzenberger), Mr. Potatohead (voice of Don Rickles), and Slinky (voice of Jim Varney), go out on a dangerous journey to rescue their friend, they find themselves confronting things like busy streets and other Buzz Lightyear toys. There are car chases, gun fights and finally the confrontation between Buzz and his Nemesis (who, by the way, resembles Darth Vader). Meanwhile, Woody learns that he was once a TV celebrity and has a family - a cowgirl named Jessie (voice of Joan Cusack), a horse named Bullseye, and a father figure called the Prospector (voice of Kelsey Grammar). They offer him another life, as a celebrity -- a toy in a museum in Japan. He is now forced to choose between being loved intensively by Andy for a little while (before he grows up) and be forgotten, or be admired by children for generations. The problem is, if Woody escapes from Al's clutches and returns home, they will end up back in the lonely darkness of storage.
A real effort is made in the technical department. The animation is rich and colorful, with lots of wonderful details. The "cinematography" is also extremely improved since Toy Story; there are a lot of complicated swings, turns and close-ups that really make an impression. Lighting and filters are used to create a mood (as in a surprisingly emotional moment - Jessie's remembrance of her days when she was a beloved toy) The film contains a lot of in-side jokes (such as the one about videogames), and entertaining parodies on "Jurassic Park" and "Star Wars". The film ends with the "failed takes", the kind of scenes that we are used to see after comedy shows on TV. These outtakes are some of the funniest scenes in the film. But what in the end makes "Toy Story 2" a memorable experience is not the jokes, its multiple parodies or marvelous animation. It is its heart and emotions -- the story about the meaning of friendship, love and even life itself. It is not difficult to predict that "Toy Story 2" would be a huge economical success, but its artistic achievement was unexpected. Unexpected because the first film wasn't much more than a demonstration of special effects. But mostly it was unexpected because Disney hasn't produced anything spectacular in years and is constantly surpassed by companies such as DreamWorks and Warner Brs. But here the director has changed the atmosphere of the film, making it more accessible and interesting for persons older that 9 years. This is a big step-away from the ancient laws of Disney-animation. Off course, this is not "Antz" , it is not as intelligent; this is not a landmark and no masterpiece, but I promise that you'll find it as funny and enjoyable as I have. Whether this is the best animated film of the year, I dare not say. My choice would probably be "The Iron Giant", but (along side with "American Pie" ) this is the comedy of the year.
I almost lost my hopes for Disney, but "Toy Story 2" proves that Disney hasn't lost their ability to entertain.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Rexster’s Dog House is a browser-based interface to Rexster and currently provides the following functions:
Start the Rexster Web Server as described on the Getting Started page, using:
./bin/rexster-start.sh
Configuration related to the Dog House are found in the rexster.xml
file. Given the default configuration, The Dog House can be accessed at:
http://localhost:8182/doghouse
It is important to remember that if you intend to host The Dog House somewhere besides http://localhost
, you must change the <base-uri>
element in rexster.xml
. Therefore, if you intend to host at http://my.favoritegraph.com:8182/doghouse
then be sure to change rexster.xml
as follows:
<rexster>
<rexster-server-port>8182</rexster-server-port>
<base-uri>http://my.favoritegraph.com</base-uri>
<web-root>public</web-root>
<character-set>UTF-8</character-set>
...
</rexster>
The Vertex and Edge Browser lists the graphs that are configured within Rexster. Rexster will only shows those graphs which are marked as enabled within the configuration. Selecting a graph yields the opportunity to browse vertices or edges. A pager at the top and bottom of the browse panel listing vertices or edges allows one to cycle through the listing and the multi-cornered arrow button within each drills through to a detailed view of that element. From there it is possible to see other graph elements associated with the one selected.
Note the small magnifying glass button to the right of the move next button on the pager. The button will display a filtering dialog box which allows you to select the key index to search by and the value for the filter.
When you click the Filter button the vertex/edge browser will page through the results returned by the key index. To cancel the filtering, simply click the Remove button, which will appear to the right of the Filter button after a filter is created.
The value field of the filtering dialog box allows Rexster typing, so if your index is an integer value, you can enter (i,10)
to get your results.
You can visualize parts of a graph from a starting vertex. Click the Visualize button attached to each vertex to display a the vertex and its connected vertices.
You can expand the visualization by right-clicking any vertex in the graph to include the connections of that vertex. Left-clicking a vertex or edge will display the properties of that graph element in the right-hand panel. Standard pan operations are supported by dragging and zooming is controlled with the mouse wheel.
Rexster Extensions can be triggered from within Dog House. Extensions configured in Rexster are available from within the “Browse” panel as shown in the screenshot below:
As the screenshot above shows, there are three configured extensions:
tp:gremlin
– the built-in Gremlin Extension.tp:batch-vertices
– the Batch Kibble for vertices.tp:batch-edges
– the Batch Kibble for edges.It is important to note that the extensions listed are sensitive to what is currently being browsed in Dog House. In other words, if a graph is selected then extensions configured to the graph extension point are shown and if viewing a vertex or edge within a graph then extensions configured to the vertex or edge extension points are shown. Extensions shown in Dog House are further limited to GET
operations that return JSON. For example, if an extension only executes via POST
it will not be displayed.
Selecting an extension will expand the accordion and display the URI to the extension and the expected parameters as extracted from the extension API. Tooltips on the textboxes for parameters show descriptions from the API.
The following screenshot displays the results of the executed extension:
The Gremlin Console looks to simulate a Gremlin session within the browser. First, ensure that the appropriate graph is selected so that Gremlin scripts are evaluated against the right graph. Like the Vertex and Edge Browser, the graph listing only includes graphs that are marked as enabled within the configuration. Once the correct graph is selected, simply use the console as one would use Gremlin in a terminal session.
It is important to note that the Gremlin Console in The Dog House will only accept single line statements. For example:
gremlin> for(int i=0; i<10; i++) {
gremlin> println i;
gremlin> }
would need to be written as:
gremlin> for(int i=0; i<10; i++) { println i; }


736_changhc.py
class Solution:
def getMinDistSum(self, positions: List[List[int]]) -> float:
import numpy as np
from numpy.linalg import norm as npnorm
pts = np.array(positions)
POINT_NUM = len(pts)
c_pt_old = np.random.rand(2)
c_pt_new = np.mean(pts, axis=0)
while npnorm(c_pt_old-c_pt_new)>1e-9:
num = 0
denom = 0
for i in range(POINT_NUM):
dist = npnorm(c_pt_new-pts[i,:])
if dist < 1e-9:
continue
num += pts[i,:]/dist
denom += 1/dist
if denom == 0:
break
c_pt_old = c_pt_new
c_pt_new = num/denom
res = 0
for i in range(POINT_NUM):
res += npnorm(c_pt_new-pts[i,:])
return res