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
2003529930406846464979072351560255750447825475569751419265016973710894059556311453089506130880933348101038234342907263181822949382118812668869506364761547029165041871916351587966347219442930927982084309104855990570159318959639524863372367203002916969592156108764948889254090805911457037675208500206671563702366126359747144807111774815880914135742720967190151836282560618091458852699826141425030123391108273603843767876449043205960379124490905707560314035076162562476031863793126484703743782954975613770981604614413308692118102485959152380195331030292162800160568670105651646750568038741529463842244845292537361442533614373729088303794601274724958414864915930647252015155693922628180691650796381064132275307267143998158508811292628901134237782705567421080070065283963322155077831214288551675554073345107213112427399562982719769150054883905223804357045848197956393157853510018992000024141963706813559840464039472194016069517690156119726982337890017641517190051133466306898140219383481435426387306539552969691388024158161859561 |
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 res = socket.sendto(buf, src); | |
if res.is_err() { | |
fail!("couldn't send: {}", res.err()); | |
} |
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::io::net::udp::UdpSocket; | |
use std::io::net::ip::{Ipv4Addr, SocketAddr}; | |
fn main() { | |
let addr = SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 0 }; | |
fail!("test"); | |
let mut socket = match UdpSocket::bind(addr) { | |
Ok(s) => s, | |
Err(e) => fail!("couldn't bind socket: {}", e), |
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() { | |
fail!("test"); | |
let mut test = [0, ..10]; | |
} |
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::str; | |
use std::io::net::udp::UdpSocket; | |
use std::io::net::ip::{Ipv4Addr, SocketAddr}; | |
fn main() { | |
let (incoming_packets_in, incoming_packets_out) = channel::<(Vec<u8>, SocketAddr)>(); | |
let (outgoing_packets_in, outgoing_packets_out) = channel::<(Vec<u8>, SocketAddr)>(); | |
let addr = SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 1000 }; | |
let mut socket = match UdpSocket::bind(addr) { |
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::str; | |
use std::io::net::udp::UdpSocket; | |
use std::io::net::ip::{Ipv4Addr, SocketAddr}; | |
fn main() { | |
let addr = SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 1000 }; | |
let mut socket = match UdpSocket::bind(addr) { | |
Ok(s) => s, | |
Err(e) => fail!("couldn't bind socket: {}", e), | |
}; |
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 socket = match UdpSocket::bind(addr) { | |
Ok(s) => s, | |
Err(e) => fail!("couldn't bind socket: {}", e), | |
}; |
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
// team compatability | |
var friend_peasant_type = "peasant"; | |
var enemy_peasant_type = "peon"; | |
var friend_soldier_type = "soldier"; | |
var enemy_soldier_type = "munchkin"; | |
var friend_librarian_type = "librarian"; | |
var enemy_librarian_type = "shaman"; | |
var friend_knight_type = "knight"; | |
var enemy_knight_type = "ogre"; |
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 os, shutil | |
shutil.rmtree("wtf", True) | |
assert(os.path.isdir("wtf") == False) | |
os.makedirs("wtf") |
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
#ifndef INTROSORT_H | |
#define INTROSORT_H | |
#include <iterator> | |
#include <utility> | |
#include <algorithm> | |
#if __cplusplus >= 201103L | |
#define PREFER_MOVE(x) std::move(x) | |
#else |
OlderNewer