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
#[derive(PartialEq, Eq, Debug, Clone, Insertable)] | |
#[table_name="orders"] | |
pub struct NewOrder { | |
pub id: i32, | |
pub account_id: Option<i32>, | |
pub side: Side, | |
pub instrument_id: i32, | |
pub price: u32, | |
pub num_shares: u32, | |
pub stamp: DateTime<UTC>, |
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
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerName sub.domain.com | |
ServerAlias sub.domain.com | |
# Next line puts ownCloud at the domain root instead of a /cloud/ subdirectory (e.g. example.com vs. example.com/owncloud/) | |
Alias /cloud "/var/www/cloud/" | |
DocumentRoot /var/www/cloud |
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
(ns clojure-noob.core | |
(:gen-class)) | |
;; This function works as expected | |
;; (macroexpand '(infix (1 + 1))) => (+ 1 1) | |
(defmacro infix | |
[infixed] | |
(let [[arg1 binop arg2] infixed] | |
(list binop arg1 arg2))) |
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
convert favicon.png -bordercolor white -border 0 \ | |
\( -clone 0 -resize 16x16 \) \ | |
\( -clone 0 -resize 32x32 \) \ | |
\( -clone 0 -resize 48x48 \) \ | |
\( -clone 0 -resize 64x64 \) \ | |
-delete 0 -alpha off -colors 256 favicon.ico |
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::ops::{Deref, DerefMut}; | |
macro_rules! extend { | |
(struct $name:ident extends $parent:ident { | |
$($field:ident: $typ_:ty),+ | |
}) => ( | |
struct $name { | |
__super: $parent, |
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
test.rs:4:22: 4:25 error: expected constant integer for repeat count, found variable | |
test.rs:4 let arr = [0i, ..FOO]; | |
^~~ | |
error: aborting due to previous error |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
module Types where |
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
apply plugin: 'android' | |
android { | |
compileSdkVersion 19 | |
buildToolsVersion '19.0.1' | |
defaultConfig { | |
minSdkVersion 14 | |
targetSdkVersion 19 | |
versionCode 1 |
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
jsonutil.rs:85:9: 85:28 error: internal compiler error: Cannot relate bound region: ReLateBound(413, BrNamed(syntax::ast::DefId{crate: 0u32, node: 398u32}, a)) <= ReInfer(0) | |
This message reflects a bug in the Rust compiler. | |
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html | |
jsonutil.rs:85 FromJson::from_json(self) | |
^~~~~~~~~~~~~~~~~~~ |
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
import Network.HTTP.Conduit | |
import qualified Data.ByteString as B | |
import qualified Data.ByteString.Lazy as L | |
import qualified Data.ByteString.UTF8 as BU | |
import qualified Data.ByteString.Lazy.UTF8 as LU | |
import qualified Data.Text as T | |
import Data.Conduit | |
import qualified Data.Conduit.List as CL | |
import qualified Data.Conduit.Binary as CB | |
import System.IO |
NewerOlder