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
sql_execute!{ | |
select(star, from(user), where(age > 5), order_by(tel)); | |
} |
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 matches = getopts::getopts(args, opts.as_slice()).unwrap(); | |
if matches.opt_present("h") { | |
let brief = "word, line, and byte or character count"; | |
format_args!(|args| { std::io::stderr().write_fmt(args).unwrap() }, | |
"{} {}\n\n{}", getopts::short_usage(program, opts), | |
"[FILE ...]", getopts::usage(brief, opts)); | |
std::os::set_exit_status(1); | |
return; | |
} |
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
if matches.opt_present("h") { | |
let brief = "word, line, and byte or character count"; | |
(writeln!(&mut std::io::stderr(), | |
"{} {}\n\n{}", getopts::short_usage(program, opts), | |
"[FILE ...]", getopts::usage(brief, opts))).unwrap(); | |
std::os::set_exit_status(1); | |
return; | |
} |
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
$ echo 'typedef union { char __mbstate8[128]; } __mbstate_t;' | bin/cdump.pl6 | |
TOP | |
| ws | |
| | ws-char | |
| | * FAIL | |
| * MATCH "" | |
| ws | |
| | ws-char | |
| | * FAIL | |
| * MATCH "" |
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
diff --git a/Makefile.in b/Makefile.in | |
index 8172d27..dd0fc06 100644 | |
--- a/Makefile.in | |
+++ b/Makefile.in | |
@@ -1,8 +1,9 @@ | |
+EXTOPTS="-arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector" | |
.PHONY: clean test | |
all: %DESTDIR%/Inline/pyhelper%SO% | |
clean: | |
rm %DESTDIR%/Inline/pyhelper%SO% |
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
pub fn transmute_memory<T: Sized, U: Sized>(dst: &mut T, src: &U) { | |
unsafe { | |
let size = ::std::mem::size_of::<U>(); | |
assert_eq!(::std::mem::size_of::<T>(), size); | |
::std::ptr::copy_nonoverlapping_memory( | |
::std::mem::transmute::<&T, *mut T>(dst), | |
::std::mem::transmute::<&U, *const T>(src), | |
size); | |
} | |
} |
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(core)] | |
extern crate "rustc-serialize" as serialize; | |
use std::mem::{size_of, transmute}; | |
use std::slice::bytes::copy_memory; | |
use serialize::hex::ToHex; | |
pub fn transmute_memory<D: Sized, S: Sized>(dst: &mut D, src: &S) { | |
unsafe { | |
let size = size_of::<S>(); | |
assert_eq!(size_of::<D>(), size); |
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
<div class="panel panel-default main-panel" style="margin-bottom: 0px; height: 700px;"> | |
<div class="panel-body"> | |
<ul class="nav nav-tabs" role="tablist"> | |
<li id="headers-tab" class="active"><a href="#headers" role="tab" data-toggle="tab">Headers</a></li> | |
<li id="cookies-tab"><a href="#cookies" role="tab" data-toggle="tab">Cookies</a></li> | |
<li id="params-tab"><a href="#params" role="tab" data-toggle="tab">Params</a></li> | |
<li id="postData-tab"><a href="#postData" role="tab" data-toggle="tab">PostData</a></li> | |
<li id="postText-tab"><a href="#postText" role="tab" data-toggle="tab">PostText</a></li> | |
<li id="response-tab"><a href="#response" role="tab" data-toggle="tab">Response</a></li> | |
<li id="timing-tab"><a href="#timing" role="tab" data-toggle="tab">Timing</a></li> |
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
def is_alt(side, side2): | |
side, side2 = side[0], side2[0] | |
return side == side2 | |
def is_opp(side, side2): | |
side, side2 = side[0], side2[0] | |
if ord(side) > ord(side2): | |
side, side2 = side2, side | |
if side == 'D' and side2 == 'U': | |
return True |
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 six | |
import pyarrow as pa | |
import pandas as pd | |
adr_schema = pa.schema([ | |
pa.field('pobox', pa.string()), | |
pa.field('street2', pa.string()), | |
pa.field('street1', pa.string()), | |
pa.field('city', pa.string()), | |
pa.field('state', pa.string()), |