text
stringlengths
14
410k
label
int32
0
9
public void Play() { if (!left && !right) snapToX(); if (!up && !down) snapToY(); moveRight(right); moveLeft(left); moveDown(down); moveUp(up); for(int a = 0; a < totalBullets; a++){ bullet[a].Play(); } }
5
private boolean processProduction(Production production, Grammar grammar, FirstSets firstSets) { if (production.isEpsilonMove()) { return false; } boolean result = false; int index = 0; for (final Symbol symbol : production.getR...
6
public void execute( JobExecutionContext context ) throws JobExecutionException { invocation++; }
0
public boolean esDigito(int num) { boolean retorno; switch(num) { case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': retorno=true; break; default: retorno=false; ...
9
public void newTitle(String title) { final int length = title.length(); if (length == 0) { title = "NO_TITLE"; newTitle(title); return; } if (_first) _first = false; else newLine(); StringBuilder line = new StringBuilder(); int i; for (i = 0 ; i < _titleMargin ; i++) line.append(' '); ...
5
public String and(String field, int min, int max) { String newField = "", number = ""; System.out.println(field.substring(0, 3)); if(field.substring(0, 3).equals("AND")) { newField = ","; field = field.substring(3); for(int i = 1; i <= field.leng...
7
@Test public void multipleBoxTest() { BoundingBox bigBox = new BoundingBox(-100.0d, 100.0d, -100.0d, 100.0d); List<BoundingBox> boxes = new ArrayList<BoundingBox>(); for (int i=0; i<10000; i++) { boxes.add(BoundingBox.containing(bigBox.randomPoint(), bigBox.randomPoint())); ...
7
public static Type wrapTypeAndReplaceTypeVariables(final Type type, final TypeMap typeMap) { if (isParameterizedType(type)) { final ParameterizedType parameterizedType = getAsParameterizedType(type); final Type[] wrappedArguments = wrapTypeParameters(parameterizedType.getActualTypeArgume...
7
public CheckResultMessage checkJ01(int day) { return checkReport.checkJ01(day); }
0
public void close(ResultSet rs, PreparedStatement ps, Connection conn) { if (rs != null) { try { rs.close(); rs = null; } catch (SQLException e) { e.printStackTrace(); } } if (ps != null) { try { ps.close(); ps = null; } catch (SQLException e) { e.printStackTrace(); } }...
6
public void setIntArray(int[] intArray){ this.intArray = intArray; }
0
public void actionPerformed (ActionEvent event) { String eventName=event.getActionCommand(); // OK if (eventName.equals("OK")) { // Transfer the trigger this to the main program TtheApp.setListTriggers(triggerList); changedTriggers=true; dispose(); } // Cancel else if (eventName.equals("Cancel"...
8
static public ParseException generateParseException() { jj_expentries.clear(); boolean[] la1tokens = new boolean[17]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } for (int i = 0; i < 5; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { ...
8
public void setNombre(String nombre) { this.nombre = nombre; }
0
private boolean check() { if (N == 0) { if (first != null) return false; } else if (N == 1) { if (first == null) return false; if (first.next != null) return false; } else { if (first.next == null) return false; } // check internal consistency of instance variable N int numberOf...
8
public int[] getInts(int par1, int par2, int par3, int par4) { int ai[] = IntCache.getIntCache(par3 * par4); for (int i = 0; i < par4; i++) { for (int j = 0; j < par3; j++) { initChunkSeed(par1 + j, par2 + i); ai[j + i * par3] = nextIn...
7
public void set(long pos, long val) { if (start == end && start == pos) { minVal = maxVal = val; sumVal = val; } else { long mid = (start + end) / 2; if (pos <= mid) left.set(pos, val); else right.set(pos, val); minVal = Math.min(left.minVal, right.minVal); maxVal = Math.max(...
3
private void Escalao_ComboBox3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Escalao_ComboBox3ActionPerformed // atualizar Torneio_ComboBox Torneio_ComboBox.removeAllItems(); Collection <Competicao> competicoes = a.getDAOCompeticao().values(); if (competicoes != null)...
4
public static void main(String[] args) { System.out.println("Tervetuloa etsimään polkuja. Haluatko syöttää " + "karttatiedoston nimen (1) vai antaa kartan koon koordinaatteina (jokin muu numero)? "); BufferedReader br = new BufferedReader(new InputStreamReader(System.in...
6
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Utente other = (Utente) obj; if (nome == null) { if (other.nome != null) return false; } else if (!nome.equals(other.nome)) return fa...
6
private void doPublicStuff(Patient patient) { LinkedBlockingDeque<Patient> q = doc_queues.get(HospitalPart.PUBLIC); q.add(patient); log("enter " + "Public" + " Q", clock, patient, "Public", doc_queues .get(HospitalPart.PUBLIC).size()); if (q.size() > max.getMaxQ()) { max.setMaxQ(q.size()); max.setHp(H...
1
public void setChildren() { if (main == null) { return; } if (main.hasChildren()) { children = new LinkedList<RSInterface>(); layers = new LinkedList<RSInterface>(); for (int index = 0; index < main.children.size(); index++) { RSInterface child = RSInterface.getInterface(main.children.get(index));...
4
public void populateTable() { NPC_DATA.removeAllElements(); NPC[] allNPCs = NPCs.getLoaded(new Filter<NPC>() { final int Radius = 20; @Override public boolean accept(NPC npc) { return (double)Calculations.distanceTo(npc) <= Radius && !npc.getName()....
2
public MOB victimHere(Room room, MOB mob) { if(room==null) return null; if(mob==null) return null; for(int i=0;i<room.numInhabitants();i++) { final MOB M=room.fetchInhabitant(i); if((M!=null) &&(M!=mob) &&(!CMLib.flags().isEvil(M)) &&(mob.mayIFight(M)) &&(M.phyStats().level()<(mob.phySt...
8
private void begin () { long t__send, dt; double rate; _t_send = System.currentTimeMillis(); while (++times <= Utils.MAX) { broadcast("TEST", String.format("%d", System.currentTimeMillis())); if (times % Utils.STEP == 0) { t__send = System.currentTimeMillis(); dt = t__send - _t_send; if (dt > ...
3
public boolean locationWithinActor(double x, double y) { if(enabled) { // disabled actors cannot be targeted (TODO: is this good???) PhysicsComponent pc = (PhysicsComponent)getComponent("PhysicsComponent"); //HitboxComponent hc = (HitboxComponent)getComponent("HitboxComponent"); ...
6
public void breakmethod () { while (true) { System.out.println("Input an integer"); n = input.nextInt(); if (n == 0) { break; } System.out.println("You entered " + n); } }
2
protected void process_term (int linger_) { assert (!pending); // If the termination of the pipe happens before the term command is // delivered there's nothing much to do. We can proceed with the // stadard termination immediately. if (pipe == null) { proceed...
2
public static int[] findLIS(int[] A) { int n = A.length; int[] M = new int[n]; int[] P = new int[n]; M[0] = 0; P[0] = -1; int L = 1; for (int i = 1; i < n; ++i) { int j = search(M, A, i, L); if (j == -1) P[i] = -1; else P[i] = M[j]; if (j == L - 1 || A[i] < A[M[j + 1]]) { M[j + 1...
6
@Override public File touch(String fileName) { //System.out.println("touch"); try { File f = new File(directory, fileName); f.createNewFile(); FileOutputStream os = new FileOutputStream(f); //os.write("Generated by Bulka".getBytes()); o...
1
@Override public String toString() { if (filterConfig == null) { return ("filtroAutenticacion()"); } StringBuffer sb = new StringBuffer("filtroAutenticacion("); sb.append(filterConfig); sb.append(")"); return (sb.toString()); }
1
@Override public Record removeRecord(Account from, Record record) { PreparedStatement pStmt = null; Record rec = null; Integer result; rec = getRecord(record.getId()); if(rec != null){ try { pStmt = conn.prepareStatement("DELETE FROM RECORD WHERE id = ? AND id_account = ?;"); pSt...
2
public boolean szabalyose(){ if(aktualispoz1+2==hovaakar1 || aktualispoz1-2==hovaakar1) if(aktualispoz2+1==hovaakar2 || aktualispoz2-1==hovaakar2) return true; else {logger.info("A lépés nem huszár lépés!");return false;} else if(aktualispoz2+2==hovaakar2 || aktualispoz2-2==hovaakar2) if(aktualispo...
8
final public CycVariable variable(boolean requireEOF) throws ParseException { CycVariable val = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SIMPLE_VARIABLE: val = simpleVariable(false); break; case META_VARIABLE: val = metaVariable(false); break; default: jj_la1[30...
4
@SuppressWarnings(value = "unchecked") public void put(int field$, java.lang.Object value$) { switch (field$) { case 0: intField = (java.lang.Integer) value$; break; case 1: floatField = (java.lang.Float) value$; break; case 2: stringField = (java.lang.CharSequence) value$; break; default: ...
3
private JPanel createTimePanel() { JPanel newPanel = new JPanel(); newPanel.setLayout(new FlowLayout()); SpinnerDateModel dateModel = new SpinnerDateModel(); timeSpinner = new JSpinner(dateModel); if( timeFormat == null ) timeFormat = DateFormat.getTimeInstance( DateFormat.SHOR...
1
public Object[] update(final int i, final int j) { int gridValue = seaGrid[i + 1][j + 1]; Logger.debug("gridValue:" + gridValue); // You hit that before if (gridValue < 0 || gridValue == AbstractFleedModel.MISS) { return new Object[]{AGAIN, null}; } if (gridValue > 0 &...
9
protected void processSpecialTag(boolean allowCDATA) throws Exception { String str = XMLUtil.read(this.reader, '&'); char ch = str.charAt(0); if (ch == '&') { XMLUtil.errorUnexpectedEntity(reader.getSystemID(), reader.getLineNr(), ...
5
protected void updateAsMobile() { final Target target = this.targetFor(null) ; float idealHeight = DEFAULT_FLY_HEIGHT ; if (! health.conscious()) idealHeight = 0 ; else if (target == null) idealHeight = flyHeight ; else if (target instanceof Tile) idealHeight = DEFAULT_FLY_HEIGHT ; else if ...
4
public void doWork() throws IOException, NoSuchAlgorithmException{ Iterator<MetaConnection> itor = connections.iterator(); while(itor.hasNext()){ //Stand connection loop... MetaConnection mc = itor.next(); if(mc.getConnectionState() == ConnectionState.closed){ itor.remove(); System.out.println("END...
8
private void removeDefeaterImpl() throws TheoryNormalizerException { List<Rule> rulesToAdd = new ArrayList<Rule>(); Set<String> rulesToDelete = new TreeSet<String>(); Map<String, List<Rule>> oldNewRuleMapping = new Hashtable<String, List<Rule>>(); List<Rule> newRules; List<Rule> newRuleMapping = null; t...
7
public ListNode reverseKGroup(ListNode head, int k) { if (head == null || head.next == null) { return head; } ListNode pre = new ListNode(0); pre.next = head; head = pre; ListNode cur = pre.next; while (cur != null) { int counter = k; while (cur != null && counter > 1) { cur = cur.next; ...
7
public static String insertInSpecialPosition(String s, String s1, int position) { if(s.isEmpty()) { return s1; } else { StringBuilder sb = new StringBuilder(); sb.append(s.substring(0,position)); sb.append(s1); if(s.length()>position) { ...
2
private void serialiseResponse() { byte[] responseHeader = new byte[2]; byte[] responsePayload; // set the bits for the first byte responseHeader[0] = 0; responseHeader[1] = 0; if (FIN) responseHeader[0] = (byte) (responseHeader[0] | (byte) (1 << ...
9
public void setSource(boolean isSource) { this.isSource = isSource; }
0
public int genShader(int shaderType,String source) { int shader = 0; try { shader = GL20.glCreateShader(shaderType); if(shader == 0) return 0; GL20.glShaderSource(shader, source); GL20.glCompileShader(shader); if (GL20.glGetShader...
3
void makeIgnoreList(File dir) throws IOException { excludeFiles.clear(); final File ignoreFilesFile = new File(dir, EXCLUDE_FILES_FILENAME); if (!ignoreFilesFile.exists()) { return; } try (BufferedReader is = new BufferedReader(new FileReader(ignoreFilesFile))) { String line; while ((line = is.readLi...
4
Object[] choose(double P[], double D[][], double F[][], int Rank[], int n) { double sP[] = new double[P.length]; double sum = 0; int counter = 0; int Selected[] = new int[n]; double S1[][] = new double[n][D[0].length]; double F1[][] = new double[n][F[0].length]; i...
9
public static void main(String[] arg){ String s = arg[0].toUpperCase(); //public char charAt(int index), index of the character will be returned char grade = s.charAt(0); switch(grade){ case 'H': System.out.println("Your score is between 85-100."); break; case 'D': System.out.println("Your sco...
5
private void initializeSingleSource(Vertex start) { for (int i = 0; i < vertices.getSize(); i++) { vertices.get(i).setColor(VertexColor.WHITE); vertices.get(i).setDistance(Integer.MAX_VALUE); vertices.get(i).setPath(null); } int indexOfStart = vertices.indexOf...
1
public static void main(String[] args) { String config = null; if (args.length != 0) { for (int i = 0; i < args.length; i++) { String arg = args[i]; if ("-c".equals(arg) && args.length > i) { config = args[i+1]; } } } SQLRunner.setOkToExit(true); SQLRunnerGUI prog = new SQLRunnerGUI(new...
5
private void btSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSalvarActionPerformed //Botão salvar/adicionar Endereco e = new Endereco(); e.setEstado(txEstado.getText()); e.setCidade(txCidade.getText()); e.setBairro(txBairro.getText()); e...
8
final private static String trimZeroes(String output) { String copyOfOutput = output; if (copyOfOutput.contains(".")) { while (copyOfOutput.substring(copyOfOutput.length() - 1, copyOfOutput.length()).equals("0")) { if (copyOfOutput.length() > 1) { copyOfOutput = copyOfOutput.substring(0, copyO...
4
public static void checkIntParam(SessionRequestContent request, Criteria criteria, String reqName, String critName){ String param = (String) request.getParameter(reqName); if (param != null && !param.isEmpty()) { Integer currParam = Integer.decode(param); if (currParam > 0) { ...
3
public void majInformations() { if(_informations == null || _informations.isEmpty()) { _informations = new ArrayList<>(); _informations.add("Aucune information"); } JLabel label; JPanel panelGrid = new JPanel(new GridLayout(_informations.size(), ...
4
@Override public void handleHttpRequest(final HttpRequest request, final HttpResponse response, final HttpControl control) throws Exception { String authHeader = request.header("Authorization"); if (authHeader == null) { needAuthentication(response); } else { if (auth...
3
public List<User> divideFirstUser(List<User> userList, int index) { List finalList = new ArrayList(); for (int i = 0; i < userList.size(); i++) { User user = (User) userList.get(i); List firstUserList = null; if (i == index) { firstUserList = new Array...
7
@Override public void run() { BmTestManager bmTestManager = BmTestManager.getInstance(); FileServer fileServer = FileServer.getFileServer(); String projectPath = null; if (fileServer.getScriptName() != null) { projectPath = fileServer.getBaseDir() + "/" + fileServer.getSc...
4
private void initialize(JComponent component) { component.addKeyListener(new KeyListener() { @Override public void keyPressed(KeyEvent e) { notifyInputAction("Keyboard_Any_Down", new AlertObject(e.getWhen())); String keyName = KeyboardMappings...
8
public VirtualDateNode(Property property, PropertyTree parent) { super(property, parent); }
0
private void notifyOverseers(String key, OperatorCommand opcmd) { //get list of players PluginManager pm = plugin.getServer().getPluginManager(); Set<Permissible> notifiedPlayers = new HashSet<Permissible>(); Set<Permissible> approvers = pm.getPermissionSubscriptions("SudoOp.Approve"); Set<Permissible> denier...
7
private void initBackgroundMenu(Color bg) { this.backgroundMenu = new JPanel(); this.backgroundMenu.setBackground(bg); this.backgroundMenu.setLayout(new VerticalLayout(5, VerticalLayout.LEFT)); // image Path initialValue = this.skin.getBackground(); ImageField imgField =...
2
@Override public boolean parseArg(String[] values) { int w = Integer.parseInt(values[0]); int h = Integer.parseInt(values[1]); if(w>0 && h>0) { Properties.Client.WINDOW_WIDTH = w; Properties.Client.WINDOW_HEIGHT = h; return true; } return false; }
2
private String getName(final ZipEntry ze) { String name = ze.getName(); if (isClassEntry(ze)) { if (inRepresentation != BYTECODE && outRepresentation == BYTECODE) { name = name.substring(0, name.length() - 4); // .class.xml to // .class } else if (...
5
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { MOB target=mob; if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB)) target=(MOB)givenTarget; if(target.fetchEffect(ID())!=null) { mob.tell(target,null,null,L("<S-NAME> <S-IS-ARE> ...
8
void setBlock(int x, int y, int z, byte[][] chunk, Material material) { if (chunk[y >> 4] == null) chunk[y >> 4] = new byte[16 * 16 * 16]; if (!(y <= 256 && y >= 0 && x <= 16 && x >= 0 && z <= 16 && z >= 0)) return; try { chunk[y >> 4][((y & 0xF) << 8) | (z <<...
8
public static void MakeFramesVisible(Boolean state) { for(int i =0;i<callFrameList.size();i++) callFrameList.get(i).setVisible(state); }
1
private void sampleTopics(InstanceList docs, boolean init) { // resample topics int ndMax = -1; int[] wordCounts = (init) ? new int[W] : null; for (int d=0; d<D; d++) { FeatureSequence fs = (FeatureSequence) docs.get(d).getData(); int nd = fs.getLength(); if (init) { z[...
9
private static boolean isWindowInScreenBounds(Point location, Point size) { Point myLocation = new Point(location); if (!isLocationInScreenBounds(myLocation)) { return false; } myLocation.translate(size.x - 1, 0); if (!isLocationInScreenBounds(myLocation)) { return false; } myLocation.translate(...
4
public void mainFlow() throws IOException { StringBuilder headersb = new StringBuilder(); headerWrite(Mode.Co, nameArray, headersb); resp.getWriter().println( "<!-- mainflow_start: " + (System.currentTimeMillis() - time) + "-->"); // 出力キャッシュが揃っていなければメインの処理をする if (flush == null || sideCount == null ...
7
private static boolean test6_1() throws FileNotFoundException { String input = "new\n" + "pick up key\n" + "lock cell door\n" + "lock cell door with key\n" + "open door\n" + "open cell door\n" + "go through door\n" + "unlock cell door\n" + "wait\n" + "unlock cell door with key\n" + "open door\n" ...
7
final int[][] method3047(int i, int i_0_) { anInt9141++; int[][] is = ((Class348_Sub40) this).aClass322_7033.method2557(-119, i); if (((Class322) ((Class348_Sub40) this).aClass322_7033).aBoolean4035) { int[][] is_1_ = this.method3039((byte) 120, (aBoolean9147 ? -i + Class299_Sub2.anInt6325 :...
6
public List<String> fullJustify(String[] words, int L) { List<String> list = new ArrayList<String>(); int sta=0; int length =0; for(int i=0 ; i < words.length && words[i] != "";i++){ length += words[i].length() + 1; // System.out.println(length); if(...
7
private Color getValueAsColor(String value, Color defaultColor) { try { if(value.startsWith("#")) { return Color.decode(value.substring(1)); } else { Field f = Color.class.getField(value); return (Color) f.get(null); } } catch (Exception e) { e.printStackTrace(); } return defaultColor; ...
2
private Component[] getChildren(Container target, boolean useMinimumSize) { ArrayList<Component> children = new ArrayList<>(); for (Component child : target.getComponents()) { PrecisionLayoutData data = mConstraints.get(child); if (!data.shouldExclude()) { children.add(child); data.computeSize(child, ...
2
public JSONObject updateRANKTag(int USER_ID,int QUESTION_ID,int ANSWER_ID, int RANK, int increased) { try { Class.forName(JDBC_DRIVER); conn=DriverManager.getConnection(DB_URL,USER,PASS); stmt=conn.createStatement(); json=new JSONObject(); String SQL="update ANSWERS set ...
6
private int getClickedRoom(int cursorX, int cursorY){ for(Room room : this.map.getRooms()){ if (cursorX > room.getPositionX() && cursorX < room.getPositionX() + room.getWidth() && cursorY > room.getPositionY() && cursorY < room.getPositionY() + room.getHeight()){ return map.getRooms().ind...
5
private void stop() { if (server == null) return; readyToGo = false; if (taskID != -1) server.getScheduler().cancelTask(taskID); server = null; // go ahead and unload any chunks we still have loaded while(!storedChunks.isEmpty()) { CoordXZ coord = storedChunks.remove(0); if (!originalChunks...
4
public void setPosicionJugador2(int x,int y){ if(x>=0&&x<8&&y<8&&y>0){ switch (pd.mapa_jugador2[x][y]) { case "SM": case "PA": case "AZ": System.out.print("POSICION OCUPADA"); System.out.println("OTRA CORDENADA"); ...
8
private static void shade(short[] imageColorArray, int[] imageShadeArray) { int i = 512; int j = 512; int k = 0; for (int m = 0; m < j; m++) { for (int n = 0; n < i; k++) { if (imageShadeArray[k] != 0) { float f1; if (n...
9
public void collisionWall() { if(snake.isSnakeUp()) { if(snake.getSnakeY()<20) { finishGame(); }else{ snake.setSnakeY(snake.getSnakeY() - 15); } }else if(snake.isSnakeDown()) { if(snake.getSnakeY()>335) { finishGame(); }else { snake.setSnakeY(snake.getSnakeY() + 15); } }else if(...
8
public int getTileSize() { return tileSize; }
0
public LinkedList<Kokus> initialisationPaquetKokus(){ LinkedList<Kokus> llk = new LinkedList<Kokus>(); for(Kokus k : this.hashKokus){ // 12 cartes kokus de 1 unité if(k.getNbkoku()==1){ for(int i=0; i<12; i++){ llk.add(k); ...
7
public static void main(String[] args) { Locale.setDefault(Locale.US); Scanner s = new Scanner(System.in); double salary = s.nextDouble(); double newSalary = 0; double earned = 0; int percentage = 0; if(salary >= 0 && salary <= 400){ percentage = ...
9
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (hashCode() == o.hashCode()) return true; Comet comet = (Comet) o; if (tailColor != comet.tailColor) return false; if (mineralResourc...
7
private void myListMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_myListMousePressed // TODO add your handling code here: if( evt.getButton() == MouseEvent.BUTTON2 ) { myList.clearSelection(); Rectangle r = myList.getCellBounds( 0, usernames.size()-1 ); ...
3
public void addFrame(Frame frame) { if (frame == null) { System.err.println("oh no! frame is null"); } String[] idRefParts; for (FrameElement fe : frame.getFrameElements()) { for (String feID : fe.getIdrefs()) { idRefParts = feID.split(":"); if (!containsNode(idRefParts[0])) return; } } ...
6
public static BufferedImage makeColorTransparent(BufferedImage ref, Color color) { BufferedImage dimg = new BufferedImage(ref.getWidth(), ref.getHeight(), BufferedImage.TYPE_INT_ARGB); Graphics2D g = dimg.createGraphics(); g.setComposite(AlphaComposite.Src); g.drawImage(ref, null, 0, 0); g.dispose(); ...
3
public AnnotationVisitor visitParameterAnnotation( final int parameter, final String desc, final boolean visible) { buf.setLength(0); buf.append(tab2).append('@'); appendDescriptor(FIELD_DESCRIPTOR, desc); buf.append('('); text.add(buf.toString()); ...
2
@Override public void updateView() { Model model = controller.getModel(); Object col[] = new Object[3]; movieHash.clear(); int c = tModel.getRowCount(); for (int i = c - 1; i >= 0; i--) { tModel.removeRow(i); movieTable.revalidate(); } if (model.getMovies().getMovieList().isEmpty()) { Sys...
3
@SuppressWarnings({"unchecked","rawtypes"}) public Object copyTransferrableProperties(AdministeredComponent target, AdministeredComponent source) { try { Iterator<String> propertyIterator = PropertyUtils.describe( target ).keySet().iterator(); Map sourceValuesMap = PropertyUtils.describe( source ...
6
private boolean processInternCommand(MapleClient c, MessageCallback mc, String[] splitted) { DefinitionInternCommandPair definitionCommandPair = interncommands.get(splitted[0]); if (definitionCommandPair != null) { try { definitionCommandPair.getCommand().execute(c, mc, split...
6
private void tablaUsuariosDelSistemaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaUsuariosDelSistemaMouseClicked // TODO add your handling code here: String opcionHabilitar = "Habilitar"; String nombreUsuario = String.valueOf(tablaUsuariosDelSistema.getValueAt(tablaUsuarios...
7
public void setjButtonPrevious(JButton jButtonPrevious) { this.jButtonPrevious = jButtonPrevious; }
0
@Override public void atualizarAVItem(AvaliacaoItem avItem, int idUser, String refeicao, String data, String item) { if(avItem.getData() != null){ if( avItens.get(avItem.getDataFormatoAmericano()+avItem.getRefeicao()+avItem.getItem()) != null){ List<AvaliacaoItem> avaliacoes = avItens.get(avIte...
7
public String getStringToPop() { return myStringToPop; }
0
public void setComments(String comments) { this.comments = comments; }
0
public static void main(String[] args) { // Working with Strings System.out.println("String letter 10 11 12 $%<!"); // Working with Intergers System.out.println(50); System.out.println(30000); System.out.println(5 + 5 - 2 * 4 / 2); // Working with Doubles System.out.println(1.2); System.out.println(...
0
public void checkExit(final int status) { if (!allowExit) { System.err.println("exit " + status); throw new SecurityException("Tried to exit (status=" + status + ")"); } }
1
public static void test() throws Exception { // ######################################################################################### System.out.println("Testing packet serialization:"); /** * Foreach packet class, create an instance, serialize it and * unserialize it. Packet class and a random sequenc...
8