text
stringlengths
14
410k
label
int32
0
9
public Transporte recebeuACKde(Transporte t, InetAddress adress){ Transporte t1=new Transporte(initTransportePSH); this.Recebidos.lock(); ArrayList<DatagramPacket> lista = (ArrayList<DatagramPacket>) this.Recebidos.lista.clone(); this.Recebidos.unlock(); for(DatagramPa...
4
public final void gen_attack_bknight(Board board, int square) { int mobility_all = 0; int mobility_safe = 0; int mobility_total = 0; int attackedSquare; for(int i = 0; i < 8; i++) { attackedSquare = square + knight_delta[i]; if((attackedSquare & 0x88) ==0) { BB[attackedSquare] |= MINOR_BIT; ...
6
protected UIComponent createVerbatimComponentFromBodyContent() { UIOutput verbatim = null; String bodyContentString; String trimString; if (null != bodyContent && null != (bodyContentString = bodyContent.getString()) && 0 < (trimString = bodyContent.getStr...
9
protected boolean needsFill(Point p) { if (p.x < 0 || p.y < 0 || p.x >= source.getWidth() || p.y >= source.getHeight()) return false; return needsFillInBound(p); }
4
private void makeWormTurn(int i, int j) { Worm thisWorm = (Worm) Level[i][j]; if (thisWorm.isChecked()) { return; } HexDirection dir = thisWorm.getWormsNewDirection(); int newX = TranslateDirection(i, j, dir, 'x'); int newY = TranslateDirection(i, j, dir, 'y')...
8
void BalWFext( double[][] A) { edge f, g; if ( head.leaf() && tail.leaf() ) distance = A[head.index][head.index]; else if ( head.leaf() ) { f = tail.parentEdge; g = siblingEdge(); distance = 0.5*(A[head.index][g.head.index] + A[head.index][f.head.index] - A[g.head.index][f.head.index...
3
@Override public void doAction() { if (isRunning) return; isRunning = true; RoundManager roundManager = RoundManager.getInstance(); ScoreManager scoreManager = ScoreManager.getInstance(); MessageDialog messageDialog = MessageDialog.getInstance(); Nam...
5
public void decrementAttempts(){ ReconnectAttempts--; }
0
void menuSave() { if (image == null) return; animate = false; // stop any animation in progress // If the image file type is unknown, we can't 'Save', // so we have to use 'Save As...'. if (imageData.type == SWT.IMAGE_UNDEFINED || fileName == null) { menuSaveAs(); return; } Cursor waitCursor = new...
5
public static void start() { GraphDrawer drawer = new GraphDrawer(); drawer.setGraph(GraphInterface.getGraph()); GraphCanvas canvas = new GraphCanvas(drawer); Window w = new Window(canvas); SwingUtilities.invokeLater(w); }
0
public static int getMaxCardsSuite(ArrayList<Card> cards) { int[] suiteCounts = new int[Card.NUM_SUITES]; for (Card card : cards) { suiteCounts[card.suite]++; } int maxSuiteIndex = 0; for (int i = 1; i < suiteCounts.length; i++) { if (suiteCounts[i] > sui...
3
public int buscarIndex(clsEnArticulo[] arreglo, String nombre) { int res=-1; for(int i=0;i<arreglo.length;i++) { if(arreglo[i].getNomprod().equals(nombre)) { res=i; break; } } return res; }
2
public static void init(String _language) { if (replace == null) { replace = new SetOfReplacements(SegmentationConstant.FILE_REPLACE); } if (_language.equals("???")) { System.out.println("default=EN"); _language = "ENGLISH"; } language = _langu...
9
private Class getWrapperClassFromPrimitive(Class t) { if(t == int.class) { return Integer.class; } if(t == short.class) { return Short.class; } if(t == float.class) { return Float.class; } if(t == boolean.class) { return Boolean.class; } if(t == double.class) { return Double.class; } if(t == long.class) { ...
7
public KAModel() { super(); data = new Vector<Osoba>(); }
0
public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.print("How many times do you want to repeat the figure (>1)?: "); int repeatTimes = keyboard.nextInt(); System.out.print("Indicate the number of stars (>1): "); int numberOfStars = keyboard.nextInt(); for (int out...
5
protected void _putcatalog() { this._out("/Type /Catalog"); this._out("/Pages 1 0 R"); if ((this.zoomMode == null) && (this.zoomFactor > 0)) { this._out("/OpenAction [3 0 R /XYZ null null " + this.zoomFactor / 100 + "]"); } else if (Zoom.FULLPAGE.equals(this.zoomMode)) { this._out("/OpenAction [3...
8
private static boolean isPangram(String in) { int []arr = new int[26]; int BASE_A = 'a'; in.trim(); in=in.toLowerCase(); in=in.replace(" ",""); char []chars = in.toCharArray(); for(char ch : chars){ int c = ch; arr[c-BASE_A] = 1; } boolean flg = true; int i = 0; while(flg && i<26){ ...
4
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=pro...
8
public void update(Graphics g) { paint(g); }
0
public boolean hit(final int portal){ if(portal == 1){ this.health1--; for(final Player p : Bukkit.getOnlinePlayers()){ p.playEffect(one, Effect.SMOKE, 0); p.playEffect(one, Effect.SMOKE, 0); p.playEffect(one, Effect.SMOKE, 0); p.playEffect(one, Effect.SMOKE, 0); p.playEffect(one, Effect.SMO...
8
@Test public void test_simple_table() throws ParserConfigurationException, SAXException, IOException{ /* * Arrange */ HtmlView<?> view = new HtmlView(); view.head().title("Dummy Table"); HtmlTable<?> t = view.body() .heading(1, "Dummy Table") .hr() .div() .table(); HtmlTr<?> headerRow = t.tr(...
8
private void streamFile(FTPFile fromFile, PipedInputStream pis) throws IOException, FtpWorkflowException, FtpIOException { setConnectionStatusLock(CSL_INDIRECT_CALL); setConnectionStatus(RECEIVING_FILE_STARTED, fromFile, null); setConnectionStatus(RECEIVING_FILE); RetrieveComma...
6
public void addAload(int n) { if (n < 4) addOpcode(42 + n); // aload_<n> else if (n < 0x100) { addOpcode(ALOAD); // aload add(n); } else { addOpcode(WIDE); addOpcode(ALOAD); addIndex(n); } ...
2
public static void main(String[] args) { // 对象名,要在反射的时候输入名称,名称需要在SRC文件下的全路径 AbstractDriver driver = AbstractDriver.getInstance("designPattern.factory.abstraction.BmwDriver"); Car car = driver.driverCar(); Bus bus = driver.driverBus(); car.driver(); bus.driver(); }
0
@SuppressWarnings("unused") private static void updateOldJobs() { JobsDatabase oldJob = new JobsDatabase(); int[] refuseSet = {31}; int[] rejectedSet = {12,29,32}; int[] inProcessSet = {49,50,51}; if(refuseSet.length>0){ for(int i=0;i<refuseSet.length;i++){ JobsDatabase.updateJobStatus(jobDBM, "Ref...
6
@Override Integer redactEntity(Criteria criteria, AbstractDao dao) throws DaoException { Integer idOrder = (Integer) criteria.getParam(DAO_ID_TOURIST); if (idOrder != null) { return updateTourist(criteria, dao); } else { return createTourist(criteria, dao); } ...
1
public void update(String tabName, String value, String column, ArrayList<String> values, ArrayList<String> names){ String statement = "UPDATE " + tabName + " SET " + column + "=? WHERE "; connect(); if(msg.equals("OK")) { for(int i = 0; i < names.size(); i++) { ...
7
private CarFeature carFeatureParse(String a) { if (a.equals(CarFeature.ABS.toString())) { return CarFeature.ABS; }else if (a.equals(CarFeature.ALARM.toString())) { return CarFeature.ALARM; }else if (a.equals(CarFeature.CAR_AUDIO.toString())) { return CarFeature.CAR_AUDIO; }else if (a.equals(Ca...
9
public void put(byte[] data, int offset, int len) { if (len == 0) return; synchronized (signal) { // see if we have enough room while (putAvailable() < len) { try { signal.wait(1000); } catch (Exception e) { System.out.println("Put.Signal.wait:" + e); } ...
7
private static String findUsingDP(String str){ int maxLen = 0; int strLen = str.length(); String result = ""; int[][] dpTable = new int[str.length()][str.length()]; for(int i=0;i<strLen;i++){ dpTable[i][i]=1; } for(int i=0;i<=strLen-2;i++){ if(str.charAt(i)==str.charAt(i+1)){ dpTable[i][i+1]...
9
public void AssignPlayersInTeams() { for (int i = 0; i < players.size(); i++) { Player p = players.get(i); int team_num = (int) (Math.random() * (NumOfTeams)); teams.get(team_num).AttachPlayer(p); } }
1
public int hasLoop(MySinglyLinkedList first) { if(first == null) // list does not exist..so no loop either. return 0; MySinglyLinkedList slow, fast; // create two references. slow = fast = first; // make both refer to the start of the list. while(true) { sl...
7
protected final void advance(char c) { cursorState = true; cursorTimer.restart(); switch (c) { case '\n': cursorX = 0; if (++cursorY >= rows) scrollByOneRow(); break; case '\r': break; default: if (++cursorX >= logicalColumns) { ...
5
public static AbstractConfigurator getConfigurator(ConfigurationSection globalConfig, AbstractCommand command) { AbstractConfigurator result = new NullConfigurator(); switch (command.getCommandType()) { case BAN: result = new BanConfigurator(globalConfig); ...
5
public static byte[] encrypt(byte[] data, byte[] key) { byte[] bloc = new byte[16]; key = paddingKey(key); S = generateSubkeys(key); int lenght = 16 - data.length % 16; byte[] padding = new byte[lenght]; padding[0] = (byte) 0x80; for (int i = 1; i < lenght; i++) padding[i] = 0; int count...
6
public static Image createWhiteImage(int height, int width) { Image whiteImage = new RgbImage(width, height); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { whiteImage.setPixel(x, y, Color.WHITE.getRGB()); } } return whiteImage; }
2
public static void setBalance(String uid, double bal) { balance = bal; }
0
public void setTask(Task task) { this.task = task; }
0
public Client(String address, int port) throws ConnectException, IOException { try { clientSocket = new SocketManager(address, port); clientSocket.setSoTimeout(5000); } catch (ConnectException e) { throw new ConnectException(); }catch (IOException e) { throw new IOException(); } }
2
void stepinto() { debugMode = 0; new Memory(); checkpoint.reset(); backend.StepRun.transfer = 0; backend.step_over.otransfer = 0; backend.step_out.common = 0; backend.step_out.call = false; ScanFile.call_count = 0; backend.step_out.next = 0; ...
7
@Override public Item peekFirstItem() { if (packageText().length() == 0) return null; final List<XMLLibrary.XMLTag> buf = CMLib.xml().parseAllXML(packageText()); if (buf == null) { Log.errOut("Packaged", "Error parsing 'PAKITEM'."); return null; } final XMLTag iblk = CMLib.xml().getPieceFromPiece...
7
@Override public void mouseClicked(MouseEvent me) { for(Entity e : Area.entities) { if(e instanceof Slave) { if(e.distance(me.getX() + View.x, me.getY() + View.y) < 10) { select = e; } } } }
3
public final AbstractPage getChildByURL (URL urlRequested) { for (AbstractPage child: childPages) if (child.url.equals(urlRequested)) return child; return null; }
2
@Override public List<Funcionario> Buscar(Funcionario obj) { // Corpo da consulta String consulta = "select f from Funcionario f WHERE f.ativo = 1 AND f.id != 0 "; // A parte where da consulta String filtro = " "; // Verifica campo por campo os valores que serão filtrados ...
8
@Override public long solve() { byte[] numbers = new byte[2000001]; long sum = 2; int breakpoint = (int) Math.sqrt(20000000); for (int x = 3; x < numbers.length; x += 2) { if (numbers[x] == IS_PRIME) { sum += x; if (x < breakpoint) { ...
3
public void mouseClicked(java.awt.event.MouseEvent me) { // System.out.println("\n mouseClicked"); TWPoint p = drawBoard_.mapClickToRowAndCol(new TWPoint(me.getPoint())); // System.out.println("mouse click @ " + p.x + "/" + p.y); if (currentState_ == STATE_PLACE_PEG) { tryPlacePeg(p); }...
6
private void buyHoldSell(Stock[] stocks){ int buyTemp=0; int sellTemp=0; int holdTemp=0; buyArray = new Object [buy][10]; sellArray = new Object [sell][10]; holdArray = new Object [hold][10]; Object [][] smallBuy = new Object [buy][6]; Object [][] smallSell = new Object [sell][6]...
9
public static void playGame() { System.out.print("PLAY"); processing(); do { deck.add(playerOneHand.get(playerOneHand.size() - 1)); playerOneHand.remove(playerOneHand.size() - 1); if (compareCards()) { randomPlayer(); } deck.add(playerTwoHand.get(playerTwoHand.size() - 1)); ...
5
public boolean add(IAliasedItem<T> item) { String key = item.getKey(); if(backingMap.containsKey(key)) { return false; } //IAliasedItem ai = new AliasedItem(item, aliases); backingMap.put(key, item); for(String alias : item.getAllAliases()) { StringList list = aliasesMap.get(alias); if(list ==...
5
protected static final synchronized WritableRaster getCachedRaster (ColorModel cm, int w, int h) { if (cm == cachedModel) { if (cached != null) { WritableRaster ras = (WritableRaster) cached.get(); if (ras != null && ras.getWidt...
7
private long collatzSteps(long num) { long result=0; cache2.clear(); while(num!=1){ if(cache.get(num)!=null){ result = result+cache.get(num); break; } if(num<0){ print(num, "< 0"); } if(num%2==0){ num=num/2; }else{ num=num*3+1; } result++; cache2.put(num, result); ...
6
public static void play(){ GUI g = new GUI(); }
0
public Collection<V> values() { if (values == null) { values = new AbstractCollection<V>() { public Iterator<V> iterator() { return new ValueIterator(); } public int size() { return LinkedTreeMap.this.size(); ...
5
public boolean checkNijikokunPermissions(Player p, String perm) { if (nijikokunPermissions == null) { Plugin plug = parent.getServer().getPluginManager().getPlugin("Permissions"); if (plug != null) { nijikokunPermissions = (com.nijikokun.bukkit.Permissions.Permissions) plug; parent.log.debug("Nijikokun ...
3
public static double[][] ordenarPorCercania(double[][] dis){//arreglar double[][] ordenado=new double[11][2]; ordenado[0][0]=dis[0][0]; ordenado[0][1]=dis[0][1]; for(int i=0;i<11;i++){ int min=i; for(int j=i+1;j<11;j++) { if(ordenado[j...
4
public void render(){ x = Game.PLAYER.getCameraX(); y = Game.PLAYER.getCameraY(); if(update > 0){ Font.renderColored("LVL UP", Game.PLAYER.getX() - 6*4, Game.PLAYER.getY() + 32, 2, 1f, 0.8f, 0); update--; } if(renderInventory) Inventory.render(x, y); if(renderQuestLog) QuestLog.render(x, y); ...
8
@Override public void writeBytesToChannel(final DataBuffers buffers) throws IOException { while(buffers.hasNext()) { final ByteBuffer buffer=buffers.next(); while(buffer.hasRemaining()) { appSizedBuf.clear(); if(buffer.remaining() <= appSizedBuf.remaining()) appSizedBuf.put(buffer); else...
7
public static <T> boolean ifHasLoop(MyListNode<T> head) { //One pointer advances once at each step, // and the other advances twice at each step. // If the faster pointer meets the slower one again, // there is a loop in the list. // Otherwise, there is no loop if the faster one reaches the end of list. ...
6
public static String[] getPageNames(Class<? extends BasePage> pageClass) { int numPages = 0; for (Class<?> clz : pageTypes) { if (pageClass.isAssignableFrom(clz)) { numPages++; } } String[] res = new String[numPages]; int i = 0; for...
7
public StringList() { this.strings=null; this.numEntries=0; }
0
private int appendSymbolHistory(StringBuilder b, SymbolTable current) { if(current == null) return 0; int indent = appendSymbolHistory(b, current.getParent()); for(Symbol s : current.getDeclarationOrder()) { // Two spaces per indent. for(int i = 0; i < indent; i++) b.append(" "); b.append(Stri...
3
private double smooth(int x, int y, BufferedImage image) { double newValue = 0; for(int i = x - 1; i <= x + 1; ++i) { for(int j = y - 1; j <= y + 1; ++j) { newValue += grayscale(image.getRGB(i, j)); } } return newValue/9; }
2
public static int getEnvironmentalTempUnit() throws ClassNotFoundException { int weightUnit = 0; try{ //Class derbyClass = RMIClassLoader.loadClass("lib/", "derby.jar"); Class.forName(driverName); Class.forName(clientDriverName); }catch(java.lang.ClassNotFound...
4
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); String msj_exito = "Se registro ...
1
public Image scale(Image img) { // Offset the image by one pixel so there's a border around it. // This lets us avoid having to check that A-I are in range of the image before samping them sourceGraphics.drawImage(img, 1, 1, null); int line = width + 2; for (int y = 0; y < h...
8
@Override public void delete() { Wire start = this.getStartPiece(); Wire end = this.getEndPiece(); if (end.potential != null) { end.potential.delete(); this.circuit.getSimulation().addEvent(end.potential.getNode1(), 0); this.circuit.getSimulation().addEvent(end.potential.getNode2(), 0); } Board bo...
6
static String[] mergePropertyNames(String[] localNames, String[] sourceNames) { // Set the output names to the other array if one array is null // or zero-length. String[] names = null; if(localNames == null || localNames.length == 0) { ...
9
public static int byteToInt(byte b){ if (b >= 0) return (int) b; else return b + 256; }
1
public static SequenceMove slow(int num, int withMove) { EflUtil.assertNoEfl(); List<Move> moves = new ArrayList<Move>(); int move = num > 0 ? Move.DOWN: Move.UP; if (num < 0) num = -num; if(num > 0) moves.add(new PressButton(move | (num == 1 ? withMove : 0))); for (int i=1; i<num; i++) { moves....
6
@Override public void run() { System.out.println("Subprocess Ouput RUN"); try { String text ; int n; byte[] buffer; text=""; n=0; buffer= new byte[9096]; System.out.println("Ok"); ...
2
public int compare(String a, String b) { int[][] score = new int[a.length() + 1][b.length() + 1]; for (int i = 0; i <= a.length(); i++) { score[0][i] = i; } for (int j = 0; j <= b.length(); j++) { score[j][0] = j; } for (int i = 1; i <= a.length();...
7
static int hex2num(char hex) { if ((hex >= '0') && (hex <= '9')) return (hex - '0'); else if ((hex >= 'a') && (hex <= 'f')) return (hex - 'a' + 10); else if ((hex >= 'A') && (hex <= 'F')) return (hex - 'A' + 10); else throw (new IllegalArgu...
6
private Command findCommand(String name) { for (Command command : commands) if (command.getName().equals(name)) return command; return null; }
2
public boolean checkIfMiddleInitial(String checkString) { if(checkString.matches(".*\\d.*")) return false; if(checkString.length() == 2 || checkString.length() == 1) { if(checkString.charAt(0) == '.') return false; if(...
5
public static TestPanel getTestPanel() { if (testPanel == null) { testPanel = new TestPanel(); } return testPanel; }
1
public void onUpdate() { if (this.isEntityAlive()) { this.lastActiveTime = this.timeSinceIgnited; int var1 = this.getCreeperState(); if (var1 > 0 && this.timeSinceIgnited == 0) { this.worldObj.playSoundAtEntity(this, "random.fuse", 1.0...
7
private float func_1224_a(int i, int j, int k, Material material) { int l = 0; float f = 0.0F; for (int i1 = 0; i1 < 4; ++i1) { int j1 = i - (i1 & 1); int l1 = k - (i1 >> 1 & 1); if (this.blockAccess.getBlockMaterial(j1, j + 1, l1) == material) { ...
6
public static void main(String[] args) { Random randGen = new Random(); Scanner input = new Scanner(System.in); int n = input.nextInt(); String[] cards = {"2", "3", "4", "5", "6", "7" ,"8", "9", "10", "J","Q", "K", "A"}; char[] suits = { '♣', '♦', '♥', '♠' }; ArrayList<String> Deck = new ArrayList<Strin...
4
private void processGetReplica(Sim_event ev) { if (ev == null) { return; } Object[] data = (Object[]) ev.get_data(); if (data == null) { return; } String filename = (String) data[0]; // get name Integer sender = (Integer) data...
3
public int Area(int[] height,int sta,int end){ if(sta > end){ return 0; }else{ int minIndex = minHeight(height,sta,end); int areaT = (end-sta+1)* height[minIndex]; int areaL = Area(height,sta,minIndex-1); int areaR = Area(height,minIndex+1,end)...
1
public static synchronized void addConnectionBackToPool(Connection c) { if(c != null) { usedConnections.removeElement(c); availableConnections.addElement(c); } }
1
@Override public void storeArray(Float a[],int column) { //store array as column in AL for(int i=0;i<a.length;i++) { switch(column) { case 0: attribute1.remove(i); attribute1.add(i, a[i]); ...
8
public int next() { int value = -1; try { value = m.getElement(next_point[0], next_point[1]); calculateNext(); } catch(Matrix.MatrixError e) {} return value; }
1
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
private static int sum(int... nums) { int sum = 0; for(int element: nums) { sum = sum + element; } return sum; }
1
private static void addMetadata( OtuWrapper originalWrapper, File inFile, File outFile, boolean fromR) throws Exception { HashMap<String, MetadataParser> metaMap = MetadataParser.getMap(); BufferedReader reader = new BufferedReader(new FileReader(inFile)); BufferedWriter writer = new BufferedWriter(new F...
6
public boolean rd_play( int i, int j, int val ){ int nval = -val; int i1 = i+1; int j1=j+1; while( i1<values.length && j1<values[0].length && values[i1][j1] == nval ){ i1++; j1++; } if( i1<values.length && j1<values[0].length && i+1 < i1 && values[...
8
public void Puntajes() throws IOException { try { String nomArchivo = "Datos.txt"; // Nombre del archivo de texto BufferedReader fileIn = new BufferedReader(new FileReader(nomArchivo)); int apunta = -1; // Apuntador auxiliar para cambiar el nombre int[] arreglo; /...
9
public void originalVerticesLocal(double paramDistancia,double paramRadio) { Iterator elemFuente; Elemento entrada,salida; Iterator elemDestino = destino.listaElementos(); double sumaDistancias,sumaValores,distancia,ponderacion; while(elemDestino.hasNext()) //Recorre...
3
public void setMessage(String message) { this.message = message; }
0
private void enterRule(NonTerminal productionRule) { if(root == null) { root = current = new ParseNode(productionRule, null); return; } ParseNode newNode = new ParseNode(productionRule, null); newNode.Parent = current; if(current.FirstChild == null) current.FirstChild = newNode; else { Pars...
3
private Class getElementTypeFromGenerics (Type type) { if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType)type; Type rawType = parameterizedType.getRawType(); if (isCollection(rawType) || isMap(rawType)) { Type[] actualTypeArguments = parameterizedType...
4
@FXML public void handleAddToCenter(MouseEvent e) throws Exception{ String resourceURL = null ; ImageView ev = (ImageView)e.getSource() ; if(ev.getId().equals("departmentImageView")){ resourceURL = "/application/department/addDepartmentDocument.fxml" ; }else if(ev.getId().equals("teacherImageView")){ r...
7
private boolean stringIsNullOrEmpty(String str) { return (str == null || str.length() == 0); }
1
public boolean containsConflictingLoad(MatchableOperator op) { if (op.matches(this)) return true; for (int i = 0; i < subExpressions.length; i++) { if (subExpressions[i].containsConflictingLoad(op)) return true; } return false; }
3
public void setFactory( ConnectionFactory factory ) { this.factory = factory; if( site != null ){ if( factory == null ){ site.listening(); } else{ trigger(); } } }
2
public void spread(World wld){ float newX, newY, newZ; newX = x; newY = y; newZ = z; Random rndGen = new Random(); int direction = rndGen.nextInt(9) + 1; switch (direction) { case 1: newX = x - 1; newZ = z - 1; wld.EntityArray.add(new Plant(newX,newY,newZ)); break; case 2: newX = x...
9
private static byte[] buildOid(String hex) { byte[] oid = new byte[SIZE]; for (int i = 0; i < HEX_SIZE; ++i) { char c = hex.charAt(i); if (c >= '0' && c <= '9') { c -= '0'; } else if (c >= 'a' && c <= 'f') ...
8
@Basic @Column(name = "address_1") public String getAddress1() { return address1; }
0