text
stringlengths
14
410k
label
int32
0
9
boolean ehIgual(DadoMaterial dadoMaterial) { return titulo.equals(dadoMaterial.titulo) && descricao.equals(dadoMaterial.descricao) && edicao.ehIgual(dadoMaterial.edicao) && anoPublicacao.ehIgual(dadoMaterial.anoPublicacao) && autor.equals(dadoMater...
7
private void loadPic() throws IOException { File jarfile = new File(this.isport, modName + ".jar"); File modpicfile = new File(isportinfo, modName+".png"); if(!modpicfile.exists()&&jarfile.exists()) { modpicfile.createNewFile(); InputStream in = null; BufferedImage bi = null; try { String i...
9
public static void main(String[] args) throws Exception { String inputfile = ""; String testfile = ""; if(args.length != 2) { System.out.println("Error in the arguments"); System.exit(0); } else { inputfile = args[0]; testfile = args[1]; } DecisionTree dt = new DecisionTree(); int status = ...
8
private void broadcast(String message) { for (ChatMessageInbound connection : connections) { try { CharBuffer buffer = CharBuffer.wrap(message); connection.getWsOutbound().writeTextMessage(buffer); } catch (IOException ignore) { ...
2
@Override public void onEnable() { // Load Configuration config = new AutoSaveConfig(getConfiguration()); config.load(); // Test the waters, make sure we are running a build that has the // methods we NEED try { // Check Server org.bukkit.Server.class.getMethod("savePlayers", new Class[] {}); //...
5
void addAsIncoming( Node u, BitSet is ) throws MVDException { Iterator<Arc> iter = iterator(); boolean wasAttached = false; while ( iter.hasNext() ) { Arc a = (Arc) iter.next(); if ( a.versions.intersects(is) ) { u.addIncoming( a ); wasAttached = true; } } if ( wasAttached ) { // n...
5
public int getNumberOfFeatureSets() { int num= 0; if (this.extractRH) ++num; if (this.extractRP) ++num; if(this.extractSSD) ++num; return num; }
3
public Snail(MonsterManager mm, Registry rg, String im, String st, int x, int y, int minDist, int maxDist) { super(mm, rg, im, st, x, y, minDist, maxDist, false); name = "Snail"; displayName = "Snail"; monsterManager = mm; difficultyFactor = 0.60f; adjustHPForLevel();...
1
public Long getTimestamp() { return timestamp; }
0
public void go() { BufferedReader br = null; BufferedWriter out = null; try { int numFloors; int numElevators; int numRiders; int maxCapacity; List<Rider> myRiders = new ArrayList<Rider>(); String sCurrentLine; br = new BufferedReader(new FileReader("inputs")); out = new Buffer...
7
public void setPortALabels(int t) { // t = t & 0b11111111; int a = t & 0b00000001; int b = t & 0b00000010; int c = t & 0b00000100; int d = t & 0b00001000; int e = t & 0b00010000; int f = t & 0b00100000; int g = t & 0b01000000; int h = t & 0b10000000; if (a > 0) { label_20.setText("1"); } else {...
8
private void addSplits(ArrayList<S3Item> fileList, SimpleQueue queue, int numSplits) { StringBuilder sb = new StringBuilder(); int mapNum = 0; long totalSize = 0; for (S3Item item : fileList) { totalSize += item.getSize(); } long splitSize = totalSize / numSplits + 1; logger.info("Total input file s...
6
public Player(int x, int y, double angle, double vx, double vy, double vAngle, int numLives, int playerNo){ model = new PlayerModel(x, y, angle, vx, vy, vAngle, numLives, playerNo); this.playerNo = playerNo; if (playerNo == 0) color = Color.WHITE; else color = Color.blue; shape = new GeneralPath(General...
1
public void addNewEnemy() throws SlickException{ // Gets a new random X location. int randX = xLoc.getX(); // Makes an enemy at (randX, 0), but doesn't display it on the screen. Enemy enemy = new Enemy(randX); // Runs at least once, then loops if the new enemy's word is the same as any of the current enemi...
8
public SmartRobot() throws AWTException { super(); // The anvil client sends over some non standard keycodes // (Android does not include the awt package) keyMap = new HashMap<Character, ShiftIndex>(); // Add Uppercase letter keys (sent as negatives of the lowercase) for(int x = -65; x > -91; x--){ k...
1
public void msgUserClicked(ArrayList<String> usersId, int result, int x, int y, String turnUserId, String winnerId) { String tmpl = "clicked %d %d %d %s"; // command x, y, result, {turnUserId|winUserId}, [win] if (winnerId != null) tmpl += " win"; String id = winnerId != null ? winne...
4
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed if(this.tabPerksFlaws.getSelectedIndex() == TAB_PERKS) { if(this.listPerks.getSelectedValue() != null) { if(!this.characterPerks.contains((Perk)this.listPerks.getSelectedV...
7
public static int levenshteinDistance (String s, String t) { int d[][]; // matrix int n; // length of s int m; // length of t int i; // iterates through s int j; // iterates through t char s_i; // ith character of s char t_j; // jth character of t int cost; // cost // Step 1 n = s.le...
7
@Override public Confirmation deliver(final Message message) { int count = 0; for (final Permissible permissible : Bukkit.getPluginManager().getPermissionSubscriptions(this.permission)) if (permissible instanceof CommandSender && permissible.hasPermission(this.permission)) { ...
3
public int checkGameState() { ArrayList<Integer> player1Moves = getValidMoves(PLAYER1); ArrayList<Integer> player2Moves = getValidMoves(PLAYER2); if (player1Moves.isEmpty() && player2Moves.isEmpty()) { this.gameOn = false; return 0; } else return 1; }
2
private static boolean checkAABB(Position p1, Collidable c1, Position p2, Collidable c2) { return !((p1.x + c1.width - 1 < p2.x) || (p1.x > p2.x + c2.width - 1) || (p1.y + c1.height - 1 < p2.y) || (p1.y > p2.y + c2.height - 1)); }
3
@Override public void onEntityHit(Player p, MapObject mo) { jiggle = true; int wepDmg = 0; ItemStack wep = world.getPlayer().invArmor.getWeapon(); if(wep != null && effectiveTool == ((ItemTool)wep.getItem()).getEffectiveness()) wepDmg = ((ItemTool)wep.getItem()).getEffectiveDamage(); switch (getType())...
5
@Override public void windowIconified(WindowEvent arg0) { // TODO Auto-generated method stub }
0
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FindWithinGenerator<?>)) { return false; } FindWithinGenerator<?> other = (FindWithinGenerator<?>) obj; return other.useIfNone == useIfNone && ...
9
public static void updateStation(Station station) { PreparedStatement stat; try { stat = ConnexionDB.getConnection().prepareStatement("select * from station where id_station=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE); stat.setInt(1, station.getId_station())...
3
@Override public Tile cross(Tile currentTile, Character crosser) { if (crosser == null || currentTile == null){ throw new IllegalArgumentException("crosser can not be null"); } if (!isLocked()){ //just cross, exit's already unlocked return super.cross(currentTile, crosser); } else if (crosser.hasIt...
4
public void loadConfigFiles(String board, String legend) throws IOException, BadConfigFormatException { rooms = new HashMap<Character, String>(); // Import Legend FileReader legendReader = new FileReader(legend); Scanner legendIn = new Scanner(legendReader); String line, parts[]; while(legendIn.hasNextLine...
9
public double getWidth() { return width; }
0
private TextMeasurer tm() { if(tm == null) tm = new TextMeasurer(str.getIterator(), rs.frc); return(tm); }
1
@Override public int getResponseSize(final ByteBuffer buf) throws Exception { // Need at least the encapsulation header int needed = 24 - buf.position(); if (needed > 0) return needed; // Buffer contains header (and maybe more after that) final short command_code = buf.getShort(0...
3
public boolean lineFree(int x1, int y1, int x2, int y2) { if(x1 == x2) { int start = Math.min(y1, y2); int end = Math.max(y1, y2); for(int i = start; i <= end; i++) { if(evaluationMap[x1][i] == WALL_VALUE) return false; } return true; } else if(y1 == y2) { int start = Math.m...
6
@Override public void deserialize(Buffer buf) { name = buf.readString(); worldX = buf.readShort(); if (worldX < -255 || worldX > 255) throw new RuntimeException("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255...
4
@Basic @Column(name = "CSA_FECHA_HORA") public Date getCsaFechaHora() { return csaFechaHora; }
0
public static void uploadFileAsBlob(String fullPath) { // TODO Auto-generated method stub FileInputStream fis = null; try { CloudStorageAccount storageAccount = CloudStorageAccount .parse(Connection.storageConnectionString); CloudBlobClient blobClient = storageAccount.createCloudBlobClient(); Cloud...
9
private void EquipaSelecionada_LabelPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_EquipaSelecionada_LabelPropertyChange if(EquipaSelecionada_Label.getText().equals("nenhuma")) { for(Component component: DadosJogador_Panel.getComponents()) component.setEnabled(...
3
public void process() { while (!eventQueue.isEmpty()) { Event event = eventQueue.poll(); if (listenerRegistry.containsKey(event.getType())) for (EventListener listener : listenerRegistry.get(event.getType())) listener.notify(event); } }
3
private void usage() { System.out.println( "Usage: java -jar jfht.jar [options]\n" + "\n" + "\t-n [num]: number of items to insert\n" + "\t-m [num]: number of right shifts of optimal bloom filter length\n" + "\t-k [num]: number of hash functions to use, none or 0 for optimal\n" + "\t-r [num]: number...
0
private void check() { //each route for (Route r : Solution.getRoutes()) { int type = r.getType(); if (r.getRequests().get(0).getNodeId() != -1) { int routeNodeStart = r.getRequests().get(0).getNodeId(); int routeNodeArrival = r.getRequests().get(r.getRequests().size()-1) .getNodeId(); //ea...
9
public BigDecimal getBigDecimal() { BigDecimal expValue2 = null; BigDecimal fraction2 = null; switch (numberType) { case Nan: return null; case Infinite: { return null; } case SubNormalized: // ����SubNormal����ֵ expValue2 = new BigDecimal("2").pow(config.MaxExp - 1); expValue2 = new BigDe...
8
private void computeDeleCommand(String message) { String[] cmd = message.split(" "); if (cmd.length > 1) { int n = Integer.parseInt(cmd[1]); if (mails.containsKey(n)) { // Mail ist noch nicht geloescht if (!mailIsDeleted(n)) { // Mail wird geloescht deletedMails.add(n); try { writ...
7
private File getURLClassFile(String url) { File classFile = new File("temp.class"); try { URL u = new URL(url); InputStream inputStream = u.openStream(); OutputStream outputStream = new FileOutputStream(classFile); byte[] buffer = new byte[1024]; int count; while ((count = inputStream.read(buffer)...
2
public static boolean addUser(DBC dbc, String username, String password, String email) throws addUserException{ boolean success = true; String errors ="", hash="", salt; // validate username if( !validUsername(username)){ errors += "Invalid Username. "; s...
9
public String getUserName() { return userName; }
0
@Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if(args.length==1){ BansManager.banPlayer(sender.getName(),args[0], ""); return true; } if(args.length>1){ String msg = ""; for(String data: args){ if(!data.equals(args[0])){ msg+=d...
4
@Override public void affectCharStats(MOB affected, CharStats affectableStats) { super.affectCharStats(affected,affectableStats); if(increase <= 0) { increase = 1; if (affectableStats.getCurrentClass().baseClass().equals("Thief")) increase = 2; if (affectableStats.getCurrentClass().baseClass().equa...
7
public void askWhereToSave() { String[] options = {trans.getString("GetPath.home"),trans.getString("GetPath.portable")}; int choose = JOptionPane.showOptionDialog(null,trans.getString("GetPath.WhereSaveQuestion"), trans.getString("GetPath.WhereSaveTitle"),JOptionPane.DEFAULT_OPTION,JOptionPane.QUESTION_ME...
3
@Override public String toString() { return "STORE " + new Integer(offset).toString() + " " + identifier + " " + identifier + " = " + new Integer(storedValueForPrinting). toString(); }
0
protected String getDocPath (int docSelector) { // if we're outta bounds ... if ((docSelector < 0) || (docSelector > docPaths.length)) { // ... return bupkis return null ; } // end if // we're in bounds. return the path name return docPaths[docSelector] ; } // end method getDocPath
2
public <T> List<T> findMoreRefResult(String sql, List<Object> params, Class<T> cls) throws Exception { List<T> list = new ArrayList<T>(); int index = 1; pstmt = connection.prepareStatement(sql); if (params != null && !params.isEmpty()) { for (int i = 0; i < params.size(); i++) { pstmt.setObject(index+...
6
private void inhibitLateralSameShapeRecognizers(int shape) { int shapeOffset = 2500 * shape; double inhibWeight = 1.0; int toNeuron; for (int neuron = 0; neuron < 2500; neuron += 5) { int fromNeuron = neuron + shapeOffset; int fromRow = neuron / 50; if ((fromRow % 10) >= 5) {// only ...
7
public static ArrayList<Excel> rotateY(int angle, ArrayList<Excel> toScale) { ArrayList<Excel> result = new ArrayList<Excel>(); double matrix[][] = { {Math.cos(angle * Math.PI/180), 0, -Math.sin(angle* Math.PI/180),0}, {0, 1 ,0, 0}, {Math.sin(angle* Math.PI/180),0, Math.cos(angle* Mat...
1
public ProtocolThread(Socket socket) { System.out.println("Accepting connection from " + socket.getInetAddress() + "..."); this.socket = socket; try { out_socket = new PrintWriter(socket.getOutputStream(), true); in_socket = new BufferedReader(new Inpu...
1
public void visit_imul(final Instruction inst) { stackHeight -= 2; if (stackHeight < minStackHeight) { minStackHeight = stackHeight; } stackHeight += 1; }
1
@SuppressWarnings("serial") private Action getDeleteAction() { if (this.deleteAction == null) { String actionCommand = bundle.getString(DELETE_NODE_KEY); String actionKey = bundle.getString(DELETE_NODE_KEY + ".action"); this.deleteAction = new AbstractAction(actionCommand...
4
@Override public void run() { int whatdo = Random.nextInt(0, 10); switch (whatdo) { case 0: case 1: Mouse.move(Random.nextInt(0, 750), Random.nextInt(16, 500)); break; case 2: case 3: case 5: case 4: case 7: case 8: Camera.setAngle(Random.nextInt(0, 360)); break; default: Camer...
8
public Integer getTaskCount(){ return taskCounter.get().intValue(); }
0
public boolean isPassiv() { for (Vertrag vertrag : vertragCollection) { if (vertrag.getAktiv()) { return false; } } return true; }
2
public static void playGame(GameFactory factory) { Game s = factory.getGame(); while (s.move()) { } }
1
public static void main(String[] args) { for (int i = 1; i <= 100; i++){ if (i % 5 == 0 || i % 7 == 0){ if (i % 5 == 0){ if (i % 7 == 0) System.out.println("ABBA"); else System.out.println("A"); } else System.out.println("B"); ...
5
@Override public synchronized void down() { super.down(); if (bulbPower > 0) { bulbPower--; } if (bulbPower == 0) { startEntryPoint.insert(new ReachedBottom()); } sendImageToGUI(); }
2
private void initExceptionMessage() { if(descriptor.getException() == null) { add(createMessageLabel(), BorderLayout.CENTER); return; } JTabbedPane tabs = new JTabbedPane(); tabs.addTab("Description", createMessageLabel()); JTextArea expTA = new JTextArea(); ...
8
public List<EventBranch> findEventBranchesByHallEventId(final Long hallEventId) { return new ArrayList<EventBranch>(); }
0
private boolean checkUserInDB(String s, String s1, String s2) { String s3 = null; s = s.trim().toLowerCase(); s1 = s1.trim().toLowerCase(); DbAccess dbaccess = null; try { dbaccess = dbManager.takeDbaRef(); } catch(Exception exception) ...
7
public void run() { init(); long start, elapsed, wait; while(running) { start = System.nanoTime(); update(); draw(); drawToScreen(); elapsed = System.nanoTime() - start; wait = TARGET_TIME - elapsed / 1000000; if(wait < 0) wait = TARGET_TIME; try { Thread.sleep...
3
private Socket getClientSocket() { Socket clientSocket = null; try { clientSocket = new Socket(this.destinationIpAddress, this.destinationPort); this.log.fine("Create new clientSocket: " + clientSocket.toString()); } catch (UnknownHostException e) { e.printStackTrace(); clientSocket = null; } c...
2
protected String getQueryString(RequestBean request) throws CitysearchException { log.info("Start OfferProxy getQueryString()"); StringBuilder strBuilder = new StringBuilder(); strBuilder.append(constructQueryParam(APIFieldNameConstants.RPP, RPP_OFFERS)); strBuilder.append(CommonConstants.SYMBOL_AMPERSA...
9
public void listen() { System.out.println("Node listening for requests..."); while (!m_exitFlag) { int incomingPolls = m_poller.poll(); if (incomingPolls > 0) { for (int i = 0; i < m_incomingSockets.size(); i++) { if (m_poller.pollin(i)) { receiveMessage(ZstIo.recv(m_poller.getSocket(i))); ...
4
@Override public void cleanUp() { // Synchronise the waitingEventLists which stores the list of all events // which were collected during the previous logic update and clear each // individual key synchronized (waitingEventLists) { for (Collection<EventHolder> eventHolderList : waitingEventLists.values()) {...
1
static Class<?> getClass(Type type) { if (type instanceof Class) { return (Class<?>) type; } else if (type instanceof ParameterizedType) { return getClass(((ParameterizedType) type).getRawType()); } else if (type instanceof GenericArrayType) { Type componentTy...
7
public Function getFunction (String literal) { int functionCount = this.functionList.size(); for(int i = 0;i<functionCount;i++) { Function currentFunction = this.functionList.get(i); String currentText = currentFunction.getLiteral(); boolean isMatchingExpression = literal.equals(currentText); if (isMa...
2
private boolean allSitesHasVarRecover(int index) { for(int i: sitesHasVar(index).keySet()) { Site site = sitesHasVar(index).get(i); if(site.isUp()) { return false; } } return true; }
2
public void validity(){ }
0
private boolean isConcealedSquare(long n) { int[] digits = Numbers.getDigits(n * n); if(digits.length < 17) { return false; } return digits[0] == 9 && digits[2] == 8 && digits[4] == 7 && digits[6] == 6 && digits[8] == 5 ...
9
@Override public IRailwayMap processRailwayGraph(final String graphInput) throws DuplicateRouteException, OrphanStationException { IRailwayMap trainMap = new RailwayMap(); HashMap<Character, Integer> checkLinkageMap = new HashMap<Character, Integer>(); String[] routes = preproc...
8
private Quote takeQuote(int maxLinesLimit) { for ( Quote q : quotes ) { if ( q.lines() <= maxLinesLimit ) return q; } return quotes.get(0); }
2
public static Vertex convertNode(org.yaoqiang.bpmn.model.elements.core.common.FlowNode inputNode){ Vertex outputNode = null; String type = inputNode.getClass().getCanonicalName(); if(outputNode == null){ if(type.toLowerCase().contains("gateway")){ //a.e.println(type + " " + inputNode.getName()); output...
7
public List<Telefone> listarTodos(int idPessoa){ try{ PreparedStatement comando = banco.getConexao() .prepareStatement("SELECT * FROM telefones WHERE id_pessoa = ? AND" + " ativo = 1"); comando.setInt(1, idPessoa); ResultSet consulta = ...
3
public static boolean createCheddarXml(List<Partition> lop, CartsModel cm, String filename) { // -> file File dir = new File(Airsched.DEFAULT_OUTPUT_DIR); // File file = new File(OUTPUT_FILE); File output_file = new File(Airsched.DEFAULT_OUTPUT_DIR + "/" + filename + "_period-" + cm.getModel_period() + ...
8
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 double[][][] createGridAround(double[] point, int m){ double xAxis[][] = new double[m*2+1][2]; double yAxis[][] = new double[m*2+1][2]; for(int i=1;i<=m; i++){ double nextPoint[]= GeoUtil.nextPoint(point, 100*i, 0); xAxis[m+i] = nextPoint; } for(int i=1;i<=m; i++){ double nextPoi...
6
*/ @Override public int compare(SchemaError arg0, SchemaError arg1) { if(arg0==null && arg1==null){ return 0; } if(arg0==null){ return 1; } if(arg1==null){ return -1; } if(arg0.getError().getErrorType()==arg1.getError().getErrorType()){ return 0; } return getRank(arg1.getError().getError...
5
public void setName(String name) { this.name = name; }
0
public int Decode(Decoder rangeDecoder) throws IOException { int m = 1; for (int bitIndex = NumBitLevels; bitIndex != 0; bitIndex--) m = (m << 1) + rangeDecoder.DecodeBit(Models, m); return m - (1 << NumBitLevels); }
1
private BufferedImage VerticalFiltering(BufferedImage pbImage, int iOutH) { int iW = pbImage.getWidth(); int iH = pbImage.getHeight(); int value = 0; BufferedImage pbOut = new BufferedImage(iW, iOutH, BufferedImage.TYPE_INT_RGB); for (int y = 0; y < iOutH; y++) { ...
7
public void checkOperation (String operation, org.omg.CORBA.Any[] args) throws RTT.corba.CNoSuchNameException, RTT.corba.CWrongNumbArgException, RTT.corba.CWrongTypeArgException { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _r...
5
public static void showPopularBooksReportsTable(ResultSet rs, String reportsQuery, Date[] years, int noBooks) { int numCols; ResultSetMetaData rsmd; JTextArea tableTitle = null; JTable table = null; try { rsmd = rs.getMetaData(); numCols = rsmd.getColumnCount(); String columnNames[] = new String...
5
public List<CertListing> getAll() { List<CertListing> courseListing = new ArrayList<CertListing>(); try { //Connect to database conn = DriverManager.getConnection(url, userName, password); stmt = conn.createStatement(); ResultSet rset = null; ...
7
public Object readResolve() { return INSTANCE; }
0
public SignatureVisitor visitReturnType() { endFormals(); if (seenParameter) { seenParameter = false; } else { declaration.append('('); } declaration.append(')'); returnType = new StringBuffer(); return new TraceSignatureVisitor(returnType); }
1
@Override public void run() { if (options.mode == Mode.BURIAL_ARMOUR) { final GameObject tunnel = ctx.objects.select().id(4618).nearest().poll(); if (tunnel.valid()) { if (ctx.camera.prepare(tunnel) && tunnel.interact("Climb")) { Condition.wait(new Callable<Boolean>() { @Override public Bo...
6
public void service(){ while(true){ Socket socket=null; try { socket = serverSocket.accept(); BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream())); PrintWriter pw = new PrintWriter(socket.getOutputStream(),true); String msg = null; while((msg=br.readLin...
6
private void testEntityCollision(double dt) { double xx = x + dx * dt; double yy = y + dy * dt; for (Entity e : level.getEntityNear(xx, yy, getWidth(), getHeight())) { if (e == this) continue; boolean collide = Collide.aabb(xx, yy + hIgnored, getWidth(), (int) (getHeight() - hIgnored), e.getBox()....
4
public void serialize(ByteWriter bw) throws IOException { int size = 16; byte[] label_b = label.getBytes(); size += label_b.length + 1; boolean u = false; if (!Charset.defaultCharset().newEncoder().canEncode(label)) { size += 4 + 1 + label.length() * 2 + 2; u = true; } bw.write4bytes(size); bw...
5
private String getInvokerFor(File file) { String name = file.getName(); String ext = name.indexOf(".") != -1 ? name.substring(name.indexOf(".")) : ""; if (ext.equals(".exe")) return ""; else if (ext.equals(".jar")) return "java -jar "; else if (ext.equals(...
5
private Config() { final InputStream in = getClass().getClassLoader().getResourceAsStream( CONFIG_FILE); if (in == null) { return; } byte[] bytes; try { bytes = new byte[in.available()]; in.read(bytes); final String[] lines = new String(bytes).split("\n"); Map<String, String> map = this.map...
6
public static List<String> twoArrayDiffData(String[] arr1,String[] arr2){ Integer arr1Length = arr1.length; Integer arr2Length = arr2.length; List<String> returnArr = new ArrayList<String>(); boolean flag = false; for(int i = 0; i< arr1Length; i++){ flag = false; for(int j = 0; j < arr2Length; j++){ ...
4
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; AssRule other = (AssRule) obj; if (a == null) { if (other.a != null) return false; } else if (!a.equals(other.a)) return false; if ...
9
public void writeToStream(OutputStream os) throws IOException { DataOutputStream dos = new DataOutputStream(os); for(int i = 0; i < ObjectList.size(); i++) { dos.writeBoolean(true); writeObjectToStream(ObjectList.get(i), ObjectType.get(i), ObjectNames.get(i), dos); } dos.writeBoolean(false); dos.flu...
1
public static String doubleToString(double d) { if (Double.isInfinite(d) || Double.isNaN(d)) { return "null"; } // Shave off trailing zeros and decimal point, if possible. String string = Double.toString(d); if (string.indexOf('.') > 0 && string.indexOf('e') < 0 && ...
7
public void redirectError(Writer w) { if (w == null) { throw new NullPointerException("w"); } stderr = w; }
1