text
stringlengths
14
410k
label
int32
0
9
protected void createDOMElement() { Document doc = BLXUtility.createDOMDocument(); if(this.getObjectType() == this.OBJECT_TYPE) domElement = doc.createElementNS("blx", BLX_NS+":"+this.BLX_OBJ_NODE_NAME); else domElement = doc.createElementNS("blx", BLX_NS+":"+this.BLX_C...
8
protected void addConnection(int x, int y, boolean input, String name) { for (Component c : getComponents()) if (c.getName().equals(name)) throw new InvalidParameterException("Connection already exists with name: " + name); Connection c = new Connection(name, input); c.setBounds(x * Logicator.gridSize, y *...
2
private List<Arg> getArgs(String[] args) { List<Arg> argumentList = new ArrayList<Arg>(); if (args.length == 0 || args[0].charAt(0) != '-') { argumentList.add(Arg.CODE_GENERATOR); return argumentList; } else { for (String parameterizedArg : args) { if (parameterizedArg.charAt(0) == '-') { boolea...
8
private JSONObject getResponseFromCookie(HttpServletRequest request) { Map<String, String> previousIdps = new HashMap<String, String>(); String last = ""; Cookie[] cookies = request.getCookies(); if (cookies != null) { for (Cookie cookie : cookies) { String na...
5
public void ARPStorm(byte[] targetIP) { // Generates a storm of poison ARPs boolean kill = true; // A kill control variable while (kill == true) { // While kill is true ARPPacket p = this.ARPGen(targetIP); // Generate a new ARP packet targeted at the targetIP parameter inject.inject(p); // Injects the pois...
1
protected int countDifferences(Vector<Boolean> oldValue, Vector<Boolean> newValue) { if (oldValue.equals(newValue)) { return 0; } if (oldValue.size() <= newValue.size()) { int result = 0; for (int i = 0; i < oldValue.size(); i++) { if (oldValue...
6
private boolean step() throws LexicalError, SyntaticError, SemanticError { if (currentToken == null) { int pos = 0; if (previousToken != null) pos = previousToken.getPosition()+previousToken.getLexeme().length(); currentToken = new Token(DOLLAR, "...
9
public String toString() { return super.toString(); }
0
public void toTwoD(){ double[] hold0 = (double[])this.point.clone(); double[] hold1 = new double[2]; boolean test1 = true; for(int i=2; i<this.nDimensions; i++){ if(hold0[i]!=0.0)test1 = false; } if(test1){ for(int i=0; i<2; i++)hold1[i] = hold0[i]...
4
public static SaleType build(String saleTypeStr) { switch(saleTypeStr) { case("分销"): return DISTRIBUTION; case("承销"): return UNDERWRITTING; } throw new IllegalArgumentException("错误的销售方式字符串{" + saleTypeStr + "}"); }
2
private boolean isaNonFoodItem(Material item){ Material i = item; if(i == Material.WATER_BUCKET || i == Material.BOWL || i == Material.POTION){ return true; }else{ return false; } }
3
public Stats mutateClone() { HashMapStats myClone = new HashMapStats(); for (Stat stat : stats.values()) { myClone.put(new Stat(stat.getType(), stat.getValue() * Random.getGaussian(0.5, 1.5))); } return myClone; }
1
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
@Override public void caseAExplist(AExplist node) { inAExplist(node); if(node.getExp() != null) { node.getExp().apply(this); } { List<PExprest> copy = new ArrayList<PExprest>(node.getExprest()); for(PExprest e : copy) { ...
2
private double calcMLon () { double add = 0; for (int i = 0; i < nbrPoints; i++) { add = add + positions.get(i).getLongitude(); } double result = add / nbrPoints; return (result); }
1
public Configuration start(String[] args) { try { // Load and validate properties System.out.println(" -- Loading and validating configuration"); Configuration config = loadAndValidateProperties(); if (config.inputDir == null || config.inputDir.trim().length() == 0) { System.out.println(" -- No co...
6
@SuppressWarnings("deprecation") @EventHandler public void onEntityRegainHealth(EntityRegainHealthEvent event) { if (enabled) { if (event.getEntity() instanceof Player) { if (victims.containsValue(((Player) event.getEntity()).getName())) { for (String name : victims.keySet()) { Player attacker = B...
7
public PdfDocument addAbsolutePosition(PdfElement element) { try { if (!element.setPosition(pdfwriter.getDirectContent(), document .getPageSize().getWidth(), document.getPageSize() .getHeight())) { document.add(element.getPdfElement()); ...
2
@SuppressWarnings("unchecked") private static void loader() { try { for(String name : typeNames) types.add( (Class<? extends Pet>)Class.forName(name)); } catch(ClassNotFoundException e) { throw new RuntimeException(e); } }
3
public boolean isCarrying() { Layered layered = gob().getattr(Layered.class); if (layered != null) { return layered.containsLayerName("gfx/borka/body/standing/arm/banzai/") || layered.containsLayerName("gfx/borka/body/walking/arm/banzai/"); } return false; }
2
public void keyboard() { String defualt_key = config.getKeyBinding(); log.logDebug("The defualt keyboard key is: " + defualt_key); KeyBindingManager bindingmanager = SpoutManager.getKeyBindingManager(); bindingmanager.registerBinding("Start vote!", keyboard_translate.Translate(defualt_key), "Starts a new ...
5
public static void main(String[] args) { //1.) System.out.println("1.)\n"); OrderedSet<Description> s = new OrderedSet<Description>(); Description d1 = new Description("abcdefg\nhijklmnop\nqrstuvw\nxyz"); Description d2 = new Description("111111111\n222222"); Description d3 = new Description("ABC\n123\n9...
8
public Rectangle getVisibleBoundaries( Graphics g ){ Rectangle result = null; for( GraphPaintable paintable : paintables ){ Rectangle boundaries = paintable.getVisibleBoundaries( g ); result = union( result, boundaries ); } for( Component child : canvas.getComponents() ){ Rectangle boundaries = c...
3
public int climbStairs(int n) { if (n ==0 || n == 1 || n == 2){ return n; } else{ int result = 0; int First = 1, Second = 2; for (int i = 2; i < n; i++){ result = First + Second; First = Second; Secon...
4
public void updateAction() { if(actionList.hasAction() || currentAction != null) { if(currentAction == null) { currentAction = actionList.poolCurrentAction(); currentAction.setStartTime(System.nanoTime()); } else { if(currentAction.isOver()) { currentAction.endAction(); currentAction = nul...
5
public CategoryDAO CategoryDAO(){ if (categoryDAO == null){ categoryDAO = new CategoryDAOImpl(); } return categoryDAO; }
1
public boolean isSyncMark(int headerstring, int syncmode, int word) { boolean sync = false; if (syncmode == INITIAL_SYNC) { //sync = ((headerstring & 0xFFF00000) == 0xFFF00000); sync = ((headerstring & 0xFFE00000) == 0xFFE00000); // SZD: MPEG 2.5 } else { sync = ((headerstring & 0xFFF80C00) ==...
5
public Torrent getMode(String str) { if (str.equals("single")) return Torrent.SINGLE; else if (str.equals("multi")) return Torrent.MULTI; else return Torrent.UNKNOWN; }
2
public static void merge(double[] input, int lo, int mid, int hi) { // Must use auxilliary array. In-place merge is a lot harder. See book. double[] aux = new double[hi - lo]; // Merge into aux int i = lo; int j = mid; for (int m = 0; m < aux.length; m++) { if (i >= mid) { aux[m] = input[j++]; ...
5
@Test public void storeAndRetrieve() { final String expected = "stored object"; cache.put(cacheKey, expected); String actual = cache.get(cacheKey, String.class); assertSame(expected, actual); }
0
private void write(SelectionKey key) throws IOException { try{ SocketChannel socketChannel = (SocketChannel) key.channel(); synchronized (this.pendingData) { List<ByteBuffer> queue = (List<ByteBuffer>) this.pendingData.get(socketChannel); // Write until there's not more data ... while (!queue.isEmp...
4
public PeerID(byte[] data, int tries) { this.data = data; this.tries = tries; }
0
protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { try { org.apache.axis.client.Call _call = super._createCall(); if (super.maintainSessionSet) { _call.setMaintainSession(super.maintainSession); } if (super.cachedU...
8
public void testCanHaveImprovement() { for (TileType tileType : spec().getTileTypeList()) { if (tileType.isWater()) { if (highSeas.equals(tileType)) { assertFalse(tileType.canHaveImprovement(fishBonusLand)); assertFalse(tileType.canHaveImprove...
8
public TrayIcon getTrayIcon() { return trayIcon; }
0
private void smoothingFilter(int rad) { int size = 2*rad+1; float [] k = getBlurKernel(2*rad+1); for (int y=0; y < height; y++) { for (int x=0; x < width; x++) { int i = y*width + x; if (plotList[i] != null) { float sum = 0; float n = 0; for (int dy = -rad, ky = 0; dy<=rad; ...
8
@Override public int rowsY() { return isNotPlayerInventory() ? 1 : 2; }
1
private double internalReadDouble(int code) throws IOException { switch (code) { case Codes.DOUBLE: return is.readRawDouble(); case Codes.DOUBLE_0: return 0.0D; case Codes.DOUBLE_1: return 1.0D; default: { ...
4
public short deinitialize() { short ret = MsgDumperCmnDef.MSG_DUMPER_SUCCESS; if (t.isAlive()) { try { // If the user does NOT notify the thread to die, notify it before waiting for its death if (!exit.get()) { ret = notify_to_deinitialize(); if (MsgDumperCmnDef.CheckMsgDumperFailure(ret)...
9
public static void main(String[] args) throws IOException{ InputStream entradaSistema = System.in; InputStreamReader leitor = new InputStreamReader(entradaSistema); BufferedReader leitorEntrada = new BufferedReader(leitor); String entradaTeclado; char menuOpcao; char opca...
9
private void benchmark() { stage.hide(); secondaryStage = new Stage(StageStyle.UTILITY); secondaryStage.setTitle("Benchmarking..."); StackPane sp = new StackPane(); benchmarkBar = new ProgressBar(); benchmarkBar.setPrefWidth(400); benchmarkBar.setPrefHeight(30); ...
5
public static boolean batch( WebSocketImpl ws, ByteChannel sockchannel ) throws IOException { ByteBuffer buffer = ws.outQueue.peek(); WrappedByteChannel c = null; if( buffer == null ) { if( sockchannel instanceof WrappedByteChannel ) { c = (WrappedByteChannel) sockchannel; if( c.isNeedWrite() ) { ...
8
private void sqrtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sqrtActionPerformed if (!"".equals(text.getText())) { double value = Double.parseDouble(text.getText()); value = Math.sqrt(value); if (value >= 0) { printer(value); ...
2
private static void setDestination(IControl control)throws Exception{ //coordinates of parking slot double back_X = destination.getBackBoundaryPosition().getX(); double back_Y = destination.getBackBoundaryPosition().getY(); double front_X = destination.getFrontBoundaryPosition().getX(); double front_Y = ...
7
protected void printProgression(int n){ System.out.println(firstValue()); for(int i=2;i<=n;i++){ System.out.println(nextValue()); } }
1
public boolean contains(String nickname) { for (User user : model) { if ( user.getNickname().equalsIgnoreCase(nickname) ) return true; } return false; }
2
public static void writeAllSentences(List<List<String>> sentences, String outputFilePath) throws IOException { File output = new File(outputFilePath); if (!output.exists()) { output.createNewFile(); } BufferedWriter bw = new BufferedWriter(new FileWriter(output)); StringBuilder builder = new StringBuild...
3
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Author)) return false; Author author = (Author) o; if (!name.equals(author.name)) return false; return true; }
3
public int getModifiers() { if ((status & HIERARCHY) == 0) loadInfo(HIERARCHY); return modifiers; }
1
private CoreConstants() { properties = new Properties(); LOG.info("The properties file is being loaded: " + APP_PROPERTIES); try (FileInputStream inputStream = new FileInputStream(APP_PROPERTIES)) { properties.load(inputStream); LOG.info("Properties file load successful"); } catch (FileNotFoundException e...
2
@Override public void run() { // TODO Auto-generated method stub CImedWrapper wrapper = new CImedWrapper(this.getProxy(), this.getUsername(), this.getPwd()); boolean bServiceAvailable = false; boolean bReportingAvailable = false; try{ bServiceAvailable = wrapper.CheckServiceAvailable(); ...
3
@Override public A set(A a, B b) { try { setMethod.invoke(a, b); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } return a; }
3
public boolean setInputFormat(Instances instanceInfo) throws Exception { if ((instanceInfo.classIndex() > 0) && (!getFillWithMissing())) { throw new IllegalArgumentException("TimeSeriesTranslate: Need to fill in missing values " + "using appropriate option when class ...
8
void bondAminoHydrogen(int indexDonor, Point3f hydrogenPoint, BitSet bsA, BitSet bsB) { AminoMonomer source = (AminoMonomer)monomers[indexDonor]; Point3f sourceAlphaPoint = source.getLeadAtomPoint(); Point3f sourceNitrogenPoint = source.getNitrogenAtomPoint(); int energyMin1 = 0...
9
private static void insertObs(Difficulty diff, Point enter, Orientation orientation){ Random random = new Random(); int recAccuracy = GetConfigByDiff.setRecAccuracy(diff); float x, y, h, l; x = y = h = l = 0; switch (orientation){ case left: { l = recA...
4
@Override public int getCount(E data) { // We traverse the list until the node with data as its value is found, then return its count // If no such node is found we return 0 if(head == null){ // Empty list has no node with data as its value return 0; } // Does head match? If so, return its count List...
5
static LookAndFeel getFactory(CHOICE choice) { LookAndFeel lookAndFeel = null; switch (choice) { case WINDOWS: lookAndFeel = new WindowsLookAndFeel(); break; case MOTIF: lookAndFeel = new MotifLookAndFeel(); break; ...
2
private void expand(SyrianGraph g, SimpleHeuristicNode hn, AbstractList<SimpleHeuristicNode> toBeExpanded, AbstractList<SimpleHeuristicNode> alreadyExpanded) { this.setExpansions(this.getExpansions() + 1); // trivial expansion AbstractCollection<SyrianEdge> edges = g.getAllEdgesForVertex(hn .getRoot());...
9
void setPendingViewOffset(int xofs,int yofs) { if (!pf_wrapx) { if (xofs < 0) xofs=0; if (xofs > tilex*(nrtilesx-viewnrtilesx)) xofs = tilex*(nrtilesx-viewnrtilesx); } if (!pf_wrapy) { if (yofs < 0) yofs=0; if (yofs > tiley*(nrtilesy-viewnrtilesy)) yofs = tiley*(nrtilesy-viewnrtilesy); } p...
8
public static String decrypt(String cipher) { if(firstTime) {initTabel();firstTime = false;} cipher = cipher.toUpperCase(); char[] crypt = cipher.toCharArray(); String tmp=""; String plain = ""; int x,y,pos = 0; for(int i=0;i<crypt.length;i+=2) { //luam doua cate doua tmp = crypt[i]+""+crypt[i...
4
public void addRock(int x, int y, int size) { if ((size <= 3) && (size > 0)) { for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { if ((y+j<this.ourMap.length) && (x+i<this.ourMap[j].length)) { this.ourMap[y+j][x+i] = new Tile(2); } } } } }
6
public static String getFix() { char c = automata.turing.Tape.BLANK; StringBuffer b = new StringBuffer(); for (int i = 0; i < 20; i++) b.append(c); return b.toString(); }
1
public void paintComponent(Graphics gx) { super.paintComponent(gx); if (m_plotInstances != null && m_plotInstances.numInstances() > 0 && m_plotInstances.numAttributes() > 0) { if (m_plotCompanion != null) { m_plotCompanion.prePlot(gx); } m_JRand = new Random(m_JitterVal); paintAxis(...
8
public void setItemId(int itemId) { this.itemId = itemId; }
0
public void methodExplorer(File folder) { methods = new MethodVisitor(); for (File file : folder.listFiles()) { if (file.isDirectory()) { methodExplorer(file); } else { if (file.getName().endsWith(".java")) { String fileName = file.getName().substring(0, file.getName().length() - 5); ...
4
private static void fillBuffer() { // Wait for user to type a line and press return, try { buffer = in.readLine(); } catch (Exception e) { if (readingStandardInput) throw new IllegalArgumentException("Error while reading standard input???"); else if (inputFile...
3
@Override public void destroy() { if(currentSector > -1) { Application.get().getLogic().getGame().getSector(currentSector).releaseLocation(owner); } }
1
public void handleInput() { int in = input.getInput(); if(in == Keys.W){this.velocity.thisAdd(new Vector2D(0,-8));} if(in == Keys.S){this.velocity.thisAdd(new Vector2D(0,8));} if(in == Keys.A){this.velocity.thisAdd(new Vector2D(-8,0));} if(in == Keys.D){this.velocity...
4
private List<Gate> getIncrementedGates(List<Gate> parsedGates){ List<Gate> res = new ArrayList<Gate>(); int incNumber = largestAugOutputWire + 1 - numberOfOriginalInputs; for (Gate g: parsedGates) { if(!g.isXOR()){ g.setGateNumber(g.getGateNumber() + numberOfNonXORGatesAdded); } //If left wire is y...
8
protected List <Segment> installedBetween(Tile start, Tile end) { final List <Segment> installed = super.installedBetween(start, end) ; if (installed == null || installed.size() < 4) return installed ; // // If the stretch to install is long enough, we cut out the middle two // segments and instal...
8
public ConstOperator deobfuscateString(ConstOperator op) { ClassAnalyzer clazz = methodAnalyzer.getClassAnalyzer(); MethodAnalyzer ma = clazz.getMethod(methodName, methodType); if (ma == null) return null; Environment env = new Environment("L" + methodAnalyzer.getClazz().getName().replace('.', '/') + ";"...
5
@Override public int down() throws ParsingException { if (!canStepDown) { throw new InvalidParseCommandException("Can't step down. Element " + currentElement.getName() + " does not have any unparsed child elements", lastEvent.getLocation().getLineNumber(), lastEvent .getLocation().getColumnNumber());...
1
@Override public boolean addClient(Client client) { int shortestLineIndex = 0; int shortestLineTime = Integer.MAX_VALUE; for(int i = 0; i < cashiers; i++){ int currentLineTime = 0; for(int j = 0; j < lines[i].size(); j++){ currentLineTime += lines[i].get(j).getExpectedServiceTime(); } if(currentL...
3
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (Exception ex) { Logger.getLogger(ControlJson.class .getName()).l...
1
public void move(Direction theD){ if(theD == null) { return; } switch(theD) { case UP: this.y--; facingDirection = Direction.UP; break; case DOWN: this.y++; facingDirection = Direction.DOWN; break...
8
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; UtilisateurVue other = (UtilisateurVue) obj; if (nom == null) { if (other.nom != null) return false; } else if (!nom.equals(other.nom)) ...
7
private void assertEquals(String text, Object expected, Object result) { boolean equal; // tests equality between expected and result accounting for null if (expected == null) { equal = result == null; } else { equal = result != null && expected.equals(result); } if (!equal) { // prints the descrip...
4
public void addToGroup(Group g, Piece p) { if (p == null || g.pieces.contains(p) || (g.pieces.size() > 0 && g.pieces.toArray(new Piece[0])[0].team != p.team)) { return; } int row = p.where.row; int col = p.where.col; g.pieces.add(p); if (col > 0) { addToGroup(g, squares[row][col - 1].piece); ...
8
public Analyser(StringBuilder builder, Logger log) { this.log = log; this.code = builder.toString(); if(log_level >= 3) log.log(3, key, "Analyser is doing stuff please wait ...", "\n"); types = new TYPES(log); program_stack ...
5
public double resolveCollisionX(AABB other, double moveAmtX) { double newAmtX = moveAmtX; if (moveAmtX == 0.0) { return moveAmtX; } if (moveAmtX > 0) { // Our max == their min newAmtX = other.getMinX() - maxX; } else { // Our min == their max newAmtX = other.getMaxX() - minX; } if (Math.ab...
3
public void sort(SortArray points, SortCanvas c) { int max = 6; // too dangerous to take more int i; // remove the unused points from view for( i = max + 1; i < points.length(); i++) points.put(i, -100); c.clearWindow(); Random rand = new Random(new Random().nextInt()); for (i = 1; i <= ...
7
protected void buildIndexMap(RootDoc root) { PackageDoc[] packages = root.specifiedPackages(); ClassDoc[] classes = root.classes(); if (!classesOnly) { if (packages.length == 0) { Set<PackageDoc> set = new HashSet<PackageDoc>(); PackageDoc pd; ...
8
@Override public void addEdge(Edge edge) { // check to see if it is a valid edge if (!edge.validGameEdge()) { throw new IllegalArgumentException("Invalid edge inserted. Edges must have both of their endpoints defined."); } ...
8
private boolean cellaValida(Cella cella){ // contolla se la cella cliccata è una mossa valida mangiate = new MangiateValide(); if (mangiate.trovaMangiateBianche(damiera).isEmpty()) { // cerca tra i movimenti MosseValide mosse = new MosseValide(damiera, mossaUtente[0].getx(), mossaUtente[0].gety(),...
8
@Override public void setMobile(String mobile) { super.setMobile(mobile); }
0
public KeyNodeIntPair dealWithPromote(int newKey, Node rightChild, InternalNodeInt node) { // if new key is greater than the key in the last element of list // insert child into the node if (newKey > node.getKeys().get(node.size() - 1)) { node.getKeys().add(newKey); node.getChildren().add(rightChild); ...
6
protected TNorm extractTNorm(String line) { List<String> token = Op.split(line, ":"); if (token.size() != 2) { throw new RuntimeException("[syntax error] " + "expected property of type (key : value) in line: " + line); } String name = token.get(1).trim(); ...
7
public static String normalizeNewlines(String input) { String result = input; if (input != null) { char[] chars = input.toCharArray(); final int length = chars.length; int startWritePos = 0; StringBuffer resultBuffer = null; char previousChar = 0; for (int index = 0; index < length; index++) { ...
9
private ArrayList<Integer> generateAgeColumnCodes(ArrayList<String> columnLabels) { ArrayList<Integer> columnCodes = new ArrayList<Integer>(); for(int i = 0; i < columnLabels.size(); i++) { String curLabel = columnLabels.get(i); if(curLabel.equals(Constants.APTA_AGE_0_14_LBL)) columnCodes.add(i, Const...
9
public CommandCwlookup(CreeperWarningMain plugin) { this.plugin = plugin; }
0
public void setNomFichier( String nomFichier ) { this.nomFichier = nomFichier; }
0
static void validateSymbolName(final GenericDescriptor descriptor) throws DescriptorValidationException { final String name = descriptor.getName(); if (name.length() == 0) { throw new DescriptorValidationException(descriptor, "Missing name."); } else { ...
8
public boolean estEnCours(){ if(this.etat == EN_COURS){ return true ; } else { return false ; } }
1
public static void main(String[] args) { String fileName; if (args.length > 0) { fileName = args[0]; } else { fileName = "jenkinslamps.properties"; } try { LampConfig config = LampConfigReader.read(new FileInputStream(new File(fileName))); ...
5
public void loseALife(boolean passed, boolean boss){ if (passed == true){ if (!boss){ lives--; } else{ lives -= 10; } } if (lives <= 0){ lives = 0; } }
3
public static Drilling nextDrillFor(Actor actor) { if (actor.base() == null) return null ; if (! (actor.mind.work() instanceof Venue)) return null ; final World world = actor.world() ; final Batch <DrillYard> yards = new Batch <DrillYard> () ; world.presences.sampleFromKey(actor, world, 5, yard...
4
@Override public void collideWith(Element e) { if (isActive()) { if (e instanceof Player) { collideWithPlayer((Player) e); getGrid().removeElement(this); } } }
2
public void setReaders(BytePacket[] value) { for(BytePacket packet : value) { if(readers.get(packet.type) != null) try { throw new Exception("try to override reader in DataReader"); } catch (Exception e) { e.printStackTrace(); } log.debug("add reader " + packet.type); reader...
3
public String getType() { return type; }
0
public static void main(String[] args) { Graph G = null; try { G = new Graph(new In(args[0])); } catch (Exception e) { System.out.println(e); System.exit(1); } int s = Integer.parseInt(args[1]); IPaths paths = new Paths(G, s); for (int v = 0; v < G.V(); v++) { System.out.print(s + "...
5