text
stringlengths
14
410k
label
int32
0
9
public void setId(Integer id) { this.id = id; }
0
static final void method842(boolean bool) { anInt1501++; Class138.aClass46Array1942 = null; if (Class59_Sub1.aBoolean5300 && (Class348_Sub42_Sub12.method3229() ^ 0xffffffff) != -2) OutputStream_Sub1.method132(106, ((Class240.anInt4674 ^ 0xffffffff) == -4) || Class240.anInt4674 == 7, za_Sub1...
6
public PaymentDialog(Member member, ClassType ct,String message,int flag) { messageTextArea.setText(message); globalMember = member; globalClassType = ct; globalFlag = flag; makePaymentButton = new JButton("Make Payment"); makePaymentButton.addActionListener(new ActionListener() { @Override public vo...
9
@Override public void render(Graphics2D gd) { _gameView.gameFieldView().render(gd); String lifes = "LIFES:" + String.valueOf(_gameModel.player().numberOfLives()); font.drawString(gd, lifes, 10, 530); String level = "LEVEL:" + String.valueOf(_gameModel.level()); font.drawStrin...
4
public boolean hasElement(T a) { if(this.a.equals(a)) { return true;} else if(this.next!=null) { return this.next.hasElement(a); } else { return false; } }
2
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {try { //GEN-FIRST:event_jButton1ActionPerformed list = new DrinksDao(); } catch (SAXException ex) { Logger.getLogger(addItemToDrinkMenu.class.getName()).log(Level.SEVERE, null, ex); } catch (ParserConfiguratio...
8
private int jjMoveStringLiteralDfa3_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(2, active0); return 3; } switch(curChar) { case 70: ...
7
public void testCompareTo() { LocalDateTime test1 = new LocalDateTime(2005, 6, 2, 10, 20, 30, 40); LocalDateTime test1a = new LocalDateTime(2005, 6, 2, 10, 20, 30, 40); assertEquals(0, test1.compareTo(test1a)); assertEquals(0, test1a.compareTo(test1)); assertEquals(0, test1.compa...
4
private void jButtongetArrivalsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtongetArrivalsActionPerformed if ("".equals(jXDatePickergetArrival.getEditor().getText()) || "".equals(jXDatePickergetDeparture.getEditor().getText())) { JOptionPane.showMessageDialog(rootPane, "Mak...
5
public CtrlMenu getCtrlM() { return ctrlM; }
0
public static void main(String[] args) { SavingsAccount bank[] = new SavingsAccount[2]; Scanner stdin = new Scanner(System.in); createAccounts(bank,stdin); System.out.println("Initial accounts:"); displayAccounts(bank); int choice; SavingsAccount acc; do{ System.out.print( "1) make a depos...
6
public ItemStack getIcon(IconType type) { if (IconManager.getInstance().getIcon(type).getItemStack() != null) return IconManager.getInstance().getIcon(type).getItemStack(); else return null; }
1
public void paint(Graphics g) { final Shire shire = ((PopupShire)parent).getShire(); if(shire==null){return;} final Library library = shire.getLibrary(); super.paint(g); int r = 0; Clan gov = shire.getGovernor(); if (gov != null) { g.drawString("Governor: " + gov, 2, 15+15*r++); g.drawString("of : ...
5
public static List<ModelFiledDesc> getModelFiledByTableColumn(TableDesc tableDesc){ List<ModelFiledDesc> result = new ArrayList<ModelFiledDesc>(); Iterator<TableColumnDesc> it = tableDesc.getTable().iterator(); while (it.hasNext()) { ModelFiledDesc mfd = new ModelFiledDesc(); TableColumnDesc tcd = it.next...
1
private void showAccounts(String instanceUrl, String accessToken, PrintWriter writer) throws ServletException, IOException { HttpClient httpclient = new HttpClient(); GetMethod get = new GetMethod(instanceUrl + "/services/data/v20.0/query"); // set the token in the h...
3
public void geraCruzCelulasPossiveis() { jogandoEmCruz = true; jogandoEmLinha = false; podeMudarPivo = false; int cAbaixo = celulaPivo + 10; int cAcima = celulaPivo - 10; int cDireita = celulaPivo + 1; int cEsquerda = celulaPivo -1; if(cAbaixo > 99) cAbaixo = celulaPivo; if(cAcima < 0) c...
5
public static void main(String[] args) { try { MainWin window = new MainWin(); for(String s : args ) { if( s.compareTo("--hide") == 0 ) //$NON-NLS-1$ { window.hiddenAtStart=true; } } window.open(); } catch (Exception e) { e.printStackTrace(); } }
3
public void paint(Graphics g) { if (!v.forme.equals("")) { int p1X = (int) v.p1.getX(); int p1Y = (int) v.p1.getY(); int p2X = (int) v.p2.getX(); int p2Y = (int) v.p2.getY(); listeDessin.add(new Donnee(v.forme, v.c, p1X, p1Y, p2X, p2Y)); for (int i = 0; i < listeDessin.size(); i++) { g.setColor(...
7
public int Delete(ArrayList<QueryCriteria> criteria) { this.DBConn = new DBHelper(); String whereClause = "", QueryStr; for (int i = 0; i < criteria.size(); i++) { if (!whereClause.equals("")) { whereClause += " and "; } whereClause += criteri...
4
private int concurDataSizeRecv(Map<Integer, Integer> observed, Iterator<XORFragment> left) throws InsufficientFragmentsException { if(left.hasNext()) { // Process the next fragment XORFragment frag = left.next(); int fragValue = frag.getClusterDataSize(); Integer ...
6
public boolean hasAlpha() { return hasAlphaChannel() || paletteA != null || transPixel != null; }
2
public void setup() { size(1300, 700, GLConstants.GLGRAPHICS); smooth(); col1 = color(255, 247, 236); col2 = color(254, 232, 200); col3 = color(253, 212, 158); col4 = color(253, 212, 158); col5 = color(252, 141, 89); col6 = color(239, 101, 72); col7 = color(215, 48, 31); col8 = color(179, 0, 0); ...
8
public void setOrder(String order) { this.order = order; }
0
public List<Planet> NotMyPlanets() { List<Planet> r = new ArrayList<Planet>(); for (Planet p : planets) { if (p.Owner() != 1) { r.add(p); } } return r; }
2
private static String loadShader(String fileName) { StringBuilder shaderSource = new StringBuilder(); BufferedReader shaderReader = null; try { shaderReader = new BufferedReader(new FileReader("./res/shaders/" + fileName)); String line; while((line = shaderReader.readLine()) != null) { s...
2
private void findScripture() { boolean extracted = true; extractChapterWord(); while (extracted == true) { extracted = bbbcvv(); //This series of if statements check for the most complex to the //least complex of possible scripture statements. When one is...
9
public static void DFSTest(WUGraph g, WUGraph t, DFSVertex[] vertArray) { int[][] maxOnPath; Neighbors neigh; int i, j; System.out.println("Testing the tree."); maxOnPath = new int[VERTICES][VERTICES]; for (i = 0; i < VERTICES; i++) { for (j = 0; j < VERTICES; j++) { vertArray[j]...
9
public void paintComponent(Graphics g) { super.paintComponent(g); // fill with background color. g.setFont(bigFont); g.setColor(Color.GREEN); g.drawString(message, 10, getHeight() - 10); // Draw labels for the two sets of cards. g.drawString("Dea...
3
public static CellFormat fromPatternString( String pattern ) { if( (null == pattern) || "".equals( pattern ) || "General".equalsIgnoreCase( pattern ) ) { return new GeneralCellFormat(); } String[] pats = pattern.split( ";" ); String tester = StringTool.convertPatternExtractBracketedExpression( pats[0] )...
8
public boolean equals(PixImage image) { int width = getWidth(); int height = getHeight(); if (image == null || width != image.getWidth() || height != image.getHeight()) { return false; } for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { if (! (getRed(...
8
public ArrayList<Integer> getRow(int rowIndex) { //store the result ArrayList<Integer> a = new ArrayList<>(); //store all the elements int[] b = new int[rowIndex + 1]; if (rowIndex < 0) { return a; } //the rowIndex is 3, the b.size is 4 for (i...
5
List<Tile> getTiles(List<Component> cmps) { List<Tile> ts = new ArrayList<Tile>(); for (Component c : cmps) ts.add(tiles.get(c)); return ts; }
1
private void jToggleButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton3ActionPerformed //Agregar Clase al Plan boolean ver = false; if (this.getTemp().getClases().isEmpty()) {//si es diferente de 0 verificamos for (int i = 0; i < th...
9
public static void main(String[] args) { BinaryTree tree = new BinaryTree(); System.out.println(tree.isEmpty()); tree.setRoot(new Node(7, null, 'c')); System.out.println(tree.root()); tree.setRoot(new Node(8, null, 'd')); System.out.println(tree.root()); tree.addLeft(tree.root(), new Node(10, null, '...
8
private static void assignClientToVehicle(Individual child, Individual parent1, Individual parent2, int[] assignedVehicle, int[] numberOfCustomerServed,int period) { for(int client=0; client<problemInstance.customerCount;client++) { if(child.periodAssignment[period][client]==false) continue; int vehicle...
7
public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int choise; System.out.println("Enter 1 to run test with java.util.concurrent"); System.out.println("Enter 2 to run test without java.util.concurrent"); choise = scanner.nextInt(); switc...
2
public static void main( String [ ] args ) { RedBlackTree<Integer> t = new RedBlackTree<>( ); final int NUMS = 400000; final int GAP = 35461; System.out.println( "Checking... (no more output means success)" ); for( int i = GAP; i != 0; i = ( i + GAP ) % NUMS ) t.insert( i ); ...
5
public static void main(String[] args) { int i, rotate_x = 0, rotate_y = 60, rotate_z = 0; for (i = 0; i < args.length; ++i) { if (!args[i].startsWith("--rotate-x")) { rotate_x = Integer.parseInt(args[i].substring(11)); } else if (!args[i].startsWith("--rotate-y")) { rotate_y = Integer.parseInt(args...
8
private static boolean getKeyDown(int keyCode) { return getKey(keyCode) && !lastKeys[keyCode]; }
1
public int getHeight() { return height; }
0
@Override public Class<?> getColumnClass(int columnIndex) { if (columnIndex == DELIVERY_PACKET_ID) { return Integer.class; } else if (columnIndex == MEMBER_NAME) { return String.class; } else if (columnIndex == EVENT) { return String.class; } else ...
6
public final Connection getConn() throws ReportTestException, ClassNotFoundException, SQLException { if (conn != null) { return conn; } //busca as configurações do banco de dados BancoDadosDao dao = new BancoDadosDao(); Projeto p = DataManager.getInstance().getProje...
7
public static void gerenciarClientes() { int opcao; String nome; String cpf; String telefone; String endereco; int anoCNH; int anoValidadeCNH; ArrayList<Cliente> clientes; while (true) { opcao = menu.menuClientes(); switch (...
9
public String proposeFilename(String filename, Serializable structure) { return filename; }
0
@Override public DateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { String text = jsonParser.getText(); try { return dateTimeFormatter.parseDateTime(text); } catch (Throwable...
1
public void topList(String senderName, DB_Timers timer) { this.plugin.util.messagePlayer(senderName, "Top " + this.plugin.top_amount + " Times:"); this.plugin.util.messagePlayer(senderName, "Timer: " + timer.getTimername()); Integer timerID = timer.getId(); HashMap<String, String> timerRanks = this.plugin.ra...
5
public ArrayList<CompanyApplication> getCompanyApplications() { return CompanyApplications; }
0
public void test_getValue_long() { assertEquals(0, MillisDurationField.INSTANCE.getValue(0L)); assertEquals(1234, MillisDurationField.INSTANCE.getValue(1234L)); assertEquals(-1234, MillisDurationField.INSTANCE.getValue(-1234L)); try { MillisDurationField.INSTANCE.getValue(((l...
1
public static void main(String args[]) { //<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://download.oracle.com/javase/tutorial/uiswing/lo...
6
public int getNextWalkingDirection() { if(wQueueReadPtr == wQueueWritePtr) return -1; // walking queue empty int dir; do { dir = misc.direction(currentX, currentY, walkingQueueX[wQueueReadPtr], walkingQueueY[wQueueReadPtr]); if(dir == -1) wQueueReadPtr = (wQueueReadPtr+1) % walkingQueueSize; else if((di...
6
@Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub Connection connection; String sqlString; String url; //连接数据库222.205.38.252 url = "jdbc:mysql://"+jtfipField.getText()+":3306/test?user=root&password=root"; ResultSet result; try { Class.forName("com.m...
4
protected void processMouseMovedEvent(MouseEvent e) { // let the tool tip show the current coordinates setToolTipText("(" + format.format((e.getX() - origin.x) / xScale) + ", " + format.format(-(e.getY() - origin.y) / yScale) + ")"); e.translatePoint(-origin.x, -origin.y); int x = e.getX(); int y = e.ge...
8
private void btnFnalizarCompraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFnalizarCompraActionPerformed VendaDAO dao = new VendaDAO(); venda.setCliente((Cliente)cbxCliente.getSelectedItem()); venda.setFormaPagamento((FormasPagamento) cbxTipoPagamento.getSelectedItem());...
1
public void onInput(String input){ if (this.abortMessage != null && this.abortMessage.equalsIgnoreCase(input)){ this.abort(); return; } Node<? extends Conversation<? extends CommandSender>, T> node = this.nextNode.processInput(input); if (node != null && (!node.isRecurring() || !node.getClass().equa...
8
public Ticket in(Car car) { if(isFull()) { throw new ParkException("停车场已满,不能停车了。"); } Ticket ticket = new Ticket(car.getCode()); this.carList.put(ticket, car); return ticket; }
1
public static NameNode NameNodeDesserial() { File file = new File("namenode.out"); ObjectInputStream oin; NameNode namenode = null; try { oin = new ObjectInputStream(new FileInputStream(file)); namenode = (NameNode) oin.readObject(); oin.close(); } catch (IOException e) { /...
2
public void addAxon(Integer startNeuronLayer, Integer startNeuronColumn, Integer endNeuronLayer, Integer endNeuronColumn) { if (startNeuronLayer >= neurons.size() || endNeuronLayer >= neurons.size()) { throw new IllegalArgumentException( "Start or End Layer equals not the size of the Perceptron."); }...
2
public void setVoisins () { // Attribut a chaque Neuron du reseau ses voisins directs ArrayList<Neuron> voisins; for (int col = 0 ; col < colNumber ; col ++) { for (int row = 0 ; row < rowNumber ; row ++) { voisins = new ArrayList<Neuron>(); if(col < colNumber -1){ voisins.add(neurons...
9
public static String unescapeDoubleQuotes(String string) { if (string == null) { return null; } String result = string.replaceAll("\\\\\\\"", "\\\""); return result.replaceAll("\\\\\\\\", "\\\\"); }
1
/* */ private void checkDirection(int tx, int ty) /* */ { /* 153 */ if (Core.activeClass == this) /* 154 */ if (this.y < ty) { /* 155 */ if (this.x > tx) { /* 156 */ if (Math.abs(this.x - tx) > Math.abs(this.y - ty)) /* 157 */ this.image = Core.unitDirections.getTileI...
8
public static void convertFolderToBinary(String dir, boolean recursive) { File file = R2DFileUtility.getResource(dir); if(!file.exists() || !file.isDirectory()) return; R2DFileFilter filter = new R2DFileFilter(); for(File f : file.listFiles()) { if(f.isFile() && filter.accept(file, f.getName())) { ...
8
public static int getMethod(String item) { if ("GET".equalsIgnoreCase(item)) { return GET; } else if ("POST".equalsIgnoreCase(item)) { return POST; } else if ("PUT".equalsIgnoreCase(item)) { return PUT; } else if ("DELETE".equalsIgnoreCase(item)) { ...
5
public boolean WolfAttack(int [] inTargets){ // carries out the lead wolf's murder. returns true if allowed int TargetRole = PlayerRoles[inTargets[this.LeadWolf() - 1] - 1]; if ((TargetRole >= 3) || (TargetRole < (0))){ return false; // Target is either a wolf, or dead. This gamestate should be removed. } els...
2
int addUninitializedType(final String type, final int offset) { key.type = TYPE_UNINIT; key.intVal = offset; key.strVal1 = type; key.hashCode = 0x7FFFFFFF & (TYPE_UNINIT + type.hashCode() + offset); Item result = get(key); if (result == null) { result = addType(key); } return result.index; }
1
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Discarded)) { return false; } Discarded other = (Discarded) object; if ((this.itemId == null && other.itemId !=...
5
public static String[] toStringRaw(ItemStack is) { ArrayList<String> msg = new ArrayList<String>(); MaterialData md = is.getData(); msg.add("Item: " + md.getItemType().name() + "; Amt: " + Integer.toString(is.getAmount()) + "; Dur: " + Short.toString(is.getDurability())); if( is.hasItemMeta() ) { ItemMe...
9
public void removeVertex( Vertex<T> v ) { int pos = getVerticesIndexFor( v ); if ( pos == -1 ) { throw new IllegalArgumentException( "vertex not found" ); } this.numberOfVertices--; this.vertices[pos] = null; // now we need to go through the adjacency matrix and // remove all edges i...
4
public Socket acceptSocketSafe(ServerSocket x) { //Anti-nuller by Slysoft boolean socketFound = false; Socket s = null; do { try { s = x.accept(); int i = s.getInputStream().read(); if ((i & 0xFF) == 14) { socketFound = true; } } catch (Exception e) { } } while (!soc...
3
public OwnerTableCellEditor(JTable table, IManagerOwner managerOwner) { this.table = table; this.managerOwner = managerOwner; panel = new JPanel(); panel.setBorder(new EmptyBorder(0, 0, 0, 0)); panel.setLayout(new GridLayout(0, 3)); buttonValid = new JButton(); ...
6
@Override public String toString() { return (isProvided ? "Provided" : "Required") + " interface " + getName() + " = component:" + component.getName() + " interface:" + toInterface + " EP:" + getEnergyPoints() + " size:" + size; }
1
public void go() { frame = new Frame("Frame for Flow lay out !"); b1 = new Button("B1"); b2 = new Button("B2"); b3 = new Button("B3"); b4 = new Button("B4"); frame.setLayout(new FlowLayout()); //使用FlowLayout替换默认的BorderLayout // frame.pack(); frame.setSize(200,200); frame.add(b1); frame....
0
public String serialize() { String str = ""; for (int i = 0; i < this.mapGrid.length; i++) { for (int j = 0; j < this.mapGrid[0].length; j++) { if (mapGrid[i][j].isPawnOn()) { // set the id if there is pawn on the cell str = str + "-" + mapGrid[i][j].getP...
6
private boolean isMirror(TreeNode left, TreeNode right) { if(left== null && right == null) return true; if(left == null && right != null) return false; if(left != null && right == null) return false; if(left.val != right.val) return false; return isMirror(left.left, right.right...
8
public void redraw(Graphics g){ if (roadGraph!= null && loaded ){ roadGraph.redraw(g, origin, scale); if (selectedNode!=null) { g.setColor(Color.red); selectedNode.draw(g, origin, scale);} if(destinationNode!=null) { g.setColor(Color.red); destinationNode.draw(g, origin, scale);} } if (se...
8
public Item returnItem(String search){ for (int f = 0; f < width; f++){ for (int k = 0; k < height; k++){ if (inventory[f][k].returnName().equals(search)){ return inventory[f][k]; } } } return null; }
3
private String [] getPDBfiles(String fName, int numFiles){ BufferedReader bufread = null; try { File file = new File(fName); FileReader fr = new FileReader(file); bufread = new BufferedReader(fr); } catch (FileNotFoundException e) { System.out.println(" ... pdbs config file not found"); System...
8
public void dispose() { for (TabListItemWidget listItem : listItems) { if(!listItem.isDisposed()) listItem.dispose(); } super.dispose(); }
2
private boolean checkALError() { switch( AL10.alGetError() ) { case AL10.AL_NO_ERROR: return false; case AL10.AL_INVALID_NAME: errorMessage( "Invalid name parameter." ); return true; case AL10.AL_INVALID_ENUM: ...
6
private Pattern createPattern(String urlStr, String sepStr1, String sepStr2) { if (urlStr == null || "".equals(urlStr)) return null; String[] urlArray = urlStr.split(","); StringBuffer buffer = new StringBuffer(urlStr.length() + urlArray.length * 2); buffer.append(sepStr1)....
3
private static int getPrice(Element work) throws Exception{ try{ int price = 0; Elements tmp = work.getElementsByClass("work_price"); if(tmp==null || tmp.size()==0) return 0; String str = tmp.get(0).text(); //数字抜き出し StringBuilder b = new StringBuilder(); String num = str.substring(0, str.inde...
5
public static boolean upload(String text) { try { byte[] data = Network.getFormattedTextData(text); HttpURLConnection con = (HttpURLConnection) new URL(Network.getServerAddress() + "internal/processor.php").openConnection(); if (!Network.processRequest(con, data)) return false; if (!Network.process...
3
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Scene other = (Scene) obj; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return fals...
9
public Object getColumnValue() { return columnValue; }
0
public void render() { // Get the loaded materials and initialise necessary variables Material[] materials = treeMesh.materials; Material material; Triangle drawTriangle; int currentMaterial = -1; int triangle = 0; // For each triangle in the object for (triangle = 0; triangle < treeMesh.triangles.len...
8
public PreparedStatement createStatement(String statement){ PreparedStatement con = null; try { con = this.connection.prepareStatement(statement); } catch (SQLException ex) { Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex); } ...
1
public static byte[] decrypt(byte[] in,byte[] key){ byte[] tmp = new byte[in.length]; byte[] bloc = new byte[16]; K = expandKey(key); int i; for (i = 0; i < in.length; i++) { if (i > 0 && i % 16 == 0) { bloc = decryptBloc(bloc); System.arraycopy(bloc, 0, tmp, i - 16, bloc.length); } if (i < i...
4
private static void createQRImage(File qrFile, String qrCodeText, int size, String fileType) throws WriterException, IOException { // Create the ByteMatrix for the QR-Code that encodes the given String Hashtable hintMap = new Hashtable(); hintMap.put(EncodeH...
3
public boolean skipPast(String to) throws JSONException { boolean b; char c; int i; int j; int offset = 0; int length = to.length(); char[] circle = new char[length]; /* * First fill the circle buffer with as many characters as are in the...
9
public void runDataWindow(){ if(dataWindow == null){ dataWindow = new FrameAddArraysData(); } }
1
@Override public void map(LongWritable ignored, Text filepath, OutputCollector<Text, Text> output, Reporter reporter) throws IOException { FileSystem fs = FileSystem.get(new Configuration()); // TIFF in LocalFile tif = new LocalFile(tempdir + "/" + filepath.toString()....
4
public boolean IsAngular() { double degree = Math.toDegrees(this.angle); if ((degree <= 85 && degree >= 5) || (degree <= 175 && degree >= 95) || (degree <= 265 && degree >= 185) || (degree <= 355 && degree >= 275)) return true; return false; }
8
@EventHandler public void SnowmanFireResistance(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getsnowgolemConfig().getDouble("Sno...
6
public void connectMySql() throws InstantiationException,SQLException,ClassNotFoundException,IllegalAccessException{ Class.forName("com.mysql.jdbc.Driver"); conn=DriverManager.getConnection("jdbc:mysql://"+server+"/"+ dbName+"?useUnicode=true&characterEncoding=utf-8&jdbcCompliantTruncation=false", userName,pass...
1
public void onAccount(IAccount account) throws JFException { // アカウント情報が更新された際に呼ばれます。 // LOGGER.trace("onAccount : " + account.getAccountId()); }
0
public void tick() { if (items.size() > 0) { if (player.input.up && moveTimer <= 0) { selected--; moveTimer = 12; } if (player.input.down && moveTimer <= 0) { selected++; moveTimer = 12; } ...
8
public int createNewGame(String name) throws Exception { prepareConnection(); webResource = client.resource(address + "adminPanel/newGame/" + name); ClientResponse response = webResource.type(MediaType.APPLICATION_JSON) .post(ClientResponse.class, null); return response.getStatus(); }
0
public static Double[][] intializeArray(int N) { Double[][] array = new Double[N][]; for (int i = 0; i < N; i++) { array[i] = new Double[N]; for (int j = 0; j <= i; j++) { if(i == j) array[i][j] = 0.0; else array[i][j] = Double.POSITIVE_INFINITY; } } return array; }
3
public List<PastMeeting> getPastMeetingList(Contact contact) throws IllegalArgumentException { List<Meeting> pastMeetings = getMeetings(contact); List<PastMeeting> pastReturn = new ArrayList<PastMeeting>(); ; if (pastMeetings != null) { for (int i = 0; i < pastMeetings.size(); i++) { if (pastMeeting...
5
public int getComputerScores(){ return computerScores; }
0
public static void main(String[] args) throws IOException { // parse arguments if (args.length == 0 || args.length > 2) usage(); boolean recursive = false; int dirArg = 0; if (args[0].equals("-r")) { if (args.length < 2) usage(); recursive = true; dirArg++; } //TODO Configurations to be a...
4