text
stringlengths
14
410k
label
int32
0
9
public static List<String> getQuotes() { List<String> ff = new LinkedList<String>(); try { HttpURLConnection con = (HttpURLConnection) new URL("http://www.bash.org/?random").openConnection(); StringBuilder sb = new StringBuilder(); con.connect(); InputStr...
9
private void parseAttributes(ArrayList<XmlAttr> attrList) { // Sort attributes by key name Collections.sort(attrList, new Comparator<XmlAttr>() { public int compare(XmlAttr o1, XmlAttr o2) { return o1.key.compareTo(o2.key); } }); boolean added; boolean ignore; // Read and create uniques combin...
8
public Character convert(String source) { if (source.length() == 0) { return null; } if (source.length() > 1) { throw new IllegalArgumentException( "Can only convert a [String] with length of 1 to a [Character]; string value '" + source + "' has length of " + source.length()); } return source.char...
2
private static String getQualifiedName(int baseNameLength, String classPath) { logger.info("Computing fully qualified name from" + classPath + " by removing " + baseNameLength + " characters from the start"); // A plugin cannot be an internal class if ((! classPath.endsWith(".class")) || (classPath.indexO...
2
@Transactional public int update(Object o) throws DataAccessException { StringBuilder qry = new StringBuilder(); StringBuilder strFieldColumn = new StringBuilder(); StringBuilder strWherePkClause = new StringBuilder(); List<Object> val = new ArrayList<Object>(); qry.append("update "); Class<?> c = o.getCl...
8
public void serialEvent(SerialPortEvent spe) { int[] msgToChildren = NetworkProtocol.msgToChildren; if (spe.getEventType() == SerialPortEvent.DATA_AVAILABLE) {//If one byte of data came in try { byte charVal = (byte)input.read(); if (charVal == START_BYTE && dataPacketFlag == false) { //Stores start ...
9
public void calculateShortestPath() { this.parent = this.startWord; this.wordParent.put(this.startWord, this.parent); char alphabetLetter; int i; //label used for breaking loop outerLoop: while(!(this.queue.isEmpty())) { char[] splitWord = this.queue.get(0).toCharArray(); for(i = 0; i < sp...
4
public File getCsvData() { List<DataLead> leads = selectAll(); if(leads == null) { this.errorLogFile.log(LoggingProxy.ERROR, "[---]CsvProxy error. Can't get data. "); return null; } File tmp = createCsvFile(); if(tmp == null) { this.errorLogFi...
8
public List<Product> getAll() { List<Product> products = null; try { beginTransaction(); products = session.createCriteria(Product.class).list(); session.getTransaction().commit(); } catch (Exception e) { e.printStackTrace(); } finally { closeSesion(); } return products; }
1
public static List<String> getMapId(String search) { List<String> ret = new ArrayList<String>(); ret.add("<<MapId Search: " + search + ">>"); MapleData data; MapleDataProvider dataProvider = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/...
5
public HBox initHeader(String titleText) { HBox header = new HBox(); header.setAlignment(Pos.CENTER_LEFT); header.getStyleClass().add("popUpHeader"); header.setPrefHeight(28); Button closeBtn = new Button(); closeBtn.getStyleClass().add("close-button"); closeBtn.setPrefSize(16, 16); closeBtn.setMinSize...
0
public float getMinGain() { float gainMin = -9999.0f; if (audioDevice instanceof JavaSoundAudioDevice) { JavaSoundAudioDevice jsAudio = (JavaSoundAudioDevice) audioDevice; gainMin = jsAudio.getMinGain(); } return gainMin; }
1
public void moveToEx(float x, float y, int random) throws IOException { LOG.debug("Moving to {} {} (and waiting until we reach it, until we're blocked or dead)"); int blocked = 0; int status = this.getMapLoading(); this.moveEx(x, y, random); pingSleep(0); float distance...
6
private static void ForWithContinue() { int[] numbers = { 10, 20, 30, 40, 50 }; System.out.println("Begin of ForWithBreak"); for (int x : numbers) { if (x == 30) { continue; } System.out.print(x); System.out.print("\n"); } System.out.println("End of ForWithContinue"); System.out.println("\n"...
2
private void findExits() throws SlickException { Collections.sort(plan); Integer idchoose = 0; int possibility = MIN_CHOISABLE; int MinDistance = MIN_DISTANCE_TO_EXIT; for (int i = 0; i < exitNumber; i++) { // Pour le nombre de sortie de la // zone boolean goodChoice = false; int tryCounter ...
5
public Game(FullGridFactory gridFactory) { if (gridFactory == null) throw new IllegalArgumentException("Gamefacotry can't be null!"); this.gridFactory = gridFactory; init(); powerFailureFactory = gridFactory.getPowerFailureFactory(); }
1
BaseColor getBadgeBackgroundColor() { String badgeBackgroundColorString = null; if (detectBadgeTypeFromName) { final String adultLeaderBadgeTag = PropertyFileReader.getProperty( "adultLeaderBadgeTag", "A_"); final String youthCounselorBadgeTag = PropertyFileReader .getProperty("youthCounselorBadgeTa...
6
public void filter(byte[] samples, int offset, int length) { for (int i=0; i<filters.length; i++) { filters[i].filter(samples, offset, length); } }
1
public void clearControllers() { // Reset the ArrayList activeControllers = new ArrayList<JInputController>(); }
0
public byte[] addHeaders(byte[] data) { List<Byte> result = new ArrayList<Byte>(); // Header byte result.add((byte)0x03); // Timestamp long timediff = System.currentTimeMillis() - startTime; result.add((byte)((timediff & 0xFF0000) >> 16)); result.add((byte)((timediff & 0x00FF00) >> 8)); result.add((b...
4
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int len = Integer.parseInt(br.readLine()); String[] l = br.readLine().split(" "); String[] p = br.readLine().split(" "); int[][] result = new int[len][len]; for (int i = 0; i...
6
@Override public void actionPerformed(ActionEvent e) { if (e.getSource() == kuldesGomb) { kuldes(); } else if (e.getSource() == manualisOktatasMenupont) { manualisOktatasAblakMegnyitas(); } else if(e.getSource() == mentesMenupont){ tudastarMentese(); ...
7
private void nextTurn() { if (this.currentPlayerTurn == 1) { // Minimum 2 players, so always change to P2. this.currentPlayer = this.P2; // Change from P1 to P2 this.currentPlayerTurn = 2; return; } if (this.currentPlayerTurn == 2) { if (this.numPlayers == 2) { // If 2 players, go back to P1. Otherwi...
8
public InputFileChooserView() { display = new Display(); shell = new Shell(display); Monitor primary = display.getPrimaryMonitor(); Rectangle r = primary.getBounds(); shell.setBounds((int) (r.width * 0.1), (int) (r.height * 0.1), (int) (r.width * 0.8), (int) (r.height * 0.8)); Point shellSize = shell.ge...
8
@Override public boolean onKeyUp(int key) { Iterator<IScreenItem> it = screenItems.iterator(); while(it.hasNext()) { IScreenItem item = it.next(); if(item.onKeyUp(key)) { return true; } } return false; }
2
static protected Location parseLocationLine(String line) { if(log.isDebugEnabled()) log.debug("parseLocationLine:" + line); String latitude, longitude; int latitudeSign = 1, longitudeSign = 1; if(log.isDebugEnabled()) log.debug("line:" + line); latitude = line.replaceAll("^.*LATITUDE ", ""); lat...
4
@Test public void testLoadMemory() { Data[] testArray = new Data[2]; testArray[0] = testInstr; Instruction testInstr2 = new BranchInstr(Opcode.BRZ, 5); testArray[1] = testInstr2; memory.loadMemory(testArray); for (int i = 0; i < 2; i++) { assertEquals(testArray[i], memory.accessAddress(i)); } ...
1
public void reserveSmallConstants(GrowableConstantPool gcp) { for (int i = 0; i < fields.length; i++) fields[i].reserveSmallConstants(gcp); for (int i = 0; i < methods.length; i++) methods[i].reserveSmallConstants(gcp); }
2
@Override public int fight() { return super.fight(); }
0
@Override public void Consultar() throws SQLException { try { Conexion.GetInstancia().Conectar(); ResultSet rs = Conexion.GetInstancia().EjecutarConsulta("SELECT Nom_Cliente,Dir_Cliente,Tel_Cliente,Ape_Cliente ,Email_Cliente,Tip_Cliente,SalPen_Cliente FROM Cliente WHERE ...
2
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 void testRowCount() { DataSet ds = null; try { final DelimitedColumnNamesInFile testDelimted = new DelimitedColumnNamesInFile(); ds = testDelimted.getDsForTest(); // check that we parsed in the right amount of rows assertEquals(6, ds.getRowCount(...
1
public static ArrayList<History> showHistory() { ArrayList<History> histories = new ArrayList<History>(); Database db = dbconnect(); try { db.prepare("SELECT * FROM ticket_history ORDER BY changed_on desc"); ResultSet rs = db.executeQuery(); while(rs...
2
private Color stripColor(ColorRGB colorInfo) { colorInfo.setR(colorInfo.getR() < 0 ? 0 : colorInfo.getR() > 1 ? 1 : colorInfo.getR()); colorInfo.setG(colorInfo.getG() < 0 ? 0 : colorInfo.getG() > 1 ? 1 : colorInfo.getG()); colorInfo.setB(colorInfo.getB() < 0 ? 0 : colorInfo.getB() > 1 ? 1 : colorInfo....
6
@DBCommand public boolean delete(CommandSender sender, Iterator<String> args) { if(!sender.hasPermission("db.delete")) { sender.sendMessage(RED + "You don't have permission to use this command!"); return true; } if(!args.hasNext()) { sender.sendMessage("No...
2
public void event() { }
0
public static void validateNumericType(Number number) { if (!(number instanceof Integer) && !(number instanceof Double) && !(number instanceof Long)) { throw new RuntimeException("Unsupported Number type: " + number.getClass().toString()); } }
3
@Override public void update(Observable arg0, Object arg1) { //arg1 ist der name (String) des Spielers der den schauen Befehl ausgeführt hat. if(arg1 == null) try { sendeAenderungenAnAlle(); } catch(RemoteException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } el...
3
@Override public void keyPressed(KeyEvent e) { // this.editor.textPane.setText(""); // this.editor.textPane.setText(""+e.getKeyCode()); if(e.getKeyCode() == 17) this.editor.strgPressed = true; else if(this.editor.strgPressed && e.getKeyCode() == 120) th...
9
private Message collectMessageFromR(int r) { while (true) { if (isSuspect(r)) { // r is been suspected, no need to block any further return null; } // try to receive the message synchronized (valMessages) { if(valMessages.containsKey(r)){ return valMessages.get(r); } } try { ...
4
private void resetLabels() { for (JLabel label : labels) { //label.setBorder(BorderFactory.createLineBorder(Color.white)); label.setFont(new java.awt.Font("Tahoma", 0, FONT_SIZE)); label.setMaximumSize(LABEL_SIZE); label.setMinimumSize(LABEL_SIZE); lab...
1
public void adjustWater() { for(Molecule mole : getMolecules()) if(mole instanceof Water) mole.setScale(((temp-250)/200.0)*20.0+1); }
2
@Override public void execute(Game game, HashMap<String, String> strings, Entity target) throws ScriptException { if (game.getPlayer().menuOpen) { System.out.println("What?"); } else { PokedexPage p = PokedexPage.newMenu(game, game.getWorld(), Pokemon.getPokemon(parseString(args[0], strings))); game.getPl...
2
public void startWithComputer() { System.out.println(WELCOME_MESSAGE); gameField.showField(); int maxMoves = (int)Math.pow(gameField.getFieldSize(),2) + 1; while(!gameField.checkWin() && move != maxMoves) { if (move % 2 != 0) { int x = requestX(); ...
9
public ArrayList<ArrayList<Integer>> pathSum(TreeNode root, int sum) { if (root == null) return res; Stack<Integer> stk = new Stack<Integer>(); stk.push(root.val); pathSumRec(root, sum, stk); return res; }
1
public void setDestination(Teleporter destination) { if (destination == null || destination == this) throw new IllegalArgumentException("The given Teleporter is invalid!"); if (this.destination != null) throw new IllegalStateException("Destination is already set!"); this.destination = destination; }
3
@Override public void updateRecord() { comps = null; byte[] first = firstPtg.getRecord(); byte[] last = lastPtg.getRecord(); // KSC: this apparently is what excel wants: if( wholeRow ) { first[5] = 0; } if( wholeCol ) { first[3] = 0; first[4] = 0; } // the last record has an extra ident...
5
private boolean jj_3R_49() { if (jj_3R_61()) return true; return false; }
1
@Override public void actionPerformed(ActionEvent e) { OutlinerDocument doc = (OutlinerDocument) Outliner.documents.getMostRecentDocumentTouched(); OutlinerCellRendererImpl textArea = doc.panel.layout.getUIComponent(doc.tree.getEditingNode()); if (textArea == null) { return; } Node node = textArea.n...
3
public void draw(Graphics g) { switch (gamestate) { case 0: menu.draw(g); break; case 1: world.draw(g); break; default: break; } g.drawImage(cursor, Keyboard.getMouseX() - 8, Keyboard.getMouseY() - 8, null); }
2
public static Matrix multiply(Matrix matrixA, Matrix matrixB) throws IllegalSizesException, MatrixIndexOutOfBoundsException, IncorrectFormatOfData { Matrix matrixC = null; int rowsA = matrixA.getRowsCount(); int colsA = matrixA.getColsCount(); int rowsB = matrixB.getRowsCou...
8
private int readBytes(byte[] b, int offs, int len) throws BitstreamException { int totalBytesRead = 0; try { while (len > 0) { int bytesread = source.read(b, offs, len); if (bytesread == -1) { break; } totalBytesRead += bytesread; offs += bytesread; len -= bytesread; }...
3
public Color getColorForDisk(int num) { try { byte[] bytesOfMessage = String.valueOf(num).getBytes(); MessageDigest md = MessageDigest.getInstance("MD5"); byte[] d = md.digest(bytesOfMessage); return new Color((int)d[0] + 128, (int)d[1] + 128, (int)d[2] + 128)...
1
public String getPrecisionAff() { // On renvoie des mots compréhensibles (en fonction des infos données sur le site officiel) switch (this.precision) { case "3": return "Très bonne"; case "2": return "Bonne"; case "1": r...
6
private void showP(File file) { try { p = DataIO.properties(new FileReader(file), "Parameter"); List<String> dims = DataIO.keysByMeta(p, "role", "dimension"); List<String> dims2d = DataIO.keysForBounds(p, 2); dimCombo.removeAllItems(); dimCombo.addItem...
3
public static JSONObject toJSONObject(String string) throws JSONException { String n; JSONObject o = new JSONObject(); Object v; JSONTokener x = new JSONTokener(string); o.put("name", x.nextTo('=')); x.next('='); o.put("value", x.nextTo(';')); ...
3
public void setThirdCorner(Rectangle thirdCorner) { this.thirdCorner = thirdCorner; }
0
public void testToStandardMinutes_overflow() { Duration test = new Duration(((long) Integer.MAX_VALUE) * 60000L + 60000L); try { test.toStandardMinutes(); fail(); } catch (ArithmeticException ex) { // expected } }
1
@Deprecated public static void loadLevel(String title, GameContainer gc) throws SlickException { nodes = new ArrayList<Node>(); wires = new ArrayList<Wire>(); Scanner scan = new Scanner(Level.class.getClassLoader().getResourceAsStream("levels.dat")); // find header for level String next; do { next =...
6
public Stack() {}
0
@Override public void run(){ Random random = new Random(); driveTime = 0; startTime = System.currentTimeMillis(); for(int i = 0; i < laps; i++){ int lapTime = random.nextInt(100); driveTime += lapTime; try { Thread.sleep(lapTime); } catch (InterruptedException e) { interrupt(); crashed ...
3
public void getAlternateLabel(StringBuffer s) throws Exception { //StringBuffer s = new StringBuffer(); FastVector tmp = (FastVector)m_ranges.elementAt(0); if (m_classObject != null && m_training.classAttribute().isNominal()) { s.append("Classified by " + m_classObject.getClass()...
9
@Override public Result findSimilarTo(Signal signal) throws RemoteException { boolean finished = false; while (!finished) { waitForBalacing.acquireAndRelease(); receivedSignals.incrementAndGet(); if (channel.isConnected()) { List<Future<Result>> futureResults = new ArrayList<>(); List<Res...
8
public SynthesisFilter(int channelnumber, float factor, float[] eq0) { if (d==null) { d = load_d(); d16 = splitArray(d, 16); } v1 = new float[512]; v2 = new float[512]; samples = new float[32]; channel = channelnumber; scalefactor = factor; setEQ(eq); //setQuality(HIGH_QUALI...
1
public void update() { up = keys[KeyEvent.VK_UP] || keys[KeyEvent.VK_W]; down = keys[KeyEvent.VK_DOWN] || keys[KeyEvent.VK_S]; left = keys[KeyEvent.VK_LEFT] || keys[KeyEvent.VK_A]; right = keys[KeyEvent.VK_RIGHT] || keys[KeyEvent.VK_D]; if (up) direction = 0; else if (right) direction = 1; else if (down)...
8
public String request(String method, String path, Response data, Map<String, String> options) { HttpURLConnection connection = null; String answer = null; try { StringBuffer sb = new StringBuffer(); sb.append("?api_key=" + apiKey); if(method.equals("GET")) { sb.append(prepareGet(data)); } ...
5
private FloatingPoint getOperatorValue(TokenOperator token, FloatingPoint[] values) { FloatingPoint floatingPoint = null; // TODO Implement new way to caculate floating point number without // using Float String original = token.getOriginal(); float value = 0.0f; if (original.equals("*")) { value = ...
5
protected void setHandler(Handler handler){ if (handler==null) this.handler=new DefaultHandler(); else this.handler=handler; }
1
public static ArrayList<String> getVoteSummary(Proposal proposal) { // Create an index of options -> numVotes Map<Integer, Integer> voteCount = new HashMap<Integer, Integer>(); VoteModel voteModel = new VoteModel(); for (Integer i : proposal.getVotes()) { Vote vote = (Vote) ...
3
public CheckResultMessage checkL1(int day) { return checkReport.checkL1(day); }
0
private static int converterComando(String cmd) throws Exception { cmd = cmd.toLowerCase(); if (cmd.equals("mover")) return 1; if (cmd.equals("olhar")) return 2; if (cmd.equals("atacar")) return 3; if (cmd.equals("largar")) return 4; if (cmd.equals("pegar")) return 5; throw new Exception("C...
5
private static Box initialize() { Box[] nodes = new Box[7]; nodes[1] = new Box(1); int[] s = {1, 4, 7}; for (int i = 0; i < 3; ++i) { nodes[2] = new Box(21 + i); nodes[1].add(nodes[2]); int lev = 3; for (int j = 0; j < 4; ++j) { ...
2
public ByteBuffer readBuf() { ByteBuffer buf = readBuf; buf.flip(); buf.position(readPos); if (buf.remaining() == 0) { if (bufs.isEmpty()) { // There's nothing to read, so we won't return this buffer. // We can clear it just in case... readBuf.clear(); readPos = 0; return null; } else ...
3
public void advice(String msg) { System.out.println("Called ..." + LoggerUtils.getSig() + "; msg:" + msg); }
0
public void mouseDown(MouseEvent e) { if(e.getButton() == e.BUTTON1) { for(UIContent content : Contents) { content.contentMouseDown(e); } } }
2
@Override public Value run(CodeBlock b) throws InterpreterException { if (args_ != null || getArgsNumber()==0) { Value[] vals = new Value[getArgsNumber()]; for (int i = 0; i < vals.length; i++) { vals[i] = args_[i].run(b); } try { Value v = function_.evaluate(vals); return v; } catch (Exce...
4
protected String processTmplFile(File inFolder, File file) throws IOException { final String template = FileUtils.readFileToString(file); Map<String, String> parameters = new HashMap<>(); Map<String, String> dependencies = listReferencedFiles(template); Map<String, String> imagesDepend...
5
protected void createDdlProcedure(Connection connection2) { BufferedReader br = null; try { StringBuilder sql = new StringBuilder(); FileReader fr = new FileReader("rev_tbl.sql"); br = new BufferedReader(fr); String line = null; Statement statement = connection.createStatement(); while ((line = br...
8
public void convertToSlopeIntersect(){ if (_y == 0){ if (_x != 1){ _c /= _x; _x = 1; } } else if (_y != 1){ _x /= _y; _c /= _y; _y = 1; } }
3
public void randomPrefabFromFile(int x, int y) throws IOException{ String path = "data/houses.pfl"; FileInputStream in = new FileInputStream(path); Random rand = new Random(System.currentTimeMillis()); int cPrefabs = in.read(); long skip = rand.nextInt(cPrefabs); skip = (skip * 24 * 24) + (skip * 2); ...
2
void updateAnsSet(String s, int a, int b) { for (int i = 0; i < checkSet.length; i++) { if (!checkSet[i]) { continue; } if ((getA(s, answerSet[i]) != a) || (getB(s, answerSet[i]) != b)) { checkSet[i] = false; } } }
4
public static String getIpAddr() { HttpServletRequest request = BaseAction.getHttpServletRequest(); String ip = request.getHeader("x-forwarded-for"); if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { ip = request.getHeader("Proxy-Client-IP"); } if (ip == null || ip.length() == 0 || "u...
9
public static void OPNB_ADPCM_CALC_CHA( YM2610 F2610, ADPCM_CH ch ) { int/*UINT32*/ step; int data; ch.now_step += ch.step; if ( ch.now_step >= (1<<ADPCM_SHIFT) ) { step = ch.now_step >> ADPCM_SHIFT; ch.now_step &= (1<<ADPCM_SHIFT)-1; /* end check */ if ( (ch.now_addr+step) > (ch.end<<1) ) { ch.flag = ...
8
public String getItemTypeName() { String n = ""; if(itemType != null) { n = itemType.getName(); } return n; }
1
public static java.util.List<Puntaje> leer(int numerDeDiscosDeseado, boolean porMovimientos) { BufferedReader br = null; FileReader fileWriter = null; File file; java.util.List<Puntaje> puntuaciones = new LinkedList<Puntaje>(); try { file = new File(RUTA); ...
7
public static void saltar() { file = new File("."); ruta = file.getAbsolutePath(); Thread hilo = new Thread() { @Override public void run() { try { Thread.sleep(1); FileInputStream fis; Player pla...
2
private static ArrayList<Score> createScores(String scores) { if(scores == null) { return null; } ArrayList<Score> list = new ArrayList<Score>(); String[] scoreList = scores.split(";"); for(String s : scoreList) { String[] s2 = s.split(":...
2
public static void main(String[] args) { final String path = "C:\\Users\\Ferium\\Documents\\NetBeansProjects\\Netlife\\src\\Files\\sample.txt"; // Checks boolean tests from the Units class boolean test1 = Units.CheckGetCommandList(path); System.out.println("Test 1: " + test1); ...
4
public FileAttribute getFileAttribute(String lfn) { // check first int rcID = getReplicaCatalogueID(); if (rcID == -1 || lfn == null) { return null; } int eventTag = DataGridTags.CTLG_GET_FILE_ATTR; FileAttribute fAttr = null; // sends a request ...
3
public static void main(String[] args) { // Create Display try { Display.setDisplayMode (new DisplayMode(800, 600)); Display.create (); Display.setTitle("Hello!!"); } catch (LWJGLException ex) { Logger.getLogger(LWJGL_Example2.cl...
7
protected final Archive createArchive() throws Exception { ProtectionDomain protectionDomain = getClass().getProtectionDomain(); CodeSource codeSource = protectionDomain.getCodeSource(); URI location = (codeSource == null ? null : codeSource.getLocation().toURI()); String path = (location == null ? null : locat...
5
@Test public void findHandFromCardSet_whenThreePairsExist_returnsHighestTwoPair() { Hand hand = findHandFromCardSet(twoKingsTwoQueensTwoJacksSix()); assertEquals(HandRank.TwoPair, hand.handRank); assertEquals(Rank.King, hand.ranks.get(0)); assertEquals(Rank.Queen, hand.ranks.get(1)); assertEquals(Rank.Jack, ...
0
private static TileFlip extractFlipRaw(long item) { long t = item; if (isSet(t, true, true, true )) return TileFlip.HVD; else if (isSet(t, true, true, false )) return TileFlip.HV; else if (isSet(t, true, false, true )) return TileFlip.HD; else if (isSet(t, true, false, false )) return T...
7
@Override @Execute public void postLogic(IChassis chassis) { if(!GL11.glGetBoolean(GL11.GL_TEXTURE_2D)) GL11.glDisable(GL11.GL_TEXTURE_2D); if(this.camera != null) this.camera.applyMatrices(); Iterator<GUIElement> it = this.guiElements.values().iterator(); while(it.hasNext()) { GUIElement element = it.nex...
4
public Map<Integer, Integer> rand() { int[] tem = new int[MAX]; boolean b; for (int key = 0; key < MAX; key++) { b = true; int element = (int) (Math.random() * MAX + ONE); for (int t = 0; t < MAX; t++) { if (element == tem[t] && key > 0) { key = key - 1; b = false; } } if (b) { ...
5
private void jButtonOpretKundeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOpretKundeActionPerformed String fornavn = jTextFieldFornavn.getText(); String efternavn = jTextFieldEfternavn.getText(); String navn = fornavn + " " + efternavn; String adresse = jTe...
6
final int method2571(int i, int i_48_, int[] is, String string, int i_49_, int i_50_, RasterToolkit[] class105s, int i_51_, int i_52_, Random random) { try { anInt4047++; if (string == null) return 0; random.setSeed((long) i_48_); int i_53_ = (random.nextInt() & 0x1f) + 192; method25...
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
@Override public void run() { double time = System.currentTimeMillis(); try { isDrawing.acquire(); } catch (InterruptedException ex) { Logger.getLogger(RedrawRoutine.class.getName()).log(Level.SEVERE, null, ex); System.exit(...
5
private static String date_format(double t, int methodId) { StringBuffer result = new StringBuffer(60); double local = LocalTime(t); /* Tue Oct 31 09:41:40 GMT-0800 (PST) 2000 */ /* Tue Oct 31 2000 */ /* 09:41:40 GMT-0800 (PST) */ if (methodId != Id_toTimeString) { ...
8