This file contains 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 World |
This file contains 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
Error extracting zip entry 'scala/sys/process/0004-ProcessImpl$SequentialProcess$$anonfun$runAndExitValue$5$$anonfun$apply$3.js.map' to '/media/sf_Ty/workspace/Personal/Scala/Pipe/math/target/streams/compile/externalDependencyClasspath/$global/package-js/extracted-jars/scalajs-library_2.10-0.3.jar--627bf5f9/scala/sys/process/0004-ProcessImpl$SequentialProcess$$anonfun$runAndExitValue$5$$anonfun$apply$3.js.map': java.io.FileNotFoundException: /media/sf_Ty/workspace/Personal/Scala/Pipe/math/target/streams/compile/externalDependencyClasspath/$global/package-js/extracted-jars/scalajs-library_2.10-0.3.jar--627bf5f9/scala/sys/process/0004-ProcessImpl$SequentialProcess$$anonfun$runAndExitValue$5$$anonfun$apply$3.js.map (Operation not permitted) | |
at sbt.ErrorHandling$.translate(ErrorHandling.scala:11) | |
at sbt.IO$.next$1(IO.scala:215) | |
at sbt.IO$.sbt$IO$$extract(IO.scala:230) | |
at sbt.IO$$anonfun$unzipStream$1.apply(IO.scala:193) | |
at sbt.IO$$anonfun$unzipStream$1.apply(IO.scala:193) | |
This file contains 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
var dblib = require('somedb'); | |
var wr = require('mywrapper'); | |
var db = wr(dblib); | |
// query | |
function queryExample() { | |
var client = yield db.connect('postgres://postgres:1234@localhost/postgres'); | |
var table = yield client.getTable('users'); |
This file contains 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
$ rustc image.rs | |
image.rs:42:9: 43:6 error: cannot infer an appropriate lifetime for autoref due to conflicting requirements | |
image.rs:42 self.pixels.as_mut_slice() | |
image.rs:43 } | |
image.rs:42:9: 42:20 note: first, the lifetime cannot outlive the expression at 42:8... | |
image.rs:42 self.pixels.as_mut_slice() | |
^~~~~~~~~~~ | |
image.rs:42:9: 42:20 note: ...so that automatically reference is valid at the time of borrow | |
image.rs:42 self.pixels.as_mut_slice() |
This file contains 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::clone::Clone; | |
use std::default::Default; | |
use std::io; | |
// A simple view into an image. | |
// Has getters for the width and height and | |
// a method for retrieving a pixel at a | |
// particular position. | |
trait View<Color> { | |
fn width(&self) -> uint; |
This file contains 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
@JSExport | |
object ScalaJSExample{ | |
@JSExport | |
def main(args: Array[String]): Unit = { | |
This file contains 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
rgl::push_matrix(|glm| { | |
glm.scale(1, 2, 1); | |
rgl::begin(rgl::DrawType::Triangles, |gld| { | |
gld.push_vertex3f(1.0, 0.0, 0.0); | |
gld.push_vertex3f(0.0, 1.0, 0.0); | |
gld.push_vertex3f(0.0, 0.0, 1.0); | |
}); | |
}); | |
// Also include rgl::unsafe::(scale / push_vertex3f) etc. |
This file contains 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
unresolved name | |
let id = C::id(); | |
I obviously can't write | |
let id = Component::id() because it would be ambiguous. |
This file contains 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
#![feature(macro_rules)] | |
use std::any::Any; | |
use std::any::AnyRefExt; | |
macro_rules! match_any( | |
($val:expr match $(if $typ:ty { $($patn: pat => $exp: expr),+ }),+ else { $other: expr}) => ( | |
{ | |
$( |
This file contains 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
# Get rid of the stupid ctrl-b binding | |
unbind C-b | |
unbind l | |
# set the prefix to ctrl-a instead | |
set -g prefix C-a | |
bind-key C-a last-window | |
bind r source-file ~/.tmux.conf |
OlderNewer