text
stringlengths
14
410k
label
int32
0
9
@Override public boolean equals(final Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; MoreMethodStatistics other = (MoreMethodStatistics) obj; if (count != other.count) return false; if (max != other.max) retur...
6
private void switchCommand(String[] cmd) { if (cmd[0].equals("exit")) { Exit e = new Exit(); e.execute(wd, cmd); } else if(cmd[0].equals("pwd")) { PWD pwd = new PWD(); pwd.execute(wd, cmd); } else if(cmd[0].equals("cd")) { CD cd = new CD(); wd = cd.execute(wd, cmd); } else if(cmd[...
7
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ChefNode other = (ChefNode) obj; if (ip == null) { if (other.ip != null) return false; } else if (!ip.equals(other.ip)) return f...
9
public void addToGrid(String code) //Afegim un nou valor al Grid { String[] values = code.split("&"); for(String value : values) { String[] component = value.split(","); int x = Integer.parseInt(component[0]); int y = Integer.parseInt(component[1]); int val = Integer.parseInt(component[2]); ...
1
private static void close() { try { if (resultSet != null) { resultSet.close(); } if (statement != null) { statement.close(); } if (connect != null) { connect.close(); } } catch (Exception e) { e.printStackTrace(); } }
4
public static SpecialChar check(char charValue){ for(SpecialChar specialChar: SpecialChar.values()){ if(specialChar.value == charValue) return specialChar; } return null; }
2
private void GetSubParam(String diValue) { int Indexfrom = 0; int Indexto = 0; String paraSpace = null; String trimValue = null; //check if(diValue.length() <= directiveName.length()){ //do not have param return; } this.SetNameupspace(diValue); //setUpSpace use Indexfrom = diValue.indexOf(...
6
@Override public long solve() throws IOException { final List<List<Node>> nodes = new ArrayList<List<Node>>(80); try (final BufferedReader reader = FileUtils.readInput(this)) { String line = null; int y = 0; while ((line = reader.readLine()) != null) { ...
9
public Set getDeclarables() { if (exceptionLocal != null) return Collections.singleton(exceptionLocal); return Collections.EMPTY_SET; }
1
public void testToStandardSeconds() { Hours test = Hours.hours(3); Seconds expected = Seconds.seconds(3 * 60 * 60); assertEquals(expected, test.toStandardSeconds()); try { Hours.MAX_VALUE.toStandardSeconds(); fail(); } catch (ArithmeticException e...
1
@Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { req.setCharacterEncoding("utf-8"); super.doFilter(req, res, chain); }
0
public String getDescription() { return description; }
0
@Override public Message build() { try { Message record = new Message(); record.to = fieldSetFlags()[0] ? this.to : (java.lang.CharSequence) defaultValue(fields()[0]); record.from = fieldSetFlags()[1] ? this.from : (java.lang.CharSequence) defaultValue(fields()[1]); record.body...
4
@Override public int rename(String from, String to) throws FuseException { try { if (fileSystem.isReadOnly()) return Errno.EROFS; fileSystem.rename(from, to); } catch (PathNotFoundException e) { return Errno.ENOENT; } catch (DestinationAlreadyExistsException e) { return Errno.EEXIST; } catch (A...
4
public final void dispatchEvent(final NativeInputEvent e) { eventExecutor.execute(new Runnable() { public void run() { if (e instanceof NativeKeyEvent) { processKeyEvent((NativeKeyEvent) e); } else if (e instanceof NativeMouseWheelEvent) { processMouseWheelEvent((NativeMouseWheelEvent) e); ...
3
public boolean hasFolderFile(SPFolder spFoler) { int i = 0; boolean found = false; while(i < files.size() && !found) { if(files.get(i).getParent().equals(spFoler)) { found = true; } i++; } return true; }
3
public Card(JSONObject data) throws JSONException, IOException { // Populate object properties ID = data.getInt("id"); Points = data.getInt("points"); sImage = data.getString("src"); sMatch = data.getString("match"); sMisMatch = data.getString("mismatch"); sReveal = data.getString("reveal"); MatchSo...
3
public void updateProgress() { setStage(getStage() + 1); if (getStage() == 1) player.getInterfaceManager().sendSettings(); else if (getStage() == 2) player.getPackets().sendConfig(1021, 0); // unflash else if (getStage() == 5) { player.getInterfaceManager().sendInventory(); player.getInventory().unl...
9
@Override public void restoreTemporaryToDefault(){tmp = def;}
0
@Override public String toString() { StringBuilder sb = new StringBuilder("codon." + name + ": "); ArrayList<String> codons = new ArrayList<String>(); codons.addAll(codon2aa.keySet()); Collections.sort(codons); for (String codon : codons) sb.append(" " + codon + "/" + aa(codon) + (isStart(codon) ? "+" : ...
2
public List<Animation> getAnimations() { List<Animation> old = new LinkedList<>(animations); animations.clear(); for (Animation a : old) { if (a.isAlive()) { animations.add(a); } } return animations; }
2
public int ginjectEncPayload(byte[] info, int start) { int i, j, n_ent, k = start; if (isInput()) { return 0; } // Create vector and array of the correct size n_ent = 1 << n_inputs; encrypted_truth_table = new Vector<byte[]>(n_ent); encrypte...
7
protected void sendMergeView(Collection<Address> coords, MergeData combined_merge_data, MergeId merge_id) { if(coords == null || combined_merge_data == null) return; View view=combined_merge_data.view; Digest digest=combined_merge_data.digest; if(view == null || digest == nu...
8
public void stepPhysics(double timeStep) { // Collision for (int i = 0; i < COLLISION_ITERATIONS; i++) { collisionBroadphase.updateCollisionPairs(timeStep); processCollisions(timeStep); } // Velocity update for (int i = 0; i < rigidBodies.size(); i++) { RigidBody rigidBody = rigidBodies.get(i); i...
8
public Vector3f checkCollision(Vector3f oldPos, Vector3f newPos, float objectWidth, float objectLength) { Vector2f collisionVector = new Vector2f(1,1); Vector3f movementVector = newPos.sub(oldPos); if(movementVector.length() > 0) { Vector2f blockSize = new Vector2f(SPOT_WIDTH, SPOT_LENGTH); Vector2f o...
5
private void displayPrevious() { try { refresh(ekd.previous(ek)); } catch (NoPreviousEmailKontaktFoundException e) { JOptionPane.showMessageDialog(this, e.getMessage()); e.printStackTrace(); } }
1
@Test public void runTestActivityLifecycle2() throws IOException { InfoflowResults res = analyzeAPKFile("Lifecycle_ActivityLifecycle2.apk"); Assert.assertEquals(1, res.size()); }
0
private boolean getFirstPlayerTurn() { boolean playersTurn = false; if (gameType == GameType.FairGo) { //Get the user input console = new Scanner(System.in); //Determine whether the player wants to go first System.out.println("Do you want to go first? [Y|N]?\n"); String playFirst = console.nex...
6
public void removeRole(User user, Role role) throws Exception { try { session = HibernateUtil.getSessionFactory().openSession(); Query q = session.getNamedQuery(getNamedQueryToRemoveRoleUser()); q.setString("role", Integer.toString(role.getId())); q.execu...
1
public void setMemory(double memory, int index){ this.memory[index] = memory; }
0
public void genBFSEdges() { ArrayList<Edge> tempEdges = new ArrayList<Edge>(); Collection<Node> pairedNodes = new HashSet<Node>(); int radius = 2 * (int) Math.sqrt(widthBound * heightBound / nodes.size()); // Find all local edges by BFS for (Node n : nodes) { for (int x = n.x - radius; x < n....
8
public static BookCategoryDO bo2do(BookCategory bookCategory) { if (bookCategory == null) { return null; } BookCategoryDO bookCategoryDO = new BookCategoryDO(); BeanUtils.copyProperties(bookCategory, bookCategoryDO, IGNORE_PARAM); if (bookCategory.getParent() != null) { bookCategoryDO.setParentId(bookC...
2
public int getUniqueChars() { String uniques = ""; for (int x = 0; x < getWidth(); ++x) { for (int y = 0; y < getHeight(); ++y) { char c = getPixel(x, y); if (!uniques.contains("" + c)) uniques += c; } } return...
3
private void message(CommandSender sender, String[] args) { if (!sender.hasPermission("graveyard.command.message")) { noPermission(sender); return; } else if (args.length == 1) { commandLine(sender); sender.sendMessage(ChatColor.GRAY + "/graveyard" + ChatC...
3
@Override public Object clone() throws CloneNotSupportedException { ObjectGroup clone = (ObjectGroup) super.clone(); clone.objects = new LinkedList<MapObject>(); for (MapObject object : objects) { final MapObject objectClone = (MapObject) object.clone(); clone.objects...
1
public final void cleanUp() { Bucket died; while ((died = (Bucket) queue.poll()) != null) { int diedSlot = Math.abs(died.hash % buckets.length); if (buckets[diedSlot] == died) buckets[diedSlot] = died.next; else { Bucket b = buckets[diedSlot]; while (b.next != died) b = b.next; b.next ...
3
public boolean canDo(char symbol) { if (symbol == '}') return true; return false; }
1
private void search(int k) { if(k == 0) { results.clear(); active = true; } if(k == max - known || (root.getLeft() == root && root.getRight() == root)) { active = false; for(Node n: results) out.add(new Node(n.getRow(), n.getRoot())); return; } Node col = root.getRight(); cover(col); fo...
9
public int play() { int clipIdx = -1; // Check if there are currently any free clips to play if (clipAssembly[nextPlaybackIdx].isRunning() == false) { clipIdx = nextPlaybackIdx; clipAssembly[clipIdx].setFramePosition(0); // If needed alter the playback volum...
6
public void genererLabel() { Iterator it = listeBus.iterator(); int compteurCritique = 0; int compteurInte = 0; while(it.hasNext()) { Bus myBus = (Bus) it.next(); if(myBus.getVitesse() < 10) compteurCritique++; else if(myBus.getVitesse() < 30) compteurInte++; JLabel lab = new JLab...
5
protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { while (in.remaining() > 0) { if (out.remaining() < 1) { return CoderResult.OVERFLOW; } final char c = in.get(); if (c >= 0 && c < 256) { out.put((byte) c); ...
4
static boolean isOverridden(Method method, Method other) { if (method.getDeclaringClass() == other.getDeclaringClass()) { return false; } if (other.getDeclaringClass().isAssignableFrom(method.getDeclaringClass()) == false) { return false; } if (Objects.equ...
8
public static int spaceCount(String s) { if (s.length() == 0) { return 0; } int count = 0; char c[] = s.toCharArray(); for (int i = 0; i < s.length(); i++) { if (c[i] == ' ') { count++; } } return count; }
3
public void addEffect(Player p, PotionEffectType potion) { if (!isValidWorld(p) || isExempt(p) || !isEnabled()) return; ConfigurationSection section = plugin.getConfig().getConfigurationSection("effects." + potion.getName().toLowerCase()); if (section == null) return; // If the hunger isn't the righ...
7
final void method1524() { int i = getSpriteWidth(); int i_113_ = getIndexHeightTotal(); if (((ImageSprite) this).indexWidth != i || ((ImageSprite) this).indexHeight != i_113_) { byte[] is = new byte[i * i_113_]; if (((ImageSprite) this).alphaIndex != null) { byte[] is_114_ = new byte[i * i_113_]; ...
7
public PrefixTree(char[] letter, double frequency[]) { pq = new PriorityQueue<PrefixTreeNode>(); for (int i = 0; i < letter.length; i++) pq.add(new PrefixTreeLeaf(letter[i], frequency[i])); while (pq.size() > 1) { PrefixTreeNode left = pq.remove(); PrefixTreeNode right = pq.remove(); pq.add(new Pr...
2
public static BaseProperties stringToProperties(String propString){ BaseProperties result = new BaseProperties(); if (null == propString) return result; InputStream is = new ByteArrayInputStream(propString.getBytes()); try { result.load(is); } catch (IOException e) { ...
2
public void visitInsn(final int opcode) { minSize += 1; maxSize += 1; if (mv != null) { mv.visitInsn(opcode); } }
1
public LinkedList<instant> getMicrobiologicalInstants(int subject_id, int itemid1, int itemid2, int itemid3, String tableName, boolean negated, LinkedList<Attribute> attributes, IntervalDescription intDesc) throws ParseException { LinkedList<instant> instants = new LinkedList<instant>(); if(!meetsAt...
9
public void close() throws IOException { isClosed = true; }
0
private static void buildValidationUriMsgPane(File file){ if(!file.exists()){ JOptionPane.showMessageDialog( null,"l'uri renseignée n'est pas valide" ,"Validation de l'uri", JOptionPane.INFORMATION_MESSAGE); }else if (!file.isDirectory()){ JOptionPane.showMessageDialog( null,"l'uri renseignée ne ...
2
private void btnEditarFuncionarioSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditarFuncionarioSalvarActionPerformed try { if (JOptionPane.showConfirmDialog(rootPane, "Deseja Salvar?") == 0) { carregaObjeto(); if (dao.S...
3
public void addItemDesc(int i, String in, int size) { if (item_desc == null) { item_desc = new String[size]; } item_desc[i] = in; }
1
private static void checkTokenName(String namedOutput) { if (namedOutput == null || namedOutput.length() == 0) { throw new IllegalArgumentException( "Name cannot be NULL or emtpy"); } for (char ch : namedOutput.toCharArray()) { if ((ch >= 'A') && (ch <...
9
private static int rpnParse(Object[] parsedQuery, int position) throws ParseException { Object curr = parsedQuery[position]; int tokens = 1; if (curr instanceof Expression) { int numArgs = ((Expression) curr).getArgumentCount(); List args = new ArrayList(numArgs); ...
9
public static boolean is_win() throws FileNotFoundException { if (ifWin == 0) { return false; } else if (win) { return true; } if ((FieldGame.unknown == 0 && ifWin == -1) || (FieldGame.objects == ifWin)) { System.out.println("main: game is finish"); Gui.writeStatus(); win = true; return t...
5
private static void fillOneDimArray(Object array, String[] values, IAutoConfigParser<?> parser, IAutoConfigValidator<?> validator) throws Exception { for (int i = 0;i < values.length;++ i) { String valueString = PATTERN_ELEMENT_ESCAPES.matcher(values[i]).replaceAll("$1"); Object value; if (parser.getClass...
5
private void btnSaveMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSaveMousePressed ArrayList<String> errors = getValidationErrors(); if (!errors.isEmpty()){ String errorMsg = "Please fix the following errors:\n"; for (String error : errors) { errorMsg += erro...
2
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 boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Organism)) { return false; } Organism other = (Organism) object; if ((this.key == null && other.key != null) ||...
5
public static void main(String args[]) { System.out.println("Client..."); try { AuctionClient client = new AuctionClient(AuctionServer.SERVER_HOST); String CurLine, ownerName, itemName, itemDesc, tmp; double bid, maxbid; int auctionTime, strategy; ...
9
protected void addHelpFileContents(Content contentTree) { Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false, HtmlStyle.title, getResource("doclet.Help_line_1")); Content div = HtmlTree.DIV(HtmlStyle.header, heading); Content line2 = HtmlTree.DIV(HtmlStyle.subT...
7
@Override public void open() throws MidiUnavailableException { if (!initialized) throw new MidiUnavailableException(); for (Synthesizer s : theSynths) s.open(); }
2
public static RefType forID(int refTypeID) { for (RefType refType : values()) { if (refType.getId() == refTypeID) return refType; } return null; }
2
public void evaluate(int trainItem, int testItem){ String DataDirectory = "RandomPieces_200"; String opticsFilename = "ids200_" + trainItem + "-" + testItem + ".optics"; ArrayList<ReachabilityPoint> ordering = OpticsOrderingReader.readFile(DataDirectory + File.separatorChar+opticsFilename); int minpts ...
9
public static void write(final INode node, final Writer writer) throws IOException { if (node == null) { return; } if (node instanceof Text) { writeText((Text)node, writer); return; } if (node instanceof Element) { writeElement((E...
9
public void removeSettingsGuiListener(SettingsGuiListener listener_) { settingsGuiListener.remove(listener_); }
0
static String getInput(Scanner scanner){ StringBuilder a=new StringBuilder(); String temp=null; scanner.nextLine();//忽略掉开始的start while (!"END".equals((temp=scanner.nextLine()))){ a.append(temp).append('\n'); } return a.toString(); }
1
private static void readData() { try { b = new BufferedReader(new FileReader(fileDirectory + dataFile)); String line; while ((line = b.readLine()) != null) { String[] s = line.split(":"); int usr = Integer.parseInt(s[0]); int mov = Integer.parseInt(s[2]); int rat = Integer.parseInt(s[4]); ...
6
@Override public void setValue(int row, int col, double value) throws MatrixIndexOutOfBoundsException { if ((row < 0) || (col < 0) || (row >= mas.size()) || (col >= mas.get(0).size())) { throw new MatrixIndexOutOfBoundsException("Inadmissible value of an index."); } mas.get(row)....
4
public static Cons idlTranslateMethodParameters(MethodSlot method) { { Cons result = Stella.NIL; Cons directions = Stella.NIL; if (method.methodParameterDirections().emptyP()) { { Symbol name = null; Cons iter000 = method.methodParameterNames().rest(); Cons collect000 = null...
9
public CheckResultMessage checkJ04(int day) { int r1 = get(17, 2); int c1 = get(18, 2); int r2 = get(20, 2); int c2 = get(21, 2); BigDecimal b = new BigDecimal(0); if (checkVersion(file).equals("2003")) { try { in = new FileInputStream(file); hWorkbook = new HSSFWorkbook(in); b = getValue(r2 ...
5
public void setPortServer(int port){ this.portServer = port; }
0
public static Integer[] getImageData(BufferedImage image) { final byte[] pixels = ((DataBufferByte)image.getRaster().getDataBuffer()).getData(); final int width = image.getWidth(); final int height = image.getHeight(); final boolean hasAlphaChannel = image.getAlphaRaster() != null; ...
5
public static void addLinkInfor(LinkInfo li) { if(!_HEAVY_SCIENCE || (li.getDestinationNode() != 1||li.getSourceNode()!=2)) return; if(labelsSave==null) labelsSave = new LinkedList<String>(); splitUpMetaInfo(li); String name = ""+li.getSourceNod...
8
private void render() { BufferStrategy bs = getBufferStrategy(); if (bs == null) { createBufferStrategy(3); return; } currentScreen.clear(); currentScreen.render(); for (int i = 0; i < currentScreen.pixels.length; i++) { pixels[i] = currentScreen.pixels[i]; } Graphics g = bs.getDrawGraphics(...
2
public String getTitle() { return title; }
0
@ Override public boolean writeToFile(final File file, T object, boolean replaceIfExists) { skipRemaining = false; // Delete file if it exists if (file.exists () && replaceIfExists) { file.delete (); } else return false; Path path = Paths.get (file.getAbsolutePath ()); BufferedWriter writer = ...
5
private Long getSmallestIdLargerThan(Long currentId) throws SQLException { StringBuilder statement = new StringBuilder(100); statement.append("SELECT "); statement.append(Defaults.ID_COL); statement.append(" FROM "); statement.append(sourceObjectTableName); statement.append(" WHERE "); statement.append(D...
2
public static byte[][][] computeParityTilesFromTileCube(byte[][][] tileCube) { byte[][][] parityTiles = new byte[3][tileCube.length][tileCube.length]; // tile 1 for (int tileIdx = 0; tileIdx < tileCube.length; tileIdx++) { for (int row = 0; row < tileCube.length; row++) { byte parity = 0; ...
9
private Printer03() { }
0
@Override public void setTmp(String value) {this.tmp = value;}
0
private ILevel chooseLevel() { if (getFirstLevels() == null || getFirstLevels().size() == 0) { return null; } if (getFirstLevels().size() == 1) { return getFirstLevels().get(0); } Integer poll = null; printLevels(); while (poll == null |...
8
@Override public StringBuffer getOOXML( String catAxisId, String valAxisId, String serAxisId ) { StringBuffer cooxml = new StringBuffer(); // chart type: contains chart options and series data cooxml.append( "<c:area3DChart>" ); cooxml.append( "\r\n" ); cooxml.append( "<c:grouping val=\"" ); if( is100Pe...
5
boolean checkValue(int Red, int Green, int Blue){ int maxValue = 1; for(int i = 0; i < bitPerPixel/numOfColorComponents; i++){ int temp = 2; maxValue = maxValue*temp; } maxValue = maxValue - 1 ; if(Red < 0 || Green < 0 || Blue < 0){ System.out.println("�G���[:RGB�l�ɕ��̒l�͎g���Ȃ�")...
7
private static void TexasHoldEm() { Table tbl = new Table(); int iPlayers = 5; Deck dStud = new Deck(); // Add the players, give them empty hands for (int i = 0; i < iPlayers; i++) { Player p = new Player("Joe",null); p.SetPlayerNbr(i+1); p.SetHand(new Hand()); tbl.AddTablePlayer(p); }...
7
private void fxInitCallbacks() { webEngine.titleProperty().addListener(new ChangeListener<String>() { @Override public void changed( ObservableValue<? extends String> observable, String oldValue, final String newValue ) { SwingUtilities.invokeLater(new Runnable() { @O...
6
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 fe...
6
public void play(int row, int col) { if (Othello.isReversed(player, opponent, row, col)) { myCanvas.repaint(); score.setText(Othello.getScore()); comment.setText(" "); //Get turn switchPlayer(); if (!Othello.isPossible(player, opponent)) { if (!Othello.isPossible(opponent, player)) { ...
7
public List<String> getSampleNames() { if (sampleNames != null) return sampleNames; // Split header String headerLines[] = header.toString().split("\n"); // Find "#CHROM" line in header for (String line : headerLines) { if (line.startsWith("#CHROM")) { chromLine = true; // This line contains all...
4
public ArrayList<AreaConhecimento> listar(String condicao) throws Exception { ArrayList<AreaConhecimento> listaAreaConhecimento = new ArrayList<AreaConhecimento>(); String sql = "SELECT * FROM areaconhecimento " + condicao; try { PreparedStatement stmt = ConnectionFactory.getConnection().prepareStatement...
2
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
private void checkPosition() { StreamsterApiInterfaceProxy proxy = new StreamsterApiInterfaceProxy(); Position[] positions = new Position[0]; try { positions = proxy.getPositions(); } catch (RemoteException ex) { Logger.getLogger(JobTradeUp.class.getName()).log(Le...
3
private static Date getStartDate(HashMap<String, Object> map) { Long startDay = (Long) map.get("startDay"); Long startMon = (Long) map.get("startMonth"); Long startYear = (Long) map.get("startYear"); Calendar cal = Calendar.getInstance(); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal...
3
protected void trainModel(InstanceStream trainStream, AbstractClassifier model) { ClassificationPerformanceEvaluator evaluator = new BasicClassificationPerformanceEvaluator(); evaluator.reset(); long instancesProcessed = 0; System.out.println("Started learning the model..."); whi...
7
public ArrayList<Person> getPersons() { return Persons; }
0
public GameMaster(Combination<Colors> target) { this.target = target; System.out.print("The target is : "); target.print(); }
0
public final NewFoodContext newFood() throws RecognitionException { NewFoodContext _localctx = new NewFoodContext(_ctx, getState()); enterRule(_localctx, 6, RULE_newFood); int _la; try { enterOuterAlt(_localctx, 1); { setState(56); match(16); setState(57); match(3); setState(60); _errHandler....
9
private void generateHardwareSystemAlternativesGeneration() { int alternatives = 1; int possibilities[] = new int[project.getHardwareSets().size()]; int repetitions[] = new int[project.getHardwareSets().size()]; int i = 0; for (HardwareSet hws : project.getHardwareSets()) { alternatives *= hws.getHardwareS...
1
public boolean isSameTree(TreeNode p, TreeNode q) { // Start typing your Java solution below // DO NOT write main() function if (p == null && q == null) return true; if (p == null || q == null) return false; if (p.val == q.val && isSameTree(p.left, q.left) && isSameTree(p.right, q.right)) return ...
7