Skip to content

Instantly share code, notes, and snippets.

View volgar1x's full-sized avatar

Antoine Chauvin volgar1x

View GitHub Profile
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
<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" />
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"
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;
}
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 {
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() {
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> {
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");
}
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);
package main
import (
"flag"
"fmt"
"io"
"log"
"net"
"strings"
)