Skip to content

Instantly share code, notes, and snippets.

@hc5
hc5 / runner.java
Last active December 15, 2015 18:59
for(int i = 0;i<1000;i++){
ServerSocket ss = new ServerSocket(8123);
OddBoard b = new OddBoard();
Thread s = new Thread(new Server(b, false, true, ss, 5000));
s.start();
c = new Thread(new Client(new AIPlayer(),"localhost",8123));
c1 = new Thread(new Client(new OddRandomPlayer(),"localhost",8123));
ArrayList<Thread> clients = new ArrayList<>();
clients.add(c);
clients.add(c1);
import random
count = 0.0
for i in range(10000):
state = 0
while True:
count += 1
if state == 1:
break
r = random.random()
if state == 0:
public class Test {
private static final int dim = 100;
static int[][] graph = new int[dim][dim];
static boolean[] color = new boolean[dim];
private static int trials = 1000;
@hc5
hc5 / b.md
Created November 16, 2012 18:18

Abstract

Timing specific reproductive events according to changes in the environment often ensures the maximum survival of many organisms and their offspring. Thus, adapting to variable conditions in order to maintain the same timings is crucial to the fitness of the species. Fiddler crabs were chosen to examine the behavior of organisms in timing specific life events due to their well-known reproductive behavior and their abundance. The common timing of larval release of fiddler crabs was found to be during nocturnal high amplitude tides in order to minimize predation and maximize distribution. If incubation and developmental durations are affected by variations in temperature, larval release timings might be mismatched with the targeted event, resulting in lower viability. Variations in temperature also cause cold, nutrient-rich, deep source water to be moved to the surface in a phenomenon called upwelling, which also affects the survival of planktonic larvae. Two fiddler crab species, Uca terpsichores a

@hc5
hc5 / ab.md
Created November 14, 2012 21:27

Timing specific reproductive events according to changes in the environment often ensures the maximum survival of many organisms and their offspring. Thus, adapting to variable conditions in order to maintain the same timings is crucial to the fitness of the species. Fiddler crabs were chosen to examine the behavior of organisms in timing specific life events due to their well-known reproductive behavior and their abundance. The common timing of larval release of fiddler crabs was found to be during nocturnal high amplitude tides in order to minimize predation and maximize distribution. If incubation and developmental durations are affected by variations in temperature, larval release timings might be mismatched with the targeted event, resulting in lower viability. Variations in temperature also cause cold, nutrient-rich, deep source water to be moved to the surface in a phenomenon called upwelling, which also affects the survival of planktonic larvae. Two fiddler crab species, Uca terpsichores and Uca deich

Timing specific reproductive events with changes in the environment often ensures the maximum survival of many organisms and their offspring. Thus, adapting to variable conditions in order to maintain the same timings is crucial to the fitness of the species. Fiddler crabs were chosen to examine the behavior of organisms in timing specific life events for their well-known reproductive behavior and abundance. The common timing of larval release of fiddler crabs was found to be during nocturnal high amplitudes in order to minimize predation and maximize distribution. If incubation and developmental durations are affected by variations in temperature, larval release timings might be mismatched with the targeted event, resulting in less viability. Variations in temperature also cause cold, nutrient rich, deep source water to be moved to the surface in a phenomenon called upwelling, which also affect the survival of planktonic larvae. Two fiddler crab species, Uca terpsichores and Uca deichmanni, were studied in o
1. a) The observation was that species radiations were most likely to occur in deep lakes and in regions
with more incident sunlight, as well as older lakes. Also, species radiation also were more likely to occur in
species exhibiting sexual dichromatism. The question posed, then, is that whether or not adaptive radiation can be
predicted based on extrinsic and intrinsic factors.
b) The hypothesis is that adaptive radiation can be predicted if both intrinsic and extrinsic factors
[{'dm': 'CG10652-RB', 'hg': 'NM_000989', 'inter_len': 312, 'overlap': 0.948},
{'dm': 'CG12352-RA', 'hg': 'NM_025146', 'inter_len': 415, 'overlap': 0.91},
{'dm': 'CG16983-RA', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RB', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RC', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RD', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RF', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RG', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RH', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG12530-RA', 'hg': 'NM_044472', 'inter_len': 457, 'overlap': 0.862},
[{'dm': 'CG10652-RB', 'hg': 'NM_000989', 'inter_len': 312, 'overlap': 0.948},
{'dm': 'CG12352-RA', 'hg': 'NM_025146', 'inter_len': 415, 'overlap': 0.91},
{'dm': 'CG16983-RA', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RB', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RC', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RD', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RF', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RG', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG16983-RH', 'hg': 'NM_170679', 'inter_len': 431, 'overlap': 0.881},
{'dm': 'CG12530-RA', 'hg': 'NM_044472', 'inter_len': 457, 'overlap': 0.862},
Stat points were the invisible difference between you and another player. The D2 stats were Strength, Dexterity, Vitality, Energy. The new stats are Strength, Dexterity, Vitality, and Intelligence. I will make a brief side by side, then get into the new primary stat system.
*Note* Primary stat simply means that for the associated class every 1 point in the stat is equal to 1% increase in damage for that class. Example: 35 Strength would give +35% damage to a barbarian and no damage bonus to all other character classes wearing the same exact item.
1a. Strength(D2) vs. Strength(D3)
Strength added base physical damage. It was also required to equip most items. Typically it was used to meet these item requirements then disregarded. Additionally, you (the player) never knew for all your spreadsheets and abacuses exactly how much damage it was actually giving you. It also placed artificial barriers on gear usage. A distinct issue was that lower level gear gave fewer bonuses so that by the time you were a high le