text
stringlengths
14
410k
label
int32
0
9
public void guardarSQLite(){ Connection con = null; PreparedStatement state = null; try{ Class.forName("org.sqlite.JDBC"); String dir = System.getProperty("user.dir"); System.out.println(dir); con = DriverManager.getConnection("jdbc:sqlite:"+dir+"/...
4
public void mergeUnhandledException(TypeBinding newException){ if (this.extendedExceptions == null){ this.extendedExceptions = new ArrayList(5); for (int i = 0; i < this.handledExceptions.length; i++){ this.extendedExceptions.add(this.handledExceptions[i]); } } boolean isRedundant = false; for(int i = thi...
7
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Ticket ticket = (Ticket) o; if (id != ticket.id) return false; if (Double.compare(ticket.price, price) != 0) return false; return true...
5
public void redo(){ myKeeper.redo(); }
0
@Override public ParserResult specialCheckAndGetParserResult(ParserResult result, SyntaxAnalyser analyser) throws GrammarCheckException { Map<String, String> dimensionLevelInfo = result.getDimensionLevelInfo(); boolean conditionIsOk = dimensionLevelInfo.size() >= 3; int nullValueNumber = 0; for (Iterator<St...
9
String fileSizeStr(long s) { if (s < K) return String.format("%dbytes", s); if (s < M) return String.format("%.1fKb", (1.0 * s / K)); if (s < G) return String.format("%.1fMb", (1.0 * s / M)); if (s < T) return String.format("%.1fGb", (1.0 * s / G)); if (s < P) return String.format("%.1fTb", (1.0 * s / T)); ...
5
private String getLoginUserIP(){ HttpServletRequest req=(HttpServletRequest)ServletActionContext.getRequest(); String lastLoginIP = req.getHeader("x-forwarded-for"); if(lastLoginIP == null || lastLoginIP.length() == 0 || "unknown".equalsIgnoreCase(lastLoginIP)) { lastLoginIP = req.getHeader("Proxy-Cl...
9
public EditButtonsListener(final MenuItem menuItem) throws IllegalParametrs { this.menuItem = menuItem; switch (menuItem) { case ADD: listener = new AddButtonActionListener(); break; case DELETE: listener = new DeleteButtonActionListener(); break; case FIND: listener = new FindButtonAct...
7
private void initGroupCreation() { driver.findElement(By.name("new")).click(); }
0
public static boolean isHappy(int n) { Map<Integer, Boolean> traverseMap = new HashMap<Integer, Boolean>(); int res = n; while (true) { res = assistIsHappy(res); if (1 == res) return true; if (traverseMap.containsKey(res)) return false; traverseMap.put(res, true); } }
3
private boolean isLegalNameChar(char ch) { return ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z')) || ((ch >= '0') && (ch <= '9')) || (ch == '.') || (ch == '_') || (ch == '$'); }
8
private void powrotDoOknaGlownego() { widokOpisTworcow.setVisible(false); if(oknoMacierzyste.equals("OknoGlowne")) widokOpisTworcow.widokGlowny.setVisible(true); if(oknoMacierzyste.equals("OknoDolacz")) widokOpisTworcow.widokGlowny.widokDolacz.setVisible(true); if(oknoMacierzyste.equals("OknoUtworz")) ...
8
public static int findRowByDate(Date date, int dateColumn, CSTable table) { String type = table.getColumnInfo(dateColumn).get(KEY_TYPE); if ((type == null) || !type.equalsIgnoreCase(VAL_DATE)) { throw new IllegalArgumentException(); } DateFormat fmt = lookupDateFormat(table,...
5
public void keyPressed(KeyEvent e) { // Packet sent for any type of key event. So create the packet first Packet event = null; // Create event packet according to key event // If the user pressed Q, invoke the cleanup code and quit. if((e.getKeyChar() == 'q') || (e.getKeyChar() == 'Q')) { event = new Pac...
9
private boolean moveTowards(int tx, int ty) { if(x < tx && move(x+1, y)) return true; if(x > tx && move(x-1, y)) return true; if(y < ty && move(x, y+1)) return true; if(y > ty && move(x, y-1)) return true; return false; }
8
public void multiplyPay(int multiplier) { if(multiplier == 1) return; this.win *= multiplier; for(WinResult winResult : this.nonReelWinResults) { winResult.Win *= multiplier; } for(ReelGridEvalResult reelGridEvalResult : this.reelGridEvalResults) { ...
6
public static Config getInstance() { if (instance == null) { new Config(); } return instance; }
1
protected void ShowMainScreen(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // set the encoding, otherwise database is encoded wrongly request.setCharacterEncoding("UTF-8"); // so, 2 ways to be here - there is session with our data (then it was // post), ...
8
public static void displayOpponentPlayerExpeditions(Player player) { List<String> lines = new ArrayList<String>(); int rowCount = 0; List<List<String>> cardsStrings = new ArrayList<List<String>>(); for (ExpeditionCardStack expeditionCardStack : player.getExpeditions()) { List<String> expeditionStrings = bui...
8
Point2D randomGoal(Game game, Point2D pt){ Point2D candidatePt = pt; Tile fTile = game.getMap().getTileAt(pt); Rectangle2D fRect = fTile.getArea(); double fwidth = fRect.getWidth(); double fheight = fRect.getHeight(); int n = 50; ...
8
private void makeFire() { final Tile playerTile = ctx.players.local().tile(); if (ctx.objects.select().at(playerTile).select(ObjectDefinition.name(ctx, "Fire")).isEmpty()) { if (ctx.inventory.itemOnItem(TINDERBOX, LOGS)) { Condition.wait(new Callable<Boolean>() { @Override public Boolean call() thr...
6
public String Add(BigInteger a) { String output = ""; ArrayList<Integer> lawl2 = new ArrayList<Integer>(); ArrayList<Integer> second = a.getNum(); //Returns the BigInteger objects ArrayList int z = 0; for(int i=0; i < input.length(); i++) { if((second.get(i) + this.lawl.get(i) + z)...
4
void parseNotationDecl() throws java.lang.Exception { String nname, ids[]; requireWhitespace(); nname = readNmtoken(true); requireWhitespace(); // Read the external identifiers. ids = readExternalIds(true); if (ids[0] == null && ids[1] == null) { ...
2
public void abrir() throws Exception { if(id.length() > 0 && id != "0"){ long cod = Long.parseLong(id); if(produto == null || (produto != null && produto.getId() != cod ) ) setProduto(ejb.Open(cod)); } }
5
public void initTransient() { if (blocks == null) { throw new RuntimeException("The level is corrupt!"); } else { listeners.clear(); blockers = new int[width * length]; Arrays.fill(blockers, height); calcLightDepths(0, 0, width, length); ...
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 void setLook(int i){ switch(i){ case 0: this.look = 0; /*look.N; */ break; case 1: this.look = 1; /*look.NE; */ break; case 2: this.look = 2; /*look.E; */ break; case 3: this.look = 3; /*look.SE; */ break; case 4: this.look = 4; /*look.S; */ break; case 5: this.look = 5; /*look.SW; */ break...
8
@Override public boolean execute(WorldChannels plugin, CommandSender sender, Command command, String label, String[] args) { final Map<Flag, String> info = new EnumMap<Flag, String>(Flag.class); info.put(Flag.TAG, WorldChannels.TAG); if(!(sender instanceof Player)) { ...
7
DisguiseSound(Sound... sounds) { for (int i = 0; i < sounds.length; i++) { Sound s = sounds[i]; if (i == 0) disguiseSounds.put(SoundType.HURT, s); else if (i == 1) disguiseSounds.put(SoundType.STEP, s); else if (i == 2) ...
5
public boolean validMove(int dir) { boolean valid = true; int[][] key = screen[row][col].key(); if (col+dir < 0 || col+dir >= NUM_COLS || dead[row][col+dir] == true) valid = false; for (int i=0; i<3; i++) { int r = row+key[i][0]; int c = col+key[i][1]; if (c+dir < 0 || c+dir >= NUM_COLS || dea...
7
public void setPassengerCurCount(int passengerCount) throws CarriageException { if ((passengerCount >= 0) && (passengerCount <= this.passengerMaxCount)) { this.passengerCurCount = passengerCount; } else { throw new CarriageException( "Current passenger count is out of range [0," + this.passenge...
2
private static ArrayList<Integer> obtenerTiempos(String etiqueta, Element elemento) { ArrayList<Integer> t = null; /*Desgloza los tiempos en funcion de la etiqueda deseada*/ NodeList e = elemento.getElementsByTagName(etiqueta); int n = e.getLength(); if (e.getLength() >...
3
public String getMessage() { if (!specialConstructor) { return super.getMessage(); } StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) { maxSize = expectedTokenSeq...
9
@Test public void nodeTests(){ Node db = null; try{ ConfigParser cp = ConfigParser.getParser("resources/config.xml"); cp.getElementAt("wookie", 0); db = (Node)cp.getElementAt("databases", 0); } catch(Exception e){ assertTrue(false); } Connection con = ConnectionFactory.createConnection(db); a...
1
public String getDefaultName() { ClassInfo type; if (clazz != null) type = clazz; else if (ifaces.length > 0) type = ifaces[0]; else type = ClassInfo.javaLangObject; String name = type.getName(); int dot = Math.max(name.lastIndexOf('.'), name.lastIndexOf('$')); if (dot >= 0) name = name.substr...
5
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerItemPickup(PlayerPickupItemEvent event) { // CAUTION:This event fires, BEFORE the picked up item is added to the inventory! // therefore, delay all checks for 1 tick because "itemInHand()" is needed for checks ...
6
protected User() { super(User.class.getSimpleName()); }
0
public void Draw(Graphics2D g2d) { //******************************************* //text coordinates g2d.setColor(Color.white); g2d.drawString("Car coordinates: " + x + " : " + y, 5, 15); g2d.drawString("Frame size, height " + Framework.frameHeight + ", width " + Framework.fram...
2
private void stopButtonAction() { text.append(String.format("Stopping current action.%s", newline)); // Remember the state before stopping State state = currentState; // Set to initial this.setStateInitial(); //remove buttons if (!results.isEmpty()) { ...
5
public void setAccountNumber(String accountNumber) { this.accountNumber = accountNumber; }
0
private void refreshClipboardList() { Transferable[] copiedItems = CopyPasteManager.getInstance().getAllContents(); int amountItems = UtilsClipboard.getAmountStringItemsInTransferables(copiedItems); String[] itemsUnique = null; boolean hasClipboardContent= UtilsClipboard...
9
@Override public void execute() { Player receiver = getReceiver(); for (String playerName : players) { Ban ban = new Ban(playerName, until, reason); TimeBanBanEvent event; if (receiver != null) { event = new TimeBanBanEvent(receiver, ban); ...
2
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { MOB target=mob; if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB)) target=(MOB)givenTarget; if(target.fetchEffect(this.ID())!=null) { mob.tell(target,null,null,L("<S-YOUPOSS> ca...
8
public void unpack(String filename1) { String filename = filename1; File srcFile = new File(filename); String zipPath = filename.substring(0, filename.length()-4); File temp = new File(zipPath); temp.mkdir(); ZipFile zipFile = null; try { zipFile = new ZipFile(srcFile); Enumeration<? extends ...
7
private boolean checkIfStuck(){ // bottom of the board if(myPieceLocation.y == 0){ return true; } // check if crashed into another piece Point[] points = getPoints(myPieceLocation, myPiece, myOrientation); for(int i = 0; i < points.length; i++){ Point p = points[i]; if(p.y - 1 > 0 && p.y - 1 < ge...
7
public static void goToManageMenu() { alphabetize(); System.out.println("\nEmployee List:"); for (Prototype p : employeeList) { System.out .println(employeeList.indexOf(p) + 1 + ") " + p.getName()); } System.out .print("\n~Management Menu~\nA) Remove Employee\nB) Edit Employee\nC) View Employee In...
4
public void switchDoors(Gameboard gameboard) { Field[][] fields = gameboard.getFields(); for(int i = 0; i < fields.length; i++) { for(int j = 0; j < fields[i].length; j++) { if(fields[i][j].getType() == 2 && Math.random() < GlobalGameboard.doorSwitchFrequency) { if(fields[i][j].isDoorOpen()...
7
public void parse(String sentence, ParserReceiver receiver, Console console) throws EvaluationException { String normalized = sentence.trim().toLowerCase(); // Check if sentence is a known magic phrase String magicPhrase = vocabulary.getMagicPhrases().get(normalized); if (magicPhrase != null) { receiver.m...
8
private static Object evaluate(final Object problem, final String expression) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { final StringTokenizer tok = new StringTokenizer(expression, "."); Object result = problem; if (to...
5
private void buyButtonActionPerformed(java.awt.event.ActionEvent evt) { if (road == -1 && settlement == -1) { return; } Request toSend = new Request(); toSend.setRequest(road == -1 ? 7 : 8); toSend.setHexagonSelected(hexagon); if (road == -1) { toSend.setOnSpotSelected(settlement); } else ...
5
private void write(){ //Writing to OutputStream try { try { transferUsePermit.acquire(); } catch (InterruptedException e){ } //never thrown if (transfer==null) transfer=new NullTransfer(); //To ensure memory space and that the objects are properly serialised oos.reset(); ...
5
private void generateStereogram() { try { if (this.dottedRadioButton.isSelected()) { if (batchMode) { //todo } else { BufferedImage depthMap = null; if (this.textRadioButton.isSelected()) { ...
8
public JLabel getjLabelNumeroRapport() { return jLabelNumeroRapport; }
0
protected static PreparedStatement prepareStatement(String query, Object... args) throws SQLException { String[] splitedQuery = (query + " ").split("\\?"); int count = splitedQuery.length - 1; String resultQuery = ""; List<Object> resultArgs = new ArrayList<Object>(); if (count !...
9
public String getLabel() { return label; }
0
private void occurrencesCharacter(char ... c) { MyIterator<String> forward = list.getForwardIterator(); int[] counts = new int[c.length]; while (forward.hasMoreElements()) { String temp = (String)forward.nextElement(); for (int i = 0; i < temp.length(); i++) for (int j = 0; j < c.length; j++) { ...
5
public static String readDodgyXML(String filename) throws IOException { InputStream in = new FileInputStream(new File(filename)); StringBuffer sb = new StringBuffer(); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String line = br.readLine(); // Ignore first line and replace it with th...
3
public Member findById(java.lang.Integer id) { log.debug("getting Member instance with id: " + id); try { Member instance = (Member) getSession().get( "com.oj.hibernate.daoNdo.Member", id); return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } }
1
public static void main(String[] args) { try (InputStreamReader isr = new FileReader(System.getProperty("user.dir") + "/file/tmp"); BufferedReader br = new BufferedReader(isr)) { String line = null; while ((line = br.readLine()) != null) { System.out.println(line); } } catch (IOException e) { e....
4
public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); ...
8
private boolean ValidPetNameChars(String inputStr,int HardCodedLen) { for(int i=0;i<HardCodedLen;i++) { if(i==0) { if(inputStr.charAt(0) == ' ') { return false; } } if((inputStr.charAt...
7
public GlobalParams withLocalParams(Collection<ParamsType> params) { GlobalParams p = copy(); for (ParamsType t: params) { p.put(t.name, t.value); } return p; }
1
public static IntNode listSearch(IntNode head, int target) { IntNode cursor; for (cursor = head; cursor != null; cursor = cursor.link) if (target == cursor.data) return cursor; return null; }
2
protected void getNodeTexts(TreeMap<String, LinkedList<ParseTopiaryNode>> map, boolean includeNamedNodes) { // System.out.format("names.size()=%d\n",names.size()); if ( (text!=null) && !text.isEmpty() ) { if (names.size() == 0 || includeNamedNodes ) { LinkedList<ParseTopiaryNode> ll = map.get(text); ...
6
@Override public void run() { if (isConnected && ossl != null) { bdl = new BroadcastDiscoveryListener(); bdl.start(); onServerStart(); } else { System.err.println("Could not launch onStartServerListener... null or not connected"); } ...
5
private synchronized static void startBackgroundThread () { if (backgroundThread == null) { backgroundThreadMayRun = true; backgroundThread = new Thread(asyncThreadGroup, "AnalyticsBackgroundThread") { @Override public void run () { Log...
6
public boolean isChoking() { return this.choking; }
0
private void processWalksFromSource(int source, ArrayList<Walk> walksFromSource) { // Now sort by target Collections.sort(walksFromSource, new Comparator<Walk>() { @Override public int compare(Walk walk1, Walk walk2) { int dest1 = walk1.getDestination(); ...
5
public void update() { if (hasGameStarted()) { if (keyListener.isUp()) { sessionImpl.update(-1); } else if (keyListener.isDown()) { sessionImpl.update(1); } else { sessionImpl.update(0); } } else if (!hasGame...
5
public AutomatonEnvironment(Automaton automaton) { super(automaton); Listener listener = new Listener(); automaton.addStateListener(listener); automaton.addTransitionListener(listener); automaton.addNoteListener(listener); initUndoKeeper(); }
0
final void paintBranchCircular( final PhylogenyNode p, final PhylogenyNode c, final Graphics2D g, final boolean radial_labels, final boolean to_pdf, ...
9
public int getLEShort() { // method437 offset += 2; int v = ((payload[offset - 1] & 0xff) << 8) + (payload[offset - 2] & 0xff); if (v > 32767) { v -= 0x10000; } return v; }
1
private boolean interestedInBitfield(byte[] bfield) { if (amountLeft == 0) { return false; } for (int byteIndex = 0; byteIndex < bitfield.length; byteIndex++) { for (int bitIndex = 0; bitIndex < 8; bitIndex++) { try { if (!Util.isBitSet(this.bitfield[byteIndex], bitIndex) && Util....
6
public int getTableId(Block block) { Set<Integer> tilesKeys = tilesLocations.keySet(); for(Integer key : tilesKeys) { SerializableLocation blockLocation = new SerializableLocation(block.getLocation()); if(tilesLocations.get(key).contains(blockLocation)) return key; } Set<Integer> spinnersKeys = spinners...
4
@Override public void mouseDragged(MouseEvent e) { if (this.grabbing) { Rectangle r = this.getRegionBounds(); int flags = 0; double pre = this.position; int left = e.getX() + this.grabOffset; this.position = left / (double) (r.width - this.grabSize) * (this.valueRange[1] - this.valueRange[0]); if ...
7
public SFormat newSFormat(JType t, String colName) //public SFormat newSFormat(JType t, boolean editable) { // Try by name if (colName != null) { Object o = makerMap.get(colName); if (o != null) return getSFormatObj(o, t); } // Index on general class of the JType, // or on its underlying Java Class (for Java...
7
protected Object initialInput(Component component, String title) { if(title.equals("")) title = "Input"; if(getObject() instanceof TuringMachine){ // Do the multitape stuff. TuringMachine tm = (TuringMachine) getObject(); int tapes = tm.tapes(); if(title.equals("Expe...
5
public void check(int x, int y, int [] loc, float startmag) { int r = 10; float [][] SSD = new float[size][size]; int N = size/4; for (int l = -size/2; l <= size/2; l++) for (int k = -size/2; k <= size/2; k++) SSD[l+size/2][k+size/2] = w[l+size/2][k+size/2]; IJ.write("Check minima at "+x+","...
9
public static void main(String[] args) { // TODO Auto-generated method stub int mat[][]={{1,2,3},{4,5,6},{7,8,0}}; boolean row[]=new boolean[mat.length]; boolean col[]=new boolean[mat[0].length]; for(int i=0;i<mat.length;i++) { for(int j=0;j<mat[0].length;j++) { if(mat[i][j]==0) { ...
9
@Test public void testEquals() { try { System.out.println("equals"); Port port = new Port(); Ship instance = new Ship(port, "Test", 12, 23); Ship newInstance = new Ship(port, "Test", 12, 23); boolean expResult = true; boolean result = i...
1
private FieldIdentifier findField(String name, String typeSig) { for (Iterator i = fieldIdents.iterator(); i.hasNext();) { FieldIdentifier ident = (FieldIdentifier) i.next(); if (ident.getName().equals(name) && ident.getType().equals(typeSig)) return ident; } return null; }
3
public static void insert (int [ ] values, int pos, int newInt) { if (pos<0 || pos>=values.length) { return; } // your code goes here }
2
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Palette other = (Palette) obj; if (!Arrays.equals(data, other.data)) return false; return true; }
4
static public ReciboCertificado instancia() { if (UnicaInstancia == null) { UnicaInstancia = new ReciboCertificado(); } return UnicaInstancia; }
1
public int maxProfit(int[] prices) { if (prices == null || prices.length <= 1) return 0; int max = 0; for (int i = 0; i < prices.length - 1; ++i) { if (prices[i + 1] > prices[i]) { max += prices[i + 1] - prices[i]; } } return max; }
4
private static void loopCallBack() { Iterator<Entry<Long,UserNotificationBuffer>> it = monitors.entrySet().iterator(); while(it.hasNext()) { Entry<Long,UserNotificationBuffer> pair = it.next(); UserNotificationBuffer notification = pair.getValue(); notification.performSchedule(); } }
1
private static String normalize(String wiki) { pattern = Pattern.compile("(\\[\\[[^\\|]*\\|)([^\\]]*)(\\]\\])", Pattern.UNICODE_CASE); matcher = pattern.matcher(wiki); while (matcher.find()) { wiki = wiki.replaceFirst("(\\[\\[[^\\|]*\\|)([^\\]]*)(\\]\\])", matcher.group(2)); ...
1
private static boolean stack_boolean(CallFrame frame, int i) { Object x = frame.stack[i]; if (x == Boolean.TRUE) { return true; } else if (x == Boolean.FALSE) { return false; } else if (x == UniqueTag.DOUBLE_MARK) { double d = frame.sDbl[i]; ...
9
private static Class getAttributeTypeClass(int attributeType, String typeStr) { Class type = RadiusAttribute.class; if (typeStr.equalsIgnoreCase("string")) type = StringAttribute.class; else if (typeStr.equalsIgnoreCase("octets")) type = RadiusAttribute.class; // DAVI allow integer8 and integer16 //else...
7
public ArgumentReader resolveReader(Class<?> type) { ArgumentReader reader = getReader(type); if (reader == null) { for (Class<?> next : readers.keys()) { if (type.isAssignableFrom(next)) { reader = readers.get(next)...
6
final Class318_Sub4 method2386(int i, AbstractToolkit var_ha) { anInt10159++; AnimatableToolkit class64 = ((Class318_Sub1_Sub5_Sub2) this).aClass235_10155 .method1668(false, true, -127, 2048, var_ha); if (class64 == null) return null; Class101 class101 = var_ha.method3705(); class101.method894((((Cla...
6
private HashSet<Integer> getForbiddenColors(Value n) { HashSet<Value> edges = adjacencyList.get(n); HashSet<Integer> rval = new HashSet<Integer>(); for(Value v : edges) { Integer c = v.getColor(); if(c != null && c != -1) { rval.add(c); } ...
3
protected boolean inBounds(int i, int j, BufferedImage completePic) { return (i > 0 && j > 0 && i < completePic.getWidth() && j < completePic .getHeight()); }
3
public static void changeUserLastLogDate (User user) { try { Connection conn = DriverManager.getConnection(Utils.DB_URL); PreparedStatement prS = conn.prepareStatement("update user set date_lastlog = ? where name = '" + user.getName() + "'"); prS.setString(1, Utils.getTodaysD...
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 void setjButtonPrevious(JButton jButtonPrevious) { this.jButtonPrevious = jButtonPrevious; }
0
private final void insertOnline(Entry<K,V> e) { if (onl[e.getH()].size()<this.w) { onl[e.getH()].add(e); onlsize++; } else { cam.put(e.getK(), e); } }
1
public Texture loadTexture(String paramFileName, boolean paramFlipped, boolean paramUseRes) { String fileLoc; try { if (paramUseRes) { fileLoc = "resources/" + paramFileName; } else { fileLoc = paramFile...
3
public int getStatusDuration(TileStatus.Type type) { if (!this.hasStatus(type)) { // Check if the tile even has the status at all. return 0; // If not, then that status has 0 effectively 0 duration. } else { // Loop through all the status the tile does have. for (TileStatus status : this.statuses) { //...
3
public static Map<String, List<Integer>> readCSV(String fileName) { Map<String, List<Integer>> disp = new HashMap<String, List<Integer>>(); File file = null; FileReader fr = null; BufferedReader br = null; try { file = new File(fileName); fr = new FileRead...
5