| 更新: | 2017-05-09 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 3.14 |
| URL: | http://voluntas.github.io/ |
MQTT をググって調べた人向け
| 更新: | 2017-05-09 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 3.14 |
| URL: | http://voluntas.github.io/ |
MQTT をググって調べた人向け
| use std::rc::Rc; | |
| trait HKT<U> { | |
| type C; // Current type | |
| type T; // Type with C swapped with U | |
| } | |
| macro_rules! derive_hkt { | |
| ($t:ident) => { | |
| impl<T, U> HKT<U> for $t<T> { |
| module DapperFSharp = | |
| open System.Data.SqlClient | |
| open System.Dynamic | |
| open System.Collections.Generic | |
| open Dapper | |
| let dapperQuery<'Result> (query:string) (connection:SqlConnection) = | |
| connection.Query<'Result>(query) | |
| let dapperParametrizedQuery<'Result> (query:string) (param:obj) (connection:SqlConnection) : 'Result seq = |
| #![feature(macro_rules)] | |
| /// MIT license etc. etc. | |
| /// | |
| /// Experimenting with Python-like list comprehensions. | |
| /// | |
| /// An attempt to explore the possibility space for ergonomic improvements | |
| /// in Rust that can come post v1.0. Notice that there are not type declerations. | |
| /// Aside from the "c!" macro invocation, Rust allows for an exact copy of the | |
| /// Python comprehension syntax. |
The following gist is an extract of the article Building a simple crawler. It allows crawling from a URL and for a given number of bounce.
from crawler import Crawler
crawler = Crawler()
crawler.crawl('http://techcrunch.com/')
| #!/usr/bin/env python | |
| # coding: UTF-8 | |
| import socket | |
| import struct | |
| DEBUG = True | |
| DEBUG2 = False | |
| PTP_OC_GetDeviceInfo = 0x1001 |
こんな指針がいいのかなー 2013 夏 ver.
.NET の「例外のデザインのガイドライン」にもこう書いてある。
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Copyright (c) Rich Hickey. All rights reserved. | |
| ; The use and distribution terms for this software are covered by the | |
| ; Common Public License 1.0 (http://opensource.org/licenses/cpl.php) | |
| ; which can be found in the file CPL.TXT at the root of this distribution. | |
| ; By using this software in any fashion, you are agreeing to be bound by | |
| ; the terms of this license. | |
| ; You must not remove this notice, or any other, from this software. | |
| ;dimensions of square world |
| #!/usr/bin/env python | |
| # | |
| # Proof of Concept: UDP Hole Punching | |
| # Two client connect to a server and get redirected to each other. | |
| # | |
| # This is the client. | |
| # | |
| # Koen Bollen <meneer koenbollen nl> | |
| # 2010 GPL | |
| # |