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
/* | |
* Nital is an effort to provide a well documented, powerful, scalable, and robust | |
* RuneScape server framework delivered open-source to all users. | |
* | |
* Copyright (C) 2011 Nital Software | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. |
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 us.ironbase.job; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Used to schedule and manage {@link Job} implementations. |
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 us.ironbase.job; | |
/** | |
* Used to contain attributes for {@link Job}s which should be | |
* client-configured. | |
* | |
* @author Thomas Nappo | |
*/ | |
class JobLegacy { |
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 us.ironbase.job; | |
/** | |
* The interface to be implemented by classes which perform business logic | |
* and desire the ability to be scheduled by a {@link Scheduler} and to be | |
* maintained by the environment. | |
* | |
* @author Thomas Nappo | |
*/ | |
public interface Job { |
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 us.ironbase.job.examples; | |
import static java.lang.System.out; | |
import us.ironbase.job.Job; | |
/** | |
* A job which creates and displays a virtual cake. | |
* | |
* @author Thomas Nappo | |
*/ |
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 com.fijeo; | |
import java.io.IOException; | |
import java.net.InetAddress; | |
import java.net.InetSocketAddress; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; | |
import java.nio.channels.spi.SelectorProvider; | |
import java.util.logging.Logger; |
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 class Main { | |
private static final int instrument = 14; | |
private static final int delay = 15; | |
private static final int note = 200; | |
public static void main(String[] args) { | |
int box = ((instrument & 0xF) << 12) | ((delay & 0xF) << 8) | (note & 0xFF); | |
int u_instrument = (box >> 12) & 0xF; | |
int u_delay = (box >> 8) & 0xF; | |
int u_note = (box & 0xFF); | |
System.out.println("Box: " + ((char) (box & 0xFFF)) + ", Instrument: " + u_instrument + ", Delay: " + u_delay + ", Note: " + u_note); |
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 class Main { | |
public static void main(String[] args) { | |
StringBuilder total = new StringBuilder(); | |
for (int i = 0; i < 100; i++) { | |
int instrument = i & 0xF; | |
int delay = i & 0xF; | |
int note = i; | |
int box = ((instrument & 0xF) << 12) | ((delay & 0xF) << 8) | (note & 0xFF); | |
int u_instrument = (box >> 12) & 0xF; | |
int u_delay = (box >> 8) & 0xF; |
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
long hp = 99; | |
long read = 27; | |
long magic = 255; | |
long rating = 30; | |
long picture = 10; | |
long sand = 12; | |
long confirmation = 1; | |
long skin = 7; | |
long resolutionX = 120; | |
long resolutionY = 120; |
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 abendigo.mem.jna; | |
import com.sun.jna.Native; | |
import com.sun.jna.NativeLibrary; | |
import com.sun.jna.Pointer; | |
import com.sun.jna.platform.win32.WinDef; | |
import com.sun.jna.platform.win32.WinNT; | |
import com.sun.jna.ptr.IntByReference; | |
import com.sun.jna.win32.W32APIOptions; |