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
//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); |
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 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; | |
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
#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; |
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
/* | |
Everything is in a single crate. The directory structure is as follows: | |
. | |
├── b | |
│ └── mod.rs | |
├── c | |
│ └── mod.rs | |
├── d | |
│ └── mod.rs |
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
//--------------- main.rs --------------------- | |
use a::b; | |
mod a; | |
mod c; | |
fn main() { | |
println!("{}", a::foo); | |
c::foobar(); |
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
// 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; |
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
<!-- strings_user.xml --> | |
<resources> | |
<string name="user_name">Name</string> | |
<string name="user_password">Password</string> | |
<string name="user_phone">Phone</string> | |
</resources> | |
<!-- strings_registration.xml --> |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"description": "A haxelib project", | |
"type": "object", | |
"properties": { | |
"name": { "$ref": "#/definitions/name" }, | |
"license": { | |
"description": "The open source license under which the project is licensed", | |
"enum": ["GPL", "LGPL", "BSD", "Public", "MIT"] | |
}, |
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
{ | |
"name": "polygonal-core", | |
"license": "MIT", | |
"tags": ["cross", "utility"], | |
"description": "core library used by other polygonal libraries", | |
"contributors":"polygonal", | |
"version": "1.0.2", | |
"url": "https://github.com/polygonal/core", | |
"dependencies": { | |
"polygonal-ds":"" |
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 ; | |
/** | |
* ... | |
* @author Zachary Dremann | |
*/ | |
#if macro | |
import haxe.macro.Expr; | |
import haxe.macro.Context; |