Skip to content

Instantly share code, notes, and snippets.

View ahornerr's full-sized avatar

Andy Horner ahornerr

View GitHub Profile
{
"name": "Particle Swarm",
"id": "particleSwarm",
"params": [
{
"id": "dimension",
"description": "Dimension of the solution (number of elements in the array)",
"min": 1,
"max": 100
},
@ahornerr
ahornerr / AndyClass.java
Last active August 29, 2015 14:13
ITickingEntity EntityTickHandler
package io.rsmc.RSMC;
import io.rsmc.RSMC.handlers.ITickingEntity;
import net.minecraft.entity.EntityLivingBase;
public class AndyClass implements ITickingEntity {
private static final int _10_SECOND_TICK = 10 * 20;
private static final int _30_SECOND_TICK = 30 * 20;
============================== hillClimb ==============================
========================== Sphere ==========================
Dimensions: 1 | Average M: 9,986.48 | Std. dev: 15.70 | Average time: 8.30ms
Dimensions: 5 | Average M: 26,919.34 | Std. dev: 9,464.79 | Average time: 0.80ms
Dimensions: 10 | Average M: 35,892.03 | Std. dev: 10,490.59 | Average time: 1.40ms
Dimensions: 50 | Average M: 165,158.61 | Std. dev: 23,702.26 | Average time: 4.80ms
Dimensions: 100 | Average M: 341,294.99 | Std. dev: 21,500.86 | Average time: 9.50ms
function tryExplMac64(att)
{
try {
//
// Part 1: getting the Uint32Array object address
//
// init vars
var u32 = new Uint32Array(0x100);
var a1 = [0,1,2,3,u32];
var a2 = [0,1,2,3,4]; // right after a1
import os
from PIL import Image
import glob
import json
def get_tile(image_file, size, shade):
img = Image.open(image_file)
shade = 1 - shade
shaded = img.copy().convert('RGB')
alpha = img
//rooms is a list of a certain size size
String[] usage = new String[rooms.size()];
for (Room room : rooms) {
usage[usage.length] = room.toString();
}
compile 'com.android.support:appcompat-v7:19.0.+'
compile 'com.android.support:support-v4:19.0.+'
compile 'com.google.android.gms:play-services:3.+'
compile 'com.google.code.gson:gson:2.2.4'
compile 'commons-codec:commons-codec:1.8'
compile 'commons-io:commons-io:2.4'
compile 'com.github.chrisbanes.actionbarpulltorefresh:library:0.8'
compile 'com.github.chrisbanes.actionbarpulltorefresh:extra-abc:0.8'
compile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OVckmpb
ExpandListGroup elg;
elg = new ExpandListGroup("Resources & Contact", "resources");
adapter.add(new ExpandListChild("Emergency", "emergency"), elg);
adapter.add(new ExpandListChild("Suicide Prevention", "suicideprevention"), elg);
adapter.add(new ExpandListChild("Other", "resourcesother"), elg);
elg = new ExpandListGroup("How-To", "howto");
adapter.add(new ExpandListChild("Tell Suicide Warning Signs", "tellsuicidewarningsigns"), elg);
adapter.add(new ExpandListChild("Talk to a Concerned Person", "talktoaconcernedperson"), elg);
adapter.add(new ExpandListChild("Become a Gatekeeper", "becomeagatekeeper"), elg);
elg = new ExpandListGroup("Messages of Hope", "messagesofhopeview");
var seatJson = [
{
"section_name": "10A",
"row_name": "13",
"seat_num": "1",
"last_seat": "8",
"num_seats": "8",
"gate": "12"
},