Skip to content

Instantly share code, notes, and snippets.

@Dr-Emann
Dr-Emann / JavaGetUrl.java
Created December 29, 2011 22:00
How can I download the contents of a URL using Java?
//------------------------------------------------------------//
// 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 //
//------------------------------------------------------------//
@Dr-Emann
Dr-Emann / Machine.java
Created February 27, 2012 18:40
Getting ESuds info from Java
package;
public class Machine {
public Machine()
{
this.status = MachineStatus.UNKNOWN;
}
public Machine(final int id, final int num, MachineStatus status)
{
this.id = id;
@Dr-Emann
Dr-Emann / Main.hx
Created March 13, 2012 06:25
Testing Haxe Rounding Speeds
package net.zdremann.tmp.roundto;
import de.polygonal.core.fmt.Sprintf;
import de.polygonal.core.math.Limits;
import de.polygonal.core.math.Mathematics;
import haxe.Timer;
import nme.display.Sprite;
import nme.events.Event;
import nme.Lib;
#if !js
package ;
/**
* ...
* @author Zachary Dremann
*/
#if macro
import haxe.macro.Expr;
import haxe.macro.Context;
@Dr-Emann
Dr-Emann / core-haxelib.json
Created May 29, 2013 17:41
Haxe haxelib.json's for polygonal libraries
{
"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":""
@Dr-Emann
Dr-Emann / haxelib.schema.json
Last active December 17, 2015 21:18
Haxelib.json schema. Written in [json-schema](http://json-schema.org/)
{
"$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"]
},
<!-- 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 -->
@Dr-Emann
Dr-Emann / a.rs
Created May 29, 2014 15:27
Rust Module Demonstration
// 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;
@Dr-Emann
Dr-Emann / gist:77f6beb2e86687a4f325
Created May 29, 2014 15:34
Demonstration of rust modules in files
//--------------- 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