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 sys | |
import json | |
from qpid.messaging import * | |
broker = "10.10.10.4:5672" if len(sys.argv)<2 else sys.argv[1] | |
address = "testexchange / testtopic" if len(sys.argv)<3 else sys.argv[2] | |
connection = Connection(broker) | |
try: |
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
phantom /tmp $ cat test | |
; ModuleID = 'test.rc' | |
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%tydesc = type { i64, i64, void ({}*, i8*)*, void ({}*, i8*)*, void ({}*, i8*)*, void ({}*, i8*)*, i64, { i8*, i64 } } | |
%struct.Test = type { %"enum.std::option::Option<~str>[#1]" } | |
%"enum.std::option::Option<~str>[#1]" = type { { i64, i64, [0 x i8] }* } | |
%str_slice = type { i8*, i64 } | |
%struct.Test2 = type { i64 } |
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
/** | |
* Executes a function in another task and waits | |
* N msecs for it to complete. | |
* | |
* # Return Value | |
* | |
* if the function succeeds, the returned value will | |
* be sent back wrapped in result::Ok, otherwise, | |
* result::Err will be returned. | |
* |
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
extern mod extra; | |
use extra::url::Url; | |
fn main() { | |
let params = ~[(~"test", ~"value")]; | |
let mut url: Url = FromStr::from_str("http://www.example.com").unwrap(); | |
// url.query is extra::url::Query | |
// which is a type = ~[(~str, ~str)] |
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
impl RtioTimer for UvTimer { | |
fn sleep(&mut self, msecs: u64) { | |
self.sleep_uv(msecs); | |
if !self.optimistic_check() { | |
rtdebug!("sleep: Optimistic check failed, blocking on"); | |
let scheduler: ~Scheduler = Local::take(); | |
do scheduler.deschedule_running_task_and_then |sched, task| { | |
self.block_on(sched, task); | |
} | |
} |
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
Name: jq | |
Version: 1.3 | |
Release: 2%{?dist} | |
Summary: Command-line JSON processor | |
License: MIT and ASL 2.0 and CC-BY and GPLv3 | |
URL: http://stedolan.github.io/jq/ | |
Source0: http://stedolan.github.io/%{name}/download/source/%{name}-%{version}.tar.gz | |
BuildRequires: flex |
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
# Mark all as read | |
# Use _ to collapse-all threads | |
macro index .r "<limit>~N<enter><tag-pattern>~N<enter><tag-prefix><clear-flag>N<clear-flag>*<untag-pattern>~T<enter><limit>all<enter>" "party time, excellent" | |
# Toggle pager full-screen | |
# Tweak `pager_index_lines` | |
macro pager indexOn "<enter-command>set pager_index_lines="30"; macro pager V indexOff 'Toggle emails index'<enter><redraw-screen>" | |
macro pager indexOff "<enter-command>set pager_index_lines="0"; macro pager V indexOn 'Toggle emails index'<enter><redraw-screen>" | |
macro pager V indexOff 'Toogle emails index' |
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
fn get_int(s: &str) -> u32 { | |
let mut result = 0 as u32; | |
for b in s.as_bytes().iter() { | |
result = (result<<8) | *b as u32; | |
} | |
result | |
} |
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
mc::cat_static_item => { | |
true | |
} | |
- mc::cat_rvalue(..) | | |
+ mc::cat_rvalue(region) => { | |
+ match region { | |
+ ty::ReStatic => { | |
+ false | |
+ } |
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
fn main() { | |
mod t { | |
enum E {V=1, A=0} | |
static C: E = V; | |
} | |
} |
OlderNewer