- Lay out possible errors (on advisory basis) and possible causes of death.
- Specify resolution to "In that case those players despite dying also win."
By David Morris and Michael Mokrysz.
extern crate futures; | |
use std::sync::atomic::{AtomicBool, Ordering}; | |
use std::thread; | |
use std::sync::Arc; | |
use std::time::{Instant, Duration}; | |
use futures::{Async, Future}; | |
use futures::executor::{self, Spawn}; | |
use futures::task::Unpark; |
use std::marker::PhantomData; | |
use std::ptr; | |
use std::mem; | |
use std::ops::Add; | |
/// This type is only every inhabited when S is nominally equivalent to T | |
#[derive(Debug)] | |
pub struct Is<S, T>(PhantomData<(*const S, *const T)>); | |
// Construct a proof of the fact that a type is nominally equivalent |
By David Morris and Michael Mokrysz.
fn writeall_stdout(socket: TcpStream) -> IoFuture<()> { | |
let iter = iter::repeat(()).map(|()| Ok(())); | |
stream::iter(iter).fold(socket, move |socket, ()| { | |
let buf = vec![0;1024]; | |
tokio_core::io::read(socket, buf).map(|(socket, _, num_bytes)| { | |
println!("Read {} bytes", num_bytes); | |
socket | |
}) | |
}).map(|_| ()).boxed() | |
} |
license: gpl-3.0 |
require 'nokogiri' | |
require 'open-uri' | |
require 'net/http' | |
# Get the video title from each of the Delta Tube videos, if they exist. | |
(1..5000).each do |id| | |
url = URI.parse("http://www.delta-tube.com/video/#{id}") | |
req = Net::HTTP.new(url.host, url.port) | |
res = req.request_head(url.path) |
(function(window,undefined){ | |
// Prepare our Variables | |
var | |
History = window.History, | |
$ = window.jQuery, | |
document = window.document; | |
// Check to see if History.js is enabled for our Browser | |
if ( !History.enabled ) { |