text
stringlengths
14
410k
label
int32
0
9
@Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (args.length == 1 && args[0].equalsIgnoreCase("help")) { showHelp(sender); return true; } if (args.length == 1 && args[0].equalsIgnoreCase("list")) ...
6
@Override public boolean singleStep() { return false; }
0
public int compareTo(IdCount idCount) { return (idCount.count > this.count ? 1 : (idCount.count != this.count ? -1 : (idCount.id < this.id ? -1 : 1))); }
3
protected String normalize(String s) { StringBuilder str = new StringBuilder(); int len = (s != null) ? s.length() : 0; for ( int i = 0; i < len; i++ ) { char ch = s.charAt(i); switch ( ch ) { case '<': { str.append("&lt;"); break; ...
9
public static void main(String[] args) throws IOException { BufferedReader f = new BufferedReader(new FileReader("numtri.in")); PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("numtri.out"))); int n = Integer.parseInt(f.readLine()); int[][] triangle = new int[n][n]; int[][] path = new...
8
public GameStates() { currentState = States.Start; }
0
private void init(OutputStream out, String encoding) throws UnsupportedEncodingException, IOException { internalOut = new OutputStreamWriter(out, encoding); // Write the proper BOM if they specified a Unicode encoding. // NOTE: Creating an OutputStreamWriter with encoding "UTF-16" DOES // DOES write out...
7
private boolean handleNoSync() { try { if (readByte() == 0) { return false; } } catch (IOException e) { stats.incrementStat(statPrefix + STAT_CONNECTION_FAIL); log.info("RxThread: exception caught while trying to...
5
@Before public void setUp() { this.p = new Piste(5, 5); this.e = new Este(0, 0, 10, 10); this.t = new Taso(); }
0
public LinkedList<Instance> getInstances() { return instances; }
0
@Override public String toString() { if (size() == 0) return "[]"; String string = "["; boolean first = false; for (int tile : this) { string += (first ? ", " : "") + tile; first = true; } string += "]"; return string; }
3
public static String assertRationalRotationMatrix(double[][] matrix, int decimalPlaces) { String rational = assertRationalMatrix(matrix); if (rational != null) { return rational; } if (matrix.length != 3) { return "The rotation matrix does not comprise three rows:" + NEWLINE + representMatri...
9
private synchronized static void deleteTaskByID(String id, String mail) { try { XStream xstream = new XStream(new DomDriver()); File remFile = new File((String) Server.prop.get("taskFilePath")); Task[] allTask = (Task[]) xstream.fromXML(remFile); List<Task> retList = new ArrayList<Task>(Arrays.asList(...
4
private Constructor<?> getXMLConstructor(Class<? extends OVComponent> c) { for (Constructor<?> con : c.getConstructors()) { if (con.getGenericParameterTypes().length == 2) { if (con.getGenericParameterTypes()[0] == Element.class && con.getGenericParameterTypes()[1] == OVContainer.class) { return con...
7
public void beforePhase(PhaseEvent event) { FacesContext facesContext = event.getFacesContext(); HttpServletResponse response = (HttpServletResponse) facesContext .getExternalContext().getResponse(); response.addHeader("Pragma", "no-cache"); response.addHeader("Cache-Control", "no-cache"); // Stronger ac...
0
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 MediaWiki endMove(final MediaWiki.EditToken moveToken, final String newFullName, final String reason, final boolean suppressRedirect, final boolean moveTalk, final boolean moveSubpages) throws IOException, MediaWiki.MediaWikiException { final Map<String, String> getParams = paramValuesToMap("action", "move", "...
5
@Override public void addAllInner(Set<? extends IObject> interfaces, Set<? extends IObject> classes) { try { long biggestId = Integer.MIN_VALUE; // Add the objects if (interfaces != null) { for (IObject interf : interfaces) { tree.addObject(interf); // IdManager part of UI, will not show up...
9
@Override public void removeSubProcess(ProductType productType, SubProcess subProcess) { productType.removeSubProcess(subProcess); tx.begin(); for (Stock s : subProcess.getStocks()) { subProcess.removeStock(s); } TypedQuery<State> q = em.createQuery( "SELECT s FROM states s WHERE s.subProcess=:sp", St...
2
@Override public int read() throws IOException { int c; // If we have a block in here, start feeding that out. if ((c = outBuffer.read()) != -1) return c; // Otherwise, time to make a block. while (inBuffer.size() < ConCh.Delta(source.length, cod...
5
private BeanstreamResponse process(HttpUriRequest http, ResponseHandler<BeanstreamResponse> responseHandler) throws IOException { HttpClient httpclient; if (customHttpClient != null) httpclient = customHttpClient; else httpclient = HttpClients.cre...
1
@Override public void setReceiveException(IReceiveException exception) { receiveException = exception; }
0
public void copyFileToZip(File src, String dest) throws IOException { if (!src.exists()) return; createDirectory(dest); for (File f : src.listFiles()) { String target = dest + f.getName(); if (f.isDirectory()) copyFileToZip(f, target + "/"); if (f.isFile()) createFile(target, f); } }
4
public int[][] left(int grid[][]) { score = 0; for (int yIndex = 0; yIndex < 4; yIndex++) { for (int xIndex = 3; xIndex > 0; xIndex--) { if (grid[yIndex][xIndex - 1] == 0) { for (int a = xIndex - 1; a < 3; a++) { grid[yIndex][a] = g...
9
public boolean checkTurn(ConnectionToClient player) { if (player == playerX && currentMove == Move.X) { return true; } else if (player == playerX && currentMove == Move.O) { return false; } else if (player == playerO && currentMove == Move.X) { return false; ...
8
public int minDepth(TreeNode root) { if(root == null) return 0; LinkedList<TreeNode> que = new LinkedList<TreeNode>(); que.offer(root); que.offer(null); int res = Integer.MAX_VALUE; int dep = 0; while(!que.isEmpty()){ TreeNode n = que.poll(); ...
8
public int indexOf(T theElement) { for(int i = 0; i < size; i++) if(element[i].equals(theElement)) return i; return -1; }
2
public static void UpperGenre(){ try { if(conn == null || conn.isClosed()){ conn = DatabaseConnection.getConnection(); } } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try{ conn.setAutoCommit(false); PreparedStatement stmnt...
4
protected LegatoTokenResponse tokenizeCard(HttpsConnector connector, String cardNum, String cvd, int expiryMonth, int expiryYear) { LegatoTokenRequest tokenRequest = new LegatoTokenRequest(); tokenRequest.number = cardNum; tokenRequest.expiryMonth = expiryMonth; tokenRequest.expiryYear = expiryYear; tokenRequ...
1
double getResult() { //trim redundant spaces String nums = getNumbers().trim(); //split <Numbers> string in tokens StringTokenizer st = new StringTokenizer(nums, " "); //add tokens to List ArrayList<Double> al = new ArrayList<Double>(); while(st.hasMoreTokens()) try { al.add(Double.par...
7
public static void updateBoard(int nr) { Game.updateMap(nr); for (int i = 0; i < BSIZE; i++) { for (int j = 0; j < BSIZE; j++) { MapObject temp = Game.getMapObject(i, j); if (temp instanceof Worm) { Worm worm = (Worm) Game.getMapObject(i, j...
6
static public void decodeAllFilesInDirectory(String src) { File folder = new File(src); File[] listOfFiles = folder.listFiles(); for (File file : listOfFiles) { if (file.isFile()) { System.out.println(file.getName()); decodeFile(file.getPath()); } } }
2
public void update(){ if(add.size() > 0){ for(Entity ent : add){ entity.add(ent); } add.clear(); } if(remove.size() > 0){ for(Entity ent : remove){ entity.remove(ent); } remove.clear(); ...
5
private void setMapBoundries() { if (!(intersections.isEmpty())) { boolean first = true; for (Intersection i : intersections) { if (first) { north = i.getLocation().y; south = i.getLocation().y; west = i.getLocation().x; east = i.getLocation().x; first = false; } else { if...
7
public Card[] pickCards(SelectCardOptions sco, Card[] allcards) { GameQuery p = new GameQuery(QueryType.GETCARD, QueryType.CARD) .setObject(sco); p = query(p); if (p == null) return null; if (p.t != QueryType.CARD) return null; if (p.o instanceof Car...
9
public Dimension getPreferredSize() { final String text = getText(); boolean isEmpty = text.length() == 0 || (HtmlTools.isHtmlNode(text) && text.indexOf("<img") < 0 && HtmlTools .htmlToPlain(text).length() == 0); if (isEmpty) { setText("!"); } ...
8
public boolean getContainer(Container container, InlandShip ship,float tpf, int location) { switch (getContainerInt) { case 0: if ((int) this.getLocalTranslation().x < location) { this.move(tpf * 8 / 3f, 0, 0); } else if ((int) this.getLocalTransla...
9
public Connection getConnection(){ if(sqlite){ if(!this.getFile().exists()){ plugin.getLogger().info("CRITICAL: Database does not exist"); try { this.getFile().createNewFile(); Class.forName("org.sqlite.JDBC"); Connection dbCon = DriverManager.getConnection("jdbc:sqlite:" + this.getFile()); ...
8
public ListNode partition(ListNode head, int x) { ListNode dummyBack = new ListNode(0); ListNode dummyFront = new ListNode(0); dummyBack.next = head; ListNode p1 = dummyBack, p2 = dummyFront; // 1. go from dummy // 2. use p1.next != null // can avoid using pre-pointer while(p1.next != null){ if(p1.n...
2
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final RestaurantServer other = (RestaurantServer) obj; if (this.customersOrder != other.customersOrder && (this...
5
private boolean checkAllRows() { boolean changed = false; int numberChanged = 0; //goes down so that rows aren't skipped for(int z = height - SAFE_HEIGHT; z >= 0; z--) { if(checkSingleRow(z)) { changed = true; numberChanged++; for(int i = z + 1; i < height; i++) { // z + 1 so that the delete...
3
public String getType(){ if(type==SSHDSS){ return Util.byte2str(sshdss); } if(type==SSHRSA){ return Util.byte2str(sshrsa);} return "UNKNOWN"; }
2
public static void main(final String[] args) throws Exception { if (args.length < 2) { showUsage(); return; } int inRepresentation = getRepresentation(args[0]); int outRepresentation = getRepresentation(args[1]); InputStream is = System.in; Outpu...
7
public Essay getModel(int Question_ID) { Essay essayQuestion = new Essay(); try { StringBuffer sql = new StringBuffer(""); sql.append("SELECT QuestionID,QuestionType,noofwords, instructions"); sql.append(" FROM `Essay`"); sql.append(" where QuestionID=" +...
2
public void alta(){ String dni,cuenta; int titulares=0,salir=0; cuenta=calcularCuenta();//Llamo al método para que me devuelva un número de cuenta a usar do{//Do while para incluir varios titulares do{//do while para pedir un DNI correcto de 9 caracteres. No optimiza...
8
public void gestionHabitaciones(int reservaEco, int reservaVip) { while (true) { int parada = (int) ((Math.random() * 10000 + 1000)); try { Thread.sleep(parada); } catch (InterruptedException ex) { Logger.getLogger(Vip.class.getName()).log(Leve...
6
public Class<? extends Annotation> getScope() { return metadata.getScope(); }
1
public void setSaleId(int saleId) { this.saleId = saleId; }
0
@Override public void actionPerformed(ActionEvent e) { String action = e.getActionCommand(); switch (action) { case "Exit": String exitMessage = "Are you sure you wish to exit?"; int doExit = JOptionPane.showConfirmDialog(null, exitMessage, action, JOption...
8
public String attempt(String gameid, String combi) { Game game = games.getGame(gameid); List<Token<Colors>> colors = getColors(combi); Combination<Colors> combination = new Combination<Colors>(colors); Answer answer = game.giveAnswer(combination); return answer.toJson(); }
0
public static void main(String[] args) { // TODO Auto-generated method stub for (int i = 2; i <= 9; i += 4) { for (int j = 1; j <= 9; j++) { for (int k = 0; k < 4; k++) { System.out.print((i + k) + " * " + j + " = " + (i + k) * j + "\t"); } System.out.println(); } System.out.println(); ...
3
public void exception(){ long result = a.getTimeLeftInMillis(); if(result <= 0){ System.out.println("The bid for " + a.getName() + " has expired."); } }
1
public double getActionPower(Instance vision, String powerType) throws Exception { // Make the decision by model if (powerType == StringUtil.DASH_POWER && dashPowerCls != null) { return dashPowerCls.classifyInstance(vision); } else if (powerType == StringUtil.KICK_POWER && kickPowerCls != null) { return kic...
4
public Point3 minus(Point3 p){ return new Point3(this.x - p.x, this.y - p.y, this.z - p.z); }
0
private void removeEntity(int x, int y, Entity e) { if (x < 0 || y < 0 || x >= w || y >= h) return; entitiesInTiles[x + y * w].remove(e); }
4
private Chromo<T> rouletteSelection(){ Chromo<T> selected = null; double totalFitness = individuals.stream() .mapToDouble(chromo -> chromo.getFitness()).sum(); double slice = rand.nextDouble() * totalFitness; double fitnessSoFar = 0; if (totalFitness == 0){ selected = getRandomChromoFromPopulation()...
3
public DataModel(String path) { this.classSet = new TreeSet<>(); this.classValuesMap = new HashMap<>(); try(BufferedReader br = new BufferedReader(new InputStreamReader( new BufferedInputStream(new FileInputStream(new File(path)))))) { String line = br.readLine(); String[] parts = line.split("\\s+");...
8
public MiniXMLToken getTokenTagName(MiniXMLToken oMiniXMLToken, int type) { bInsideTag = true; int token = getNext(); oMiniXMLToken.setValue(token); if (isFirstNameChar(token)) { oMiniXMLToken.setType(type); while (true) { if (!isNameChar(testNext())) return oMiniXMLToken; oMiniXMLToken.appen...
3
public List<String> getSubNodes(String node) { List<String> ret=new ArrayList<String>(); try { for(Object o:fconfig.getConfigurationSection(node).getKeys(false)) { ret.add((String) o); } } catch(Exception e){} return ret; }
2
@Override public HashMap<String,String> getAvailableCommands() { HashMap<String,String> toRet = new HashMap<String,String>(); ArrayList<Class<?>> availableCommands = (ArrayList<Class<?>>) ReflectionHelper.getCommandClasses(); for(Class<?> comm:availableCommands) { try { Command currComm = (Command)c...
5
int method328(int arg0) { if (anInt545 >= anInt541) { anInt544 = anIntArray537[anInt542++] << 15; if (anInt542 >= anInt535) { anInt542 = anInt535 - 1; } anInt541 = (int) (anIntArray536[anInt542] / 65536D * arg0); if (anInt541 > anInt545) { anInt543 = ((anIntArray537[anInt542] << 15) - anInt544)...
3
@Test public void testLuoHarjoitusJaTarkistaTehtavat() { boolean oikeinMeni = true; try { this.kone.luoHarjoitus("m", lkm); } catch (Exception exception) {// EXCEPTION System.out.println("Airmetiikkakone.luoHarjoitus-virhe");// EXCEPTION } for (int ...
4
/* */ public void moveToBest() /* */ { /* 211 */ Random r = new Random(); /* 212 */ if ((Math.abs(this.x - this.bestPosX) < 2) && (Math.abs(this.y - this.bestPosY) < 2)) { /* 213 */ this.speedX = 0.0F; /* 214 */ this.speedY = 0.0F; /* 215 */ setMoveTo(false); /* 216 */ return...
8
public String[] getVariablesOnLHS() { ArrayList list = new ArrayList(); if(myLHS == null) return new String[0]; for(int i = 0; i < myLHS.length(); i++) { char c = myLHS.charAt(i); if (ProductionChecker.isVariable(c)) list.add(myLHS.substring(i, i + 1)); } return (String[]) list.toArray(new Str...
3
private static String date_format(double t, int methodId) { StringBuffer result = new StringBuffer(60); double local = LocalTime(t); /* Tue Oct 31 09:41:40 GMT-0800 (PST) 2000 */ /* Tue Oct 31 2000 */ /* 09:41:40 GMT-0800 (PST) */ if (methodId != Id_toTimeString) { ...
8
protected JPanel createDaysGUI() { JPanel daysGrid = new JPanel(true); daysGrid.setLayout(new GridLayout(0, dayName.length)); // What day is today in case we need to highlight it Calendar today = Calendar.getInstance(); int todayMonth = today.get(Calendar.MONTH); int tod...
8
@Test public void WhenUpdatingWithNullHostAndRefmaxLesserThanLevelSize_ExpectReducedLevelSize() throws UnknownHostException { RoutingTable routingTable = new RoutingTable(); localhost_.setHostPath("0"); routingTable.setLocalhost(localhost_); PGridHost aHost = new PGridHost("127.0.0.1...
2
public static ArrayList<Word> analyze(String string) { StringTagger tagger = SenFactory.getStringTagger(null); List<Token> tokens = new ArrayList<Token>(); ArrayList<Word> arrayList = new ArrayList<Word>(); try { tagger.analyze(string, tokens); for (Token token : tokens) { Word word = new Word(); ...
6
@Override public boolean equals(Object obj) { if(obj instanceof Pair) { Pair that=(Pair)obj; { return (this.s.equals(that.s)&&this.t.equals(that.t));} } else { return false;} }
2
@Override public void kill() { setRunning(false); listening = false; try { if (serverSocket != null) serverSocket.close(); for (ClientConnection client : clientConnections) { if (client.getClientSocket() != null) client.getClientSocket().close(); } } catch (IOException e) { e.printStac...
4
public boolean isAutoscrollOnStatus() { if(frame == null) buildGUI(); return autoscrollStatus.isSelected(); }
1
public void swim(int k) { /** * Checking for isLesser makes sure that the >= property of MaxHeap is * satisfied. */ while (k > 1 && isLesser(k / 2, k)) { swapArrayValues(k / 2, k); k = k / 2; this.arrayAccess += 2; this.comparisi...
2
public List<CmisObject> getQueryResults(String queryString) { List<CmisObject> objList = new ArrayList<CmisObject>(); System.out.println(queryString); // execute query ItemIterable<QueryResult> results = session.query(queryString, false); for (QueryResult qResult : results) { ...
3
public MP3Container getClone() { Vector<MP3> temp1 = new Vector<MP3>(); for (int i = 0; i < size();i++) { temp1.add(list.get(i)); } Vector<Integer> temp2 = new Vector<Integer>(); for (int i = 0; i < size();i++) { temp2.add(i); } return new MP3Container(temp1,temp2); }
2
public static void cashSelected() { askForAmount(); String s = sc.nextLine(); BigDecimal cashAmt; cashAmt = BigDecimal.valueOf(Double.parseDouble(s)); if (payments == null || payments.isEmpty()) { if (s == null || s.isEmpty()) { System.out.println("Error: Please enter a valid cash amount."); ...
8
public synchronized static int getStatus() { if (serverMainThread == null) { return DEAD; } else if (serverMainThread.isAlive() && !serverMainThread.isInterrupted()) { return RUNNING; } else if (serverListeningThreads == null) { return DEAD; //...
8
public Dimension preferredLayoutSize(Container target) { synchronized (target.getTreeLock()) { Dimension dim = new Dimension(0, 0); if (eastComponent != null) { Dimension d = eastComponent.getPreferredSize(); dim.width += d.width + getHgap(); dim.height = Math.max(d.height, dim.height); } i...
9
private String parseDependencyFromLine(String line) { String addedPath = null; if ((line != null) && line.startsWith("//:include ")) { addedPath = getNormalPath(line); } else if ((!isIgnoreRequire()) && (line != null) && (line.startsWith("//= "))) { addedPath = MiniProcessorHelper.getRequirePath...
5
public int getMaxZCaveSpot() { int count = caveSpots.size(); int[] caveSpot; int zMax = 0; int iMax = -1; for(int i = 0; i < count; i++) { caveSpot = (int [])caveSpots.get(i); if(caveSpot[0] > zMax && caveSpot[2] - caveSpot[1] > 3) { zMax =...
3
public static void main(String[] args) { // String queryString ="SELECT ?actor ?news WHERE {\n"+ // // "SERVICE <http://linkedmdb.org/sparql> {" + // "?film <http://purl.org/dc/terms/title> 'Tarzan' .}\n"+ // "SERVICE <http://linkedmdb.org/sparql> {" + // "?film <http://data.linke...
6
public static void main(String[] args) throws Exception { Runnable server = new Runnable() { @Override public void run() { try { new SocketServerExample("localhost", 8090).startServer(); } catch (IOException e) { e.p...
3
public static List<IComponent> getAllChildrenComponents(Entity entity, List<IComponent> componentList) { Children childrenComponent = entity.getComponent(Children.class); // Our base test, stop recursion if we no longer have children if (childrenComponent == null) { return componentList; } for (Entity ch...
2
private void deleteFile() { HashMap<String, FileStructure> currFileList = fileUtil.getAllFiles(rootDirAddress, true); Iterator iter = currFileList.keySet().iterator(); while(iter.hasNext()) { String currFileName = (String)iter.next(); // here we have a bug, cannot delete ...
5
protected void addDuplicate(URI uri) { this.duplicates.add(uri); }
0
private AFParser recursiveAFNEGenerate(RegularExpresionNode node) { AFParser result = null; if(node instanceof ConcatNode){ RegularExpresionNode left = ((ConcatNode)node).leftOperandNode; RegularExpresionNode right = ((ConcatNode)node).rightOperandNode; result = this....
4
private static ArrayList<Configuration> sautRecursif(Configuration conf, byte[] triplet, byte typeSauteFirst, boolean noirEnPlayer){ ArrayList<Configuration> listeConf = new ArrayList<Configuration>(); byte caseDebut = triplet[0]; byte typeSaute = triplet[1]; byte caseFin = triplet[2]; byte newTurttle...
7
private void setBalance(BigInteger balance) throws IllegalArgumentException { if (! this.canHaveAsBalance(balance)) throw new IllegalArgumentException(); this.balance = balance; }
1
private void findRecursive(File folder) { for(File file : folder.listFiles()) { if(file.isDirectory()) { findRecursive(file); } if(FilenameUtils.getExtension(file.getName()).equals("java")) { results.add(file); } } }
3
public void checkImgDir(){ if(xDirection > 0 && pDir != 3){ pDir = 3; } if(xDirection < 0 && pDir != 2){ pDir = 2; } if(yDirection < 0 && pDir != 1){ pDir = 1; } if(yDirection > 0 && pDir != 0){ pDir = 0; } }
8
private static boolean validateRGB(String[] rgb) { if (rgb.length < 3) { return false; } for (String color : rgb) { if (color.isEmpty() || color.length() > 3) { return false; } short value = Short.parseShort(color); if (value < 0 || value > 255) { return false; } } return true; ...
6
public void actionPerformed(ActionEvent e) { AbstractButton b = (AbstractButton) e.getSource(); if (b == quoteBtn) { getQuote(); } else if (b == orderBtn) { placeOrder(); } else if (b == marketBtn) { priceText.setText(""); } else if (b == limitBtn) { priceText.selectAll(); priceText.r...
4
@Override public void execute(String[] input) { Properties preferences = laura.getPreferences(); String userName = preferences.getProperty("userName"); if (userName == null) { laura.print("Hello, my name is LAURA. What's yours?"); userName = laura.getInput(); laura.print("Great to meet you, " + userN...
1
public void processMouseReleased(int x, int y) { // ARE WE COMPLETE MAKING OUR SHAPE? if (state == PoseurState.COMPLETE_SHAPE_STATE) { // WE HAVE TO USE POSE SPACE COORDINATES Rectangle2D poseArea = zoomableCanvasState.getPoseArea(); float zoomLevel = zoom...
7
public void insertarFinal(T obj){ // Variable auxiliar Nodo<T> q = p; //EL nodo auxiliar Nodo<T> t = new Nodo<>(); //El nuevo nodo a insertar t.setValor(obj); t.setLiga(null); if(p == null){ p = t; }else{ //ciclo que recorre la lista while(q.getLiga() != null){ q = q.getLiga(); } q.s...
2
@Override public int hashCode() { int hash = 0; hash += (idEntrada != null ? idEntrada.hashCode() : 0); return hash; }
1
public static Sujet creerSujet(Categorie categorie, String sujet, String message, boolean sticky, Utilisateur auteur, Icone icone) throws ChampInvalideException, ChampVideException { if (!categorie.peutCreerSujet(auteur)) throw new InterditException("Vous n'avez pas les droits requis pou...
5
public String toString() { // only ZeroR model? if (m_ZeroR != null) { StringBuffer buf = new StringBuffer(); buf.append(this.getClass().getName().replaceAll(".*\\.", "") + "\n"); buf.append(this.getClass().getName().replaceAll(".*\\.", "").replaceAll(".", "=") + "\n\n"); buf.append("Wa...
9
@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 MateriaPK)) { return false; } MateriaPK other = (MateriaPK) object; if ((this.idpropuesta == null && other.idpr...
9
protected boolean encodeHeader(int alphabetSize, int[] alphabet, int[] frequencies, int lr) { EntropyUtils.encodeAlphabet(this.bitstream, alphabet, alphabetSize); if (alphabetSize == 0) return true; this.bitstream.writeBits(lr-8, 3); // logRange int inc = (alphabetSize > 64) ? 16 :...
9
private void cores() { Menu m = new Menu("CORES"); m.inclui("listar", "Todos as cores e modificadores"); m.inclui("incluir", "Adicionar um nova cor"); m.inclui("incluir2", "Adicionar um novo modificador"); m.inclui("remover", "Remover uma cor"); m.inclui("remover2", "Rem...
9