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
<?php | |
$url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20woeid%3D12781740&format=json&diagnostics=true&callback="; | |
// $url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D%22Macalester%20-%20Groveland%2C%20MN%22&format=json&diagnostics=true&callback="; | |
// $url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20woeid%3D29306623&format=json&diagnostics=true&callback="; | |
$text = file_get_contents($url); | |
$data = json_decode($text, true); | |
function get_location($data) { |
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 ifupdown.com/putnam/generator.html | |
to generate a matrix and global values. | |
Then paste that generated code here. | |
*/ | |
void loop() { |
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
package com.ifupdown.odin.adapters; | |
import android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import android.util.SparseBooleanArray; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.CheckBox; |
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
#!/bin/bash | |
# don't forget to include ADB in your path | |
# for example, in your ~/.bashrc, somewhere near the top | |
# export PATH=$PATH:/path/to/android-sdk/sdk/platform-tools | |
# check if there is a filename | |
if [ -z "$1" ]; then | |
echo usage: $0 filename | |
exit |
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; | |
use std::rand; | |
struct Monte { | |
h: uint, | |
k: uint, | |
r: uint | |
} | |
fn main() { |
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 multi() { | |
let tasks:uint = 4; | |
let (tx, rx): (Sender<uint>, Receiver<uint>) = channel(); | |
let mut senders = Vec::<Sender<uint>>::new(); | |
let mut receivers = Vec::<Receiver<uint>>::new(); | |
for i in range(0, tasks) { |
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 crate time; | |
use std::fmt; | |
use time::precise_time_ns; | |
use std::rand::{task_rng, Rng}; | |
#[deriving(Clone)] | |
enum Value { | |
Two, |
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 args = os::args(); | |
let tasks:uint = match args.len() { | |
2 => match args[1].as_slice().trim().parse() { | |
Some(x) => x, | |
None => 1 | |
}, | |
_ => 1 | |
}; |
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
-------------------------------------------------------------------------------- | |
Profile data file 'callgrind.out.23136' (creator: callgrind-3.8.1) | |
-------------------------------------------------------------------------------- | |
I1 cache: | |
D1 cache: | |
LL cache: | |
Timerange: Basic block 0 - 273612 | |
Trigger: Program termination | |
Profiled target: ./game (PID 23136, part 1) | |
Events recorded: Ir |
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
ryans-mba:rust-wg ryanrampersad$ cargo run --bin game | |
Compiling wargame v0.0.1 (file:///Users/ryanrampersad/Desktop/rust-wg) | |
/Users/ryanrampersad/Desktop/rust-wg/src/wg.rs:2:1: 2:23 error: compile time crate loading is experimental and possibly buggy | |
/Users/ryanrampersad/Desktop/rust-wg/src/wg.rs:2 #[phase(plugin, link)] extern crate log; | |
^~~~~~~~~~~~~~~~~~~~~~ | |
/Users/ryanrampersad/Desktop/rust-wg/src/wg.rs:2:1: 2:23 help: add #![feature(phase)] to the crate attributes to enable | |
/Users/ryanrampersad/Desktop/rust-wg/src/wg.rs:2 #[phase(plugin, link)] extern crate log; | |
^~~~~~~~~~~~~~~~~~~~~~ |
OlderNewer