text
stringlengths
14
410k
label
int32
0
9
public void actionPerformed(ActionEvent e) { String action = e.getActionCommand(); if(action.equals("Next")){ SlideShow.this.counter++; if(SlideShow.this.counter==SlideShow.this.numberPhotos) SlideShow.this.counter=0; SlideShow.this.slideArea.remove(picture); SlideS...
7
Long hash(Path file) throws IOException { if (NOHASH_FILES.contains(getFileEnding(file))) { return Files.size(file); } InputStream inputStream = null; try { inputStream = Files.newInputStream(file); byte[] currentChunk = new byte[8192]; while (inputStream.read(currentChunk) > -1) { adle...
4
public void generateLevel() { for (int y = 0; y < Height; y++) { for (int x = 0; x < Width; x++) { if (x * y %17 <15) { tiles[x + y * Width] = Tile.Grass.getid(); } else { tiles[x+y * Width] = Tile.TallGrass.getid(); } } } }
3
public static void endThread(final int ThreadId){ for(ArrayList Me : ServerThreadList){ Object Targ = Me.get(0); int ObjId = (Integer)Targ; if (ObjId == ThreadId){ AliveThreadsID[ObjId] = 0; Thread Threaded = (Thread)Me.get(1);//the thread ...
2
public void insertStructuredBlock(StructuredBlock insertBlock) { if (methodHeader != null) { insertBlock.setJump(new Jump(FlowBlock.NEXT_BY_ADDR)); FlowBlock insertFlowBlock = new FlowBlock(this, 0); insertFlowBlock.appendBlock(insertBlock, 0); insertFlowBlock.setNextByAddr(methodHeader); insertFlowBlo...
1
protected byte[] findBases(SAMSequenceRecord record, boolean tryNameVariants) { { // check cache by sequence name: String name = record.getSequenceName(); byte[] bases = findInCache(name); if (bases != null) { log.debug("Reference found in memory cache by name: " + name); return bases; } } St...
9
public boolean containsKey (K key) { int hashCode = key.hashCode(); int index = hashCode & mask; if (!key.equals(keyTable[index])) { index = hash2(hashCode); if (!key.equals(keyTable[index])) { index = hash3(hashCode); if (!key.equals(keyTable[index])) return containsKeyStash(key); } } return...
3
public void setBackgroundColor(String s) { final String BGCOLOR_PLACEHOLDER = owner.getResource("splitter.placeholder.transparent", "Transparent"); String prevText = this.bgcolor.getText().trim().isEmpty() ? BGCOLOR_PLACEHOLDER : this.bgcolor.getText(); Color col = null; if (!IOSImageUtil.isNullOrWhiteSpace(s))...
8
public void upgrade(File file) throws IOException { LinkedHashMap<String, String> nodes = new LinkedHashMap<String, String>(); if (this.tpl.getString("error.bank.exists") == null) { nodes.put("tag.money", "<green>[<white>Money<green>] "); nodes.put("tag.bank", "<green>[<white>Bank<green>] "); ...
6
public void nextInternPhase(){ internPhase=(internPhase+1)%3; currentPlayer=0; if(internPhase==1){ checkOrder(); }else if (internPhase==2){ System.out.println("Consolidation !"); //on retire les ordres consolidations(sans étoiles) pour chaque familles for(Family family ...
8
public Map<String, Object> getExecutionResults() { Map<String, Object> map = new HashMap<String, Object>(); int status = -1; try { status = process.waitFor(); outReader.join(); errReader.join(); StringWriter outWriter = outReader.getResult(); outResult = outWriter.toString(); outWriter.close(); ...
5
public void writeNart(CycNart cycNart) throws IOException { if (trace == API_TRACE_DETAILED) { Log.current.println("writeNart = " + cycNart.toString()); } write(CFASL_EXTERNALIZATION); write(CFASL_NART); writeList(cycNart.toCycList()); }
1
private Method getInterfaceMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes) { do { // Get interfaces Class<?>[] interfaces = clazz.getInterfaces(); for (int i = 0; i < interfaces.length; i++) { // Ignore non-public interfaces if (!Modifier.isPublic(interfaces[i].getModifiers())...
8
@Override public void mouseMoved(MouseEvent e) { // TODO Auto-generated method stub int x = e.getX (); int y = e.getY (); if (back.contains (x, y)) back.setState (1); else back.setState (0); if (help.contains (x, y)) help.setState (1); else help.setState (0); if (earthquake.contains(x, y))...
8
public static boolean isPrime(long n) { if (n < 2) return false; if (n == 2 || n == 3) return true; if (n % 2 == 0 || n % 3 == 0) return false; long sqrtN = (long) Math.sqrt(n) + 1; for (long i = 6L; i <= sqrtN; i += 6) { if (n ...
8
private static void playBackgroundMusic() { try { new Thread() { public void run() { try { while(true) { int choose = random.nextInt(SOUNDTRACK_PATHS.length); soundtrackClip = Applet.newAudioClip(SoundsOfEmpire.class.getResource(SOUNDTRACK_PATHS[choose...
3
public void setDescription(String description) { this.description = description; }
0
public boolean WriteToFile(String data) { boolean result = false; try { //write data to file br.write(data); br.newLine(); //set the status flag result = true; } catch(Exception e){} return ...
1
public Grid drawWorld(int i, int killed) { ArrayList<Background> BackGrounds = new ArrayList<Background>(); if (i == 1) { BackGrounds = this.world1(); } Background a = BackGrounds.get(0); Grid g = new Grid(killed); HashMap<Point, GridSpace> grid = g.getGrid(); for (int d = 0; d < 101; d++) { for (i...
7
/* package */TrackerRequest ( Sha1Hash infoHash, PeerId peerId, int port, long uploaded, long downloaded, long left, Boolean compact, boolean noPeerId, Event event, InetAddress ip, int numWant, int key, byte[] trackerId) { if (infoHash == null) throw new NullPointerException("Nul...
5
public String simplifyPath(String path) { String[] paths = path.split("/"); Stack<String> stack = new Stack<String>(); for(int i=0; i<paths.length; i++){ if(paths[i].equals(".") || paths[i].equals("")) continue; else if(paths[i].equals("..")){ if(!stack.isEmpty(...
7
protected boolean disconnectInput(NeuralConnection i, int n) { int loc = -1; boolean removed = false; do { loc = -1; for (int noa = 0; noa < m_numInputs; noa++) { if (i == m_inputList[noa] && (n == -1 || n == m_inputNums[noa])) { loc = noa; break; } } if (loc >= 0...
8
public void CreatePopulation(int popSize) throws Exception{ InitPopulation(popSize); /** Delimit the best attributes from the worst*/ int segmentation =m_numAttribs/2; /*TEST*/ /* System.out.println ("AttributeRanking"); for (int i = 0; i <attributeRanking.size (); i++){ if(i ==segmentation)S...
7
@Override public void changedMostRecentDocumentTouched(DocumentRepositoryEvent e) { calculateEnabledState(e.getDocument()); }
0
private void initTimeline() { timeline = new Timeline(); timeline.setCycleCount(Timeline.INDEFINITE); KeyFrame kf = new KeyFrame(Config.ANIMATION_TIME, new EventHandler<ActionEvent>() { public void handle(ActionEvent event) { if (state == STATE_SHOW_TITLE) { ...
9
public boolean hasPotentialAvailableSpace(int fileSize) { if (fileSize <= 0) { return false; } // check if enough space left if (getAvailableSpace() > fileSize) { return true; } Iterator it = fileList_.iterator(); File file = null; ...
5
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((decodedValue == null) ? 0 : decodedValue.hashCode()); result = prime * result + ((encodedValue == null) ? 0 : encodedValue.hashCode()); result = prime * result + ((symmetricKey == null) ? 0 : symmetricKey.hash...
3
@Override public boolean interpret(String context) { return expression1.interpret(context) && expression2.interpret(context); }
1
private static List<ChunkHolder> getChunks( List<Holder> list ) { List<ChunkHolder> chunks = new ArrayList<ChunkHolder>(); ChunkHolder currentChunk = null; int lastIndex = 0; while(lastIndex < list.size()) { Holder thisHolder = list.get(lastIndex); if( currentChunk == null) { if(thisHol...
8
public String getResponseString(String url) { String lineText; StringBuilder sb = new StringBuilder(); InputStreamReader isr = null; int failCount = 0; do { try { getMethod.setURI(new URI(url)); HttpResponse response = httpClient.execute(getMethod); int status = response.getStatusLine().getStat...
8
public int GetFirstTicks() { //get the tick time the person got to the stop for the bus return firstTicks; }
0
@Override public void Redo() { Rectangle obr = getObjectRectangle(); for (LevelItem obj : objs) { Rectangle r = obj.getRect(); r.x += XDelta; r.y += YDelta; r.width += XSDelta; r.height += YSDelta; obj.setRect(r); ...
4
protected void setPosition(Position position) { if (position == null) throw new IllegalArgumentException("Position can't be null"); if (position.xCoordinate < 0 || position.yCoordinate < 0) throw new IllegalArgumentException("The given position is invalid!"); this.position = position; }
3
public void setIdSolicitud(int idSolicitud) { this.idSolicitud = idSolicitud; }
0
private void insertDemoProducts(){ try { db = new DataBase(); Random randomNumbers; int n=0; for(int i=0;i<=20;i++){ con = db.getConnection(); statement = con.createStatement(); randomNumbers = new Rando...
9
public ArrayList<Vertex> gpsrPath(int sourceIndex, int sinkIndex) { DijkstraVertex sourceVertex = new DijkstraVertex(); DijkstraVertex sinkVertex = new DijkstraVertex(); DijkstraVertex currentVertex = new DijkstraVertex(); DijkstraVertex tempVertex = new DijkstraVertex(); ArrayList<Vertex>...
8
void calcVelocity(float dT){ SimpleVector dVelocity = new SimpleVector(this.acceleration); dVelocity.scalarMul(dT); this.velocity.add(dVelocity); }
0
public boolean removeBalance(int num, double monto){ boolean state=false; if(!activo.validateTipo(Usuario.LIMITADO)){ if(num>0 && monto>0){ int index = searchIndex(num, !state); if(index>=0){ return remove(index, monto); } ...
4
public void quit() { for (Player player : players) { player.stop(); } }
1
public static void maxheap(int array[], int i) { int left = 2 * i; int right = 2 * i + 1; int parent = i; if (left <= N && array[left] > array[i]) parent = left; if (right <= N && array[right] > array[parent]) parent = right; if (parent != i) { swap(array, i, parent); maxheap(array, parent); }...
5
@Override public void keyPressed(KeyEvent k) { //System.out.println("Key pressed: " + k.getKeyCode()); if (k.getKeyCode() != 17 && !this.ctrl) { this.saved = false; } else if (k.getKeyCode() == 17) this.ctrl = true; }
3
/* */ public void paintComponent(Graphics paramGraphics) /* */ { /* 37 */ int i = getWidth() / 2 + 1; /* 38 */ int j = getHeight() / 2 + 1; /* 39 */ if ((this.img == null) || (this.img.getWidth(null) != i) || (this.img.getHeight(null) != j)) { /* 40 */ this.img = createImage(i, j); /* */ ...
6
public void run() { try { while (true) { int n = selector.select(); if (n == 0) { continue; } keys = selector.selectedKeys(); Iterator<SelectionKey> iter = keys.iterator(); while (iter.hasNext()) { SelectionKey key = iter.next(); iter.remove(); if (key.isValid()) { ...
8
@Override public void startDocument () {}
0
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String fromname = request.getParameter("fromname"); Date date = new Date(); String dates = " -at " + date; String all = date + "!" +fromname; String toname = request.getParameter(...
5
public void generateMineshaft(int x,int y){ int length = rand.nextInt(SIZE/2); boolean up = rand.nextBoolean(); // false if in left-right for(int i=x;i<length+x;i++){ if(i>=SIZE || y+1>=SIZE || y+2>=SIZE) return; if(up){ world[y][i] = TileType.WOOD; ...
5
private char getElement(Coordinate current) { MazeNode currentNode = game.getNode(current); if (game.isMouseAtLocation(current) && game.isCatAtLocation(current)) { return DEAD; } else if (game.isMouseAtLocation(current)) { return MOUSE; } else if (game.isCatAtLocation(current)) { return CAT; }...
7
*/ public static void createSingleton(String[] args) { //modifications by Zerbetto 05-12-2007 String fileName = null; boolean showFileMenu = true; if ((args != null) && (args.length > 0)) { for (int i = 0; i < args.length; i++) { String arg = args[i]; if (arg.startsWith("file="...
8
public LSystemInputEvent(LSystemInputPane input) { super(input); }
0
public Note setNote( final Note newNote ) { if( null == newNote ) { return null; } final long noteId = newNote.getId(); final Note oldNote = notes.put( noteId, newNote ); if( null == oldNote ) { notifyNotesChangedListeners(); } if( !newNote.equals( oldNote ) ) { notifyNoteChangedListeners( new...
3
public StackState constructorCall(int initializedValueStackPosition, StackEntry entry) { List<StackEntry> newContents = new ArrayList<StackEntry>(contents.size()); if (entry.getType() == StackEntryType.UNINITIALIZED_THIS) { for (int i = 0; i < contents.size() - 1 - initializedValueStackPosit...
7
private final void progressCheck(boolean useTime, double progressFactor, double progressOffset) { Matcher m = ProgressCallbackThread.progressPattern.matcher(this.progressScanner); Matcher m2; int start = 0, pos; long time; int flags; int frame; while (m.find(start)) { // Parse time = 0L; ...
7
protected void showClassInfo (StringBuffer buf) { try { buf.append ("<b>Rio Status</b><br>\n"); if (getRio () == null) { buf.append ("<em>Device claimed by another driver.</em>"); buf.append ("<br><br>\n"); return; } rio.start (); showStorage (buf, false); if (rio.hasExternalM...
4
public static int getDaysNumber(int m, int y) { switch(m) { case 2: return isALeapYear(y) ? 29 : 28; case 1: case 3: case 5: case 7: case 8: case 10: case 12: return 31; de...
9
public static void main(String[] args) throws Exception { args = new String[] { "-c" }; try { File collectionFile = new File(args[1]); if (args[0].equals("-c")) { assert !collectionFile.exists(); collectData(collectionFile); } else if (args[0].equals("-ag")) { assert collec...
5
public void insertionSort (int[] array, int a, int b) { int i = a, j = a-1; while (i <= b) { int key = array[i]; int k = i-1; while (k > -1 && array[k] > key) { array[k+1] = array[k]; k--; } if (k+1 != i) { ...
4
public static void checkCost(String s) throws Exception { for (char c : s.toCharArray()) { if (!((c >= '0' && c <= '9') || c == ',' || c == '.')) { throw new Exception("В поле с ценой недопустимые символы: "); } } }
5
public String getStatus(int status) { try { isAValidKey(status); } catch (Exception e) { e.printStackTrace(); } return getStatusCodesMap().get(status); }
1
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { final Item target=getTarget(mob,mob.location(),givenTarget,commands,Wearable.FILTER_ANY); if(target==null) return false; if(target.fetchEffect(this.ID())!=null) { mob.tell(L("@x1 is alread...
7
private static void checkIntWordRange(Token token, int value) throws TokenCompileError { if((value >= 0 && (value & 0xffff0000) != 0) || (value < 0 && (value & 0xffff8000) != 0xffff8000)) { throw new TokenCompileError("Value can not fit in 16 bits", token); } }
4
public static void insertEntreprise(int idville,String nom, String adresse1, String adresse2) throws SQLException { String query; try { query = "INSERT INTO ENTREPRISE (ID_VILLE,ENTNOM,ENTADRESSE1,ENTADRESSE2) VALUES (?,?,?,?);"; PreparedStatement pStatement = ConnectionBDD.ge...
1
public void ticRefreshSpace(int space) { if (space == 1) { button1.setText(""); button1.setEnabled(true); } else if (space == 2) { button2.setText(""); button2.setEnabled(true); } else if (space == 3) { button3.setText(""); button3.setEnabled(true); } else if (spac...
9
static void processArgs(String args, Config config) { String[] split = args.split(",\\s*"); for (String s : split) { if (s.equals("debug")) { DEBUG = true; } if (s.equals("tty")) { config.setTty(true); } if (s.startsWith("context=")) { CONTEXT = s.replace("context=", ""); } if (s.eq...
6
public boolean hasText() { for (Node child: childNodes) { if (child instanceof TextNode) { TextNode textNode = (TextNode) child; if (!textNode.isBlank()) return true; } else if (child instanceof Element) { Element el = (...
5
public void updateDB() { if (succLogin) { try { openConnection(); st.execute("UPDATE Player SET Coins='" + coins + "' WHERE Name='" + user + "'"); st.execute("UPDATE Player SET Unlocked='" + unlocked + "' WHERE Name='" + user + "'"); st.execute("UPDATE Player SET Playtime='" + playtime + "' WHERE N...
2
private boolean isClassInDir(File file) { String []files; files = file.list(); for(int i=0; i< files.length; i++) { if(files[i].equals(this.className)) return true; } return false; }
2
public void colision (int ancho, int alto){ //no dejo que bueno salga por la derecha if (this.getPosX() + this.getAncho() >= ancho) { this.setPosX(ancho - this.getAncho()); } //no dejo que bueno salga por izquierda else if (this.getPosX() <= ancho/2) { th...
4
@Override public Component getTableCellRendererComponent( JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column ) { return this; }
0
public static void end() { Printer.printToConsole("End"); Printer.printToConsole(String.format("%d Victims killed", killedVictims)); Printer.printToConsole(String.format("%d Victims spawned", spawnedVictims)); Printer.printToConsole(String.format("Victims in pool %d", Initialization.numb...
0
public static String lcp(String v, String w) { int n = Math.min(v.length(), w.length()); for (int i = 0; i < n; i++) { if (v.charAt(i) != w.charAt(i)) return v.substring(0, i); } return v.substring(0, n); }
2
public float getAttackBonus(Point p) { float bonus = 0; Placeable placeable = null; try { for (String key : placeables.keySet()) { placeable = (Placeable) placeables.get(key); if (placeable != null) { bonus += placeable.getAttackB...
3
void createExampleWidgets () { /* Compute the widget style */ int style = getDefaultStyle(); if (shadowInButton.getSelection ()) style |= SWT.SHADOW_IN; if (shadowNoneButton.getSelection ()) style |= SWT.SHADOW_NONE; if (shadowOutButton.getSelection ()) style |= SWT.SHADOW_OUT; if (leftButton.getSelectio...
6
private void replace(Node seNode,HashSet<String> names,HashSet<Integer> excludedIds,Associator assoc){ Iterator<String> it = names.iterator(); String seName = seNode.getName(); SynSE oldSE = null; SynSE se = ses.get(seName); while(it.hasNext()){ String name = it.next(); while(replacedSEs.contai...
9
private void createGUIComponents() { CardTreeNode treeRoot = new CardTreeNode(Main.CARDS); cardsTree = new JTree(treeRoot); cardsTree.setRootVisible(false); cardsTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); cardsTree.addTreeSelectionListen...
5
@Override public void remove(T t) { DInfo<T> op; SearchReturnValues ret; LockFreeNode<T> newNode=new LockFreeNode<T>(t);//node to find while(true){ ret=search(newNode); if(newNode.compareTo(ret.l)!=0){ //In case something change during the search and // we miss the element, we try it again one ...
7
private static void addSettersClass(Class<?> cls) { List<FastMethod> setters = new ArrayList<FastMethod>(); classToSetters.put(cls, setters); FastClass fastClass = FastClass.create(cls); while (cls != null) { for (Method method : cls.getDeclaredMethods()) { in...
6
@Override public boolean okMessage(final Environmental myHost, final CMMsg msg) { if(!super.okMessage(myHost,msg)) return false; if((msg.targetMinor()==CMMsg.TYP_WEAPONATTACK) &&(msg.tool()==this) &&(requiresAmmunition()) &&(ammunitionCapacity()>0)) { if(ammunitionRemaining()>ammunitionCapacity()) ...
7
@Override protected void onAction(String sender, String login, String hostname, String target, String action) { super.onAction(sender, login, hostname, target, action); int i = 0; while(true) { Main.debug("Action check: " + serverid + " - " + Main.gui.tabs.get(i).serverid, false); if(Main.gui.tabs.get(...
4
@Test public void testReadyStateTransition() throws ProcessExecutionException, ProcessRollbackException { IProcessComponent<?> comp = TestUtil.executionSuccessComponent(true); assertTrue(comp.getState() == ProcessState.READY); // test valid operation TestUtil.setState(comp, ProcessState.READY); try { c...
5
private int parseOption(String option) { if(option.equals("1")) { return MAKE_CELL_ALIVE; } else if (option.equals("2")) { return NEXT_GENERATION; } else if (option.equals("3")) { return UNDO; ...
5
@Override public void componentResized(ComponentEvent arg0) { HEIGHT = this.getHeight(); WIDTH = this.getWidth(); resize(); }
0
public void add(Integer k, Integer v) { int nHeight = 1; Node<Integer, Integer> x = root, y = null; while (x != null) { int cmp = k.compareTo(x.key); if (cmp == 0) { x.value = v; return; } else { y = x; ...
6
public static void main(String[] args) throws IOException { // parse arguments if (args.length == 0 || args.length > 2) usage(); boolean recursive = false; int dirArg = 0; if (args[0].equals("-r")) { if (args.length < 2) usage(); recursive = true; dirArg++; } //TODO Configurations to be a...
4
public void generateDataforCassandra(int uID, int noOfReplicas, int noOfSamples, int rate) { // to measure Cassandra replicating // performance int tsID = 0; long executedTime = 0; // String test = ""; try { DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); Date date = new...
9
public static void main(String[] args) { try { // Creating a server ServerSocket theConnection; theConnection = new ServerSocket(5001); // A new socket to pick up the "request" Socket theConversation; theConversation = theConnection.accept(); // We create a reader on this socket as well as a writ...
4
protected void addMissing(Instances data, int level, boolean attributeMissing, boolean classMissing, int attrIndex) { int classIndex = data.classIndex(); Random random = new Random(1); for (int i = 0; i < data.numInstances(); i++) { Instance current = data.instance(i); for (i...
7
@Override public Class getColumnClass(int column) { Class returnValue; if ((column >= 0) && (column < getColumnCount())) { if (getValueAt(0, column) == null) { return String.class; } returnValue = getValueAt(0, column).getClass(); } else { ...
3
public AbstractTestLinkRunListener(final T testLinkRunListener) { this.inTestLinkListener = testLinkRunListener; }
0
@Override public void execute(double t) { if (hist != null && input.isConnected()) { Matrix u = input.getInput(); hist.store(u, t); double v = u.norm1(); if (v > maxv) maxv = v; } }
3
public static void main(String[] args){ f = new FrameManager(); f.setVisible(true); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setResizable(false); f.setSize(width, height); f.setTitle("Nightmare"); f.setLocationRelativeTo(null); Image icon; try { icon = ImageIO.read(WindowManager.class.ge...
1
private void btSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSalvarActionPerformed Funcionario f = new Funcionario(); if (!(txCodigo.getText().equals("")) || (txCodigo.getText().equals(null))){ f.setId_funcionario(Integer.parseInt(txCodigo.getText())); } ...
7
public static void saveBubbleDiagram(File file) { try { PrintWriter writer = new PrintWriter(file); writer.println("Bubbles:"); for(Bubble bubble : Main.flowChart.getBubbles()) { Point loc = bubble.getLocation(); writer.println("bubble:"+bubble.getId()+":"+loc.x+":"+loc.y+":"+bubble.getRadius...
5
@SuppressWarnings("rawtypes") public static SingleColumnComparator createDoubleComparator(NumberName numberName, boolean ascending, String defaultString) throws Exception { final String type="double"; if (ascending) { if (defaultString.equals("")) { return new SingleColumnComparator(...
5
@Test public void testAsteroidVelocityInfluencedByGameSpeed() { ArrayList<Asteroid> astX = new ArrayList<Asteroid>(); ArrayList<Asteroid> astY = new ArrayList<Asteroid>(); p.setGameSpeed(1.2); for (int i = 0; i < 20; i++) { p.spawnAsteroids(); } for (Aster...
8
public void removeShadow(Player player) { for (Castle c: player.getCastles()) { core.Point p = p2o.get(c); player.removeShadowRadius(p.x, p.y, 3); } }
1
@Override public void deactivateFrame(JInternalFrame f) { //System.out.println("deactivateFrame"); super.deactivateFrame(f); }
0
public void btnConfirmarAgendamento() { facesContext = FacesContext.getCurrentInstance(); Solicitacoes solicitacao = solicitacaoSelecionada.getSolicitacao(); solicitacao.setSol_status("Autorizado"); autorizar.setAut_data_horaAtual(new Timestamp(System.currentTimeMillis())); autorizar.setAut_profAgen...
4
public static String authenticateToken(String username, String token) throws SQLException { String auth_pass = getPassword(username); String plain_token = UserServices.decrypt(token, UserServices.generateKeys(auth_pass)); Statement statement = mysqlDB.createStatement(); ResultSet result = statement ....
4
public static void main(String[] args) { DWT _dwt = new DWT(); /* ----------------- Test for zigzag --------------------*/ double[][] _input = {{49, 61, 69, 61, 78, 89, 100, 112} , {68, 60, 51, 42, 62, 69, 80, 89} , {90, 81, 58, 49, 69, 72...
5
@Override public void draw(Pixel pixel, SinglePlayerGame game, Graphics g) { MortalEntity entity = (MortalEntity) game.getEntity(pixel.x, pixel.y); if (entity != null) { float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); Color c = Color.get...
1