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 searcher(g: &Graph<Node,Edge>, ni: NodeIndex) -> Vec<Vec<Node>> { | |
let mut v = Vec::new(); | |
for neighbor in g.neighbors_directed(ni, EdgeDirection::Outgoing) { | |
let result = searcher(&g, neighbor); | |
for mut nodev in result { | |
let node = g.node_weight(ni).unwrap().clone(); | |
nodev.insert(0, node); | |
v.push(nodev); | |
} | |
} |
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
struct X; | |
impl Drop for X { | |
fn drop(&mut self) { | |
println!("dropped"); | |
} | |
} | |
fn main() { | |
let x = X; | |
println!("1"); | |
let _ = x; |
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
.section ".text._ZN4util43LayoutNode$LT$$u{27}ln$GT$.LayoutDataAccess18mutate_layout_data20h25c0b7d2cec491f8VarE","ax",@progbits | |
.globl "_ZN4util43LayoutNode$LT$$u{27}ln$GT$.LayoutDataAccess18mutate_layout_data20h25c0b7d2cec491f8VarE" | |
.align 16, 0x90 | |
.type "_ZN4util43LayoutNode$LT$$u{27}ln$GT$.LayoutDataAccess18mutate_layout_data20h25c0b7d2cec491f8VarE",@function | |
"_ZN4util43LayoutNode$LT$$u{27}ln$GT$.LayoutDataAccess18mutate_layout_data20h25c0b7d2cec491f8VarE": | |
.Lfunc_begin9242: | |
.loc 31 103 0 | |
.cfi_startproc | |
cmpq %fs:112, %rsp | |
ja .LBB9242_0 |
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
let mut result = "".into_string(); | |
let mut chars = remainder.chars(); | |
loop { | |
match chars.next() { | |
Some('-') => { | |
match chars.next() { | |
Some(c) if 'a' <= c && c <= 'z' => { | |
result.push(c.to_uppercase()); | |
}, | |
Some(c) => { |
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 fn setRequestHeader(cx: *mut JSContext, _obj: JSHandleObject, this: *XMLHttpRequest, argc: libc::c_uint, vp: *mut JSVal) -> JSBool { | |
unsafe { | |
let this = JS::from_raw(this); | |
let mut this = this.root(); | |
if argc < 2 { | |
throw_type_error(cx, "Not enough arguments to \"XMLHttpRequest.setRequestHeader\"."); | |
return 0; | |
} |
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 datetime | |
import json | |
import matplotlib | |
matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
def parse_time(s): | |
return datetime.datetime.strptime(s, "%Y-%m-%d %H:%M:%S") | |
def parse_date(s): |
NewerOlder