text stringlengths 14 410k | label int32 0 9 |
|---|---|
public ChineseLine(int x1, int x2, int y1, int y2) {
this.x1 = x1;//sets the value of the first x coordinate in the line
this.x2 = x2;//sets the value of the second x coordinate in the line
this.y1 = y1;//sets the value of the first y coordinate in the line
this.y2 = y2;//sets the valu... | 9 |
public void doFixedLengthHeaderAndTrailer() {
try {
final String mapping = ConsoleMenu.getString("Mapping ", FixedLengthHeaderAndTrailer.getDefaultMapping());
final String data = ConsoleMenu.getString("Data ", FixedLengthHeaderAndTrailer.getDefaultDataFile());
FixedLengthHe... | 1 |
public int getSize() {
return items.length;
} | 0 |
public static Class compile(final String className, final String classString) {
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
JavaFileManager fileManager = new ClassFileManager(compiler.... | 4 |
public void chooseTrainAndTestSignatures(String database)
{
ArrayList<LabeledSignature> signatures = parseDatabaseFile(database);
if (database == null) return;
ArrayList<ArrayList<LabeledSignature>> userGenuineSignatures = new ArrayList<ArrayList<LabeledSignature>>(numberOfUsers);
ArrayList<ArrayList<LabeledS... | 9 |
@Override
public void setInstructionList(ArrayList<Instruction> instructions) {
this.instructions = instructions;
instructionList = new ArrayList<String>();
for (Instruction instruction : instructions) {
if (instruction != null && instruction.getName() != null) {
instructionList.add(instruction.getName())... | 3 |
private void updateForDragOver(Point where) {
int count = getComponentCount();
int insertAt = count;
for (int i = 0; i < count; i++) {
Component child = getComponent(i);
if (child instanceof DockTab) {
Rectangle bounds = child.getBounds();
if (where.x < bounds.x + bounds.width / 2) {
insertAt =... | 5 |
@Override
public final void write(final String text) throws OutputException {
FileWriter fileWriter = null;
BufferedWriter writer = null;
try {
fileWriter = new FileWriter(path, true);
writer = new BufferedWriter(fileWriter);
writer.append(text);
writer.newLine();
writer.close();... | 1 |
@SuppressWarnings({ "unchecked", "unused" })
@ApiMethod(name = "listMessages")
public CollectionResponse<MessageData> listMessages(
@Nullable @Named("cursor") String cursorString,
@Nullable @Named("limit") Integer limit) {
EntityManager mgr = null;
Cursor cursor = null;
List<MessageData> ... | 5 |
public A2Ifs() {
System.out.println("Enter the number of your birth month:");
// birthMonth = inputInt() - 1;
while ((birthMonth = inputInt()) > 12 || birthMonth < 1) {
System.out
.println("You must have forgotten your birthmonth, ask your mum then try again:");
}
birthMonth--;
System.out.println("... | 6 |
private void printGridletList(GridletList list, String name,
boolean detail, double gridletLatencyTime[])
{
int size = list.size();
Gridlet gridlet = null;
String indent = " ";
StringBuffer buffer = new StringBuffer(1000);
buffer.append("\n\n==... | 4 |
JarDirClassPath(String dirName) throws NotFoundException {
File[] files = new File(dirName).listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
name = name.toLowerCase();
return name.endsWith(".jar") || name.endsWith(".zip");
}
... | 3 |
public ConfigurationReader() throws ReaderException {
_parseFile();
} | 0 |
public static void confirmExit (final JFrame fen){
fen.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
int reponse = JOptionPane.showConfirmDialog(fen,
"Voulez-allez quitter l'application, Voulez-vous enregistrer",
"Confirmation",
JOptionPane.YES_NO_OPTION,
... | 2 |
public Level(Game game, Tileset tileset) {
this.game = game;
this.tileset = tileset;
} | 0 |
private void protectServer(int level, String[] keywords) {
if (isAccountTypeOf(level, ADMIN, MODERATOR)) {
if (keywords.length == 2) {
if (Functions.isNumeric(keywords[1])) {
Server s = getServer(Integer.parseInt(keywords[1]));
if (s.protected_server) {
s.protected_server = false;
sendMes... | 4 |
public static void main( String[ ] args ) throws IOException {
BufferedReader in = new BufferedReader( new InputStreamReader( System.in ) );
String line = "";
StringBuilder out = new StringBuilder( );
int n = Integer.parseInt( in.readLine( ) );
for ( int p = 0; p < n; p++ ) {
int index = 0;
cube = new... | 8 |
public static void main(String[] args) {
LinkedList filterList = new LinkedList();
IntegerFilter f = null;
int actualFilters = 0;
if (args.length == 0) {
System.err
.println("USAGE: java polimi.reds.examples.ClientTester [reds-tcp | reds-udp]:<brokerAddress>:<brokerPort>"
+ " <localPort> <publi... | 9 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
public Creator() throws IOException {
BufferedReader reader = new BufferedReader(new FileReader("Kills.txt"));
String lol = null;
int i = 0;
while((lol = reader.readLine()) != null)
{
System.out.println(++i);
String name = lol.substring(1,lol.indexOf("]")... | 6 |
@Override
public JavaFileObject getJavaFileForInput(Location location,
String className, Kind kind) throws IOException {
JavaFileObject result;
if (StandardLocation.CLASS_OUTPUT == location && Kind.CLASS == kind) {
result = outputMap.get(className);
if (result == ... | 3 |
public DNode getLast() throws IllegalStateException{
if(isEmpty()) throw new IllegalStateException("List is empty");
return trailer.getPrev();
} | 1 |
public void endTurn()
{
for (Unit unit : units) {
unit.endTurn();
}
} | 1 |
public String getName() {
return name;
} | 0 |
@Override
public synchronized void stop() throws Exception {
doStop();
} | 0 |
public void getTicketContents(String ticketId) {
data = new HashMap<String, String>();
try {
if(user != null && pass != null) {
Authenticator.setDefault(new TracAuthenticator());
}
URL url = new URL(prop.getProperty("trac_url") + combo.getSelectedItem() + "/ticket/" + ticketId... | 9 |
public String listSocials(Session viewerS, List<String> commands)
{
WikiFlag wiki = getWikiFlagRemoved(commands);
final StringBuilder buf=new StringBuilder("^xAll Defined Socials: ^N\n\r");
final int COL_LEN=CMLib.lister().fixColWidth(18.0,viewerS);
int col=0;
Set<String> baseDone = new HashSet<String>();
... | 9 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
answersGroup = new javax.swing.ButtonGroup();
mainPanel = new javax.swing.JPanel();
eventsPanel = new javax.swing.JPanel();
ev... | 0 |
public boolean canJump(int[] A) {
int[] minJump = new int[A.length];
Arrays.fill(minJump, Integer.MAX_VALUE);
minJump[0] = 0;
int currentMax = 0;
for (int i = 0; i < A.length; i++) {
if (minJump[i] == Integer.MAX_VALUE)
break;
for (int j =... | 5 |
@Override
public void actionPerformed(ActionEvent e) {
//System.out.println("SelectNoneAction");
OutlinerCellRendererImpl textArea = null;
boolean isIconFocused = true;
Component c = (Component) e.getSource();
if (c instanceof OutlineButton) {
textArea = ((OutlineButton) c).renderer;
} else if (c in... | 6 |
int getRoomFitness(RoomScheme r){
int roomFitness = maxFitness(r);
for (Subject[] room : r.rooms) {
for (Subject room1 : room) {
if (room1.getCode() == 0) roomFitness --;
if (classCount(r, room1.getCode()) > 2) roomFitness --;
}
} return ro... | 4 |
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int length = in.nextInt();
int testCases = in.nextInt();
int[] laneWidth = new int[length];
for (int i = 0; i < length; i++) {
laneWidth[i] = in.nextInt();
}
while (testCases > 0) {
System.out.println(serLane(l... | 2 |
public static void newMap() {
Writer writer = null;
try {
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(MazeMaker.mapName), "utf-8"));
for(int y = 0; y < MazeMaker.gridSize; y++) {
for(int x = 0; x < MazeMaker.gridSize; x++) {
if(MazeMaker.border == true && (y == 0 ||... | 9 |
public Matrix4f initIdentity() {
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
int entry;
if (i == j) {
entry = 1;
} else {
entry = 0;
}
m[i][j] = entry;
}
}
return this;
} | 3 |
private void notifyListeners()
{
for (PriceListener listener : listeners)
listener.onPriceChanged(price);
} | 1 |
public SoundPlayer() {
try {
SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
} catch (SoundSystemException ex) {
oggPlaybackSupport = false;
}
try {
SoundSystemConfig.setCodec("wav", CodecWav.class);
} catch (SoundSystemException ex) {
wavPlaybackSupport = false;
}
boolean is... | 6 |
private static void simulateMove(Robot r, int x2, int y2) throws InterruptedException {
int x1 = MouseInfo.getPointerInfo().getLocation().x, y1 = MouseInfo.getPointerInfo().getLocation().y;
long starttime = System.currentTimeMillis();
while (Math.abs(x1 - x2) > 5 || Math.abs(y1 - y2) > 5) {
... | 5 |
private int startY( Side side ){
if( side == Side.SOUTH ){
return boundaries.y + boundaries.height;
}
else{
return boundaries.y;
}
} | 1 |
public static String stripTrailingBlanks(final String string) {
//// Preconditons
if (string == null)
throw new InvalidParameterException("string cannot be null");
return stripTrailing(string, ' ');
} | 1 |
protected void drawState(Graphics g, State state) {
statedrawer.drawState(g, getAutomaton(), state);
if (drawLabels) {
statedrawer.drawStateLabel(g, state, state.getPoint(),
StateDrawer.STATE_COLOR);
}
} | 1 |
private void processMoveFromHand(MouseEvent e) {
List<Card> hand = game.getHand().getList();
if (hand.size() > 0) {
final double handXGap = handXGap(hand.size());
int index = (int) ((e.getX() - handXStart()) / (handXGap + CARD_WIDTH));
activeMove = new CardMoveImpl(... | 1 |
public void cleanNotWin(){
boolean win = false;
//Controllo se c'è una mossa che mi fa vincere
for(int i=0;i<desmosse.length;i++)
if(desmosse[i]!=null)
if(desmosse[i].isWinner()){
win = true;
break;
}
System.out.println("Variabile che controlla se ci sono vincite: "+win);
//Se c'... | 7 |
public Behaviour jobFor(Actor actor) {
if ((! structure.intact()) || (! personnel.onShift(actor))) return null ;
final Choice choice = new Choice(actor) ;
//
// Return a hunting expedition. And... just explore the place. You'll
// want to make this a bit more nuanced later.
if (still != nul... | 9 |
public RelativeCombinedStream(final ArchiveDataStream[] streamsToCombine, ArchiveDataSpecification spec) {
// Siehe de.bsvrz.ars.ars.mgmt.tasks.ArchiveQueryTask.Query.maxInterval
long maxSize = Math.min(spec.getTimeSpec().getIntervalStart(), 16000);
// Erstmal alle Stream wie gewohnt verketten
ArchiveData... | 8 |
public void update() {
if (active){
vy+=Player.ACCELERATION/Level.speed();
vx=(float) Math.max(Math.min(12, vx), -12);
vy=Math.max(Math.min(7/Level.speed(), vy), -7/Level.speed());
vx*=Math.pow(.9,1/Level.speed());
x+=vx;
y+=vy;
}
} | 1 |
private Declaration declaration() throws RequiredTokenException
{
enterRule(NonTerminal.DECLARATION);
Declaration declaration = null;
try
{
if(firstSetSatisfied(NonTerminal.VARIABLE_DECLARATION))
declaration = variable_declaration();
else if(firstSetSatisfied(NonTerminal.ARRAY_DECLARATION))
decl... | 4 |
public boolean isLastRow(boolean isWhite) {
return (isWhite && this.rank == '8') || (!isWhite && this.rank == '1');
} | 3 |
protected void fireChangedMostRecentDocumentTouchedEvent(Document doc) {
changedMostRecentDocumentTouchedEvent.setDocument(doc);
for (int i = 0, limit = documentRepositoryListeners.size(); i < limit; i++) {
((DocumentRepositoryListener) documentRepositoryListeners.get(i)).changedMostRecentDocumentTouched(changed... | 1 |
static void changeLevel(Tank t) {
t.level = 55;
} | 0 |
@SuppressWarnings({ "unchecked", "rawtypes" })
public RoomBooking() {
setBackground(UIManager.getColor("CheckBoxMenuItem.selectionBackground"));
setForeground(Color.WHITE);
setFont(new Font("Cordia New", Font.BOLD, 14));
setTitle("Conference Room Booking System");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOS... | 7 |
@Override
public void run() {
//if(initConnection()) {
while(connected && !socket.isClosed()) { //read in commands
//TODO: try/catch for badly formatted commands
Command cmd = null;
try {
String inputStr = in.readLine();
if(inputStr == null) {
System.out.println("null input");
d... | 6 |
public static void main(String[] args) throws IOException, ClassNotFoundException {
System.out.println("Creating objects: ");
Blip3 b3 = new Blip3("String ", 47);
System.out.println(b3);
ObjectOutput out = new ObjectOutputStream(new FileOutputStream("Blip3.out"));
System.out.pri... | 0 |
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Object instantiate( ObjectBinder context, Object value, Type targetType, Class targetClass )
{
if( value instanceof Map && targetClass == User.class )
{
Map<String, ?> map = (Map<String, ?>) value;
User u... | 6 |
public double calculateOvershootCosts(AbstractStochasticLotSizingProblem problem, double[] periodOvershoot){
AbstractLotSizingPeriod[] periods = problem.getPeriods();
double overshoot = 0.0;
double costs = 0.0;
for (int i = 0; i < periodOvershoot.length; i++){
overshoot += periodOvershoot[i];
costs += per... | 1 |
public void flush() throws IOException
{
target.flush();
} | 0 |
private void createDragOperations(Composite parent) {
parent.setLayout(new RowLayout(SWT.VERTICAL));
final Button moveButton = new Button(parent, SWT.CHECK);
moveButton.setText("DND.DROP_MOVE");
moveButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
Button b = (... | 9 |
public ArrayList stepConfiguration(Configuration config) {
ArrayList list = new ArrayList();
PDAConfiguration configuration = (PDAConfiguration) config;
/** get all information from configuration. */
String unprocessedInput = configuration.getUnprocessedInput();
String totalInput = configuration.getInput();
... | 4 |
public static float pedir_saldo_retirar(){
float retirar=0;
do{
try{
System.out.print("Saldo a retirar => ");
BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
retirar=Float.parseFloat(stdin.readLine());
if(retirar<1){
System.out.println("El saldo a retirar debe ser mayor... | 3 |
public String readPassword()
{
String result = "";
result = SourceLoader.loadFile(PASSWORDFILE).trim();
return result;
} | 0 |
public void prepareAttributes() throws XPathException {
String selectAtt = null;
String disableAtt = null;
String separatorAtt = null;
AttributeCollection atts = getAttributeList();
for (int a=0; a<atts.getLength(); a++) {
int nc = atts.getNameCode(a);
String f = getNamePool().getClarkName(nc);
if... | 9 |
public static void editLine(Player p, String line) {
if (line == null) {
editLine = false;
editLineN = 0;
editLineText = null;
MessageManager.getInstance().info(p, t.get("t_disabledEditLine"));
return;
}
int l = 0;
try {
l = Integer.parseInt(line);
} catch (Exception e) {
MessageManager.... | 5 |
static public SolicitudCertificado instancia() {
if (UnicaInstancia == null) {
UnicaInstancia = new SolicitudCertificado();
}
return UnicaInstancia;
} | 1 |
public void copyRect(int x, int y, int w, int h, int srcX, int srcY) {
int dest = (width_ * y) + x;
int src = (width_ * srcY) + srcX;
int inc = width_;
if (y > srcY) {
src += (h - 1) * inc;
dest += (h - 1) * inc;
inc = -inc;
}
int destEnd = dest + h * inc;
while (dest != ... | 2 |
public void save(String fileName,boolean rewrite){
try{
File outFile = new File(fileName);
if(outFile.exists()&&rewrite){
if(JOptionPane.showConfirmDialog(null, "File already exists. Rewrite it?","File exits",JOptionPane.YES_NO_OPTION)==JOptionPane.NO_OPTION)
return;
}
FileWriter fw = new ... | 5 |
final Entry<V> removeEntryForKey(int key) {
int hash = hash(key);
int i = indexFor(hash, this.table.length);
Entry prev = this.table[i];
Entry e = prev;
while (e != null) {
Entry next = e.next;
if (e.key == key) {
this.modCount += 1;
this.size -= 1;
if (prev == e... | 3 |
private boolean isMatch(BSTNode<T> haysack, BSTNode<T> needle) {
// if both the nodes are null its considered as match
if(haysack == null && needle == null) {
return true;
}
// if one of them is null and other one is not .. consider it as not match
if((haysack == null... | 8 |
public void getMultiplier() throws Exception {
Object st = null;
st = JOptionPane.showInputDialog(null,
"Increase tempo by how many times?\n" +
"Please type an integer.", "File Splitter",
JOptionPane.INFORMATION_MESSAGE, null, null, "1");
... | 4 |
public void CriarCompeticao(String Nome, String escalao, Collection<String> equipa, int tipo, String torneio, String date) throws Exception {
int year = Calendar.getInstance().get(Calendar.YEAR);
if (tipo == 0) {
if (!DAOCompeticao.containsKey(escalao)) {
Competicao comp = ne... | 8 |
public void removePropertyChangeListener(PropertyChangeListener listener) {
this.riverChangeSupport.removePropertyChangeListener(listener);
for (River r: rivers) {
r.removePropertyChangeListener(this);
}
} | 1 |
public String[] interpret(String[] result, Symtab st, Taccount account) {
if (pm != null) {
result = pm.interpret(result, st, account);
} if (pmc.f != null)
result[1] += pmc.interpret(st, account);
else if (pmc.sd != null)
result[0] += pmc.interpret(st, account);
return result;
} | 3 |
public Boolean getSignForPointInSpace(Point p) throws OctNodeException {
if (p.getDimensions() != this.getDimensions())
throw new InvalidArgumentOctNodeException();
try {
if (this.getBoundingBox().pointInBox(p) == false) return false;
} catch (GeometryException ge) { thro... | 8 |
public void setPublic(final boolean flag) {
int modifiers = classInfo.modifiers();
if (flag) {
modifiers |= Modifiers.PUBLIC;
} else {
modifiers &= ~Modifiers.PUBLIC;
}
classInfo.setModifiers(modifiers);
this.setDirty(true);
} | 1 |
public boolean AttackNPC(int NPCID) {
if(server.npcHandler.npcs[npcs[NPCID].attacknpc] != null) {
int EnemyX = server.npcHandler.npcs[npcs[NPCID].attacknpc].absX;
int EnemyY = server.npcHandler.npcs[npcs[NPCID].attacknpc].absY;
int EnemyHP = server.npcHandler.npcs[npcs[NPCID].attacknpc].HP;
int hitDiff = 0;... | 7 |
private void cmdJOIN(ArrayList<String> args) {
if (status == HANDSHAKE_SUCCESFULL) {
if (args.size() >= 0 && args.size() <= 1) {
int slots = server.getBestLobby();
try {
if (args.size() == 1) {
slots = Integer.parseInt(args.get(0));
}
} catch (NumberFormatException e) {
// if args.... | 5 |
CPGreyBmp makeHorizLinesTexture(int lineSize, int size) {
CPGreyBmp texture = new CPGreyBmp(size, size);
for (int i = 0; i < size * size; i++) {
if (i / size >= lineSize) {
texture.data[i] = (byte) 255;
}
}
return texture;
} | 2 |
@Override
public int getHeight() { return height; } | 0 |
public static void main(String[] args) {
String friendsFile = "/Users/matthiasfelix/git/RecommenderSystem/RecommenderSystem/artificial/friendsA01.txt";
String ratingsFile = "/Users/matthiasfelix/git/RecommenderSystem/RecommenderSystem/artificial/";
String rootPath = "/Users/matthiasfelix/git/RecommenderSystem/R... | 7 |
private boolean isClassInFolder(String fileName)
{
String[] files;
//check if file is in the folder
files = folderFile.list();
for (int i = 0; i < files.length; i++)
{
if (this.className.equals(files[i]))
{
return true;
... | 2 |
public void endTag() throws XMLStreamException {
mDepth--;
if (!mHadText) {
eol();
} else {
mHadText = false;
}
mWriter.writeEndElement();
} | 1 |
@Override
public void keyPressed(KeyEvent ke) {
if(ke.getKeyCode() == KeyEvent.VK_LEFT){
left = true;
} else if(ke.getKeyCode() == KeyEvent.VK_RIGHT){
right = true;
}
if(ke.getKeyCode() == KeyEvent.VK_UP){
up = true;
} else if(ke.getKeyCode() == KeyEvent.VK_DOWN){
down = true;
}
} | 4 |
@Test
public void shouldReturnAreaOfTwelveForThreeByFourRectangle(){
Rectangle rectangle = new Rectangle(3, 4, 0, 0);
assertEquals(12, rectangle.area());
} | 0 |
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((accessToken == null) ? 0 : accessToken.hashCode());
result = prime * result
+ ((expireIn == null) ? 0 : expireIn.hashCode());
result = prime * result
+ ((refreshToken == null) ? 0 : refreshToken.hashCode... | 3 |
private static String m(long n, String s) {
return n + " " + s + (n == 1 ? "" : "s");
} | 1 |
@Override
public void deserialize(Buffer buf) {
position = buf.readUByte();
if (position < 0 || position > 255)
throw new RuntimeException("Forbidden value on position = " + position + ", it doesn't respect the following condition : position < 0 || position > 255");
objGid = buf.... | 4 |
public void allocateStats() {
String s;
try {
while (mc.getStatPoints() > 0) {
System.out.println("You must use all stat points.");
System.out.println("Stat Points Remaining: "
+ mc.getStatPoints());
System.out.println("... | 6 |
public void run(){
//Run until interrupted.
while(true){
try{
System.out.println("processing");
ref = queue.remove();//ref:reference to a key
res = null;
synchronized(ResourceManager.this){
res = refs.get(ref);//res:an object mapping by the key of "ref"
refs.remove(ref);
}... | 6 |
private void sysCallExec()
{
//If there is nothing to run, abort. This should never happen.
if (m_programs.size() == 0)
{
System.err.println("ERROR! syscallExec has no programs to run.");
System.exit(-1);
}
//find out which program has been ... | 6 |
protected int findClosest(Color c) {
if (colorTab == null) return -1;
int r = c.getRed();
int g = c.getGreen();
int b = c.getBlue();
int minpos = 0;
int dmin = 256 * 256 * 256;
int len = colorTab.length;
for (int i = 0; i < len;) {
int dr = r - (colorTab[i++] & 0xff);
int dg = g - (colorTab[i++] &... | 4 |
public void readMails(String folderName) {
properties = new Properties();
properties.setProperty("mail.host", "imap.gmail.com");
properties.setProperty("mail.port", "995");
properties.setProperty("mail.transport.protocol", "imaps");
session = Session.getInstance(properties,
new javax.mail.Authenticator() ... | 4 |
protected void onSetModerated(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} | 0 |
public boolean isFirstMove() {
return this.moveCount == 0;
} | 0 |
public static void recordAndIntroductionJustification(ControlFrame frame, Keyword lastmove) {
{ Vector conjuncts = ((Vector)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ARGUMENTS, null)));
Cons antecedents = Stella.NIL;
if (lastmove == Logic.KWD_UP_TRUE) {
{ ControlFrame ... | 6 |
public static void main(String[] args) throws Exception {
BeeCommandLineParser arguments = BeeCommandLineParser.parse(args);
// average available surface: 29ha
// 1ha = 10000 square meters -> 29ha = 290000 square meters ->
// sqrt(290000) approximately 540m -> Env(-270, 270, -270, 270)
BeeSimulation simulat... | 5 |
public void setMaxSize(int newMaxSize)
{
if(newMaxSize < 0)
{
System.out.println("New size must be a nonnegative integer. " +
"maxCount has not been modified.");
return;
}
if(newMaxSize == maxCount)
{
return; ... | 6 |
public double getAltitude()
{
return altitude;
} | 0 |
private boolean dupi(char[] c) {
for (int i = 0; i < c.length; i++) {
if (c[i] != ')') {
// if not closing bracket or a token
stack1.push(c[i]);
} else {
// if a closing bracket
char k = stack1.pop();
boolean tokenize = false;
while (k != '(') {
if (k != '(' || k != ')') {
to... | 6 |
private synchronized static void createInstance() {
if (instance == null) {
instance = new FamilyService();
}
} | 1 |
public static void printWithColor(String color, String message){
try{
Colores col = Colores.valueOf(color.toUpperCase());
System.out.print("\034[" + col.cod + "m" + message + "\033[30m");
}catch (IllegalArgumentException e){
System.out.println("\033\tError: " + e.getM... | 1 |
@Override
public void run( ){
while( keepDispatching ){
try{
Message event = MESSAGE_QUEUE.take();
MessageType type = event.getType();
int dispatchedCount = 0;
for( MListener listener : ELIST ){
if( listener.isSupported( type ) ){
... | 6 |
public void setId(String value) {
this.id = value;
} | 0 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.