text
stringlengths
14
410k
label
int32
0
9
public void closeConnections() { try { if (statement != null) { if (!statement.isClosed()) { statement.close(); } } } catch (SQLException sqlEx) { Helper.logException(sqlEx); } try { if (...
6
public void init(ChatServer server,String args[]){ this.server=server; ExpirationChecker expirationChecker=new ExpirationChecker(server); expirationChecker.start(); int serverPort; try{ serverPort = Integer.parseInt(args[0]); }catch(Exception e){ serverPort=8000; } Runtime.getRuntime().a...
9
public int cdlHangingManLookback( ) { return ((( ((( ((( (this.candleSettings[CandleSettingType.BodyShort.ordinal()].avgPeriod) ) > ( (this.candleSettings[CandleSettingType.ShadowLong.ordinal()].avgPeriod) )) ? ( (this.candleSettings[CandleSettingType.BodyShort.ordinal()].avgPeriod) ) : ( (this.candleSettings[...
7
private static void seqTreatment(String s,String obj){ String [] split = null; if(s.contains("*")){ split = s.split("\\*"); }else if(s.contains("&")){ split = s.split("\\&"); } String newComp = ""; HashMap<String,String> hash = new HashMap<String,String>(); for(int i = 0 ; i < split.length ; i++){ ...
5
public ImportingModuleLoader(String pathToBin, ClassLoader parent) { super(parent); this.pathToBin = pathToBin; }
0
private boolean superSimpleCleanup(String channel, String sender, String message) { if (channel.equalsIgnoreCase("#azorae")) return false; if (!message.contains(" ") && message.length() >= 150) { if (message.startsWith("http") && message.length() < 300) retu...
7
@Override public boolean equals(Object obj){ if (obj instanceof Noeud){ Noeud noeud = (Noeud) obj; return (noeud.id == this.id) && (noeud.xMetre==this.xMetre) && (noeud.yMetre == this.yMetre); } else { return false; } }
3
public void addClassAnalyzer(ClassAnalyzer clazzAna) { if (parent != null) parent.addClassAnalyzer(clazzAna); }
1
@Override public final Configuration readConfiguration() throws ReaderException { try { Configuration config = new Configuration(); Properties properties = new Properties(); FileInputStream configFile; configFile = new FileInputStream(this.filePath); properties.load(configFile); config.setLevel(thi...
1
public static Node clone(Node n){ if(n instanceof SETNode){ SETNode res = new SETNode(n.getLabel(),n.getWeight()); res.setWeightAlone(n.getWeightAlone()); res.setType(n.getType()); for(int i = 0 ; i < n.getFils().size() ; i++){ res.getFils().add(ToolNode.clone(n.getFils().get(i))); } return ...
4
public String getResourceTotal() { int cpu_count = 0; long memoryAvailable = 0; long diskAvailable = 0; try { List<String> regionList = ControllerEngine.gdb.getNodeList(null,null,null); //Map<String,Map<String,String>> ahm = new HashMap<String,Map<String,String>>(); //System.out.println("Region C...
7
private void makeTableDisplay() { List<List<String>> table = null; TableView<Row> tableView = new TableView<>(); tableView.setId("table"); if (!expression.getText().equals("")) { //switch to handle the selected mode if (outputMode.equals("Compact")) { CompactTableGenerator compTable = new CompactTable...
5
protected MaskFormatter createFormatter(String s) { MaskFormatter formatter = null; try { formatter = new MaskFormatter(s); } catch (java.text.ParseException exc) { System.err.println("formatter is bad: " + exc.getMessage()); System.exit(-1); } ...
1
private void readData() throws IOException { while (! isClosed) { int code = is.read(); switch (code) { case ' ': case '\t': case '\n': case '\r': break; case 'C': { int channel = (is.read() << 8) + is.read(); inputReady[channel] = true; ...
8
@Override public void onStringInput(String input) { System.out.println("User input: " + input); }
0
public static void writeFile(String fileName) { if (fileName == null) // Go back to reading standard output writeStandardOutput(); else { PrintWriter newout; try { newout = new PrintWriter(new FileWriter(fileName)); } catch (Exception e) { ...
4
public void setStartDate(XMLGregorianCalendar value) { this.startDate = value; }
0
public static void killme(int num) { if (SH.containsKey(num)){ SH.get(num).interrupt(); } }
1
static final boolean method2547(int i, byte i_0_) { anInt3993++; if (Class163.aBooleanArray2162[i]) return true; if (!Class229.aClass45_2978.method408(i)) return false; int i_1_ = Class229.aClass45_2978.getAmountChildEntries(i); if (i_1_ == 0) { Class163.aBooleanArray2162[i] = true; return true...
9
public static Pair<BigInteger, BigInteger> sign(boolean deb, String message, BigInteger publcG, BigInteger publicP, BigInteger publicQ, BigInteger privateX) { debug = deb; debugMode("=== CREATING SIGNATURE ===", true); // K debugMode("Creating auxiliar variable K .......... ", false); BigInteger k = ne...
3
public int[][] getUsedAttributes(){ int[][] usedAttributes = new int[m_numClasses][]; //first extract coefficients double[][] coefficients = getCoefficients(); for (int j = 0; j < m_numClasses; j++){ //boolean array indicating if attribute used boolean[] attributes = new boolean[m_numericDataH...
7
public void setMacro( String macro ) { if( cxnSp != null ) { cxnSp.setMacro( macro ); } else if( graphicFrame != null ) { graphicFrame.setMacro( macro ); } else if( sp != null ) { sp.setMacro( macro ); } else if( grpSp != null ) { grpSp.setMacro( macro ); } }
4
public void deleteTags(String filePath){ PictureI picture = findById(filePath); if(picture != null){ try{ List<? extends TagI> taggs = picture.getTags(); List<Tag> tags = new ArrayList<Tag>(); for(TagI t: picture.getTags()) tags.add((Tag) t); beginTransaction(); for(TagI tag: tags){ ...
8
public int[][] getActualGrid() { int[][] gridActual = new int[sudokuSize][sudokuSize]; for (int i = 0; i < sudokuSize; i++) { for (int j = 0; j < sudokuSize; j++) { gridActual[i][j] = cells[i][j].current; } } return gridActual; }
2
public void initialisieren() { this.anzSpieler = -1; while ( this.anzSpieler < 0 || this.anzSpieler > 4 ) { Anzeige.zeigeStringAn( "Anzahl der Spieler ( 0 bis 4 ) eingeben:" ); try { this.anzSpieler = Integer.parseInt( getEingabe() ); } catch ( NumberFormatException nfEx ) { System.out...
6
public static void main(String[] args) throws LexerException, IOException { // TODO code application logic here Reader r; try { for (int i = 0; i < args.length; i++) { r = new FileReader(args[i]); MyLexer l = new MyLexer(new PushbackReader(r)); ...
7
protected String addTopGameFeatures(JButton b) { b.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myMDisplay.setText(""); updateTopPane(false); reset(); ...
0
public void start() { if (gameStatus.equals(GameResult.MafiaWins)) sendMafiaWinsMessage(); else sendVillagerWinsMessage(); close(); }
1
@Override public void save(Object o) throws Exception { try { session = obtainSession(); session.beginTransaction(); session.update(o); session.flush(); session.getTransaction().commit(); } catch (HibernateException e) { session...
1
protected void runProgram (List<String> args) throws IOException, InterruptedException { logger.entering(getClass().getName(), "runProgram", args); ProcessBuilder procBuilder = new ProcessBuilder(args); Process proc = procBuilder.start(); proc.waitFor(); // E...
2
private List<ExternalContent> getExpandedExternalContents(final Request request) { final List<ExternalContent> externalContents = request.getExternalContents(); final List<Variable> contextVariables = workflow.getContext().getVariables(); for (final ExternalContent eContent : externalContents) { print("Exte...
4
public void propertyChange(PropertyChangeEvent e) { File selectedFile = fc.getSelectedFile(); if(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY.equals(e.getPropertyName()) && selectedFile!=null) { preview = new ImageIcon(selectedFile.getPath()); if(preview == null) r...
7
@SuppressWarnings({ "incomplete-switch", "deprecation" }) @EventHandler public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { if (!(event.getEntity() instanceof Player)) { return; } if ((event.getDamager() instanceof Player)) { switch (event.getEntityType(...
8
public String createTable(List<ColumnInfo> cols, PrimaryKey pk, List<Index> uis, Partitioning partitioning) { if (null == cols || 0 == cols.size()) { throw new RuntimeException("建表时必须至少包含一列!"); } StringBuilder sb = new StringBuilder(); cols.stream().forEach((col) -> { sb.append(',').append(col.toString())...
6
public void mouseReleased(MouseEvent e) { if (mode == Mode.DRAW) // in DRAW mode, create the new box { // and add it to the list of shapes int wid = Integer.parseInt(JOptionPane.showInputDialog( theWindow,"Enter the width")); int ht = Integer.parseInt(JOptionPane.showInputDialog( ...
8
public String toString() { return this.mode == 'd' ? this.writer.toString() : null; }
1
public void refresh() { try { int i = mySlider.getValue(); if(i > myMax) i = myMax; if(mySlider.getValue() < myMin) mySlider.setValue(myMin); myDisplay.setText(myText.substring(myMin, i)); myLengthDisplay.set...
3
public static int costFunction(TetrisBoard TB, int i, int j, int k, boolean DEBUG) { if (DEBUG) { System.out.println("cost fn ("+i+", "+j+", "+k+")"); TetrisBoard.printTetromino(i); } int cost = Integer.MAX_VALUE; int ret = TB.dropTetromino(i,j,k,TB.tilemarker); if (ret >= 0) { ...
8
public CheckResultMessage check24(int day) { return checkReport.check24(day); }
0
public void SpecDamg(int maxDamage) { for (Player p : server.playerHandler.players) { if(p != null) { if (PlayerHandler.players[AttackingOn].IsDead == false ) { int damage = misc.random(maxDamage); if (PlayerHandler.players[AttackingOn].playerLevel[3] - hitDiff < 0) damage = PlayerHand...
4
public static HandshakeBuilder translateHandshakeHttp( ByteBuffer buf, Role role ) throws InvalidHandshakeException , IncompleteHandshakeException { HandshakeBuilder handshake; String line = readStringLine( buf ); if( line == null ) throw new IncompleteHandshakeException( buf.capacity() + 128 ); String[] f...
7
public void render(Tesselator tess, int i, int j, int k, Level level) { if(icon[0] < 0) return; boolean xm = !level.getBlock(i - 1, j, k).solid, xp = !level.getBlock(i + 1, j, k).solid; boolean ym = !level.getBlock(i, j - 1, k).solid, yp = !level.getBlock(i, j + 1, k).solid; boolean zm = !level.getBlock(i, j, ...
7
public static void usePokeBall(Item item) { if (!hasItem(item)) { errorWindow.addMessage(" You don't have this item in your inventory to use! "); errorWindow.toFront(); return; } if (!Battle.BATTLE_TYPE.equals("WILD")) { errorWindow.addMessage("You can't steal a Trainer's Pokemon!"); errorWin...
4
public String getColumnName( int col ) { String back = "-" ; if ( col == 0 ) // status column { back = "" ; } else if (col == 1) { back = "ref" ; } else if ( col == KEY_COLUMN ) // key { back = "key" ; } else // language column { // is a default ...
7
@Override public boolean supportsComments() {return true;}
0
public StructuredBlock getNextBlock(StructuredBlock subBlock) { if (subBlock == subBlocks[0]) { if (subBlocks[1].isEmpty()) return subBlocks[1].getNextBlock(); else return subBlocks[1]; } return getNextBlock(); }
2
public void appendBytes(byte...datas){ this.isBuffered.set(true); ByteBuffer buffer = this.getBuffer(); if(buffer.remaining() >= datas.length){// 缓冲区的空间大于数据的长度 buffer.put(datas); log.info("the postion of the data: " + buffer.position()); }else{// 缓冲区的空间小于数据的长度 int offset = 0;// 初始相对位移为0 int length =...
4
protected BufferedImage initOffsets() { BufferedImage img = image; if( img == null ) return img; scale = 1; while( img.getWidth() * scale > getWidth() || img.getHeight() * scale > getHeight() ) { scale /= 2; } while( img.getWidth() * scale * 2 <= getWidth() && img.getHeight() * 2 <= getHei...
5
public void printList(List<Integer> list) { for (int elm : list) System.out.print(elm + "=>"); System.out.println("EOL (length:" + list.size() + ")"); }
1
public DragonBoneSword(){ this.name = Constants.DRAGONBONE_SWORD; this.attackScore = 15; this.attackSpeed = 19; this.money = 1500; }
0
public ProcessTextArea(final JTextArea area, ProcessBuilder processBuilder) { super(area); this.processBuilder = processBuilder; close = new JButton("Terminate"); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { closeProcess(); } }); addT...
8
public void deleteSelectedItem() { // DELETE THE SELECTED INTERSECTION, BUT MAKE SURE IT'S // NOT THE STARTING LOCATION OR DESTINATION if ((selectedIntersection != null) && (selectedIntersection != level.startingLocation) && (selectedIntersection != level.des...
8
public List<Integer> postorderTraversal1(TreeNode root) { if (root == null) return list; Stack st = new Stack(); Stack st2 = new Stack(); st2.add(root); while(!st2.isEmpty()) { root = (TreeNode) st2.pop(); st.push(root); if (root.left != null) st2.push(root.left); if (root.right !=...
5
public static void main(String[] args) { // TODO Auto-generated method stub DataModel model = null; try { model = new FileDataModel(new File("/home/naren/projects/minhash/intro.csv")); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } UserSimilarity similarity; t...
3
public void sort(int low, int high) { if(low >= high) return; int i=low+1, j=high; int pivotIndex = low; while(i<=j) { // i,j comparison should come first while(i<=j && array[i] <= array[pivotIndex]) i++; while(j>=i && array[j] > array[pivotIndex]) j--; if(i<=j) { swap(i, j)...
7
public Object callMethod(Object o, String methodName, Object... args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Method method = null; if (args == null || args.length == 0) { method = o.getClass().getDeclaredMethod(methodName); } else { Class<?>...
6
public void send(Object message) { if (isOpen) { try { out.writeObject(message); out.flush(); } catch (IOException e) { statusMessage("Error writing object to stream"); e.printStackTrace(); errorCloseClient("Error writing object to stream"); } } }
2
public <I extends Item> void addConverter( Class<I> itemType, Class<? extends ItemKey<I>> keyType, DataConverter<I, ? extends Data<I>, ? extends DefaultItem<I>> converter ) { convertersByItemType.put( itemType, converter ); convertersByKeyType.put( keyType, converter ); }
3
protected void FillBuff() throws java.io.IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxN...
9
public static int getInteger() throws BadInput { int num; try { String str = getString(); num = Integer.parseInt(str); } catch(NumberFormatException e) { throw new BadInput(); } return num; }
1
public static int ladderLength(String start, String end, HashSet<String> dict) { dict.add(start); dict.add(end); HashMap<String, Pair> visitMap = new HashMap<String, Pair>(); for (String w : dict) { if (w.equals(start)) { visitMap.put(start,new Pair(false,w, ...
9
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxN...
9
public static ArrayList<bConsulta> getListaGMP(String dt1) throws SQLException, ClassNotFoundException { ArrayList<bConsulta> sts = new ArrayList<bConsulta>(); Connection conPol = conMgr.getConnection("PD"); if (conPol == null) { throw new SQLException("Numero Maximo de Conexoes Atin...
3
public boolean compareToLoc(Location loc) { if(loc.getBlockX() == x && loc.getBlockY() == y && loc.getBlockZ() == z) { return true; } else { return false; } }
3
public Region(int x,int z,Dimension dim){ this.x = x; this.z = z; this.dim = dim; }
0
@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 TaxonDataset)) { return false; } TaxonDataset other = (TaxonDataset) object; if ((this.datasetKey == null && ot...
5
@Override public void draw() { spellWindow.draw(); weaponWindow.draw(); if(confirmationWindow != null) confirmationWindow.draw(); }
1
private static int getTypeInt(TiffType type) { switch (type) { case SHORT: return 3; case LONG: return 4; default: throw new IllegalArgumentException(); } }
2
private List<String> expandDynamicArg(String arg) { for (ParameterDescription pd : m_descriptions.values()) { if (pd.isDynamicParameter()) { for (String name : pd.getParameter().names()) { if (arg.startsWith(name) && !arg.equals(name)) { return Arrays.asList(name, arg.substring(name.l...
5
public void setjLabelSecteur(JLabel jLabelSecteur) { this.jLabelSecteur = jLabelSecteur; }
0
public void setFinishedById(Integer id, boolean isFinished) { String query = "UPDATE Step SET isFinished = :isFinished WHERE id = :stepId"; sessionFactory.getCurrentSession().createQuery(query) .setInteger("stepId", id) .setBoolean("isFinished", isFinished) ...
0
@Override public void add(LessFileStatus lfs) { //System.out.println("ADD " + lfs.getLessName()); synchronized (LOCK_MODEL) { // - Compute sortedIndex int sortedIndex, sortedLen = sortedLFS.size(); for (sortedIndex = 0; sortedIndex < sortedLen; sortedIndex++) { LessFileStatus item = sortedLFS.get(sorted...
7
public IPlugin getPlugins(int param) throws IllegalArgumentException { IPlugin plugins = null; switch(param) { case 0: plugins = null; break; case 1: // HTTP(S) Proxy + Header Dumper + Header Changer with Deactivate-Compression plugin and HTTP 1.0 plugin plugins = new He...
8
private MoveButtonPanel() { super(); ActionListener buttonListener = new ButtonMoveListener(); this.setLayout(new GridLayout(3, 3)); // grid layout this.setPreferredSize(new Dimension(75, 50)); // set size /* Create the arrow buttons */ up = new BasicArrowButton(SwingConstants.NORTH); down = n...
0
private int jjMoveStringLiteralDfa7_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(5, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(6, active0); return 7; } switch(curChar) { case 32: ...
6
public void resume() { for(int x = 0; x<soundEffects.size(); x++) { soundEffects.get(x).getClip().resume(); } for(int x = 0; x<tracks.size(); x++) { tracks.get(x).getClip().resume(); } background.getClip().resume(); }
2
public static boolean putMoney(int money) { Utils.getString("city/index"); Control.quietSleep(500); Utils.getString("sparkasse/banker"); Control.quietSleep(500); String einzahlen = Utils.getString("sparkasse/einzahlen"); Control.quietSleep(500); if (money == 0) { List<NameValuePair> nvps = new Arr...
7
public Menu() { initComponents(); //Se crea el archivo "txt" String archivo = "Reistro.txt"; File f = new File(archivo); }
0
public void usingKeySet(Map<Integer, String> map){ for(Integer key: map.keySet()){ System.out.println("Key: "+key); } }
1
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Player other = (Player) obj; if (!Objects.equals(this.username, other.username)) { return fal...
3
public static void main(String[] args) throws IOException, JDOMException { Map<String, String> propertiesMap = readProperties(args); if (!propertiesMap.containsKey("method") || !propertiesMap.containsKey("file")){ System.out.println("Miss properties (file | method)"); System.out.println("java -jar TreeVis...
9
private void startDealing() { Method[] mm = dealer.getClass().getDeclaredMethods(); for(Method m : mm){ System.out.println(m); } dealerThread = new Thread(new Runnable() { @Override public void run() { try { maintainDealer(); } catch (NoSuchMethodException e) { // TODO Auto-generated...
7
public static Resource getResourceInstance(String domainName, String path){ Resource reuturnedResource =null; if(path.contains(".css")){ reuturnedResource = new CSS(domainName, path); }else if( path.contains(".js")){ reuturnedResource = new JS(domainName, path); } else{ reuturnedResource = new Page(...
2
private static <A extends Annotation> A getAnnotationOnProperty(PropertyDescriptor propertyDescriptor, Class<?> javaType, Class<A> annotationType) { Method setter = propertyDescriptor.getWriteMethod(); Method getter = propertyDescriptor.getReadMethod(); if (setter.isAnnotationPresent(annotationType) && gett...
7
public void visitBaseType(final char descriptor) { if (type != TYPE_SIGNATURE || state != EMPTY) { throw new IllegalStateException(); } if (descriptor == 'V') { if (!canBeVoid) { throw new IllegalArgumentException(); } } else { ...
6
public static Mitgliedstyp fromString(String str) { switch (str) { case "Mitglied": case "MITGLIED": return MITGLIED; case "Nicht-Mitglied": case "Nicht Mitglied": case "NICHT_MITGLIED": return NICHT_MITGLIED; case "Schnuppermitglied": ...
9
void turn() { if (whichIndex == 0) { whichIndex = 1; step = step * -1; } else { whichIndex = 0; } max[whichIndex]--; if (max[whichIndex] <= 0) closed = true; }
2
public boolean Insertar(Object o) { Transaction t = cx.beginTransaction(); try { cx.save(o); t.commit(); cx.flush(); return true; } catch (Exception e) { System.out.println("no se inserto"); t.rollback(); return...
1
static final void method3808(boolean bool, int i) { anInt4075++; for (Node_Sub47 node_sub47 = (Node_Sub47) Class290_Sub6.aClass312_8122.method3613(65280); node_sub47 != null; node_sub47 = (Node_Sub47) Class290_Sub6.aClass312_8122.method3620(16776960)) { if (node_sub47.aNode_Sub9_Sub2_7568 != null) { Class176...
9
public boolean getHasVisited() { return hasVisited; }
0
public static int countNeighbours(boolean[][] world, int col, int row) { int c = 0; if (getCell(world, col - 1, row - 1) == true) { c += 1; } if (getCell(world, col, row - 1) == true) { c += 1; } if (getCell(world, col + 1, row - 1) == true) { c += 1; } if (getCell(world, col - 1, row) == tr...
8
@Override public void keyPressed(KeyEvent e) { int id = e.getKeyCode(); //KeyCode des KeyEvents auslesen // Mittels KeyEvent prüfen, was für eine Taste gedrückt wurde, Wahrheitswert setzen switch (id) { case (KeyEvent.VK_W): if(!CollideTop) { figUp = true; } break; case (KeyEvent.VK...
8
public void addNamespace(int nscode) throws XPathException { if (localNamespaces == null) { localNamespaces = new int[]{nscode, -1, -1, -1}; } for (int n=0; n<localNamespaces.length; n++) { int nn = localNamespaces[n]; if (nn == nscode) { retur...
9
@Override public void messageReceived(IoSession session, Object message) { Logger log = LoggerFactory.getLogger(ChatProtocolHandler.class); log.info("received: " + message); String theMessage = (String) message; String[] result = theMessage.split(" ", 2); String theCommand = ...
8
public JsonObject toJsonObject() { JsonObject json = new JsonObject(); json.add("id", id); if ( stdin != null ) json.add("stdin", stdin); if ( stdout != null ) json.add("stdout", stdout); if ( stderr != null ) json.add("stderr", stderr); if ( status != null ) json.add("status", status); if ( error != n...
9
public Image getImageMetadatabyId(String id) { return imageTemplateRepository.getImageMetadatabyId(id); }
0
private static int getFreeSlots(InventoryItem[] targetInventory) { //counter variable int count = 0; //Scan the targetInventory looking for EmptyItem's for(int i = 0; i<targetInventory.length; i++) { //if it finds one, increment the counter variable. if(...
2
public void playUnit() throws InterruptedException{ try { in = new FileInputStream(unit); as = new AudioStream(in); ap.player.start(as); } catch(Exception e) { System.out.println("Got an IOException: " + e.getMessage()); e.printStackTrace(); ...
1
private void genUi(int userId) { int userRatedNumber = DataInfo.userlist[userId].length; //用户评过分的项目个数 if (userRatedNumber == 0) { for (int j = 0; j != DataInfo.featureNumber; j++) { DataInfo.userFeature[userId][j] = 0; } return; } int[] columnIndexes = new int[userRatedNumber]; dou...
4
public Node getPrevious() { Node node = current; if (node == head) { current = null; return null; } current = node.previous; return node; }
1