text
stringlengths
14
410k
label
int32
0
9
public static void main(String[] args) { //Liskov sub ProgrammingCourse[] courseList = { new AdvancedJavaCourse("Advanced Java","COURSE_NUMBER"), new IntroJavaCourse("Introduction to Java","COURSE_NUMBER"), new IntroToProgrammingCourse("Introduction to Programming","COURS...
1
private void expand1(byte[] src, byte[] dst) { for(int i=1,n=dst.length ; i<n ; i+=8) { int val = src[1 + (i >> 3)] & 255; switch(n-i) { default: dst[i+7] = (byte)((val ) & 1); case 7: dst[i+6] = (byte)((val >> 1) & 1); case 6: dst[i+...
8
private double doSingleSwap(Deque<Pair<Vertex>> swaps) { Pair<Vertex> maxPair = null; double maxGain = Double.NEGATIVE_INFINITY; for (Vertex v_a : unswappedA) { for (Vertex v_b : unswappedB) { Edge e = graph.findEdge(v_a, v_b); double edge_cost = (e != null) ? e.weig...
4
public static void secondinit() throws SlickException{ if(dogepossible==true) chicken1= new Image("resources/images/doge.png"); else if (dogepossible==false) chicken1= new Image("resources/images/chickun1.png"); if(cagepossible==true) chicken2= new Image("resources/images/cage.png"); else...
4
public Set<Map.Entry<Character,Integer>> entrySet() { return new AbstractSet<Map.Entry<Character,Integer>>() { public int size() { return _map.size(); } public boolean isEmpty() { return TCharIntMapDecorator.this.isEmpty(); } ...
8
@Override public void actionPerformed(ActionEvent e) { if(e.getSource() == widokOpisTworcow.btn_WrocDoWyboruKategorii) powrotDoOknaGlownego(); if(e.getSource() == widokOpisTworcow.mnI_Wyjscie) wyjscie(); if(e.getSource() == widokOpisTworcow.mnI_InstrukcjaObslugi) { } if(e.getSource() == widokOpis...
4
public void addFileDownloadListener(FileDownloadListener listener){ listeners.add(listener); }
0
private void verifyTransfer(boolean srcdirect, boolean dstdirect) { String txt1 = "123"; String txt2 = "abcde"; String srctxt = txt1+txt2; byte[] srcdata = srctxt.getBytes(); org.junit.Assert.assertEquals(srctxt.length(), srcdata.length); //sanity check java.nio.ByteBuffer srcbuf = NIOBuffers.create(srcdat...
9
public void renderModel(TextureManager var1, float var2, float var3, float var4, float var5, float var6, float var7) { super.renderModel(var1, var2, var3, var4, var5, var6, var7); Model var9 = modelCache.getModel(this.modelName); GL11.glEnable(3008); if(this.allowAlpha) { GL11.glEnable(...
4
public void translateSelectedAtomsXYBy(Matrix3f transform, BitSet bs, float dx, float dy) { if (translationMatrix == null) translationMatrix = new Matrix4f(); if (tempMatrix1 == null) tempMatrix1 = new Matrix3f(); if (tempMatrix4f == null) tempMatrix4f = new Matrix4f(); if (tempPoint3f == null) temp...
7
private String removeNamespace(String string){ if (string.contains(":")){ return string.substring(string.indexOf(":")+1); }else{ return string; } }
1
@Override public String toString() { return "fleming.entity.Perfil[ idPerfil=" + idPerfil + " ]"; }
0
@Override public void run() { long lastTime = System.nanoTime(); start(); long now = System.nanoTime(); long timer = System.currentTimeMillis(); double delta = 0; int frames = 0; int updates = 0; System.out.println("Initialized in " + ((now - lastTime) / 1000000000.0) + " seconds"); while(!Display.is...
3
public boolean bodyCall(Node[] args, int length, RuleContext context) { checkArgs(length, context); BindingEnvironment env = context.getEnv(); Node n1 = getArg(0, args, context); Node n2 = getArg(1, args, context); if (n1.isLiteral() && n2.isLiteral()) { Object v1 = n...
8
public boolean isScopeOf(Object obj, int scopeType) { if (scopeType == METHODSCOPE && obj instanceof ClassInfo) { ClassAnalyzer ana = getClassAnalyzer((ClassInfo) obj); if (ana != null) return ana.getParent() == this; } return false; }
3
public static HashMap<String, HashMap<String, Integer>> getMap(String filePath) throws Exception { HashMap<String, HashMap<String, Integer>> map = new HashMap<String, HashMap<String,Integer>>(); BufferedReader reader = filePath.toLowerCase().endsWith("gz") ? new BufferedReader(new InputStreamReader( ...
6
@Override public String returnXMLBlock(String Blob, String Tag) { int foundb=Blob.indexOf("<"+Tag+">"); if(foundb<0) foundb=Blob.indexOf("<"+Tag+" "); if(foundb<0) foundb=Blob.indexOf("<"+Tag+"/"); if(foundb<0) return ""; int founde=Blob.indexOf("/"+Tag+">",foundb)-1; if(founde<0) founde=Blob...
8
public int maxDepth(TreeNode root) { if (root == null){ return 0; } if (root.left == null && root.right == null){ return 1; } else if (root.left == null){ return maxDepth(root.right)+1; } else if (root.right == null){ return max...
5
public boolean checkShapeDate(long fechaDesde, long fechaHasta){ return (fechaAlta >= fechaDesde && fechaAlta < fechaHasta && fechaBaja >= fechaHasta); }
2
private boolean containsElement(List<ElementInfo> elements, ElementInfo element) { for(ElementInfo e : elements) if (e.equals(element)) return true; return false; }
2
public void addPanelToLayer(Panel pi) { this.ditems.add(pi); }
0
private void imprimirElementorSin(ArrayList<Nodo> tem,DefaultMutableTreeNode padre){ Iterator nex=tem.iterator(); Nodo a; int con=0; try{ while(nex.hasNext()){ String tabla = ""; a=(Nodo)nex.next(); DefaultMutableTreeNode ...
9
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Classroom other = (Classroom) obj; if (this.number != other.number) { return false; }...
3
@Override public void draw(Graphics g) { int width = getWidth(); int height = getHeight(); if (width == -1 || height == -1) return; g.setClip(getRealX(), getRealY(), width, height); if (this.hasBackground()) g.setColor(getBackground()); else g.setColor(Color.darkGray); g.fillRect(getRealX(), getRea...
9
private TreeNode checkChildrenForKeyWords(TreeNode currentNode, String currentWord) { List<TreeNode> children = currentNode.getChildren(); for (TreeNode child : children) { if (child.isTempVisited()) continue; child.setTempVisited(true); if (child.isAccessible()) { List<String> keyWords = child....
8
public boolean pickAndExecuteAnAction() { try { //synchronized(Customers){ for(int i =0; i < Customers.size(); i++){ ////print("" + Customers.get(i).s ); if(Customers.get(i).s == CustomerState.waiting){ seatCustomer(Customers.get(i)); return true; } } //synchronized(Customers){ ...
9
public void setOpMode(int mode){ opmode = mode; boolean[] es = new boolean[]{false, true, false, false, true, true}; if(es[mode] == false){pause();} switch(aamode){ case 1: pete.setEnabled(es[mode]); break; case 2: for(int y = 0; y < gridy; y++){ for(int x = 0; x < gridx; x++){...
5
private void expTypeChanged() { if (m_Exp == null) return; // update parameter ui if (m_ExperimentTypeCBox.getSelectedItem() == TYPE_CROSSVALIDATION_TEXT) { m_ExperimentParameterLabel.setText("Number of folds:"); m_ExperimentParameterTField.setText("" + m_numFolds); } else { m_Experi...
7
private void jpeg2dicom(File archivoJPEG, File archivoDICOM) { try { BufferedImage jpegImage = ImageIO.read(archivoJPEG); if(jpegImage == null) { System.err.println("No se pudo crear imagen de archivo JPEG"); } //atributos de imagen int...
5
public boolean isStart() { return type == START; }
0
@Override public float[] getData() { if (ptr != 0) { return null; } else { if (isConstant()) { if (length > getMaxSizeOf32bitArray()) return null; float[] out = new float[(int) length]; for (int i = 0; i < length; i++) { ...
4
@Override public QueryResults<String> parseObjectIdentifiers(AtmosResponse response) { Collection<String> identifiers = new LinkedList<String>(); HttpEntity body = response.getEntity(); if (body != null) { try { DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); Document ...
9
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: try { String arquivo = null; jSalvar_Backup.setVisible(true); int result = jSalvar_Backup.showSaveDialog(null); if(resu...
4
public void init(int i, int j, PersonnageType v) { if(i<0 && j <0) throw new PreConditionError("i>=0 && j>=0"); super.init(i, j, v); if(!(super.getType()==v)) throw new PostConditionError("getType(init(i,j,v)) == v"); if(!(super.getForceVitale() == 3)) throw new PostConditionError("getForceVitale(init(...
9
private boolean isValidUrl(String urlString) { boolean isUrl = false; try { URL url = new URL(urlString); URLConnection conn = url.openConnection(); conn.connect(); isUrl = true; } catch (MalformedURLException e) { // the URL is not in ...
2
private static int sign(int [] a){ int x=0; int len = a.length; for(int k=1; k<len; k++) if (a[k]> k ) x+=a[k]-k; x%=2; if (x==1) return -1; else return 1; }
3
public boolean gameEnded() { int seeds = 0; //Player 1 - South for (int i = START_S; i <= END_S; i++) { seeds += board[i]; } if (seeds == 0) { //Gather opponents seeds (if any) //Rule 6 for (int i = STAR...
8
public void adjacencyListConnections(GraphNode<T> a, GraphNode<T> b, int direction,int weight) {//creates connection between two nodes forming the adjacency list.(lists inside lists) if (existNode(a) && existNode(b)) {//if a and b exists in the list of graph nodes. if (direction == 0 || direction =...
6
public static PlayOutside getSingleton(){ // needed because once there is singleton available no need to acquire // monitor again & again as it is costly if(singleton==null) { synchronized(PlayOutside.class){ // this is needed if two threads are waiting at the monitor at the ...
2
@Test public void worksWithSeveralFieldFilters2() { citations.add(c1); citations.add(c2); citations.add(cnull); filter.addFieldFilter("publisher", "Otava"); filter.addFieldFilter("year", "2012"); List<Citation> filtered = filter.getFilteredList(); List<Citatio...
1
public void setIdAlmacen(int idAlmacen) { this.idAlmacen = idAlmacen; }
0
public void printSources(){ if (sources == null) { System.err.println("Sources not calculated yet"); return; } System.out.println("Sources:"); for (AndroidMethod am : sources) { System.out.println(am.toString()); } System.out.println("End of Sources"); }
2
@Override public void documentRemoved(DocumentRepositoryEvent e) {}
0
static Direction getDir(String s) { if(s.equalsIgnoreCase("r")) return RIGHT; if(s.equalsIgnoreCase("d")) return DOWN; if(s.equalsIgnoreCase("l")) return LEFT; if(s.equalsIgnoreCase("u")) return UP; return null; }
4
public boolean isFrozen() { return frozen; }
0
public boolean checkNaive(List<Integer> list) { for (int idx = 0; idx < list.size(); ++idx) if (idx != list.get(idx)) { System.out.print("[FAILED] "); printList(list); return false; } System.out.print("[PASSED] "); printLis...
2
public void run() { while(isRunning()) { if(isEnabled()) { while(Keyboard.next()) { switch(Keyboard.getEventKey()) { case Keyboard.KEY_W: setUp(Keyboard.getEventKeyState()); break; case Keyboard.KEY_A: setLeft(Keyboard.getEventKeyState()); break; case Keyboard...
9
public ProfileResponse updateCard(String profileId, Card card) throws BeanstreamApiException { ProfilesUtils.validateProfileId(profileId); Gateway.assertNotNull(card, "card is is null"); String cardId = card.getId(); Gateway.assertNotEmpty(cardId, "card Id is empty"); String url = BeanstreamUrls.getProfil...
2
private void gameLoop() { long beforeTime, afterTime, timeSpent, sleepTime, overTime; overTime = 0; long totalOverTime = 0; gameStart = System.nanoTime(); beforeTime = gameStart; while (sc.isRunning()) { sc.update(); sc.paint(); afterTime = System.nanoTime(); timeSpent = afterTime - bef...
5
public int ReloadHeidelTimeDocs(int year) { File folder = new File(Configuration.HeidelCollectionRoot + "19" + year); File[] listOfFiles = folder.listFiles(); if (listOfFiles == null) { System.out.printf("ANNO 19%d assente\n", year); return 0; } int countFiles = 0; double perc = 0;...
6
public double[][] getOpacites() { double[][] opacites = new double[grid.length][grid[0].length]; boolean[][] nextGrid = this.nextGeneration(); for (int i = 0; i < grid.length; i++) { for (int j = 0; j < grid[0].length; j++) { if (nextGrid[i][j] != grid[i][j]) { ...
5
public void setClassFieldString(String classFieldString) { this.classFieldString = classFieldString; }
0
private void createKBestList() throws MaltChainedException { final Class<?> kBestListClass = history.getKBestListClass(); if (kBestListClass == null) { return; } final Class<?>[] argTypes = { java.lang.Integer.class, org.maltparserx.parser.history.action.SingleDecision.class }; final Object[] arguments =...
8
public ArrayList<ParseResult> doIt(String x) { String s = new String("OK"); try { Path path = Paths.get(x); ArrayList<ParseResult> parseResults = new ArrayList<>(); // Read lines from file List<String> lines = Files.readAllLines(path); // Iterate all lines for (int i = 0; i ...
9
public List<Branch> getActiveBranches(){ List<Branch> list = new ArrayList<>(); Connection con = null; Statement stmt = null; try { DBconnection dbCon = new DBconnection(); Class.forName(dbCon.getJDBC_DRIVER()); con = DriverManager.get...
5
public TableModel(ResultWrapper rw) { myRes = rw.getResultSet(); wrapper = rw; try { if(myRes != null)// dml commands { int cols = myRes.getMetaData().getColumnCount(); colSizes = new int[cols + 1]; String t...
5
public int[][] csvInt( String filePath, int tableWidth, int tableLength ) { int[][] table = null; BufferedReader ingester = null; try { String line; table = new int[ tableWidth ][ tableLength ]; ingester = new BufferedReader( new FileReader( filePath ) ); while ( (line = ingester.readLine() ...
5
public iProperty(String fileName) { this.fileName = fileName; File file = new File(fileName); if (file.exists()) { try { load(); } catch (IOException ex) { log.severe("[PropertiesFile] Unable to load " + fileName + "!"); } ...
2
public float getFloat(String key) { try { if(hasKey(key)) return ((NBTNumber<Float>) get(key)).getValue(); return 0; } catch (ClassCastException e) { return 0; } }
2
* @param adj_data The data value of the adjacent block */ private STAIR_RENDER shouldRenderStairFront(short adj_id, byte adj_data) { if (adj_id < 0 || blockArray[adj_id] == null) { return STAIR_RENDER.YES; } if (blockArray[adj_id].isSolid()) { return STAIR_RENDER.NO; } else { switch (blockA...
8
@Override public void messageArrived(MqttTopic topic, MqttMessage message) { String[] topics = topic.getName().split("/"); String subtopic = topics[topics.length-1]; Housemate person = null; WCMessage msg = null; for(Housemate hm : Housemate.values()) { if (hm.getName().equals(subtopic)) { pe...
5
protected void spaceMultipleTrees(StandardTreeNode root) { // Found the appropriate boundary of this tree, allowing for // orientation Point2D pos = graph.getLocation(root.cell); double rootX = 0; double rootY = 0; if (pos != null) { rootX = graph.getLocation(root.cell).getX(); rootY = graph.getLocati...
9
public Anim(byte[] buf) { id = Utils.int16d(buf, 0); d = Utils.uint16d(buf, 2); ids = new int[Utils.uint16d(buf, 4)]; if (buf.length - 6 != ids.length * 2) throw (new LoadException("Invalid anim descriptor in " + name, Resource.this)); for (int i = 0; i < ids.length; i++) ids[i] = Utils.int...
2
@Override public Property deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { JsonObject o = jsonElement.getAsJsonObject(); String name = o.get("name").getAsString(); int displayMode = o.get("displayMode").getAsI...
5
@Override public void mouseReleased(MouseEvent e) { if (enteredOC != null) { this.setSelectedOC(enteredOC, enteredOC.getParent()); enteredOC = null; } else if (e.isPopupTrigger()) { for (Component ele : elements) { if (ele.contains(e.getPoint())) { setSelected(ele); ele.showMenu(e.getX(), e....
4
private static void listFile(File f) throws InterruptedException { if (f == null) { throw new IllegalArgumentException(); } if (f.isFile()) { System.out.println(f); return; } File[] allFiles = f.listFiles(); if (Thread.interrupted()) { ...
4
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Source other = (Source) obj; if (sourceName == null) { if (other.sourceName != null) return false; } else if (!sourceName.equals(other.s...
6
protected static char[] encodeBlock(byte[] raw, int offset) { int block = 0; // how much space left in input byte array int slack = raw.length - offset - 1; // if there are fewer than 3 bytes in this block, calculate end int end = (slack >= 2) ? 2 : slack; // convert sign...
6
private boolean areDirectlyConnected(State s1, State s2, Automaton automaton) { if (s1 == s2) return false; if (automaton.getTransitionsFromStateToState(s1, s2).length == 0 && automaton.getTransitionsFromStateToState(s2, s1).length == 0) return false; return true; }
3
public Lista<Rama_Hoja> getSalidas(){ Lista<Rama_Hoja> resp = null; for (Nodo<Rama_Hoja> i = arrayIO.getHead(); i != null; i=i.getSiguiente()){ if(i.getIndex().split("_")[2]=="O") resp.insertar(i.getDato()); } return resp; }
2
public static void cardclick(int button) { // in case of button gets clicked again if ((newhand[button] != handcopy[button]) && newhand[button] >= 1) { newhand[button]--; } // in case new button gets clicked else if ((newhand[button] == handcopy[button]) && newhand[button] >= 1) { System.arraycopy(handc...
6
private int checkHtml(final StringBuilder out, final String in, int start) { final StringBuilder temp = new StringBuilder(); int pos; // Check for auto links temp.setLength(0); pos = Utils.readUntil(temp, in, start + 1, ':', ' ', '>', '\n'); if(pos != -1 && in.charAt...
9
public static boolean couldBeDouble(final String v) { if(null==v) { return false; } final int len = v.length(); if(len<=0) { return true; } if(len>40) { return false; } if(BurstMap.missingDoubleValue(v)) { return true; } if(v.equalsIgnoreCase(BurstMap.doublePosInfString)||v.equalsIgnoreC...
7
public void addMany(int... elements) { if (manyItems + elements.length > data.length) { // Ensure twice as much space as we need. ensureCapacity((manyItems + elements.length)*2); } System.arraycopy(elements, 0, data, manyItems, elements.length); manyItems += elements.length; ...
1
public final DirkExpParser.additiveExpr_return additiveExpr() throws RecognitionException { DirkExpParser.additiveExpr_return retval = new DirkExpParser.additiveExpr_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token set15=null; DirkExpParser.multiplyExpr_ret...
7
private boolean Ingreso(float importe) { if (importe < 0 ) { return false; } saldo += importe; return true; }
1
public void run(){ // If we have a list of replies from a previous repetition // calculate suspected processes if (started) { for(int i = 0; i <= p.getNo(); i++) { if (i != 0 && i != p.pid) { if (!successfulReplies[i-1] && !suspectedProcesses[i-1]) { Utils.ou...
6
public void closeConnection() { //4: Closing connection try { if (in != null) { in.close(); } if (out != null) { out.close(); } if (providerSocket != null) { providerSocket.close(); } ...
4
public static void waitForElement(UIObject obj) throws Exception{ wait=new WebDriverWait(driver, 320); //wait.until(ExpectedConditions.visibilityOf(element)); log.info("waiting for element " +obj); try{ if(obj.getIdentifier().equalsIgnoreCase("Byid")){ wait.until(ExpectedConditions.presenceOfElementLo...
6
public boolean estBloquee(Piece p) { Piece sauv = p; Piece monRoi = null; boolean isBloquee = false; // Recherche de mon roi dans l'echiquier for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { if (this.tableau[i][j].getCouleur() == p.getCouleur() && this.tableau[i][j].getClass().g...
5
private static boolean isNullOrEmpty(String str) { return str == null || str.length() < 1; }
1
public boolean equals( Object other ) { if ( _set.equals( other ) ) { return true; // comparing two trove sets } else if ( other instanceof Set ) { Set that = ( Set ) other; if ( that.size() != _set.size() ) { return false; // different sizes, no need ...
6
private boolean readCharToken(char ch, List<Token> parts) { switch (ch) { case '(': parts.add(CharToken.OPEN); return true; case ')': parts.add(CharToken.CLOSE); return true; case ',': parts.add(C...
3
public String toString() { return xCoordinate+", "+yCoordinate; }
0
public int crearOpcion(Opcion op) { String consulta; try { if (con.isClosed()) { con = bd.conexion(); } Object ob = null; if (op.getdespuesDeOpcion().getCodigo() != 0) { ob = op.getdespuesDeOpcion().getCodigo(); ...
8
protected void setGrid() { String line; int count = 0; // update geometry this.updateDataSize(); grid = new DataGridCel[numberOfRows][numberOfCols + 1]; LineScanner scan = new LineScanner(dataBuffer.toString()); for (int r = 0; r < numberOfRows; r++) { ...
7
public String getExtraData() { return this.extraData; }
0
public static int switchlt(int x) { int j = 1; switch(x) { case 1: j++;break; case 2: j++; case 3: j++; case 4: j++; case 5: j++; default: j++; } System.out.println("j = " + j); return j + x; }
5
public static int d(int l1, int l2, int type) { switch (type) { case 01 : return ( match(l1, l2) + penalty01 ); case 10 : return ( match(l1, l2) + penalty01 ); case 11 : return ( match(l1, l2) ); case 12 : return ( match(l1, l2) + penalty21 ); case 21 : return ( match(l1, l2) + penalty21 ); defa...
5
private int[][] pasaArregloAMatrizUp(int[] c0, int[] c1, int[] c2, int[] c3) { int[][] res = new int[4][4]; for (int k = 0; k < 4; k++) res[k][0] = c0[k]; for (int k = 0; k < 4; k++) res[k][1] = c1[k]; for (int k = 0; k < 4; k++) res[k][2] = c2[k]; for (int k = 0; k < 4; k++) res[k][3] = c3[k]...
4
@Override public Boolean[] convertFromString(Class<? extends Boolean[]> cls, String str) { if (str.length() == 0) { return EMPTY; } Boolean[] array = new Boolean[str.length()]; for (int i = 0; i < array.length; i++) { ...
6
@Override public void visitDocComment(JsDocComment comment) { boolean asSingleLine = comment.getTags().size() == 1; if (!asSingleLine) { newlineOpt(); } p.print("/**"); if (asSingleLine) { space(); } else { p.newline(); ...
9
private JSONWriter end(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.write(c); }...
3
public void setValue(T value) { this.value = value; }
0
@Override public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { if ("relation".equals(qName)) { cr.setRelationId(Integer.parseInt(attrs.getValue("id"))); } if ("member".equals(qName) && "relation".equals(eleStack.peek())) { if (clcMainWays.containsKey...
9
@SuppressWarnings("unchecked") public static Map<String, Object> parseMapFirstObject(List<String> strings) { ObjectMapper mapper = new ObjectMapper(); JsonFactory factory = mapper.getFactory(); JsonParser jp = null; Map<String, Object> result = null; try { jp = factory.createParser(strings.get(0)); res...
3
public void setBossSpawnLocation(Location bossspawn) { this.bossspawn = bossspawn; }
0
public void execute() throws MojoExecutionException, MojoFailureException { File scriptFile = null; File scriptMetaFile = null; UnityMenuCommands menuCommands = new UnityMenuCommands(new ProcessRunner(getLog()), unity, project.getBasedir().getAbsolutePath()); try { InputStream scriptStream = this.getClass()...
9
static void loadTickerSet(String fileName,ArrayList<String> tickers) { Scanner inFile = null; try { inFile = new Scanner(new File(fileName)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } if (inFile == null) { System.out.println("invalid file no symb...
4
final private void handleOperator( Operator o ) { int precedence = o.getPrecedence(); int prevPrecedence = -1; if ( this.m_operatorsStack.size() > 0 ) { Token prev = this.m_operatorsStack.peek(); if ( prev instanceof Operator ) { prevPrecedence = ( (Operator) prev ).getPrecedence(); while( prev i...
9