most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
require 'test_helper' | |
require 'masterize' | |
require 'master_hotels/cmd/rate_append' | |
class RateAppendTest < Minitest::Test | |
include MasterHotels | |
def test_append | |
ra = Cmd::RateAppend.new | |
cmd = ra.append("WRO0001", {}) |
use std::str; | |
struct UpperChars<'a> { | |
chars: str::Chars<'a> | |
} | |
struct LowerChars<'a> { | |
chars: str::Chars<'a> | |
} |
use std::cell::RefCell; | |
use std::mem; | |
struct Foo { | |
bar: String | |
} | |
thread_local!(static LOOKUP: RefCell<Option<Vec<Foo>>> = RefCell::new(None)); | |
fn lookup<'a>(idx: usize) -> Option<&'static str> { |
use std::io::{self, IoResult, MemReader}; | |
use rustc_serialize::{ Encodable }; | |
use rustc_serialize::json::{ self, Json }; | |
use response::IntoReader; | |
pub trait IntoReader { | |
type OutReader: Reader; | |
fn into_reader(self) -> Self::OutReader; | |
} |
use std::io::{self, IoResult, MemReader}; | |
use hyper::status; | |
use hyper::net::Fresh; | |
pub use hyper::server::Response as HttpResponse; | |
use hyper::header::Headers; | |
pub struct Response { | |
pub body: Option<Box<Reader + Send>> | |
} |
extern crate core; | |
use core::cell::Cell; | |
#[deriving(Copy, Show)] | |
struct Pos(u32, u32); | |
#[deriving(Show)] | |
struct Monster { | |
name: String, | |
pos: Cell<Pos> |
#[deriving(Show)] | |
struct Monster { | |
name: String, | |
hp: uint | |
} | |
struct Game { | |
monsters: Vec<Box<Monster>> | |
} |
struct StrSplits<'a> { | |
buf: &'a str, | |
finished: bool, | |
sep: char | |
} | |
impl<'a> StrSplits<'a> { | |
pub fn new(buf: &'a str) -> StrSplits<'a> { | |
StrSplits { buf: buf, finished: false, sep: '|' } | |
} |
use std::str; | |
struct UpperChars<'a> { | |
chars: str::Chars<'a> | |
} | |
struct LowerChars<'a> { | |
chars: str::Chars<'a> | |
} |