There exists a Color space.
weight(Color) = real number between 0 and 1
difference(Color, Color) = real number between 0 and 100
extern crate serde; | |
use serde::{Serialize, Deserialize}; | |
struct PathInfo; | |
struct QueryInfo; | |
trait ApiFunction<I: Deserialize<'static>, R: Serialize> { | |
fn build(self) -> Box<Fn(PathInfo, QueryInfo, I) -> R>; | |
} |
open System.Collections.Generic; | |
let memoize f = | |
let table = new Dictionary<_, _>() | |
fun k -> | |
if lock table (fun () -> table.ContainsKey(k)) | |
then | |
lock table (fun () -> table.[k]) | |
else | |
let res = f k |
find . | grep "Cargo.toml$" | # Find all cargo.toml files \ | |
sed 's#/[^/]*$##' | # Remove the filename leaving us with the directories containing cargo.toml files \ | |
xargs -L1 printf "cd \"%s\"; cargo clean; cd -\n" | # Print "cd path/to/crate; cargo clean; cd -" \ | |
bash # Execute |
export PATH="$PATH:$HOME/.cargo/bin" | |
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib" | |
set_fg() | |
{ | |
printf "\001\e[38;5;${1}m\002" | |
} | |
set_bg() | |
{ |
cpp -undef -o foo.txt -nostdinc -E -P |
# Make it use C-a, similar to screen.. | |
unbind C-b | |
unbind l | |
set -g prefix C-a | |
bind-key C-a last-window | |
# Reload key | |
bind r source-file ~/.tmux.conf | |
set -g default-terminal "screen-256color" |
Process: window [58777] | |
Path: /Users/USER/*/window | |
Identifier: window | |
Version: 0 | |
Code Type: X86-64 (Native) | |
Parent Process: bash [56204] | |
Responsible: Terminal [326] | |
User ID: 501 | |
Date/Time: 2015-02-02 12:50:13.794 -0800 |
/home/ty/workspace/rust/bincode/examples/basic.rs:4:3: 4:55 warning: `deriving` is deprecated; use `derive` | |
/home/ty/workspace/rust/bincode/examples/basic.rs:4 #[deriving(RustcEncodable, RustcDecodable, PartialEq)] | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/ty/workspace/rust/bincode/examples/basic.rs:10:3: 10:55 warning: `deriving` is deprecated; use `derive` | |
/home/ty/workspace/rust/bincode/examples/basic.rs:10 #[deriving(RustcEncodable, RustcDecodable, PartialEq)] | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/ty/workspace/rust/bincode/src/test.rs:68:7: 68:65 warning: `deriving` is deprecated; use `derive` | |
/home/ty/workspace/rust/bincode/src/test.rs:68 #[deriving(RustcEncodable, RustcDecodable, PartialEq, Show)] | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/ty/workspace/rust/bincode/src/test.rs:79:7 |