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_escape] | |
/** | |
* Create a new T with default values. | |
* usage: | |
* | |
* let x:T = default!(); | |
* let x = default!(Foo, x:1); | |
* let x = default!(Foo); | |
*/ |
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
<!-- hello-flomp component --> | |
<link rel="import" href="hello-gallery.html"/> <!-- Oo, we're using a subcomponent --> | |
<template id="hello_flomp"> <!-- Look a designer friendly template --> | |
<style> <!-- With encapsulated styles.... --> | |
hello-flomp > div { | |
border : 2px solid #000; | |
} |
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
http.redirects: | |
405bourkestreet.com: | |
to_url: http://www.405bourkestreet.com | |
redirect_with_path: True | |
405bourkestreet.com.au: | |
to_url: http://www.405bourkestreet.com | |
redirect_with_path: True |
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 strict'; | |
var ext = require('./.gruntExt') | |
module.exports = function (grunt) { | |
// Paths and things | |
ext.configure({ | |
path: { | |
content: 'contents', | |
css: 'contents/css', | |
scripts: 'contents/scripts' |
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
{ | |
"locals": { | |
"url": "http://shadowmint.com", | |
"name": "Coffee & Code", | |
"owner": "shadowmint", | |
"description": "Code adventures with coffee~" | |
}, | |
"plugins": [ | |
"./plugins/paginator.coffee", | |
"./plugins/debug.js", // <------------ |
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
// Fake FAaaake | |
var src = '123121312322211112222'; | |
var offset = 0; | |
function next() { | |
var rtn = offset < src.length ? src[offset] : null; | |
offset += 1; | |
return rtn; | |
} | |
function score(l1) { |
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 std::mem::transmute; | |
use std::ops::Index; | |
struct Vec2d { | |
width:uint, | |
values:Vec<uint> | |
} | |
struct Vec2dView { | |
value:uint |
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 std::collections::HashMap; | |
struct Tmp { | |
v:String | |
} | |
impl Tmp { | |
fn new(value:&str) -> Tmp { | |
return Tmp { | |
v:String::from_str(value) |
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
def url(self, image, width=None, height=None): | |
"""Generate a scaled image url from the given values """ | |
if width is None: | |
width = image.width | |
if height is None: | |
height = image.height | |
scales = image.restrictedTraverse('@@images') | |
scaled_image = scales.scale( | |
'image', | |
width=width, |
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
src/string.rs:371:3: 379:4 note: consider using an explicit lifetime parameter as shown: fn clone(&self) -> String<'a> | |
src/string.rs:371 fn clone(&self) -> String<'b> { | |
src/string.rs:372 return String { | |
src/string.rs:373 len: self.len, | |
src/string.rs:374 bytes: match self.bytes { | |
src/string.rs:375 IsStatic(ref x) => IsStatic(x.as_array().clone()), | |
src/string.rs:376 IsView(ref x) => IsStatic(x.as_array().clone()) | |
... | |
src/string.rs:371:3: 379:4 error: method not compatible with trait: expected `fn(&string::String<'a>) -> string::String<'a>` but found `fn(&string::String<'a>) -> string::String<'b>` (lifetime mismatch) | |
src/string.rs:371 fn clone(&self) -> String<'b> { |