Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 |
import lejos.nxt.*;
import lejos.nxt.addon.*;
import lejos.util.TextMenu;
/*
* Emulates the RCX Remote control
*
* @author Lawrie Griffiths <lawrie.griffiths@ntlworld.com>
*
* Bugs:
* Beep does not work twice in a row with standard RCX firmware.
* Commands only work every other time with RCX l... | 480 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.addon.*;
/**
* Test of the Mindsensors RCX Motor Multiplexer.
*
* The adapter should be connected to S1 and an RCX
* motor connected to port 1 on the multiplexer.
*
* @author Lawrie Griffiths
*
*/
public class RCXMMTest {
public static void main(String[] a... | 205 |
github-java-corpus | 2,012 | import lejos.nxt.Button;
import lejos.util.*;
/**
* Example created to test Matrix Class
*
* @author Juan Antonio Brenha Moral
*
*/
public class MatrixTest{
private static DebugMessages dm;
//Main
public static void main(String[] args) throws Exception{
dm = new DebugMessages();
dm.setL... | 173 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.addon.*;
/**
* Simple test of compass sensors.
*
* Works with Mindsensors and HiTechnic compass sensors.
*
* @author Lawrie Griffiths
*
*/
public class RFIDTest {
public static void main(String[] args) throws Exception {
RFIDSensor rfid = new RFIDSensor(SensorPort.S1... | 230 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.robotics.navigation.*;
import java.util.Random;
/**
* EchoNavigator is a obstacle avoiding robot that attempts reach its destination.
* Uses SimpleNavigator
* Hareware rquirements: an ultrasonic sensor mounted on a vertical axle
* driven by the third motor.
* Since it relie... | 841 |
github-java-corpus | 2,012 |
/**
* Demo for Mindsensors RXmux
*
* @author Michael Smith <mdsmitty@gmail.com>
*/
import lejos.nxt.*;
import lejos.nxt.addon.*;
public class RCXMuxTest{
public static void main(String[] args) throws Exception {
RCXSensorMultiplexer mux = new RCXSensorMultiplexer(SensorPort.S1);
RCXLightSensor ... | 224 |
github-java-corpus | 2,012 | import lejos.robotics.navigation.*;
import lejos.nxt.*;
import java.util.ArrayList;
/**
* The WaypointNav class uses the SimpleNavigator to execute the
* individual segments
*
*
* @author Dirk Sturzebecher - 20090131 - initial version
* revised 20090701 to use instead of extend a SimpleNavigator.
*/
public ... | 770 |
github-java-corpus | 2,012 |
import lejos.nxt.*;
/**
* Simple test of the Lego UltraSonic Sensor.
*
* @author Lawrie Griffiths
*
*/
public class SonicTest {
public static void main(String[] args) throws Exception {
UltrasonicSensor sonic = new UltrasonicSensor(SensorPort.S1);
while(!Button.ESCAPE.isPressed()) {
LCD.clear();
... | 165 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.addon.*;
import lejos.util.TextMenu;
public class View {
public static void main (String[] aArg)
throws Exception
{
String sys = "System info";
String batt = "Battery :";
String tot = "Tot mem :";
String free = "Free mem:";
String sensVal = "Sensor Value";
String m... | 1,854 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.addon.*;
import lejos.util.*;
/**
* This Example show how to use the sensor PFMate.
*
* Developer Note: I discover that it is necessary to use a delay between 2 commands to use both motors.
*
* @author Juan Antonio Brenha Moral
*
*/
public class PFMateTest {
priv... | 693 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.comm.*;
import lejos.nxt.remote.*;
import lejos.util.TextMenu;
import java.io.*;
/**
* This program demonstrates the use of the RemoteNXT class to allow one NXT
* to control another. It should be used in conjunction either with the standard
* leJOS menu (for Bluetooth o... | 1,169 |
github-java-corpus | 2,012 | import lejos.nxt.*;
/**
* Shows how leJOS free RAM reduces as String objects are created.
*
* Now that leJOS NXJ has a garbage collector, it shows the
* garbage collector kicking in and the memory increasing again.
*
* @author Lawrie Griffiths
*
*/
public class MemoryTest {
public static void main (String[]... | 139 |
github-java-corpus | 2,012 | import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import lejos.nxt.*;
import lejos.nxt.comm.*;
/**
* Open a connection to the NXT using the BTSend sample
* and then walk round the house measuring the signal
* strength.
*
* @aut... | 225 |
github-java-corpus | 2,012 | import lejos.nxt.*;
/**
* Test of sensor port listeners.
*
* Note that these only work with Analog/Digital sensors
* like the LEGO Touch, Sound and Light sensors.
*
* They do not work with I2C sensors like the Ultrasonic sensor.
*
* This test needs a LEGO Sound sensor connected to sensor port S1.
*
* @au... | 381 |
github-java-corpus | 2,012 | import lejos.util.*;
import javax.microedition.location.*;
/**
* This example show how to use the class Coordinates from JSR-179
* The example explain how to use GPS points (Lat/Lon) to calculate the distances
* in Kilometers
*
* The example has been tested with others Online tools as:
* http://www.gps... | 917 |
github-java-corpus | 2,012 | import lejos.nxt.*;
/**
* $Id: HelloWorld.java 1587 2008-05-02 17:19:41Z lgriffiths $
*
* @author Lawrie Griffiths
*
*/
public class HelloWorld
{
public static void main (String[] aArg)
throws Exception
{
LCD.drawString("Hello World",3,4);
Thread.sleep(2000);
}
}
| 92 |
github-java-corpus | 2,012 |
import lejos.nxt.*;
import lejos.nxt.comm.*;
import lejos.util.TextMenu;
import java.io.*;
/**
* Receive data from another NXT, a PC, a phone,
* or another device. Allow the use of Bluetooth,
* USB or RS485. Allow either packet based or RAW
* connections
*
* Waits for a connection, receives an int and return... | 476 |
github-java-corpus | 2,012 |
import lejos.robotics.subsumption.*;
import lejos.nxt.*;
/**
* Demonstration of the Behavior subsumption classes.
*
* Requires a wheeled vehicle with two independently controlled
* motors connected to motor ports A and C, and
* a touchmsensor connected to sensor port 1 and
* an ultrasonic sensor connected to... | 502 |
github-java-corpus | 2,012 | import lejos.addon.gps.*;
import lejos.nxt.*;
import lejos.nxt.comm.*;
import lejos.util.Stopwatch;
import lejos.util.TextMenu;
import java.util.*;
import java.io.*;
import javax.bluetooth.*;
import javax.microedition.location.*;
/**
* This example show how to:
*
* + Connect with a GPS Device with a... | 3,639 |
github-java-corpus | 2,012 | import lejos.nxt.*;
/**
* Entry point for the program. This version uses
* the enhanced Thread interface available in lejos1.0.2
*/
public class Subsumption2 {
public static void main (String[] arg)
throws Exception {
// Won't return until the 'RUN' button is pressed.
runIt();
}
/**
* Return the... | 2,282 |
github-java-corpus | 2,012 | import java.util.*;
import lejos.nxt.*;
public class SpeedTest {
static final int TOTALTIME = 60000;
public static void main(String [] args) throws Exception {
byte A = 0;
Random rand = new Random();
LightSensor ls = new LightSensor(SensorPort.S3);
UltrasonicSensor us = new UltrasonicSensor(SensorPort.S1);... | 464 |
github-java-corpus | 2,012 |
import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.ChoiceGroup;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import ja... | 4,358 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.rcxcomm.LLC;
/**
* Shows Lego IR byes received on the LCD.
*
* Requires a Mindsensors NRLink adapter connected to
* sensor port S1.
*
* Point the RCX remote control at the NRLink and see
* the bytes received, or use any other Lego IR source.
*
* @author L... | 183 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.robotics.navigation.*;
import lejos.nxt.comm.*;
/**
* Test of remote monitor.
*
* This sample is based on the PilotTester sample - see
* the comments in PilotTester.java for the requirements
* of the robot. MonitorTest also requires a light sensor
* connected to senso... | 974 |
github-java-corpus | 2,012 |
import lejos.nxt.*;
import lejos.nxt.comm.*;
import lejos.util.TextMenu;
/**
* Create an LCP responder to handle LCP requests. Allow the
* User to choose between Bluetooth, USB and RS485 protocols.
*
* @author Andy Shaw
*
*/
public class NXTLCPRespond
{
/**
* Our local Responder class so that we can o... | 316 |
github-java-corpus | 2,012 |
import lejos.nxt.*;
import lejos.nxt.comm.*;
import java.io.*;
import java.net.*;
/**
* Simple test program. Echoes data back to the socket server
*
* @author Ranulf Green and Lawrie Griffiths
*/
public class SocketTest {
private DataInputStream ins;
private DataOutputStream outs;
private BTConnec... | 401 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.comm.RConsole;
import lejos.robotics.Colors;
import lejos.util.TextMenu;
/**
* Test program for the Lego Color Sensor.
* @author andy
*/
public class ColorSensorTest
{
public static void main(String [] args) throws Exception
{
String ports[] = {"Por... | 552 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import java.io.*;
import lejos.nxt.comm.*;
/**
* Test of Java streams over USB.
* Run the PC example, USBSend, to send data.
*
* @author Lawrie Griffiths
*
*/
public class USBReceive {
public static void main(String [] args) throws Exception
{
LCD.drawString("waiting", 0, 0);
USBConn... | 190 |
github-java-corpus | 2,012 | import lejos.nxt.*;
public class Tune {
// NOTE: This tune was generated from a midi using Guy
// Truffelli's Brick Music Studio www.aga.it/~guy/lego
private static final short [] note = {
2349,115, 0,5, 1760,165, 0,35, 1760,28, 0,13, 1976,23,
0,18, 1760,18, 0,23, 1568,15, 0,25, 1480,103, 0,18, 11... | 371 |
github-java-corpus | 2,012 | import lejos.nxt.addon.*;
import lejos.nxt.*;
/**
* Example designed to test Mindsensors NXT Servo
*
* @author Juan Antonio Brenha Moral
*
*/
public class NXTServoTest{
private static String appName = "NXTServo Test";
private static String appVersion = "v0.3";
private static MSC msc;
public... | 600 |
github-java-corpus | 2,012 |
import lejos.nxt.*;
/**
* Entry point for the program. Creates an instance of Subsumption
* and kicks of the lowest priority task (wander)
*/
public class Subsumption1 {
public static Subsumption main;
public static void main (String[] arg)
throws Exception {
main = new Subsumption();
main.tasks[0].exe... | 2,406 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.addon.*;
/**
* Demo for RCXTemperatureSensor
*
*/
public class RCXTempTest {
public static void main(String[] args) throws Exception {
RCXTemperatureSensor temperature = new RCXTemperatureSensor(SensorPort.S1);
boolean s = true;
while(!... | 155 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.addon.PFLink;
/**
* Test class for PFLink, used to remote-control the lego bulldozer
*/
public class PFLinkTest {
private static final void sleep(int milli) {
try {
Thread.sleep(milli);
} catch (InterruptedException e) {
... | 398 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.comm.*;
import lejos.util.TextMenu;
import java.io.*;
/**
*
* Test of NXT to NXT Bluetooth/RS485 communications.
*
* Allows the user to choose the connection type and mode.
*
* Connects to another NXT, sends 100 ints, and receives the
* replies. Then clos... | 794 |
github-java-corpus | 2,012 | import javax.microedition.lcdui.Graphics;
import lejos.nxt.*;
/**
* Simple demonstration of leJOS graphics.
*
* see the LCDUI sample for more sophisticated graphics.
*
* @author Brian Bagnall and Lawrie Griffiths
*
*/
public class GraphicsSample {
public static void main(String [] options) throws Exception... | 120 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.nxt.comm.*;
import java.io.*;
import java.net.*;
/**
* Gets the time from a time server
* @author Lawrie Griffiths
*
*/
public class TimeTest {
private String host = "time.nist.gov";
private int port = 13;
private DataInputStream ins;
private DataOutputStream outs;
... | 323 |
github-java-corpus | 2,012 |
import lejos.nxt.*;
import lejos.nxt.addon.*;
/**
* Simple test of Acceleration (Tilt) sensors.
*
* This should work with Mindsensors and HiTechnic Acceleration
* sensors.
*
* @author Lawrie Griffiths
*
*/
public class TiltTest {
public static void main(String[] args) throws Exception {
TiltSensor tilt... | 240 |
github-java-corpus | 2,012 |
import lejos.nxt.*;
import lejos.nxt.addon.*;
/**
* Test of HiTechnic IRLink driving PF motors.
*
* @author Lawrie Griffiths
*
*/public class PFTest {
/**
* Test of PF Motors using the HiTechic IRLink
*/
public static void main(String[] args) {
IRLink link = new IRLink(SensorPort.S1);
... | 181 |
github-java-corpus | 2,012 | package js.tools;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class ListReader
{
public static ArrayList<String> loadStrings (File aFile)
{
ArrayList<String> pVec = new ArrayList<String>();
if (!aFile.e... | 174 |
github-java-corpus | 2,012 | package js.tools;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.util.TreeSet;
/**
* A comparable ArrayList.
*/
class Packing implements Comparable<Packing>
{
Size array[];
... | 1,701 |
github-java-corpus | 2,012 | package js.common;
/**
* Simple implementation of ToolProgressMonitor with output to System.out.
*/
public class CLIToolProgressMonitor implements ToolProgressMonitor {
private boolean _verbose = false;
/*
* (non-Javadoc)
*
* @see js.tools.ToolProgressMonitor#operation(java.lang.String)
*/
public void... | 338 |
github-java-corpus | 2,012 | package js.common;
/**
* Generic tool exception.
*/
public class ToolException extends Exception
{
/**
* @param message
*/
public ToolException (String message)
{
super(message);
}
/**
* @param cause
*/
public ToolException (Throwable cause)
{
super(cause);
}
... | 143 |
github-java-corpus | 2,012 | package js.common;
/**
* Dummy progress listener.
*/
public class NullToolProgressMonitor implements ToolProgressMonitor
{
/*
* (non-Javadoc)
*
* @see js.common.ToolProgressMonitor#operation(java.lang.String)
*/
public void operation (String message)
{}
/*
* (non-Javadoc)
*
... | 219 |
github-java-corpus | 2,012 | package js.common;
/**
* Listener for progress of long running operations.
*/
public interface ToolProgressMonitor
{
/**
* Notification change of operation.
*
* @param message human readable description of current operation
*/
public void operation (String message);
/**
* Notification ... | 160 |
github-java-corpus | 2,012 | package js.common;
import java.util.ArrayList;
import java.util.Collection;
/**
* Abstract tool.
*/
public class AbstractTool
{
//private ToolProgressMonitor _progress;
protected Collection<ToolProgressMonitor> _monitors;
/**
* Constructor.
*
* @param listener tool progress listener
*/
... | 216 |
github-java-corpus | 2,012 | package js.tinyvm.io;
import java.io.IOException;
public interface IByteWriter
{
//
// specific write order
//
public void writeU1 (int aByte) throws IOException;
public void writeU2 (int aShort) throws IOException;
public void writeU4 (int aInt) throws IOException;
public void writeU8 (lo... | 246 |
github-java-corpus | 2,012 | package js.tinyvm.io;
import java.io.IOException;
/**
* Helper class for padding.
*/
public class IOUtilities
{
/**
* Write padding bytes.
*
* @param writer writer to write to
* @param aMinRecSize size of one record
* @throws IOException
*/
public static void writePadding (IByteWriter... | 236 |
github-java-corpus | 2,012 | package js.tinyvm.io;
import java.io.IOException;
import java.io.OutputStream;
public class BEByteWriter extends ByteWriter
{
public BEByteWriter (OutputStream stream)
{
super(stream);
}
//
// specific write order
//
public void writeU1 (int aByte) throws IOException
{
writeByte(... | 151 |
github-java-corpus | 2,012 | package js.tinyvm.io;
import java.io.IOException;
import java.io.OutputStream;
/**
* Writes lo-byte first, hi-byte last. In longs, hi-word goes first, but each
* word is written as though with writeU4.
*/
public class LEByteWriter extends ByteWriter
{
public LEByteWriter (OutputStream stream)
{
super(s... | 423 |
github-java-corpus | 2,012 | package js.tinyvm.io;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/**
* Basic byte writer implementation (write order independant part)
*/
public abstract class ByteWriter implements IByteWriter
{
/**
* Data output stream used for writing.
*/
private DataO... | 670 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.HashSet;
import js.common.ToolProgressMonitor;
import js.tinyvm.io.IByteWriter;
import js.tinyvm.util.HashVector;
/**
* Abstraction for dumped binary.
*/
public class Binary
{
// State that is written to the... | 6,703 |
github-java-corpus | 2,012 | package js.tinyvm;
import org.apache.bcel.classfile.ConstantUtf8;
public class Signature
{
String iImage;
public Signature (String aName, ConstantUtf8 aDescriptor)
{
iImage = aName + aDescriptor;
}
public Signature (String aName, String aDescriptor)
{
iImage = aName + aDescriptor;
}... | 190 |
github-java-corpus | 2,012 |
package js.tinyvm;
/**
*
* @author andy
*/
public enum RunTimeOptions {
EnableTypeChecks(0x1), EnableAssert(0x2);
private int value;
RunTimeOptions(int value)
{
this.value = value;
}
public int getValue()
{
return value;
}
} | 74 |
github-java-corpus | 2,012 | package js.tinyvm;
import js.tinyvm.io.IByteWriter;
public interface WritableData
{
/**
* Dump.
*
* @param writer writer to write binary to
* @throws TinyVMException
*/
public void dump (IByteWriter writer) throws TinyVMException;
/**
* Returns the length of the record, in bytes.
... | 107 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import js.tinyvm.io.IByteWriter;
import org.apache.bcel.classfile.Field;
public class StaticValue extends WritableDataWithOffset
{
Field _field;
TinyVMType iType;
public StaticValue (Field aEntry) throws TinyVMException
{
_field = aEntry;
iType... | 473 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import js.tinyvm.io.IByteWriter;
import js.tinyvm.io.IOUtilities;
import org.apache.bcel.classfile.CodeException;
import org.apache.bcel.classfile.ConstantClass;
import org.apache.bcel.classfile.JavaClass;
public class ExceptionRecord implements WritableData
{
CodeE... | 657 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import js.tinyvm.io.IByteWriter;
public class CodeSequence extends WritableDataWithOffset
{
private byte[] iBytes;
public void setBytes (byte[] aBytes)
{
iBytes = aBytes;
}
public in... | 201 |
github-java-corpus | 2,012 | package js.tinyvm;
/**
* Machine-generated file. Do not modify.
*/
public interface OpCodeConstants
{
int OP_NOP = 0;
int OP_ACONST_NULL = 1;
int OP_ICONST_M1 = 2;
int OP_ICONST_0 = 3;
int OP_ICONST_1 = 4;
int OP_ICONST_2 = 5;
int OP_ICONST_3 = 6;
int OP_ICONST_4 = 7;
int OP_ICONST_5 = 8;... | 2,055 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import js.tinyvm.io.IByteWriter;
import js.tinyvm.io.IOUtilities;
/**
* Master record.
*/
public class MasterRecord implements WritableData
{
/**
* The binary.
*/
Binary _binary;
int runTimeOptions = 0;
/**
* Constructor.
*
* @param b... | 637 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import java.io.InputStream;
/**
* Class path.
*/
public class ClassPath implements IClassPath
{
/**
* BCEL class path.
*/
private org.apache.bcel.util.ClassPath _classPath;
/**
* Constructor.
*
* @param classPath string class path separat... | 187 |
github-java-corpus | 2,012 | package js.tinyvm;
public abstract class WritableDataWithOffset implements WritableData
{
/**
* Offset.
*/
private int _offset = -1;
/**
* Init offset.
*
* @param startOffset start offset
* @throws TinyVMException if offset is not correct
*/
public void initOffset (int startOf... | 280 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.ArrayList;
import js.tools.ListReader;
public class GenerateConstants
{
static String iTinyVMHome = System.getProperty("tinyvm.home");
static final String CLASSES = ... | 1,499 |
github-java-corpus | 2,012 | package js.tinyvm.util;
import java.io.File;
import java.io.PrintWriter;
import js.tinyvm.TinyVMException;
import js.tinyvm.RunTimeOptions;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import or... | 1,569 |
github-java-corpus | 2,012 | package js.tinyvm.util;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Iterator;
public class HashVector<T>
{
private HashMap<T, Object> iHashMap;
private ArrayList<T> iArrayList;
public HashVector ()
{
super();
iHashMap = new HashMap<T, Object>();
iArrayList = n... | 477 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.PrintWriter;
import java.io.Writer;
/**
* Class for creating a report of a binary.
*/
public class BinaryReport
{
/**
* Binary.
*/
private Binary _binary;
/**
* Constructor.
*
* @param binary binary to create report from.
*/
public BinaryReport... | 530 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import java.util.logging.Logger;
import js.tinyvm.io.IByteWriter;
import org.apache.bcel.classfile.Constant;
import org.apache.bcel.classfile.ConstantDouble;
import org.apache.bcel.classfile.ConstantFloat;
import org.apache.bcel.classfile.ConstantInteger;
import org.apa... | 1,427 |
github-java-corpus | 2,012 | package js.tinyvm;
import org.apache.bcel.classfile.Constant;
import org.apache.bcel.classfile.ConstantCP;
import org.apache.bcel.classfile.ConstantClass;
import org.apache.bcel.classfile.ConstantDouble;
import org.apache.bcel.classfile.ConstantFieldref;
import org.apache.bcel.classfile.ConstantFloat;
import o... | 9,674 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.util.HashMap;
import java.util.ArrayList;
import js.tinyvm.util.HashVector;
/**
* Abstraction for a class record (see vmsrc/language.h).
*/
public class PrimitiveClassRecord extends ClassRecord
{
ConstantRecord classConstant;
@Override
public String getName ()
{
... | 1,369 |
github-java-corpus | 2,012 | package js.tinyvm;
import org.apache.bcel.Constants;
import org.apache.bcel.classfile.Utility;
import org.apache.bcel.generic.Type;
/**
* This class encapsulates all functionality regarding tiny vm types.
*/
public class TinyVMType
{
//
// All byte values
//
public static final byte T_REFERENCE_TYPE... | 1,305 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.ArrayList;
import js.tinyvm.io.IByteWriter;
import js.tinyvm.io.IOUtilities;
import js.tinyvm.util.... | 7,631 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import java.util.logging.Logger;
import java.util.HashSet;
import java.util.Iterator;
import js.tinyvm.io.IByteWriter;
import js.tinyvm.io.IOUtilities;
import js.tinyvm.util.HashVector;
import org.apache.bcel.Constants;
import org.apache.bcel.classfile.Code;... | 2,485 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import js.common.CLIToolProgressMonitor;
import js.common.ToolProgressMonitor;
import js.tinyvm.util.TinyVMCommandLineParser;
/**
* Tiny VM.
*/
pub... | 727 |
github-java-corpus | 2,012 | package js.tinyvm;
import js.common.ToolException;
/**
* Generic tiny vm exception.
*/
public class TinyVMException extends ToolException
{
/**
* @param message
*/
public TinyVMException (String message)
{
super(message);
}
/**
* @param cause
*/
public TinyVMException (Throw... | 157 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import java.util.logging.Logger;
import js.tinyvm.io.IByteWriter;
/**
* This class provides a represntation of an interface map.
* The map is used at run time to determine if a class implements a particular
* interface. The map is stored per interface and consists of... | 917 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import js.tinyvm.io.IByteWriter;
public class EntryClassIndex implements WritableData
{
String iClassName;
Binary iBinary;
public EntryClassIndex (Binary aBinary, String aClassName)
{
iBinary = aBinary;
iClassName = aClassName;
}
public i... | 181 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import java.io.InputStream;
/**
* Interface for class paths.
*/
public interface IClassPath
{
/**
* Get input stream with the given class byte code.
*
* @param className name of class with '/' as separator
* @throws IOException if class could not be... | 91 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import js.tinyvm.io.IByteWriter;
import js.tinyvm.io.IOUtilities;
import org.apache.bcel.classfile.Constant;
import org.apache.bcel.classfile.ConstantPool;
public class ConstantRecord implements WritableData
{
Binary iBinary;
/**
* Constant.
*/
Consta... | 563 |
github-java-corpus | 2,012 | package js.tinyvm;
/**
* Machine-generated file. Do not modify.
*/
public interface SpecialClassConstants {
static final String[] CLASSES = {
"java/lang/Object",
"java/lang/Throwable",
"java/lang/Error",
"java/lang/OutOfMemoryError",
"boolean",
"char",
"float",
"double... | 279 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import js.tinyvm.io.IByteWriter;
import org.apache.bcel.classfile.Field;
public class InstanceFieldRecord implements WritableData
{
Field iField;
TinyVMType iType;
public InstanceFieldRecord (Field aEntry) throws TinyVMException
{
iField = aEntry;
... | 262 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import js.tinyvm.io.IByteWriter;
import js.tinyvm.io.IOUtilities;
/**
* Record table.
*/
public class RecordTable<T extends WritableData> extends WritableDataWithOffset
{
/**
* Descriptive name of this reco... | 1,112 |
github-java-corpus | 2,012 | package js.tinyvm;
public class TinyVMConstants
{
public static final String VERSION = "2.1.0";
public static final int VERIFY_LEVEL = 2;
public static final int MAGIC_MASK = 0xCAF6;
public static final int F_SIZE_SHIFT = 12;
public static final int F_OFFSET_MASK = 0x0FFF;
public static final int... | 424 |
github-java-corpus | 2,012 | package js.tinyvm;
/**
* Machine-generated file. Do not modify.
*/
public interface OpCodeInfo
{
int OPCODE_ARGS[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 2, 1, 1, 1,
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 1,... | 2,077 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.IOException;
import js.tinyvm.io.IByteWriter;
import org.apache.bcel.classfile.Field;
public class StaticFieldRecord implements WritableData
{
ClassRecord iClassRecord;
Field iField;
boolean isUsed = false;
public StaticFieldRecord (Field aEntry, ClassRecord aRec)
... | 378 |
github-java-corpus | 2,012 | package js.tinyvm;
/**
* Machine-generated file. Do not modify.
*/
public interface SpecialSignatureConstants {
static final String[] SIGNATURES = {
"main([Ljava/lang/String;)V",
"run()V",
"<init>()V",
"<clinit>()V",
"notify()V",
"notifyAll()V",
"wait()V",
"wait(J)V",
... | 1,038 |
github-java-corpus | 2,012 | package js.tinyvm;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import js.common.AbstractTool;
import js.common.ToolProgressMonitor;
import js.tinyvm.io.BEByteWriter;
import js.tinyvm.io.IByteWriter;
impo... | 999 |
github-java-corpus | 2,012 | public class mach2
{
public static void main(String[] args)
{
robitController robit = new robitController();
maze aMaze = new maze();
robit.startSing();
robit.startAlign();
while(robit.found == false)
{
if(robit.move()) // move(int) now returns true if we need to mark a ... | 519 |
github-java-corpus | 2,012 | public class mach1
{
public static void main(String[] args)
{
robitController robit = new robitController();
maze aMaze = new maze();
robit.startSing();
robit.startAlign();
while(robit.found == false)
{
if(robit.move()) // move(int) now returns true if we need to mark a w... | 520 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.robotics.navigation.*;
import java.io.File;
import java.util.*;
public class robitController {
Pilot pilot = new TachoPilot(1.9527f, 4.9f, Motor.A, Motor.C);
IntStack stackx = new IntStack(56);
IntStack stacky = new IntStack(56);
int curx, cury = 0;
int face = 2;// ... | 2,602 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.robotics.navigation.*;
import lejos.robotics.Colors.Color;
public class MotorTest
{
public static void main(String[] args)
{
Pilot pilot = new TachoPilot(1.9527f, 4.9f, Motor.A, Motor.C);
while(true)
pilot.forward();
// pilot.travel(12);
// pilot.rotate(93);
... | 143 |
github-java-corpus | 2,012 | public class maze
{
char[][][] Maze = new char[8][8][4];//3d array of chars instead of 2d array of ints
public maze()
{
for(int i = 0; i < 8; i++)
{
for(int j = 0; j < 8; j++)
{
for(int k = 0; k < 4; k++)
{
Maze[i][j][k] = '?'; ... | 639 |
github-java-corpus | 2,012 |
public class main1{
public static IntStack stackx = new IntStack(56);
public static IntStack stacky = new IntStack(56);
public static int[] array = new int[0];
public static void main(String args[]){
test1();
test2();
test3();
}
public static void cleanStack(){
int[] xVals = stackx.get... | 2,156 |
github-java-corpus | 2,012 | // File: IntStack.java from the package edu.colorado.collections
// Complete documentation is available from the IntStack link in:
// http://www.cs.colorado.edu/~main/docs/
import java.util.EmptyStackException;
/******************************************************************************
* An <CODE>IntStac... | 2,444 |
github-java-corpus | 2,012 | public class mach2
{
public static void main(String[] args)
{
robitController robit = new robitController();
maze aMaze = new maze();
int counter = 0;
robit.startSing();
robit.startAlign();
while(robit.found == false)
{
if(robit.move()) // move(int) now returns true ... | 508 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.robotics.navigation.*;
import java.io.File;
public class robitController {
Pilot pilot = new TachoPilot(1.9527f, 4.9f, Motor.A, Motor.C);
IntStack stackx = new IntStack(56);
IntStack stacky = new IntStack(56);
int curx, cury = 0;
int face = 2;// 0 is north, 1 east, 2... | 1,952 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.robotics.navigation.*;
import lejos.robotics.Colors.Color;
public class MotorTest
{
public static void main(String[] args)
{
Pilot pilot = new TachoPilot(1.9527f, 4.9f, Motor.A, Motor.C);
pilot.travel(12);
pilot.rotate(93);
pilot.travel(12);
pilot.rotate(93);
... | 126 |
github-java-corpus | 2,012 | public class maze
{
char[][][] Maze = new char[8][8][4];//3d array of chars instead of 2d array of ints
public maze()
{
for(int i = 0; i < 8; i++)
{
for(int j = 0; j < 8; j++)
{
for(int k = 0; k < 4; k++)
{
Maze[i][j][k] = '?'; ... | 684 |
github-java-corpus | 2,012 | import lejos.nxt.*;
import lejos.robotics.Colors.Color;
public class SensorTest {
public static void main(String[] args)
{
ColorLightSensor cs1 = new ColorLightSensor(SensorPort.S1, ColorLightSensor.TYPE_COLORGREEN);
ColorLightSensor cs2 = new ColorLightSensor(SensorPort.S2, ColorLightSensor.TYPE_COL... | 147 |
github-java-corpus | 2,012 | // File: IntStack.java from the package edu.colorado.collections
// Complete documentation is available from the IntStack link in:
// http://www.cs.colorado.edu/~main/docs/
import java.util.EmptyStackException;
/******************************************************************************
* An <CODE>IntStac... | 2,364 |
github-java-corpus | 2,012 | /*
* Link.java
* 24/05/2011
* Facebook API Micro Edition
* Copyright(c) Ernandes Mourao Junior (ernandes@gmail.com)
* All rights reserved
* GNU General Public License (GPL) Version 2, June 1991
*/
package com.emobtech.facebook.api.graph;
import java.io.IOException;
import com.emobtech.facebook.api.... | 885 |
github-java-corpus | 2,012 | /*
* Status.java
* 24/05/2011
* Facebook API Micro Edition
* Copyright(c) Ernandes Mourao Junior (ernandes@gmail.com)
* All rights reserved
* GNU General Public License (GPL) Version 2, June 1991
*/
package com.emobtech.facebook.api.graph;
import java.io.IOException;
import com.emobtech.facebook.ap... | 562 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.