This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use gloo::utils::body; | |
| use js_sys::Function; | |
| use wasm_bindgen::closure::Closure; | |
| use web_sys::window; | |
| fn main() { | |
| gloo::console::log!("hello world"); | |
| main_loop(0); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async fn hoge<E>(executor: &mut E) | |
| where | |
| for<'e> &'e mut E: sqlx::Executor<'e, Database = sqlx::Sqlite>, | |
| { | |
| sqlx::query("").execute(executor).await.unwrap(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct A; | |
| struct B; | |
| struct C; | |
| struct D; | |
| struct E; | |
| struct F; | |
| struct G; | |
| struct Yes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -ex | |
| ############################################################ | |
| # | |
| # CentOS 6コンテナでdiesel_cliのAppImageを作る手順 | |
| # | |
| ############################################################ | |
| # 必要なライブラリなどのインストール | |
| yum groupinstall -y "Development Tools" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[macro_use] | |
| pub mod query_builder { | |
| //! SQL like generic query builder. | |
| //! 構文木の生成までを行うので、それをトラバースして必要な処理を行う。 | |
| /// Entityのフィールドを表す型が実装するメソッド | |
| pub trait Field { | |
| /// 演算子の右辺の型 | |
| type Data; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| const d = document; | |
| const c_e = () => d.createElement('div'); | |
| const e_a = (e, c) => e.appendChild(c); | |
| const set_t = (e, t) => e.textContent = t; | |
| const s = c_e(); | |
| const l = c_e(); | |
| const r = c_e(); | |
| const set_s_t = n => set_t(s, `statuses: ${n}`); | |
| const set_l_t = n => set_t(l, `logins: ${n}`); |
- 5回繰り返し実行
- timeのtotalのベスト
| 言語 | 愚直 | エレガント |
|---|---|---|
| C | 0.030 | 0.028 |
| Nim | 0.032 | 0.055 |
| Rust | 0.024 | 0.049 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| cd $HOME/.atom | |
| : "Pull config" && { | |
| git pull --rebase | |
| } | |
| : "Update packages" && { | |
| apm uninstall $(apm list -ib | sed -e "s/@.*//") |
NewerOlder