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
public class Main { | |
public static void main(String[] args) { | |
MyThreadUnsafeTestObject o1 = new MyThreadUnsafeTestObject(); | |
MyThreadSafeTestObject o2 = new MyThreadSafeTestObject(); | |
long start = System.nanoTime(); | |
for (int i = 0; i < 1000000; i++) { | |
o1.foo(); | |
} |
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
public class Main { | |
public static void main(String[] args) { | |
long troveGetTime, trovePutTime, javaGetTime, javaPutTime; | |
troveGetTime = trovePutTime = javaGetTime = javaPutTime = 0L; | |
for (int test = 0; test < 10; test++) { | |
ConcurrentHashMap<Integer, Integer> testMap = new ConcurrentHashMap<Integer, Integer>(100000); | |
TIntObjectMap<Integer> testMap2 = TCollections.synchronizedMap(new TIntObjectHashMap<Integer>(100000)); | |
ArrayList<Thread> threads = new ArrayList<Thread>(); | |
for (int i = 0; i < 10; i++) { | |
if (i % 2 == 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
package org.bukkit.craftbukkit; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
// CraftBukkit start | |
import java.util.Random; | |
import net.minecraft.server.BlockSand; | |
import net.minecraft.server.Chunk; |
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
Header Information for each Region: | |
Region Coord X (Integer). | |
Region Coord Y (Integer). | |
Region Coord Z (Integer). | |
Payload: | |
16x16x16 chunk information | |
Header information for each Chunk: | |
Format (0/1). 0 - Byte Ids. 1 - Short Ids. |
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
http://get.spout.org/nuget/mirrors | |
http://get.spout.org/nuget/builds/spout | |
http://get.spout.org/nuget/builds/dev/spout | |
http://get.spout.org/nuget/builds/beta/spout | |
http://get.spout.org/nuget/libraries | |
http://get.spout.org/nuget/libraries/dev | |
http://get.spout.org/nuget/libraries/beta | |
http://get.spout.org/nuget/libraries/stable |
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
import java.util.Random; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println(getRandomName(new Random(), 10)); | |
} | |
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
public enum DeathCause implements DeathCauseFactory { | |
DROWNING { | |
public Cause<?> buildCause(Entity victim, Entity killer) { | |
return new DrowningCause(victim); | |
} | |
}, | |
FALLING { | |
public Cause<?> buildCause(Entity victim, Entity killer) { | |
//TODO |
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
[22:58:09] <@Wulfspider> Most of the buttons in the mockup can go away | |
[22:58:14] <@Wulfspider> Gear icon for options, by the player name | |
[22:58:28] <@Wulfspider> With the player's avatar to the left of the name (still pondering best placement) | |
[22:58:41] <@Wulfspider> Home Play Market About | |
[22:58:49] <@Wulfspider> Those for the bottom, all in a single line, no background | |
[22:58:59] <@Wulfspider> No other buttons | |
[22:59:17] <@Wulfspider> The rest in the middle is still being decided on, as we don't know exactly what we want there, but we don't want huge lists | |
[22:59:25] <@Afforess> ok | |
[22:59:38] <@Wulfspider> The servers and such can go on the place page | |
[22:59:55] <@Wulfspider> We were talking about removing the difference between SP and MP, so it'd all go under the Play page |
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
# Get the latest Sun Java SDK from Oracle | |
wget http://download.oracle.com/otn-pub/java/jdk/7u17-b02/jdk-7u17-linux-i586.rpm | |
# Rename the file downloaded, just to be nice | |
mv jdk-7u17-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u17-linux-i586.rpm | |
# Install Java | |
sudo rpm -i jdk-7u17-linux-i586.rpm | |
# Check if the default java version is set to sun jdk |
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
function softPowerScore() { | |
var html = $('<div>').append($(".highcharts-data-labels").children()[0]).html(); | |
var search = '<tspan x="3">'; | |
var index = html.indexOf(search) + search.length; | |
var end = html.indexOf('</tspan>', index); | |
console.log(index + " " + end); | |
return html.substring(index, end); | |
} |
OlderNewer