Please note: See character.construction/emoji-categories for more up-to-date listings.
😀 😁 😂 🤣 😃 😄 😅 😆 😉 😊 😋 😎 😍 😘 🥰 😗 😙 😚
fn main() { | |
let mut failed = 0usize; | |
for i in 0..=u32::max_value() { | |
if i & 0xffffff == 0 { println!("{}", i); } | |
let x = f32::from_bits(i); | |
let r_std = x.round(); | |
let r_hoc = (x+0.5).floor(); | |
if r_std.to_bits() != r_hoc.to_bits() { | |
println!("round for {} fails", x); | |
failed += 1; |
#![allow(warnings)] | |
#[macro_use] | |
extern crate lazy_static; // 1.1.0 | |
use lazy_static::LazyStatic; | |
struct MyFoo {} | |
impl MyFoo { |
Please note: See character.construction/emoji-categories for more up-to-date listings.
😀 😁 😂 🤣 😃 😄 😅 😆 😉 😊 😋 😎 😍 😘 🥰 😗 😙 😚
macro_rules! unit_tests { | |
($( fn $name:ident($fixt:ident : $ftype:ty) $body:block )*) => ( | |
$( | |
#[test] | |
fn $name() { | |
let mut $fixt = <$ftype as Fixture>::setup(); | |
$body | |
$fixt.teardown(); | |
} | |
)* |
Updated: July 2nd (XE7)
Ron Amadeo of Android Police did a review of these experiments: http://www.androidpolice.com/2013/05/24/google-glasss-hidden-labs-features-ok-glass-everywhere-web-browsing-video-stabilization-and-more-video/
Google Glass has a series of Labs experiments that can be enabled on engineering or userdebug builds. Using APKTool, I've removed that restriction and now they can be enabled with root access.
To start, for example, the SOUND_SEARCH lab, type in a root shell
import urllib | |
import urlparse | |
def iri_to_uri(iri, encoding='Latin-1'): | |
"Takes a Unicode string that can contain an IRI and emits a URI." | |
scheme, authority, path, query, frag = urlparse.urlsplit(iri) | |
scheme = scheme.encode(encoding) | |
if ":" in authority: | |
host, port = authority.split(":", 1) | |
authority = host.encode('idna') + ":%s" % port |
class Sass::Script::Color < Sass::Script::Literal | |
class << self | |
def new_hsv_float(hue, saturation, value) | |
zero_to_threesixty = lambda { |x| x < 0 ? 0 : (x > 360 ? 360 : x) } | |
zero_to_onehundred = lambda { |x| x < 0 ? 0 : (x > 100 ? 100 : x) } | |
hue = zero_to_threesixty.call((hue * 360.0).round) | |
saturation = zero_to_onehundred.call((saturation * 100.0).round) | |
value = zero_to_onehundred.call((value * 100.0).round) |
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |