text
stringlengths
14
410k
label
int32
0
9
@Override public Member getMemberByEmailId(String emailId) { Session session = this.sessionFactory.getCurrentSession(); Query query = session.createQuery("from Member where EmailId = :emailId "); query.setParameter("emailId", emailId); List list = query.list(); if (list.isEmpty()) { return null; } ret...
1
public void compFinalResult() { do { iStage++; compAllocation(); if (compDistribution()) { /* deadline can not be satisfied */ if (!bDeadline) { System.out.println("CostSufferage: THE DEADLINE CAN NOT BE SATISFIED!"); return; } else { System.out.println("\nNEW ROUND WITHOUT CHECKI...
7
@Override public long[] run(String query) { FUNCTION_NAME = "TJSGM"; query = query.toUpperCase(); boolean state = true; SQLParser parser = new SQLParser(); state &= parser.parse(query + ".txt"); // file name wrieteGlobalInfoToHDFS(parser); long[] time = new long[4]; long startTime = new Date().getTim...
5
public void notifyPeersPieceCompleted(int index) { byte[] m = Message.haveBuilder(index); for(Peer p : this.peerList){ p.sendMessage(m); } }
1
private Object number() { int length = 0; boolean isFloatingPoint = false; buf.setLength(0); if (c == '-') { add(); } length += addDigits(); if (c == '.') { add(); length += addDigits(); isFloatingPoint = tr...
9
@Override public void execute() { SceneObject rock = SceneEntities.getNearest(Main.getRockIDs()); if (Inventory.isFull()) { if (BANK_AREA.contains(Players.getLocal().getLocation())) { if (Bank.isOpen()) { Bank.deposit(Main.oreID, 28); } else { Bank.open(); } } else if (MINE_AREA.contain...
8
public static void main(String[] args) { long res = 0; int save = 0; int runs = 0; int tempRuns = 0; for(int i = 1; i < 1000000; i++) { res = i; tempRuns = 0; while(res != 1) { tempRuns++; if(res % 2 == 0) res = res / 2; else res = (res * 3) + 1; } if(tempRuns > ru...
4
public int solution(int A, int B, int K) { if (B != 0 && B<K) { return 0; } else if (A == B) { return (A%K == 0) ? 1 : 0; } else if (A != 0 && A < K) { A = K; } int from = (A % K == 0) ? A : A + (K-(A % K)); int range = (B-from); int diff = 0; if (B % K == 0) diff++; ...
9
@Override public final void Paint(Graphics PanelGraphics) { Graphics2D Graphics = this.GameImage.createGraphics(); GeneralHelper.DrawBackground(Graphics, this.GetPanelWidth(), this.GetPanelHeight(), this.GameSize, this.GameStopped); if (!this.GameStopped) { if (this.GameStarted) { if (this.Direction...
8
public static List<List<Integer>> getAllPolygonals() { List<List<Integer>> polygonals = new ArrayList<List<Integer>>(); for(int i = 0; i < 6; i++) polygonals.add(new ArrayList<Integer>()); for(int i = 1000; i <= 9999; i++) { if(isTriangle(i)) polygonals.get(0).add(i); if(isSquare(i)) polygonals.get(1...
8
private void editFile(File file) { try { Runtime.getRuntime().exec(DEFAULT_EDITOR + " " + file.getAbsolutePath()); } catch (IOException e){ noteEditorFrame.showMessage("I/O Error", "Open editor error", JOptionPane.ERROR_MESSAGE); } }
1
private boolean jj_3R_34() { Token xsp; xsp = jj_scanpos; if (jj_3R_37()) { jj_scanpos = xsp; if (jj_3R_38()) { jj_scanpos = xsp; if (jj_3R_39()) { jj_scanpos = xsp; if (jj_3R_40()) { jj_scanpos = xsp; if (jj_3R_41()) { jj_scanpos = xsp; if (jj_3R_42()) { jj_scan...
9
public static <T extends DC> Set<Pair<Pair<PT<Integer>,T>,Pair<PT<Integer>,T>>> getAllPairs(Set<Pair<PT<Integer>,T>> baseSetA, Set<Pair<PT<Integer>,T>> baseSetB) { Set<Pair<Pair<PT<Integer>,T>,Pair<PT<Integer>,T>>> res; ...
8
private void calculateSizes() { if (!mDirty) { return; } mDirty = false; mSize.width = 0; mSize.height = 0; Enumeration e = mComponents.keys(); while (e.hasMoreElements()) { Component c = (Component) e.nextElement(); Point p = (Point) mComponents.get(c); mSize.width = Math.max(mSize.widt...
2
@Override public boolean equals(Object other) { if (other == null) return false; if (other == this) return true; CashOffice otherCashOffice = (CashOffice) other; return this.number == otherCashOffice.number; }
2
public String getTranslation( int langID ) { if ( ( langID >= 0 ) && ( langID < numberOfTranslations ) ) { TValueEntry dummy = values[langID] ; if ( dummy != null ) { return dummy.value ; } } // no translation but a default value if ( defValue != null ) { ...
4
public void method390(int x, int alpha, String text, int seed, int y) { if (text == null) { return; } random.setSeed(seed); int color = 192 + (random.nextInt() & 0x1f); y -= trimHeight; for (int i = 0; i < text.length(); i++) { if (text.charAt(i) == '@' && i + 4 < text.length() && text.charAt(i + 4) =...
8
public DrawableNode findCommonAncestor(ArrayList<DrawableNode> sample) { if (sample.size()==0) //shouldn't happen, but just in case return null; DrawableNode newroot = (DrawableNode)root; ArrayList<Node> containsSample = new ArrayList<Node>(); for(Node kid : newroot.getOffspring()) { if (subtreeCont...
8
public String toString(){ StringBuffer strbuf = new StringBuffer(); strbuf.append(this.getBeginPosition()).append("-").append(this.getEndPosition()); strbuf.append(" : ").append(this.lexemeText).append(" : \t"); switch(lexemeType) { case TYPE_UNKNOWN : strbuf.append("UNKONW"); break; case TYPE_EN...
9
public void moveSide(Direction d) { if(d == Direction.RIGHT) { blockCol++; updateBoard(); } else if (d == Direction.LEFT) { blockCol--; updateBoard(); } else { System.out.println("UNEXPECTED ERROR, UNABLE TO MOVE"); } }
2
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); //由context parameter取得JDBC需要的資訊 ServletContext sc = this.getServletConfig().getServletContext()...
9
private int calcDef() { if (leadership > 92) { // For high Leadership commanders return Math.round(leadership * 8 / 10 + intelligence * 2 / 10); } else if (combatPower > 92) { // For high combatPower commanders return Math.round(combatPower * 6 / 10 + le...
3
public FireSword(){ this.name = Constants.FIRE_SWORD; this.attackScore = 20; this.attackSpeed = 15; this.money = 1500; }
0
public void itemStateChanged(ItemEvent event) { if (event.getStateChange() == ItemEvent.SELECTED) { String fileToRead = (String)comboBox.getSelectedItem(); if (!comboBox.getSelectedItem().equals(Files.REVERT)) fileToRead += Files.PRESET_EXTENSION; if (FileParser.readFile(fileTo...
3
private static void check14() { if (!checked14) { checked14 = true; StringTokenizer st = new StringTokenizer(System.getProperty("java.specification.version"), "."); try { int major = Integer.parseInt(st.nextToken()); int minor = Integer.parseIn...
5
public void onQuestionChange(Question question) { setQuestion(question); }
0
private ArrayList<Position> findBoxes(ArrayList<String> board) { ArrayList<Position> boxes = new ArrayList<Position>(); for (int y = 0; y < board.size(); ++y) { for (int x = 0; x < board.get(y).length(); ++x) { char c = board.get(y).charAt(x); ...
4
public void run() { while(true) { try { receiveData(); } catch (Exception e) { e.printStackTrace(); } } }
2
public void setFoo1(T1 foo1) { this.foo1 = foo1; }
0
public void mouseInteract() { int mouseX = MouseInfo.getPointerInfo().getLocation().x; int mouseY = MouseInfo.getPointerInfo().getLocation().y; if (!holdingItem && !inventoryOpen) { interact(); } if (holdingItem && !inventoryOpen) { placeItemHeld(direction); } if (invent...
5
@Override public void mouseExited(MouseEvent e) { if(e.getComponent().getName().equals("globeMenu")) parent.getTitlePanel().hoverGlobe(); }
1
public static void main(String[] args) { ElevensBoard board = new ElevensBoard(); int wins = 0; for (int k = 0; k < GAMES_TO_PLAY; k++) { if (I_AM_DEBUGGING) { System.out.println(board); } while (board.playIfPossible()) { if (I_AM_DEBUGGING) { System.out.println(board); } } if (bo...
5
public String[] split(String message) { char[] array = message.toCharArray(); String toadd = ""; ArrayList<String> temp = new ArrayList<String>(); for (int i = 0; i < array.length; i++) { toadd += "" + array[i]; if (i % 64 == 0 && i != 0) { temp.add(toadd); toadd = ""; } } if (!toadd.equals...
4
public String interpret(Symtab st) { String result = ""; if (oa != null) { //SymtabEntry id1Entry = st.lookup(oa.getID1().toString()); //struct interpretation if (!oa.getObjectType(st).equals("message")) { result += oa.toString() + " = "; result += parlist.interpret(); result += ";\...
5
public void setDate(Date date) { this.date = date; }
0
public Villager() { this.setAdult(true); this.setAlive(true); this.setProffession(null); this.setHealth(initHealth); this.setHunger(initHunger); this.setThirst(initThirst); this.setTool(null); this.setArmor(0); pos = new Point2D.Double(); }
0
public static void main(String[] args) { try { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); initCards(); Mat AdAs = Highgui.imread(getAbsoluteFilePath("AcesHand.png")); for (Card card : deck) { if (isCardInImage(card, AdAs)) { System.out.println("*" + card.name + " is in AdAs"); ...
5
public static ClassInfo forName(String name) { if (name == null || name.indexOf(';') != -1 || name.indexOf('[') != -1 || name.indexOf('/') != -1) throw new IllegalArgumentException("Illegal class name: " + name); int hash = name.hashCode(); Iterator iter = classes.iterateHashCode(hash); while (iter.hasN...
6
@Override public void update(long delta) { if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { InputController.keyDown(delta, Keyboard.KEY_UP); } if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { InputController.keyDown(delta, Keyboard.KEY_DOWN); } if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { InputController.keyD...
7
private void writeQNames(javax.xml.namespace.QName[] qnames, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { if (qnames != null) { // we have to store this data until last moment since it is not possible to write any ...
7
@Override public String execute(SessionRequestContent request) throws ServletLogicException { String page = ConfigurationManager.getProperty("path.page.countries"); try { Criteria criteria = new Criteria(); Country currCountry = (Country) request.getSessionAttribute(JSP_CURRE...
3
public void dumpInstruction(TabbedPrintWriter writer) throws java.io.IOException { writer.println("break" + (label == null ? "" : " " + label) + ";"); }
1
public void visitFiles(ArrayList<String> fileNames) { // Treat all other command line arguments as files to be read and evaluated FileReader freader; for (String file : fileNames) { try { System.out.println("Reading from: " + file + "..."); freader = n...
3
public void testConstructorEx_Type_int_Chrono() throws Throwable { try { new Partial(null, 4, ISO_UTC); fail(); } catch (IllegalArgumentException ex) { assertMessageContains(ex, "must not be null"); } }
1
public void run(){ try { //System.out.println("Dwonload Incomming Connection from IP: " + clientsocket.getInetAddress().getHostAddress()+ " PORT: "+clientsocket.getPort()); ObjectInputStream in = new ObjectInputStream(clientsocket.getInputStream()); ObjectOutputStream out = new ObjectOutputStream(clientsocket.getOutput...
8
private boolean isOk() { lblError.setVisible(false); boolean res = false; boolean checkDates = Validate.startdateBeforeReleasedate(calStartDate.getDate(), calReleaseDate.getDate()); if (checkDates) { res = true; } else { if (calStartDate.getDate() != null ...
3
public static Map<String,String> getPluginFileMap() { Map<String,String> pluginList = new HashMap<String,String>(); try { File jarLocation = new File(ControllerEngine.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); String parentDirName = jarLocation.getParent(); // to get the...
5
public void score(Paddle paddle, Player player) { if (collision(paddle)) { paddle.catchPowerUp(type); player.catchPowerUp(type); switch (type) { case 0: toCenter(); break; default: i...
2
public static void main(String[] args) { GameMachine gameMachine = new GameMachine(); ArrayList<MainMenuHeroSlot> heroies = new ArrayList<MainMenuHeroSlot>(); //System.out.println(gameMachine); Scanner scanchoice = new Scanner(System.in); int choiceentry = 0; do { //Print out menu System.out....
8
public String wraplineword (int columns) { int n=N,good=N; String s=""; while (n<L) { if (C[n]=='\n') { s=new String(C,N,n-N); N=n+1; break; } n++; if (n>=L) { if (n>N) s=new String(C,N,n-N); N=n; break; } if (n-N>=columns && good>N) { s=new String(C,N,good-N); N=good+...
9
private void btnLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoadActionPerformed String tempPath = txtPath.getText(); if(tempPath.isEmpty()){ JOptionPane.showMessageDialog(this, "You have to select a XML File first", "Missing Value",JOptionPane.WARNING_MESSAG...
3
private Map.Entry<Integer, Integer> traverseTree(String curIDRef, ArrayList<String> pathFromRoot) throws IDrefNotInSentenceException { String parentIdRef = ""; Node curNode = getNode(curIDRef); if (curNode.getHeadIDref() == null && !curNode.isHeadChecked()) { Node newHead = calculateHeadWord(Arrays.asList(curI...
9
public static void startupHtmlPprint() { { Object old$Module$000 = Stella.$MODULE$.get(); Object old$Context$000 = Stella.$CONTEXT$.get(); try { Native.setSpecial(Stella.$MODULE$, Stella.getStellaModule("/ONTOSAURUS", Stella.$STARTUP_TIME_PHASE$ > 1)); Native.setSpecial(Stella.$CONTEXT$...
6
private boolean onCloseButton(int x, int y) { int xStart = getWidth() / 3; int xEnd = xStart + width(); int yStart = getWidth() / 3; int yEnd = yStart + SLOT_SIZE / 2; if (x > xStart && x < xEnd && y > yStart && y < yEnd) { return true; } return false; }
4
public String inCar(String carID) { String txt=""; if(isFull()) { txt="对不起,停车场已满。"; return txt; } if(carID.equals("")){ txt="请输入你停的车的车牌号:"; return txt; } if(contain(new Ticket(carID))) { txt="你要停的车已经停在我们的停车场里了。"; return txt; } Ticket ticket = in(new Car(carID)); txt = "OK,请记住你的...
3
public void selectionSort() { int maxCompare = a.length - 1; int smallestIndex = 0; int numSteps = 0; // loop from 0 to one before last item for (int i = 0; i < maxCompare; i++) { // set smallest index to the one at i smallestIndex = i; numSteps = 0; // loop...
3
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 task(int tId) { try { int nRow, nCol; int[][] mat; int[] vec; int[] product; File file; BufferedReader reader; PrintWriter printWriter; String line; String[] elements; //read the shared matrix file file = new File("fs/exampl...
9
public static boolean addNewPatient(NewPatientPage newPatient){ Date dob = HelperMethods.getDate(newPatient.getDob()); Patient newPat = new Patient(); newPat.setFirstName(newPatient.getfName().getText()); newPat.setLastName(newPatient.getlName().getText()); newPat.setPhone(newPatient.getPhone().getText(...
1
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents dialogPane = new JPanel(); contentPanel = new JPanel(); label1 = new JLabel(); txtInterval = new JTextField(); label2 = new JLabel(); txtTimeout...
0
public static void main(String [] args) throws Throwable { if (args.length < 2) { usage(); return; } Class stemClass = Class.forName("org.tartarus.snowball.ext." + args[0] + "Stemmer"); SnowballStemmer stemmer = (SnowballStemmer) stemClass.newInstance(); Reader reader; ...
9
public void run() { if (validArgs) { runCrawler(); } else { try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } }
2
public String[] readFromAdjacencyMatrix(String file){ ArrayList<Node> nodes = new ArrayList<Node>(); try { BufferedReader in = new BufferedReader(new FileReader(file)); String line; String[] parts; line = in.readLine(); parts = line.spl...
7
public synchronized static GameSocketServer getServerSingleton() { if (instance == null) { instance = new GameSocketServer(); } return instance; }
1
private static int getId(String functionName) { if (functionName.equals(NAME_REGEXP_STRING_MATCH)) return ID_REGEXP_STRING_MATCH; else if (functionName.equals(NAME_X500NAME_MATCH)) return ID_X500NAME_MATCH; else if (functionName.equals(NAME_RFC822NAME_MATCH)) ...
9
public int[][] generateMatrix(int n) { // Start typing your Java solution below // DO NOT write main() function int[][] res = new int[n][]; int i = 0, j = 0; for (i = 0; i < n; i++) res[i] = new int[n]; int round = (n + 1) / 2; int k = 1; for (i = 0; i < round; i++) { // FULL for (j = i; j <= n...
7
public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = 1; int max = 1; String input = sc.nextLine(); String[] strArr = input.split(" "); String largest = strArr[0]; for (int i = 1; i < strArr.length; i++) { if (strArr[i].equals(strArr[i - 1])) { ...
4
public void compose(Position singleNodePos){ singleNodePosition = singleNodePos; JPanel cp = new JPanel(); cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS)); cp.setBorder(BorderFactory.createEmptyBorder(3,3,3,3)); JPanel dist = new JPanel(); dist.setBorder(BorderFactory.createTitledBorder("Node Distri...
2
public boolean check(String attempt, String wordtype, boolean testtype){ if (testtype){ if (!wordtype.equals(type)){ return false; } } if (attempt != null){ if (attempt == "") { return false; } if (attempt.equals(romaji) || attempt.equals(kana) || attempt.equals(kanji)){ return true; ...
7
public static boolean isMagic(byte[] peerid) throws java.security.NoSuchAlgorithmException { if (peerid==null) return false; MessageDigest md = MessageDigest.getInstance("SHA-1"); md.update(peerid); byte[] digest = md.digest(); int magic = (digest[digest.length-2] << Byte.SIZE) | digest[digest.length-1]; ...
1
@Basic @Column(name = "CTR_MOA_CONSEC") public int getCtrMoaConsec() { return ctrMoaConsec; }
0
private void retry(String query) { Boolean passed = false; while (!passed) { try { Connection connection = getConnection(); Statement statement = connection.createStatement(); statement.executeQuery(query); passed = true; return; } catch (SQLException...
4
public void runGameTimedSpeedOptimised(Controller<MOVE> pacManController,Controller<EnumMap<GHOST,MOVE>> ghostController,boolean fixedTime,boolean visual) { Game game=new Game(0); GameView gv=null; if(visual) gv=new GameView(game).showGame(); if(pacManController instanceof HumanController)...
9
private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed int opc = -1; int row = -1; if (row == -1) { row = jTable16.getSelectedRow(); opc = 1; } if (row == -1) { row = jTable17.getSelectedRow(); opc = 2; } System.out.println("" + row)...
6
private boolean logoutCommand(CommandSender sender, String[] args) { if (!xPermissions.has(sender, "xauth.admin.logout")) { plugin.getMsgHndlr().sendMessage("admin.permission", sender); return true; } else if (args.length < 2) { plugin.getMsgHndlr().sendMessage("admin.logout.usage", sender); return true...
5
@Override public ServerModel buildRoad(BuildRoadRequest request, CookieParams cookie) throws InvalidMovesRequest { if(request == null) { throw new InvalidMovesRequest("Error: invalid build city request"); } ServerModel serverGameModel = serverModels.get(cookie.getGameID()); //execute int playerInde...
2
private BitSet selectTBonds(String str) { int n = model.tBonds.size(); if (n == 0) return null; BitSet bs = new BitSet(n); if ("selected".equalsIgnoreCase(str)) { synchronized (model.tBonds) { for (int i = 0; i < n; i++) { if (model.getTBond(i).isSelected()) bs.set(i); } } return ...
8
public void deplacerUnite(Matrice matrice) { Chemin chemin = matrice.getChemin();; Deplacement[] deplacement = matrice.getChemin().getTabDeplacements(); switch (deplacement[chemin.getIndiceDeplacement()]) { case BAS: Coordonnees pos_bas = new Coordonnees(this.getPos().getX(), this.getPos().getY() + 1); ...
5
int readCorner4(int numRows, int numColumns) { int currentByte = 0; if (readModule(numRows - 3, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 2, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRo...
8
private boolean jj_3_24() { if (jj_3R_41()) return true; return false; }
1
public void closePosition(java.lang.String positionID) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[7]); _call....
3
public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); String s; for(int i=0;i<N;i++){ s = sc.next(); if(s.length() == 4){ System.out.println("3"); } else{ if((s.t...
8
public String convertHTMLCode2Unicode(String text) { StringBuffer newString = new StringBuffer(); int textLen = text.length(); for (int i = 0; i < textLen; i++) { char charAtI = text.charAt(i); if (i + 2 < textLen && charAtI == '&' && text.charAt(i + 1) == '#' && text.charAt(i + 2) == '7') { int indexO...
7
public boolean setHigherReplicaCatalogue(String rcName) { // if a local RC already exists, then exit if (localRC_ == null) { System.out.println(super.get_name() + ".setHigherReplicaCatalogue(): Warning - a local " + "Replica Catalogue entity doesn'...
3
protected static int makeBody0(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, boolean isStatic, CtClass[] parameters, CtClass returnType, ConstParameter cparam, Bytecode...
7
private void orderPath(Path path) { if (path.isMarked) return; path.isMarked = true; Segment segment = null; Vertex vertex = null; for (int v = 0; v < path.grownSegments.size() - 1; v++) { segment = (Segment) path.grownSegments.get(v); vertex = segment.end; double thisAngle = ((Double) vertex.cach...
7
private static String getClassNumByInt(int i) { switch (i) { case 1: return "G06Q10/00"; case 2: return "G06Q20/00"; case 3: return "G06Q30/00"; case 4: return "G06Q40/00"; case 5: return "G06Q50/00"; case 6: return "G06Q90/00"; case 7: return "G06Q99/00"; } return ""; }
7
public void printInventory(){ for(Block i : inv){ System.out.print(i.type + " "); } System.out.println(); }
1
public BigDecimal getStudentExpenses(Student s) { BigDecimal amount = new BigDecimal(0.0); // 1º Get activities prize Set<Activity> activities = s.getActivities(); for (Activity a : activities) { amount = amount.add(a.getPrize()); } // 2º Get bookings prize Set<Booking> bookings = s.getBookings(); fo...
2
private MoveAndCost findBestMoveInternal(int[][] board, int allowedCallCnt) { allowedCallCnt--; //this call int n = board.length; int m = board[0].length; double minCost = Double.POSITIVE_INFINITY; int[][] bestBoard = null; Move bestMove = null; int[][][] newBoar...
6
public Photos getNotInSet(Date minUploadDate, Date maxUploadDate, Date minTakenDate, Date maxTakenDate, JinxConstants.PrivacyFilter privacyFilter, JinxConstants.MediaType mediaType, EnumSet<JinxConstants.PhotoExtras> extras, int perPage, int page) throws JinxException { Map<String, String> ...
9
public void addMaps(int noToAdd) { for (int i = 0; i < noToAdd; i++) { Map newMap = myGen.generateMap(0); sampleMaps.add(newMap); } int noMaps = sampleMaps.size(); for (int x = 0; x < mapWidth; x++) for (int y = 0; y < mapHeight; y++) { for (int t = 0; t < converter.numOfTileTypes(); t++) { ...
7
public boolean loadCalendar(String filename) { BufferedReader bis = null; try { try { // open file bis = new BufferedReader(new FileReader(filename)); String s=null; s = bis.readLine(); //while we still have even...
5
public static String getBiomeName(int biome) { if (biome == -1) return "Sea"; else if (biome == 0) return "Ice"; else if (biome == 1) return "Taiga"; else if (biome == 2) return "Desert"; else if (biome == 3) return "Steppe"; else if (biome == 4) return "Dry Forest"; else if (biome == 5...
9
static final void method909(int i) { anInt1598++; if (Class348_Sub40_Sub30.aBoolean9403 && i == 3553) { while ((Class65.lobbyWorlds.length ^ 0xffffffff) < (Class215.anInt2834 ^ 0xffffffff)) { LobbyWorld class110_sub1 = Class65.lobbyWorlds[Class215.anInt2834]; if (class110_sub1 == null || ((L...
7
protected Set<Resource> findPathMatchingJarResources(Resource rootDirResource, String subPattern) throws IOException { URLConnection con = rootDirResource.getURL().openConnection(); JarFile jarFile = null; String jarFileUrl = null; String rootEntryPath = null; boolean newJarFile ...
9
public Dimension minimumLayoutSize(Container parent) { ToolBarPanel panel = (ToolBarPanel) parent; boolean isHorizontal = panel.getOrientation() == SwingConstants.HORIZONTAL; synchronized(parent.getTreeLock()) { Dimension dim = new Dimension(0, 0); int majorCount = getMajorCount(); for(int i = 0; i < maj...
7
public static void genererTablesDeTest() throws Exception { System.out.println("Début création des tables de tests...."); try { getEntityManager().getTransaction().begin(); // Créer utilisateurs System.out.println("Utilisateurs"); Utilisateur u1 = new Uti...
2
@Override public boolean keydown(KeyEvent ev) { if (ev.getKeyCode() == KeyEvent.VK_UP) APXUtils.wPressed = true; if (ev.getKeyCode() == KeyEvent.VK_LEFT) APXUtils.aPressed = true; if (ev.getKeyCode() == KeyEvent.VK_DOWN) APXUtils.sPressed = true; if (ev.getKeyCode() == KeyEvent.VK_RIGHT) APXUtils.d...
8
public static void main(String[] args) { ItemTest i = new ItemTest(); InventoryWindow iw1 = new InventoryWindow(); iw1.openInventory(State.BATTLE); while (iw1.visible) { try { Thread.sleep(15); } catch(Exception ignored) { } } System.exit(-1); }
2