I hereby claim:
- I am dr-emann on github.
- I am dr_emann (https://keybase.io/dr_emann) on keybase.
- I have a public key whose fingerprint is 4CC6 37E4 32B9 86CB 25A1 7977 D9AC DE1A 2C61 D85D
To claim this, I am signing this object:
| // you can just use | |
| // `pub mod b;` | |
| // if this file is a/mod.rs and | |
| // if you have a file named a/b.rs or a/b/mod.rs | |
| // that contains the contents inside the curly brackets | |
| pub mod b { | |
| pub static bar: f64 = 1.1; | |
| } | |
| pub static foo: int = 40; |
| //--------------- main.rs --------------------- | |
| use a::b; | |
| mod a; | |
| mod c; | |
| fn main() { | |
| println!("{}", a::foo); | |
| c::foobar(); |
| /* | |
| Everything is in a single crate. The directory structure is as follows: | |
| . | |
| ├── b | |
| │ └── mod.rs | |
| ├── c | |
| │ └── mod.rs | |
| ├── d | |
| │ └── mod.rs |
| #include <stdio.h> | |
| int main() { | |
| FILE *fp; | |
| int i; | |
| fp = fopen("\\\\.\\PhysicalDrive0", "r"); | |
| for(i = 0; i < 10; i++) { | |
| printf("%x", (int)fgetc(fp)); | |
| } | |
| return 0; |
| extern crate getopts; | |
| use std::io::{File, Open, Read}; | |
| use std::path::Path; | |
| use std::io::{Command}; | |
| use std::string::{String}; | |
| use std::os; | |
| use std::str; | |
| //based off https://gist.github.com/samuell/5555803 | |
| use std::fs::File; | |
| use std::io::BufReader; | |
| use std::io::prelude::*; | |
| use std::env; | |
| fn main() { | |
| let mut file = BufReader::new(File::open("Homo_sapiens.GRCh37.67.dna_rm.chromosome.Y.fa")); | |
| let content = gc_content(&mut file); | |
| println!("{:.2}", content * 100.0); |
I hereby claim:
To claim this, I am signing this object:
| pub struct Brick { | |
| pub peer: Peer, | |
| pub path: Path, | |
| } | |
| use std::fmt; | |
| impl fmt::Display for Brick { | |
| fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | |
| write!(f, "{}:{}", self.peer.hostname, self.path.display()) |
| //------------------------------------------------------------// | |
| // JavaGetUrl.java: // | |
| //------------------------------------------------------------// | |
| // A Java program that demonstrates a procedure that can be // | |
| // used to download the contents of a specified URL. // | |
| //------------------------------------------------------------// | |
| // Code created by Developer's Daily // | |
| // http://www.DevDaily.com // | |
| //------------------------------------------------------------// |
| package; | |
| public class Machine { | |
| public Machine() | |
| { | |
| this.status = MachineStatus.UNKNOWN; | |
| } | |
| public Machine(final int id, final int num, MachineStatus status) | |
| { | |
| this.id = id; |