text
stringlengths
14
410k
label
int32
0
9
public ArrayList getSolutionsRunningOnSpecificDevice(int tmpClassID, String tmpDeviceName) { if(printDebugInfo) { System.out.println("\ngetSolutionsRunningOnSpecificDevice --- START"); System.out.println("\t" + getClassNameByID(tmpClassID) + "(s) running on " + tmpDeviceName ...
7
private boolean makeServiceNameUnique(ServiceInfoImpl info) { final String originalQualifiedName = info.getQualifiedName(); final long now = System.currentTimeMillis(); boolean collision; do { collision = false; // Check for collision in cache ...
8
@Override public void copySources( HashMap<String, Source> srcMap ) { if( srcMap == null ) return; Set<String> keys = srcMap.keySet(); Iterator<String> iter = keys.iterator(); String sourcename; Source source; // Make sure the buffer m...
9
public boolean IniciarServidor() { MensajeServidor("Servidor Iniciado"); try { // Se abre el host en el puerto esperando que un cliente llegue ServerSocket s = new ServerSocket(puerto); MensajeServidor("Esperando Conexion......"); String url = "http://localhost:"+puerto; ...
5
public Product grabAProduct(){ Document doc = null; try { doc = Jsoup.connect("http://www.mathem.se/sok?q=socker&qtype=p").get(); } catch (IOException ex) { Logger.getLogger(ProductRetriever.class.getName()).log(Level.SEVERE, null, ex); } System.out.printl...
3
private boolean displayModesMatch(DisplayMode m1, DisplayMode m2) { if(m1.getWidth() != m2.getWidth() || m1.getHeight() != m2.getHeight()) {return false;} if(m1.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI && m2.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI && m1.getBitDepth() != m2.getBitDepth()) {r...
8
public void clear_buffer() { for (int i = 0; i < channels; ++i) bufferp[i] = (short)i; }
1
private int returnStep (int vertex) { int maxVertex = 0; int i, j; for (Vertex incidentVertex : numberToVertex.get(vertex).getIncidentVertices()) { j = vertexToNumber.get(incidentVertex); if (j < vertex) { maxVertex = j; } } j =...
9
public static StandardObject walkFirstArgumentToFunction(MethodSlot fnslot, Cons tree) { { List ptypespecs = fnslot.methodParameterTypeSpecifiers(); StandardObject targetts = ((StandardObject)(ptypespecs.first())); if (!fnslot.methodEvaluateArgumentsP()) { tree.rest = MethodSlot.quoteArguments(...
9
public void body() { // Gets the PE's rating for each Machine in the list. // Assumed one Machine has same PE rating. MachineList list = super.resource_.getMachineList(); int size = list.size(); machineRating_ = new int[size]; for (int i = 0; i < size; i++) { ...
7
private void ScheduleSessionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ScheduleSessionActionPerformed // TODO add your handling code here: if(memID != null){ int day, month, year; Boolean facial, haircut, massage,pedicure; try{ ...
7
private ArrayList<Coordinate> getAvailableMoves() { boolean test = false; if (test || m_test) { System.out.println("OthelloAI :: getAvailableMoves() BEGIN"); } ArrayList<Coordinate> list = new ArrayList<Coordinate>(); if (getYourTurn()) { for (int y = 0; y < GAME_HEIGHT; y++) { fo...
8
public boolean agregar(String tabla, String campos, String[] valores) { String query = "INSERT INTO " + tabla; String[] camp = campos.split(","); int max = camp.length; query += campos(max, camp); query += valores(max); //System.out.println(query); if (prepararEs...
1
public static StompFrame factory(String wholeMessage){ HashMap<String, String> headers=parseHeaders(wholeMessage); if (headers == null) return ErrorFrame.factory(wholeMessage, "cannot read headers"); if (headers.get("destination") == null) return ErrorFrame.factory(wholeMessage, "invalid subscribe: no desti...
3
@Override public Iterable<K> keySet() { ArrayList<K> keys = new ArrayList<>();// return container for (int i = 0; i < capacity; i++) { if ((bucket[i] != null) && (bucket[i] != available)) keys.add(bucket[i].getKey()); } return keys; }
3
public boolean equivalentWasEndedBys (WasEndedBy description1, WasEndedBy description2) { return bothNull (description1, description2) || (neitherNull (description1, description2) && equivalentIdentifiers (description1, description2) && equivalentAttributes (...
7
public void remove(Item item) { if (item == null) throw new IllegalArgumentException("Item can't be null!"); if (!items.contains(item)) throw new IllegalArgumentException("The item is not in the inventory!"); items.remove(item); }
2
public static String cleanPath(String path) { if (path == null) { return null; } String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR); // Strip prefix from path to analyze, to not treat it as part of the // first path element. This is necessary to correctl...
8
public void insert(Key v) { if (N == pq.length - 1) resize(pq.length * 2); pq[++N] = v; swim(N); }
1
public static String stripNonDoubleChars(final String value) { final StringBuilder newString = new StringBuilder(); for (int i = 0; i < value.length(); i++) { final char c = value.charAt(i); if (c >= '0' && c <= '9' || c == '-' || c == '.') { newString.append(c);...
9
public static Tuple[] fromResultSet(ResultSet in) throws SQLException { List<Tuple> res = new ArrayList<Tuple>(); int colCount = in.getMetaData().getColumnCount(); boolean empty = !in.next(); while (!in.isAfterLast() && !empty) { Object[] objects = new Object[colCount]; for (int i = 0; i < colCount; i++) ...
3
private boolean isDataEnd() { String flag = buffer.substring( buffer.lastIndexOf( "\n" ) + 1, buffer.length() ); int indexLeft = flag.lastIndexOf( "[" ); int indexRight = flag.lastIndexOf( "@" ); if ( indexLeft == -1 || indexRight == -1 || indexLeft > indexRight ) { return false; } if ( ...
4
private void loadUserSettings(){ if(!this.fUserData.exists()){ File fDir = new File(sDir); if(!fDir.exists()){ fDir.mkdir(); } try { this.fUserData.createNewFile(); saveUserSettings(); } catch (Exception e) { e.printStackTrace(); } } // Initialise or load the User Settings thi...
3
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 Enumeration getClassesAndPackages(final String packageName) { final Enumeration enum_ = classpath.listFiles(packageName.replace('.', '/')); return new Enumeration() { public boolean hasMoreElements() { return enum_.hasMoreElements(); } public Object nextElement() { String name = ...
1
@Test /* No output should be printed about unhandled tokens */ public void testLoadString() { File dir = new File(graphics.core.Model.MODEL_PATH); // Loop through all models in models directory for(String file: dir.list()) { if (file.toLowerCase().endsWith(graphics.c...
6
public static void main(String[] args){ DataStoreImpl dataStoreImpl = new DataStoreImpl(); if(dataStoreImpl.loginUser("randomUser", "password")){ System.out.println("success"); } else { System.out.println("fail"); } }
1
public T get(final int index) { final int i0 = index >>> 24; final T[][] map1; if (i0 != 0) { if (map == null) return null; // NOT_FOUND; map1 = map[i0]; if (map1 == null) return null; // NOT_FOUND; } else { map1 = map10; } final T[] map2 = map1[(index >>> 12) & 0xfff]; if (map2 == ...
4
public int atrLookback( int optInTimePeriod ) { if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 14; else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) return -1; return optInTimePeriod + (this.unstablePeriod[FuncUnstId.Atr.ordinal()]) ; ...
3
public EventBranch findEventBranchById(final Long id) { return new EventBranch(); }
0
public static ArrayList<DebtAccount> readDebtAccounts(String filename) { File file = new File(filename); if (file.exists()) { ObjectInputStream ois = null; try { // // Read the previously stored SecretKey. /...
7
public MainFrame() { lf = null; sponsorlopen = new ArrayList<Sponsorloop>(); setSize(200, 200); lab1 = new JLabel("Sponsorlopen", JLabel.CENTER); lab2 = new JLabel(); listModel = new DefaultListModel(); list = new JList(listModel); list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); deselec...
5
@Override public List<Usuario> Buscar(Usuario obj) { String sql = "select a from Usuario a"; String filtros = ""; if(obj != null){ if(obj.getId() != null){ filtros += "a.id = " + obj.getId(); } if(obj.getNome() != null){ ...
5
public String addMoreInfo() throws Exception { Connection conn = null; Statement stmt = null; try { Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection(url, user, psw); if (!conn.isClosed()) System.out.println("Success connecting to the Database!"); else System.out.print...
3
public Teaches add(Teacher t, ClassGroup c) { Teaches newTeach = new Teaches(c, t); if (!this.teachingList.contains(newTeach)) { this.teachingList.add(newTeach); // If a object matching the new instance has been recently deleeted, remove that record. if (this.deletedTeaching.contains(newTeach)) this.de...
2
public void actionPerformed(ActionEvent e) { if ("btnOpen".equals(e.getActionCommand())) { if (chart != null) chart.closeChart(); frame.setVisible(false); getList(); // chart = new ValueChart(vc_files); if (btnVC.isSelected()) { ...
8
public void setSource(int x, int y, double value) { if (_maxValue < value) { _maxValue = value; } _source[y][x] = value; }
1
private long waitForBackupSizeToBecomeStable(Date timeoutDate, String backupName) throws ReadTimeoutException { com.unispezi.cpanelremotebackup.tools.Console.print("Polling for backup file size to become stable"); long lastFileSize = 0; long currentFileSize = 0; Date now = new Date(); ...
5
@Override public void actionPerformed(ActionEvent arg0) { if(item.getLabel().equals("Square")) { b.mousetype = "square"; b.last_mouse_type.add("square"); } else if(item.getLabel().equals("Circle")) { b.mousetype = "circle"; b.last_mouse_type.add("circle"); } else if(item.getLabel().e...
9
public static IntArrayBag union(IntArrayBag b1, IntArrayBag b2) { IntArrayBag answer = new IntArrayBag(b1.getCapacity() + b2.getCapacity()); System.arraycopy(b1.data, 0, answer.data, 0, b1.manyItems); System.arraycopy(b2.data, 0, answer.data, b1.manyItems, b2.manyItems); answer.manyItems = b1.manyItems...
0
public FileStream(RandomAccessFile source) throws OggFormatException, IOException { this.source=source; ArrayList po=new ArrayList(); int pageNumber=0; try { while(true) { po.add(new Long(this.source.getFilePointer())); // skip data if pageNumber>0 ...
8
@Override public boolean activate() { return (Bank.isOpen() && !Widgets.get(13, 0).isOnScreen() && !Settings.usingFlask && !Settings.usingHerb ); }
3
public void setPictureMimeType(String pictureMimeType) { if (pictureMimeType != null && !pictureMimeType.equals("") && !pictureMimeType.equals("image/") && !pictureMimeType.equals("image/jpg") && !pictureMimeType.equals("image/png")) throw new IllegalArgumentException("The picture mime type field in t...
7
private ModDatabase() { try { Properties p = new Properties(); InputStream in = getClass().getResourceAsStream(".password"); p.load(in); in.close(); host = p.getProperty("host"); database = p.getProperty("database"); user = p.getProperty("user"); password = p.getProperty("password"); if (...
3
public LinkedList<CarteTroupe> initialisationPaquetTroupe(){ LinkedList<CarteTroupe> llct = new LinkedList<CarteTroupe>(); int i=1; for(Troupes t : hashTroupes){ CarteTroupe ct = new CarteTroupe(t); // On met 6 fois la même carte dans la liste for(int...
5
private void postPlugin(final boolean isPing) throws IOException { // The plugin's description file containg all of the plugin data such as name, version, author, etc final PluginDescriptionFile description = plugin.getDescription(); // Construct the post data final StringBuilder data =...
9
private static String[] readTokens() throws IOException { Set<String> result = new TreeSet<String>(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String t; while (true) { System.out.print("Enter token or blank line to end input: "); ...
3
public static void addEnder(List<LabeledToken> parsedContents) { int offset=0, length=0; if (parsedContents==null) { parsedContents=new ArrayList<LabeledToken>(); } if (parsedContents.size()>0) { LabeledToken lastToken=parsedContents.get(parsedContents.size()-1); offset=lastToken.getOffset(); le...
2
public boolean equals (Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Path other = (Path)obj; if (dir == null) { if (other.dir != null) return false; } else if (!dir.equals(other.dir)) return false; if (name == null) { ...
9
private static void displayApparentPlace(double t, ApparentPlace ap, int referenceSystem, PrintStream ps) { switch (referenceSystem) { case EQUATORIAL: displayApparentPlaceEquatorial(t, ap, ps); break; case ECLIPTIC: displayApparentPlaceEcliptic(t, ap, ps); break; } }
2
@SuppressWarnings("unchecked") public Map<String, BEValue> getMap() throws InvalidBEncodingException { if (this.value instanceof HashMap) { return (Map<String, BEValue>)this.value; } else { throw new InvalidBEncodingException("Expected Map<String, BEValue> !"); } }
1
public int compareTo(Object object) { if (this instanceof CycConstant) { if (object instanceof CycConstant) return this.toString().compareTo(object.toString()); else if (object instanceof CycNart) return this.toString().compareTo(object.toString().substring(1)); else throw ...
5
@Override public void deserialize(Buffer buf) { spellId = buf.readShort(); if (spellId < 0) throw new RuntimeException("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0"); cellId = buf.readShort(); if (cellId < -1 || c...
3
public List<Double> getDoubleList(String path) { List<?> list = getList(path); if (list == null) { return new ArrayList<Double>(0); } List<Double> result = new ArrayList<Double>(); for (Object object : list) { if (object instanceof Double) { ...
8
@Override public void actionPerformed(ActionEvent e) { if(e.getSource() == btnChars[0]){ //System.out.println("Green Char"); _Model.setBallChoice(GameModel.ballGreen); } if(e.getSource() == btnChars[1]){ //System.out.println("Bl...
5
public void editNextShip() { if(editingPos < shipSizes.length-1) { editingPos++; if(myTurnEditing) { editingShip = new Ship(shipSizes[editingPos], mySea.sea.length, mySea.sea[0].length, mySea.fleet); mySea.renderEditingShip = true; } else { editingShip = new Ship(shipSizes[editingPos]...
2
public static MapleShop createFromDB(int id, boolean isShopId) { MapleShop ret = null; int shopId; try { Connection con = DatabaseConnection.getConnection(); PreparedStatement ps = con.prepareStatement(isShopId ? "SELECT * FROM shops WHERE shopid = ?" : "SELECT * FROM shops WHERE npcid = ?"); ps.set...
8
public Reader createReader() { return new Reader() { public Iterable<? extends Player> readPlayers(String key) throws KeyNotFoundException { try { // ToDo return DatabaseFactory.createDatabase(key); } catch (FileNotFoundExceptio...
2
public void drawImageString(JGEngineInterface eng, String string, double x, double y, int align, String imgmap, int char_offset, int spacing,boolean pf_relative) { ImageMap map = (ImageMap) imagemaps.get(imgmap); if (map==null) throw new JGameError( "Font image map '"+imgmap+"' not found.",true ); if (align...
5
* * @throws UnknownHostException if cyc server host not found on the network * @throws IOException if a data communication error occurs * @throws CycApiException if the api request results in a cyc server error */ public CycList converseList(Object command) throws UnknownHostException, IOExcepti...
3
@Basic @Column(name = "SOL_ID_ELEMENTO") public Integer getSolIdElemento() { return solIdElemento; }
0
@Override public void executeMsg(Environmental myHost, CMMsg affect) { super.executeMsg(myHost, affect); if((affect.target()!=null)&&(affect.target().equals(affected)) &&(affect.tool()!=null)&&(affect.tool().ID().equals("Scrapping"))) { final Item item=(Item)affect.target(); final MOB mob = affect.so...
7
public Color stringToColor(String color) { if(color.equals("white")) return Color.white; else if(color.equals("red")) return Color.red; else if(color.equals("blue")) return Color.blue; else if(color.equals("green")) return Color.green; else if(color.equals("gray")) return Color.gra...
8
@Override public int compare(Rate a, Rate b) { if (a.get() > b.get()) { return 1; } else { return -1; } }
1
public void updateMissileTime(int time, String missileId, String type, String destination, int damage, int flyTime) { Iterator<String> keySetIterator = map.keySet().iterator(); Iterator<String> destuctorsSetIterator = destructors.keySet() .iterator(); if (type == "missile") { while (keySetIterator.hasNe...
9
public CategoryServlet() { super(); // TODO Auto-generated constructor stub }
0
@Override public void actionPerformed(ActionEvent e) { if (e.getSource()==questionDeleteButton) { this.setVisible(false); this.getParent().remove(this); this.invalidate(); } }
1
public double getDouble(String key) throws JSONException { Object object = this.get(key); try { return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble((String) object); } catch (Exception e) { throw new JSONException("JS...
2
public static double[] readAudioFile( File audioFile, float sampleRate ) throws IOException, UnsupportedAudioFileException { AudioInputStream audioStream = AudioSystem.getAudioInputStream(audioFile); AudioFormat audioFormat = new AudioFormat(sampleRate, 16, 1, true, true); DataInputStream dataStream = new ...
1
public XmlParser(String src) { try { xmlFile = new File(src); } catch (Exception e) { System.out.println("Erro ao abrir o arquivo XML\nErro: " + e.getMessage()); } }
1
@Override public void doLogic() { if (inputList[0] == true && inputList[1] == true){ this.power = true; this.solved = true; } else { this.power = false; } if (solved == false){ inputList[0] = false; inputList[1] = false; } }
3
public Metrics(final Plugin plugin) throws IOException { if (plugin == null) { throw new IllegalArgumentException("Plugin cannot be null"); } this.plugin = plugin; // load the config configurationFile = getConfigFile(); configuration = YamlConfiguration.load...
2
@Override public void mouseClicked(MouseEvent e) { }
0
public MiniAirplaneTurnImage(String imageURL, PlaneColor color) { super(imageURL); totalFrame=8;//3 frames per plane delayCounter=0;//delay counter starts at 0 //Set the image to military color if(color==PlaneColor.MILITARY) { yLocationSpriteSheet=136; } //Set the image to white color else if(...
4
private BitSet[] findElementaryCycles( BitSet reachables ) { ArrayList<BitSet> elementaryCycles = new ArrayList<BitSet>(); ArrayList<Integer> queue = new ArrayList<Integer>(); queue.add(0); BitSet bitSet; int last, parent, son; for ( int source = dRun.length - 1; source >= 0; source-- ) if ( r...
9
public void setPackageName(String name) { this.packageName = name; }
0
protected void shiftCell(Object cell, double dx, double dy, double x0, double y0, double right, double bottom, double fx, double fy, boolean extendParent) { mxGraph graph = getGraph(); mxCellState state = graph.getView().getState(cell); if (state != null) { mxIGraphModel model = graph.getModel(); ...
8
public void run(int interfaceId, int componentId) { if (stage == -1) { sendEntityDialogue((short) 241, new String[] { player.getDisplayName(), "Sure, let's see what I can set it to!" }, (byte) 0, player.getIndex(), 9827); stage = 1; } else if (stage == 1) { sendDialogue((short) 238, new St...
7
private Image warpImage(String imagePath){ BufferedImage image = null; //load image try { image = ImageIO.read(this.getClass().getResource(imagePath)); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } //wrap image in the transformer object javaxt.io.Image warped...
6
private void parse(CommandLine line) throws FileNotFoundException, UnsupportedEncodingException { if(line.getArgList().isEmpty() || line.hasOption("help")) { printUsage(); return; } if(line.hasOption("in")) { String inFile = line.getOptionValue("in"); ...
8
private boolean checkTouchBullet() { boolean tocat = false; this.setVisible(true); ArrayList<Line2D.Double> linies = this.getBoundLines(); if (!Board.getBullets().isEmpty()) { for (int i = 0; i < linies.size(); i++) { for (int t = 0; t < Board.getBullets()....
8
public void move(int m) { int pX = x; int pY = y; switch (m) { case 0: { pY--; break; } case 2: { pY++; break; } case 1: { pX++; break; ...
4
@EventHandler public void onDisconnectEvent(ClientDisconnectEvent event){ try{ Client c = ClientManager.get(event.sc); if(c.isLoggedIn()){System.out.println(c.getUsername() + " Disconnected!");} else{System.out.println(event.sc.getLocalAddress()+" Disconnected!");} ClientManager.remove(event.getSocketCha...
2
public void fixAllBarrows() { int totalCost = 0; int cashAmount = c.getItems().getItemAmount(995); for (int j = 0; j < c.playerItems.length; j++) { boolean breakOut = false; for (int i = 0; i < c.getItems().brokenBarrows.length; i++) { if (c.playerItems[j]-1 == c.getItems().brokenBarrows[i][1]) { ...
6
public String searchANDdescribe() { StringBuilder result = new StringBuilder(); for(K k : this) { if(k.getClass().equals(PapaBuilding.class)){ result.append(((PapaBuilding) k).getAttributes()); }else if(k.getClass().equals(PapaBicho.class)){ result.append(((PapaBicho) k).getAttributes()); }else if(...
9
static void quick_sort (int lowerIndex, int higherIndex,int array[]) { int i = lowerIndex; int j = higherIndex; // calculate pivot number, I am taking pivot as middle index number int pivot = array[lowerIndex+(higherIndex-lowerIndex)/2]; // Divide into two arrays whi...
7
private int splitOutputFile(final File tempOutputFile, final File outputFolder) throws IOException { //output should be words_1.dict....words_n.dict InputStream inputStream = new FileInputStream(tempOutputFile); int file_postfix = 0; int current_output_fil...
5
public static int removeElement(int[] A, int elem) { if (A == null || A.length == 0) return 0; int foundNum = 0; int i = 0; while (i < A.length && i <= A.length - 1 - foundNum) { if (A[i] == elem) { int j = A.length - 1 - foundNum; while (j > i) { if (A[j] == elem) foundNum++; els...
7
private void moveGhosts(){ if (this.ghostMoveCounter == 0){ for (int i=0; i < 4; i++){ if (this.ghosts[i].getIsAlive() && (i != 2)) this.ghosts[i].move(); } if (this.ghosts[2].getIsAlive()) if (!didGhostsCollide()) this.ghosts[2].move(); } }
6
private int handleL(String value, DoubleMetaphoneResult result, int index) { result.append('L'); if (charAt(value, index + 1) == 'L') { if (conditionL0(value, index)) { result.appendAlternate(' '); } in...
2
private String[] getTroisMeilleurs(String nomJeu, String xmlJeu, String xmlUsers) { String[] result = new String[3]; HashMap<String, List<String>> partiesParJoueur = getParties(nomJeu, xmlUsers); if (partiesParJoueur == null) return result; HashMap<Integer, Integer> pointParSituation = getPoints(...
8
public static void initbardas() { try { for (Class<?> c : barda) Class.forName(c.getName(), true, c.getClassLoader()); } catch (ClassNotFoundException e) { e.printStackTrace(); throw (new Error(e)); } }
3
public static Cons yieldContextSensitiveSlotValueSetterTree(StorageSlot slot, Stella_Object objectref, Stella_Object valueref, StandardObject returntype, Cons csoptions, Object [] MV_returnarray) { { boolean contextsensitiveP = !((csoptions != null) && (Cons.searchPlist(csoptions, Stella.KWD_CONTEXT_SENSI...
7
public Queue<String> escoltaXMLUnit (){ try { path = new File(".").getCanonicalPath(); FileInputStream file = new FileInputStream(new File(path + "/xml/papabicho.xml")); DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); D...
9
public boolean after(Temps t) { boolean aft=true; if (this.heures<t.heures) { aft=false; } else { if (this.heures==t.heures) { if (this.minutes<t.minutes) { aft=false; } else { if (this.minutes==t.minutes) { if (this.s...
5
public static double ddot_f77 (int n, double dx[], int incx, double dy[], int incy) { double ddot; int i,ix,iy,m; ddot = 0.0; if (n <= 0) return ddot; if ((incx == 1) && (incy == 1)) { // both increments equal to 1 m = n%5; for (i = 1; i <= ...
8
public boolean supprimerPointLivraison(Noeud noeudASup) throws HorsPlageException{ boolean trouve = false; int i; Chemin cheminAvant = null; Chemin cheminApres = null; for (i=0 ; i<cheminsResultats.size() ; i++) { int idNoeudASup = noeudASup.getId(); if ((...
4
public static void main( String[] args ) throws Exception { CUI c = new CUI(); String cui = "C0032344"; System.out.println(cui); System.out.println("----------"); System.out.println("Definition: "); System.out.println(c.retreiveDefinition(cui)); Syste...
2
protected BufferedImage initOffsets() { BufferedImage img = image; if( img == null ) return img; scale = 1; while( img.getWidth() * (scale+1) <= getWidth() && img.getHeight() * (scale+1) <= getHeight() ) { ++scale; } while( scale > 1 && (img.getWidth() * scale > getWidth() || img.getHeight() * scal...
6
public RuleMatch matchRule(Rule rule) { List<UnificationPair> mgu = unifier.unify(new UnificationPair(rule.getHead(), target)); // If there exists a most general unifier, then we have found a suitable rule if (mgu != null) { return new RuleMatch(rule, mgu); ...
1