text
stringlengths
14
410k
label
int32
0
9
@Inject public void setJobFactory( JobFactory jobFactory ) throws SchedulerException { scheduler.setJobFactory( jobFactory ); }
0
public EntityLightningBolt(World par1World, double par2, double par4, double par6) { super(par1World); this.setLocationAndAngles(par2, par4, par6, 0.0F, 0.0F); this.lightningState = 2; this.boltVertex = this.rand.nextLong(); this.boltLivingTime = this.rand.nextInt(3) + 1; ...
7
public Image complete() { Image completed = original.shallowClone(); for (Cluster cluster : clusters) { for (Point p : cluster.points) { completed.setPixel(p, RED, cluster.mean.x); completed.setPixel(p, GREEN, cluster.mean.y); completed.setPixel(p, BLUE, cluster.mean.z); } } return completed; ...
2
public int findTwoBiggestDistinct(int[] arr) { if (arr.length < 2) { //no such numbers System.out.println("no such numbers"); return arr[0]; } int big1 = arr[0]; int big2 = arr[1]; int i = 2; while (i < arr.length && big1 == big2) { big2 = arr[i]; i++; } if (big1 != big2) ...
9
public void placeOrder(TradeOrder order) { Trader t = order.getTrader(); String msg = "New order: "; if (order.isSell()) { msg += "Sell "; } else { msg += "Buy "; } msg += this.symbol; if (!"".equals(this.companyName)) { msg += " (" + this.companyName + ")\n"; } msg += order.getSh...
4
public ArrayList<Item> createArrayList(int items) { ArrayList<Item> array = new ArrayList<Item>(); for (int i=0;i<items;i++) { Item item = genItem(i,items); array.add(item); } return array; }
1
@Override public boolean test(String value) { // TODO Auto-generated method stub if(value == null || value.equals("")) return true; else if( value.length() != 3) { return false; } else { char c1 = value.charAt(0); char c2 = value.charAt(1); char c3 = value.charAt(2); if( Character.isDigit(c...
6
@Override public int getBits() { // TODO Auto-generated method stub return 0; }
0
private boolean impossibleAlmostMill(GameBoard board, GamePiece p, Team other){ int pNext = (p.getP()+1) % 8; //next spot on the ring int pPrev = p.getP()-1; //p minus one mod eight if (pPrev < 0) { pPrev+=8; } //--MILL DETECTION--------------------------------------- if(p.getP() % 2 == 0) { ...
9
@Override public Class getColumnClass(int column) { Class returnValue; if ((column >= 0) && (column < getColumnCount())) { if(getValueAt(0, column)==null) return String.class; returnValue = getValueAt(0, column).getClass(); ...
3
public static void main(String[] args) { int[][] arr ={{1,2,3,4},{5,0,7,8},{9,10,11,12},{13,14,15,16}}; for(int[] a : arr){ for(int b : a){ System.out.print(b); System.out.print(' '); } System.out.println(); } setZero(arr); for(int[] a : arr){ for(int b : a){ System.out.print(b); ...
4
public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; g2.setColor(Color.black); for(int row = 0; row < game.getBoard().getLength(); row++){ for(int col = 0; col < game.getBoard().getWidth(); col++){ Rectangle rec = new Rectangle(col *23,row*23,23,23); if(game.getBoard().getValue(...
9
public void initWorld() { if(restart) {//The player has restarted the game /*Reset the level counter*/ levelNumber = 0; /*Load the first level*/ loadNextLevel(); /*Reset the paddle's position*/ Paddle paddle = player.getPaddle(); paddle.setXPos(paddleStartX); paddle.setYPos(paddleStartY); /...
4
public static int candy(int[] ratings) { if (ratings == null && ratings.length == 0) { return 0; } if (ratings.length == 1) { return 1; } int[] tables = new int[ratings.length]; tables[0] = 1; for (int i = 1; i < ratings.length; i++) { ...
9
public boolean inBounds(int x2, int y2){ //If we clicked the object if(x2 >= x && x2 <= x+bwidth && y2 >= y && y2 <= y+bheight){ return true; } return false; }
4
private void b_loginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_b_loginActionPerformed if ("".equals(f_login.getText()) || "".equals(String.valueOf(f_password.getPassword()))) { JOptionPane.showMessageDialog(rootPane, "Digite seu login e senha para Continuar!", "CadoreSis...
8
private int getCmd(String command) { try { if (command.equals("/rg")) { return 0; } else if (command.equals("/l")) { return 1; } else if (command.equals("/cmd")) { return 2; } else if (command.equals("/q")) return 3; } catch (Exception e) { System.out.println(e.getMessage()); } r...
5
private void paintList(Graphics g, List highlights) { int len = highlights.size(); for (int i = 0; i < len; i++) { HighlightInfo info = (HighlightInfo)highlights.get(i); if (!(info instanceof LayeredHighlightInfo)) { // Avoid allocating unless we need it. Rectangle a = textArea.getBounds(); Inse...
6
private boolean istGueltigePosition(int x, int y) { return (x >= 0 && x < _arraySpaltenzahl && y >= 0 && y < _arrayZeilenzahl); }
3
public static String [] partitionOptions(String [] options) { for (int i = 0; i < options.length; i++) { if (options[i].equals("--")) { // ensure it follows by a -E option int j = i; while ((j < options.length) && !(options[j].equals("-E"))) { j++; } /* if (j >= options.length) { return new...
7
public boolean camposobrigatoriospreenchidos() { if (TfDescOperacao.getText().equals("")) { msg.CampoObrigatorioNaoPreenchido(LbNotificacao, "Digite a descrição desta operação!"); TfDescOperacao.grabFocus(); return false; } if (TfCodFuncionario.getText().equal...
9
public void testSetInterval_RInterval3() { MutableInterval test = new MutableInterval(TEST_TIME1, TEST_TIME2); try { test.setInterval(null); fail(); } catch (IllegalArgumentException ex) {} }
1
private static long largestPrimeFactor(long number) { // If number is less than 2 then simple return -1 if (number < 2) { return -1; } // If number is 2 or 3 then simply return the number if (number == 2 || number == 3) { return number; } // Start factoring from smallest prime number which is 2 ...
7
public PhotoList<Photo> getRecentForContacts(Date lastComment, ArrayList<String> contactsFilter, Set<String> extras, int perPage, int page) throws FlickrException { PhotoList<Photo> photos = new PhotoList<Photo>(); Map<String, Object> parameters = new HashMap<String, Object>(); param...
9
public void checkSolution( Contestant submitter , String solution ) { try { //determine the cards that must be used String cards = ""; for ( int i = 0 ; i < this.m_cards.length ; i++ ) { cards += this.m_cards[ i ] + " "; } cards = cards.trim(); //check the user's solution Process runC...
8
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Oven other = (Oven) obj; if (temperature != other.temperature) { return f...
8
public static Properties loadConfig() throws IOException { File configFile = new File("config.properties"); if (!configFile.exists()) { configFile.createNewFile(); } FileInputStream configInputStream = new FileInputStream(configFile); Properties configProperties = new Properties(); configProperties.load(...
6
@Test public void test_squareContentSprite(){ assertNotNull(board); ArrayList<Pawn> pawns = getAllPawn(board); //if current Pawn assertEquals(board.squareContentSprite(pawns.get(0).getX(), pawns.get(0).getY()), 'c'); board.removeAllPawns(); numberOfPawns=0; ...
0
public void nonStaticMain(String[] args) { if (args.length == 0) args = new String[] { "help" }; String command = args[0]; String[] args2 = new String[args.length - 1]; for (int i = 1; i < args.length; i++) args2[i - 1] = args[i]; // Figure out which ha...
9
@Override public String getHouseNumber() { return super.getHouseNumber(); }
0
static public BigInteger det(final BigInteger[][] A) throws ArithmeticException { BigInteger d = BigInteger.ZERO ; /* row size */ final int rL = A.length ; if ( rL == 0 ) throw new ArithmeticException("zero row count in matr...
7
private void initGUI() { mnuItemSave.setEnabled(true); Dimension d = new Dimension(132, 20); lblGeneral.setPreferredSize(d); lblContestants.setPreferredSize(d); lblPlayers.setPreferredSize(d); lblBonus.setPreferredSize(d); conPanel = new ContestantPanel(); playerPanel = new PlayerPanel(); bonusPanel...
3
public void body() { // get the destination entity ID this.destID_ = GridSim.getEntityId(destName_); int packetSize = 500; // packet size in bytes Sim_event ev = new Sim_event(); // an event // a loop waiting for incoming events while ( Sim_system.runn...
5
@Override public boolean willAcceptFirstEnvelope(Envelope e1, Envelope e2) { boolean numberAccepted; double p1 = mRandom.nextTrueDouble(); double p2 = mRandom.nextTrueDouble(); if (p1 > p2) { double tmp = p2; p2 = p1; p1 = tmp; } do...
4
private void myRepaint() { Graphics2D graphics = (Graphics2D) canvas.getBufferStrategy().getDrawGraphics(); graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, //Enable antialiasing RenderingHints.VALUE_ANTIALIAS_ON); if (keys[0]) { yDraw -= MOVE_SPEED; } ...
5
protected void incrementAge(){ age +=1; if (!mature && !thirsty && age + Math.random()*maturationRandomMax >= maturationThreshhold){ mature = true; } else if (Math.random() < productionChance && !thirsty && mature) harvestable = true; if (Math.random() < thirstyChance) thirsty = true; }
7
public Boolean isEmpty() { return (counter == 0) ? true : false; }
1
public static void setCurrentTrack(Track newCurrent) { if(newCurrent == null) return; MediaPlayer oldCurrent = currentPlayback; currentTrack = newCurrent; String trackPath = "file:///" + newCurrent.get("filepath").replace("\\","/"); try { trackPath = par...
4
public void ExecuteTaskPeriodically(int amount, int UnitTime, TimerTask task) { long ExecutionTime = 0; switch (UnitTime) { case HOURS: ExecutionTime = amount * oneHour; break; case MINUTES: ExecutionTime = amount ...
4
public State getState() { return state; }
0
public String validaDatosArticulo(String codigoArticulo, String descripcion,String proveedor) { String errorLog =""; Articulo articuloValida = new Articulo(true); Long tmpCodigoArticulo = null; Float tmpPrecioVenta = null; Float tmpPrecioCompra = null...
8
@Override public String executer(HttpServletRequest req) throws CommandeException { Facade f = new Facade(); DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); ClientBean cb = new ClientBean(); if (((String) (req.getParameter("creerClient"))) != n...
7
private void grabOSArchitecture() { if (Main.VERBOSE) { System.out.println("[INFO] Determining OS architecture..."); } String arch = "32 Bit"; if(isWindows) { if(new File("C:\\Program Files (x86)").exists()) { arch = "64 Bit"; } ...
9
private int[] termCoefficient(String term){ String firstChar = term.charAt(0) + ""; if(!term.contains("x") && !term.contains("/")){ int result[]={Integer.parseInt(term),1}; return result; } if(!term.contains("/")){ if(firstChar.equals("x") || t...
8
private static String decrypt(final int key, final String text) { String decryptedText = ""; logger.log(Level.INFO, "Encrypted text: {0}", text); char temp[] = new char[text.length()]; int c = 0; for (int level = 0; level < key; level++) { for (int n = 0; n < text.len...
7
private String updateBasedOnPop(){ String pop = (String)navigationStack.pop(); if(pop.equals("person")){ if(!personStack.isEmpty()){ updatePersonCard((Person)personStack.pop()); } } else if(pop.equals("movie")){ if(!movieStack.isEmpt...
4
@Override public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException { // onBar1(instrument, period, askBar, bidBar); onBar2(instrument, period, askBar, bidBar); // 日付 // String date = DATEFORMAT.format(new Date(askBar.getTime())); // if (this.aliveOrder != null &...
0
public AwesomeThresholdingMenu() { super("Video threshold"); setEnabled(true); JMenuItem awesomeImage = new JMenuItem("Single Image"); JMenuItem awesomeImageNotMerged = new JMenuItem( "Unmerged Single Image"); JMenuItem awesomeVideo = new JMenuItem("Video"); JMenuItem unmerged = new JMenuItem("Unmerge...
2
public int getGameAction(int keyCode){ Integer ga = ((Integer) gameActions.get(new Integer(keyCode))); if (ga != null){ return ga.intValue(); } switch(keyCode){ case DEFAULT_KEYCODE_UP: return Canvas.UP; case DEFAULT_KEYCODE_DOWN: return Canvas.DOWN; ...
6
private void addActions(){ JButton buttonOK = noteEditorFrame.getButtonOK(); buttonOK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { ICommand command = new EditNoteCommand(); command.execute(); ...
0
public void visit_dup_x2(final Instruction inst) { stackHeight -= 3; if (stackHeight < minStackHeight) { minStackHeight = stackHeight; } stackHeight += 4; }
1
private StringBuffer actualizarRegistro() { //Es el punto que sera comparado int punteo = playerManager.Punteo; StringBuffer CadenaRegistro = new StringBuffer(); String linea; //Preparando para leer el registro FileReader fr = null; BufferedReader br = null; ...
8
public static void main(String args[]) throws Exception { module = MODULE; testFile = System.getProperty("testFile"); if(System.getProperty("device")!=null) device = System.getProperty("device"); if(System.getProperty("persist")!=null) persist = Boolean.parseBool...
4
private ConsoleCanvas() { addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { //super.componentResized(e); int w = e.getComponent().getWidth(); int h = e.getComponent().getHeight(); if(w < 1) w = 1; if(h < 1) ...
5
public static FileNameFilter getFullNameFilter(String keyword) { return new FileNameFilter(keyword, false); }
0
private File getDefaultFile(){ File home = new File(System.getProperty("user.home")); if(!home.exists()) return null; String s = System.getProperty("os.name").toLowerCase(); if(s.contains("win")){ File file = new File(home,"AppData/Roaming/.minecraft"); return file.exists()?file...
8
public static void playSound(byte[] in) { ByteBuffer b = ByteBuffer.wrap(in); b.get(); int sound = b.getInt(); boolean surface = b.get() == 1; String soundName = ""; switch(sound) { case 1: soundName = "/sound/effects/explosions/hullboom_1.wav"; break; case 2: soundName = "/sound/effect...
7
private int sink(int i) { Key t = heap[i]; // Save key for later restoring while (2 * i + 1 <= N) // while heap[i] has both the children { int j = 2 * i + 1; // rightmost child // 1st comparision: Making j point to the least of the two // children as heap[i] should sink to j if (greater(heap[j], hea...
5
static /* package scope */ void addProfile(LangProfile profile, int index, int langsize) throws LangDetectException { String lang = profile.name; if (instance_.langlist.contains(lang)) { throw new LangDetectException(ErrorCode.DuplicateLangError, "duplicate the same language profile"); ...
5
public static void main (String[] args) { new Lawnchair(); LOGGER.log(Level.INFO, "INIT. Sitting in Lawnchair."); int reply = JOptionPane.NO_OPTION; saveScorecard(); if (Manager.getInstance().getProfiles().size() == 0) { LOGGER.log(Level.INFO, "No profiles found. Prompting user to create one."); r...
2
public FieldAnalyzer getField() { ClassInfo clazz = getClassInfo(); if (clazz != null) { ClassAnalyzer ana = methodAnalyzer.getClassAnalyzer(); while (true) { if (clazz == ana.getClazz()) { int field = ana.getFieldIndex(ref.getName(), Type.tType(ref.getType())); if (field >= 0) retu...
7
private static String getTemperature(String date, String state, String bound) { DB db = _mongo.getDB(DATABASE_NAME); DBCollection coll = db.getCollection(COLLECTION_TEMPERATURE); BasicDBObject query = new BasicDBObject(); query.put("year", "" + getYear(date)); query.put("month", "" + getMonth...
1
public static <T> void swap(List<T> items, int index1_, int index2_) { if (index1_ == index2_) return; T item1 = items.get(index1_); T item2 = items.get(index2_); if (item1 != null) items.set(index2_, item1); if (item2 != null) ...
3
private void imposeConstraints(Particle p) { if (outOfRange(p.getNewPos().x, 0, rangex)) { p.getVelocity().x = 0; } if (outOfRange(p.getNewPos().y, 0, rangey)) { p.getVelocity().y = 0; } if (outOfRange(p.getNewPos().z, 0, rangez)) { p.getVelocity().z = 0; } p.getNewPos().x = clampedConstraint(...
3
@Before public void Setup() { patternSix = new Pattern("alan,friend,warbyparker,*,five,it"); patternTwoWildCards = new Pattern("alan,friend,*,*,five,it"); }
0
void compress() { if (getCount < GET_THRESHOLD) if (!isModified() && ClassPool.releaseUnmodifiedClassFile) removeClassFile(); else if (isFrozen() && !wasPruned) saveClassFile(); getCount = 0; }
5
public static ChessBoardEntity moveChessmen(final ChessBoardEntity b, final ChessmenEntity c, final PositionEntity p, final boolean promote) { ChessBoardEntity board = null; if (isMoveChessmen(b, c, p, promote)) { List<ChessmenEntity> chessmens = new ArrayList<ChessmenEntity>(); for (ChessmenEntity chessmen :...
7
private boolean isValid(String str) { if(str==null || str.length()>3) return false; int num = Integer.parseInt(str); if(str.charAt(0)=='0' && str.length()>1) return false; if(num>=0 && num<=255) return true; return false; ...
6
public void save() { BufferedReader reader; try { reader = new BufferedReader(new FileReader(System.getProperty("resources") + "/database/factions")); String line; StringBuilder fileContent = new StringBuilder(); String newLine = null; while((line = reader.readLine()) != null) { String[] temp = ...
4
public List<Cell> exploreWay(Cell [][]cells, int xStart, int yStart, int xGoal, int yGoal) { // A* alogoritm List<Cell> openset = new ArrayList<Cell>(); // will explore List<Cell> closeset = new ArrayList<Cell>(); // was explored int tentativeScore; boolean tentetiveIsBetter; List<Cell> pathMap = ne...
8
public String closestWeekday(String field) { String newField = ""; for(int i = 1; i <= field.length(); i++) { if(isNumber(field.substring(i - 1, i))) { newField = newField + field.substring(i - 1, i); } ...
3
public void deleteDataBase(JList<String> log){ ArrayList<String> alstLog = new ArrayList<>(); try { alstLog.add("Loading driver..."); log.setListData(alstLog.toArray(new String[0])); Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); alstLog.add("Driver loaded"); log.setListData(alstLog.toAr...
3
public ArrayList<BESong> getAll() throws SQLException { ArrayList<BESong> result = new ArrayList<BESong>(); Statement stm = DBConnection.getConnection().createStatement(); stm.execute("select * from song inner join Artist on Song.artistID = artist.id inner join Category on Category.ID = song.Ca...
1
private static int chooseUseIndex(SingleAttributeUse[] uses) { for (int i = 0; i < uses.length; i++) if (uses[i] != null && uses[i].getType() == null && uses[i].getDefaultValue() == null) return i; int firstIndex = -1; for (int i = 0; i < uses.length; i++) { if (uses[i] != null) { ...
9
public boolean isSpaceAboveRobot() { if(robot.getLocation().y <= 0) return false; if(robot.getLocation().y <= GROUND_LEVEL) return true; for(Rectangle hole:currentPlanet.getHoles()) { if(((hole.y + hole.height) == robot.getLocation().y) && (robot.getLocation().x == hole.x)) { return true; } } r...
5
private void jButtonPrecedentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPrecedentActionPerformed ((CtrlVisiteur)controleur).visiteurPrecedent(); }//GEN-LAST:event_jButtonPrecedentActionPerformed
0
public void statusChanger(){ if (status == "Heavy"){ speed /= 2; waveHealth *= 2; } else if(status == "Light"){ speed *= 2; waveHealth /= 2; } if (boss){ size *= 2; waveHealth *= 5; } }
3
public void setId(String value) { this.id = value; }
0
@Override protected int drawUnselectedText(Graphics graphics, int x, int y, int p0, int p1) throws BadLocationException { Document doc = getDocument(); String text = doc.getText(p0, p1 - p0); Segment segment = getLineBuffer(); SortedMap<Integer, Integer> startMap = new TreeMap<Int...
7
private double f(double b) { double PrB=1, p=probLessThan(b); for (int i = 0; i < futureBowls; i++) { PrB*=p; } double PrA=1-PrB; double ExA=exptGreaterThan(b); double ExB=exptLessThan(b); double Ex2=PrA*ExA+PrB*ExB; return Ex2; }
1
void compress(int init_bits, OutputStream outs) throws IOException { int fcode; int i /* = 0 */; int c; int ent; int disp; int hsize_reg; int hshift; // Set up the globals: g_init_bits - initial number of bits g_init_bits = init_bits; // Set up the necessary values clear_flg = false; n_bits =...
9
public String insertionSort(String a) { char[] arr = a.toCharArray(); char tmp; int j; for (int i = 1; i < arr.length; i++) { tmp = arr[i]; j = i; while (j > 0 && tmp < arr[j - 1]) { arr[j] = arr[j - 1]; j--; } arr[j] = tmp; } return new String(arr); }
3
private void showWord(IIndexWord idxWord, IDictionary dict) { StringBuffer sb = new StringBuffer(); sb.append("<html><body>"); if (idxWord != null) { List<IWordID> wordIDs = idxWord.getWordIDs(); for (IWordID wordID : wordIDs) { IWord word = dict.getWord(wordID); sb.append("<h4>"); sb.append(w...
5
private void foundStraight(Card firstCard) { boolean add = false; Card last = null; for (Card card : hand) { // Purposeful optimization if (card == firstCard) { add = true; } if (add) { if (last == null || last.getRa...
7
public static void main(String args[]){ emailValidator = new EmailValidator(); for (String temp : validEmailIds) { boolean valid = emailValidator.validateEmail(temp); System.out.println("Email ID "+temp+" is valid? " + valid); } System.out.println("\n\n"); ...
2
private String parseTokenChecked(String str, int ichStart, int ichMax) { int ich = ichStart; char ch; while (ich < ichMax && ((ch = str.charAt(ich)) == ' ' || ch == '\t')) ++ich; int ichNonWhite = ich; while (ich < ichMax && ((ch = str.charAt(ich)) != ' ' && ch != '\t')) ++ich; ichNe...
7
public ArrayList<String> replaceObjects( ArrayList<String> tokenizedInput, LanguageKeywords language ) { // Acquire a temporary copy of the tokenized input to be filled with the new tokenize input ArrayList<String> tempTokenizedInput = new ArrayList<String>(); // Acquire an iterator for the tokenized input ...
9
@Override public void moveCustomerToSellerQueue(int currentPhase, Queue lineQueue, ArrayList<TicketSeller> sellers) { for(int j = 0 ; j < Define.theNumberOfTicketSeller && !lineQueue.isEmpty() ; j++){ TicketSeller tmpSeller = sellers.get(j); if(tmpSeller.sellerQueue.isEmpty()){ int previ...
7
public GridFactoryException(Exception e) { super(e); }
0
@Override public boolean equals(Object other) { if (!(other instanceof DecodedAudio)) return false; DecodedAudio otherAudio = (DecodedAudio)other; // Formats are unequal; so audio objects are not equal. if (!(mFormat.equals(otherAudio.mFormat))) return false; // Number of channels are diff...
5
public boolean delete(Administrador admin){ PreparedStatement ps; try { ps = mycon.prepareStatement("DELETE FROM Administradores WHERE userName=?"); ps.setString(1, admin.getNombre()); return (ps.executeUpdate()>0); } catch (SQLException ex) { Logg...
1
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 static void setDisabled(Container c, HashMap<Component, Boolean> wasEnabled, Component[] notEdit) { List<Component> notEditList = null; if (notEdit != null && notEdit.length > 0) { notEditList = Arrays.<Component> asList(notEdit); } else { notEditList = new ArrayList<Component>(); } Component...
5
public static boolean checkHasGround(int x, int y, int z) { if ( (x == 0) || (y == 0) || (z == 0) || (x == dimX-1) || (y == dimY-1) || (z == dimZ-1) ) return true; return false; }
6
public final void ChangeLang(){ if(!(TextStyles.containsKey("UserText")&& TextStyles.containsKey("PwdText")&& TextStyles.containsKey("ProfilesText")&& TextStyles.containsKey("RememberMe")&& TextStyles.containsKey("LoginBtn")&& TextStyles.containsKey("ProfileFormat")) ){System.out.println("--*Theme Er...
9
public static Iterator allSupercollections(LogicObject self) { { MemoizationTable memoTable000 = null; Cons memoizedEntry000 = null; Stella_Object memoizedValue000 = null; if (Stella.$MEMOIZATION_ENABLEDp$) { memoTable000 = ((MemoizationTable)(Logic.SGT_LOGIC_F_ALL_SUPERCOLLECTIONS_MEMO_T...
7
static int readBlockSize(RandomAccessFile raf) throws IOException { // read size byte b[]=new byte[3]; MediaFileUtil.read_sure(raf,b); return ((b[0]& 0xff)<<16) + ((b[1]& 0xff)<<8) + (b[2]& 0xff); }
0
public void render(Graphics g) { update(); g.setColor(color); if (text == "Pistol" || text == "SMG" || text == "Shotgun"){ g.setFont(new Font(g.getFont().getFontName(), Font.BOLD, 20)); } else g.setFont(new Font(g.getFont().getFontName(), Font.BOLD, 14)); if (text != null) { g.drawString(text...
4
public List<PastMeeting> getPastMeetingList(Contact contact) { List<PastMeeting> result = new ArrayList<PastMeeting>(); PastMeetingImpl tempM = null; PastMeeting tempPM = null; try { if(!contactList.contains(contact)) { throw new IllegalArgumentException(); }else{ for(Meeting m : meeting...
5
private boolean redo() throws IOException, ParseException { if (redoList.isEmpty()) { messageToUser = MSG_CANNOT_REDO_ANYMORE; return false; } ActionEntry ae = redoList.pop(); Action done = ae.getAction(); Task t = ae.getTask(); actionList.push(ae); Command command = done.getCommand(); Task task ...
9