This file contains hidden or 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 hello | |
import java.util.Scanner | |
import java.util.Random | |
import com.sun.javaws.exceptions.InvalidArgumentException | |
import java.util.HashMap | |
/** | |
* Created with IntelliJ IDEA. | |
* User: Blackrush |
This file contains hidden or 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
<npcs> | |
<npc id="1" template="615" map="7411" cell="370" orientation="SOUTH_WEST" start="1936"> | |
<question id="1936"> | |
<answer id="1937"> | |
<action type="5" question="5452" /> | |
</answer> | |
</question> | |
<question id="5452"> | |
<answer id="2627"> | |
<action type="4" /> |
This file contains hidden or 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 org.shivas.server.core.plugins.Plugin | |
import org.shivas.server.core.plugins.Startable | |
import com.google.common.collect.Lists | |
import javax.swing.Timer | |
class PubManagerPlugin extends Plugin { | |
final String author = "Blackrush" | |
final String version = "alpha1" | |
final String help = "Sends pub message in global channel" |
This file contains hidden or 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
URLClassLoader loader; | |
try { | |
loader = new URLClassLoader(new URL[] { | |
file.toURI().toURL() | |
}, ClassLoader.getSystemClassLoader()); | |
} catch (Exception e) { | |
log.error("can't load {} because : {}", file.getPath(), e.getMessage()); | |
return null; | |
} |
This file contains hidden or 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.shivas.server; | |
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineFactory; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
import junit.framework.TestCase; | |
public class ScriptingTest extends TestCase { |
This file contains hidden or 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
class Tree<TKey, TValue> | |
{ | |
protected readonly Tree<TKey, TValue> parent; | |
protected readonly IDictionary<TKey, Tree<TKey, TValue>> children = new Dictionary<TKey, Tree<TKey, TValue>>(); | |
public Tree(Tree<TKey, TValue> parent) { | |
this.parent = parent; | |
} | |
public Tree() { |
This file contains hidden or 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 fr.blackrush.activejdbc; | |
import java.util.*; | |
public class App { | |
static String capitalize(String s) { | |
return Character.toUpperCase(s.charAt(0)) + s.substring(1); | |
} | |
static class Pair<T> { |
This file contains hidden or 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.shivas.server.database.models; | |
import org.javalite.activejdbc.Model; | |
import org.javalite.activejdbc.LazyList; | |
public class Account extends Model { | |
public String getName() { | |
return getString("name"); | |
} |
This file contains hidden or 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 static void println(String string, int radix) { | |
byte[] bytes = string.getBytes(); | |
for (byte b : bytes) { | |
System.out.print(Integer.toString(b, radix)); | |
} | |
System.out.println(); | |
} | |
public static void printlnBinary(String string) { | |
println(string, 2); |
This file contains hidden or 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 main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"strings" | |
) |