text
stringlengths
14
410k
label
int32
0
9
@Override public void tick(LinkedList<GameObject> lstObj) { super.tick(); if (this.isAlive()) { velX = Math.signum(velX) * 3; walkLeft.runAnimation(); walkRight.runAnimation(); for (GameObject tmpObj : lstObj) { if (this != tmpObj) { ...
9
public boolean method284(int arg0, byte arg1, int arg2, int arg3, Entity entity, int arg5, int arg6, int arg7, int arg8, int arg9) { if (entity == null) { return true; } else { int i2 = arg9 * 128 + 64 * arg5; int j2 = arg8 * 128 + 64 * arg3; return method287(arg6, arg9, arg8, arg5, arg3, i2, j2, arg2, ...
1
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = br.readLine()) != null) { StringTokenizer st = new StringTokenizer(s); int n = Integer.parseInt(st.nextToken()); ...
8
public List<Interval> insert(List<Interval> intervals, Interval newInterval) { if (intervals.isEmpty()) { intervals.add(newInterval); return intervals; } List<Interval> result = new ArrayList<>(intervals.size()); Iterator<Interval> iter = interva...
9
public void update(GameContainer container, StateBasedGame game, int delta, int mouseX, int mouseY) { if (contains(mouseX, mouseY) && !current.equals(mouseOver)) { current = mouseOver; currentColor = mouseOverTxtColor; mouseEnter.play(1, RLGame.SOUND_VOLUME); } else if (!contains(mouseX, mouseY) && !cur...
4
public byte[] getPgenCounter() { return pgenCounter; }
0
@Override public void keyPressed(KeyEvent e) { switch (e.getKeyCode()) { case KeyEvent.VK_UP: System.out.println("Move up"); break; case KeyEvent.VK_DOWN: currentSprite = characterDown; if (robot.isJumped() == false) { robot.setDucked(true); robot.setSpeedX(0); } break; case KeyEve...
9
public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int a = Integer.parseInt(reader.readLine()); int b = Integer.parseInt(reader.readLine()); int c = Integer.parseInt(reader.readLine()); int d...
7
static public boolean deleteDirectory(File path) { if (path.exists()) { File[] files = path.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { deleteDirectory(files[i]); } else { file...
3
private TrainNumber CreateG101() { TrainNumber rs = new TrainNumber(); rs.setId(UUID.randomUUID()); rs.setName("G101"); Route route = new Route(); route.setId(UUID.randomUUID()); route.setStartDate(new LocalDate(0L)); route.setEndDate(LocalDate.now().plusYears(10)); rs.getRoutes().add(route); for...
1
@EventHandler(priority = EventPriority.MONITOR) public void bucketEmpty(PlayerBucketEmptyEvent event){ if(plugin.getArena(event.getPlayer())!= null){ int a = plugin.getArena(event.getPlayer()); if(!event.isCancelled()){ if(plugin.canjoin.get(a)){ if(plugin.Playing.get(a).contains(event.getPlayer().get...
7
public String toString(){ String str = identifier.getNewName(false) + "("; if(argumentListOpt!=null) str += argumentListOpt.toString(); str += ")"; return str; }
1
@Id @Column(name = "POP_PROVEEDOR_ID") public Integer getPopProveedorId() { return popProveedorId; }
0
public PlayerShip getNewShip() { switch(shipPreference) { case BOMBER: return new actor.ship.types.Bomber(); case FIGHTER: return new actor.ship.types.Fighter(); case SCOUT: return new actor.ship.types.Scout(); case ...
4
public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); StringBuilder out = new StringBuilder(); String line = ""; while ((line = in.readLine()) != null && line.length() != 0) { int n = Integer.parseInt(line.trim()); if (n == 0)...
6
public String getInput() { String str = ""; try { BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(System.in)); str = bufferedReader.readLine(); } catch (IOException ex) { ex.printStackTrace(); } String returnStr = str.toLowerCase(); return returnStr; }
1
public void setProductType(ProductType productType) { if (this.productType == productType) return; if (this.productType != null) { this.productType.removeTray(this); } this.productType = productType; if (productType != null) { this.productType.addTray(this); } }
3
public static void evaluateTwoParsers(File parserDataA, File parserDataB) { BufferedReader brA = getReader(parserDataA); BufferedReader brB = getReader(parserDataB); String strLineA; String strLineB; int sentencesCounter = 1; int partialMatches = 0; int completeMatches = 0; int word...
9
public Triple getTriple(String identifier) throws InvalidRecordException{ Predicate pred = null; Node sub = null; Node obj = null; //Check for the Triple, if not add it to the KnowledgeGraph if (!(tripleMap.containsKey(identifier))){ StringTokenizer st = new StringTokenizer(identifier," "); ...
7
@Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { //刷新选中状态 selectNone(); for(int i = 0; i < model.size(); i++) { CheckStore<E> store = model.get(i); if(store.isSelected()) { uiCheckBoxList.addCheckBoxListSelectedIndex(i); } } //大小 if(popSize != null && popSize.height != 0 &&...
5
@EventHandler public void CreeperRegeneration(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getCreeperConfig().getDouble("Creeper...
6
private static Map<String, String> parse(String fileName) { DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = null; Map<String, String> map = new HashMap<String, String>(); try { builder = builderFactory.newDocumentBuilder(); } catch(ParserConfigu...
3
public short getMinimumDifference_as_short(){ short diff = (short)0; if(this.type==8 || this.type==9){ ArrayMaths am = this.sort(); short[] sorted = am.getArray_as_short(); diff = (short)(sorted[1] - sorted[0]); short minDiff = diff; for(int i=...
4
@Override public void windowClosed(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSED) { this.setVisible(false); this.dispose(); } //To change body of implemented methods use File | Settings | File Templates. }
1
@Override public boolean interpret(String context) { if (context.contains(data)) { return true; } return false; }
1
private void jTextField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost // TODO add your handling code here: try{ if(esCarga){ if((jTextField1==null)||(jTextField1.getText().equals(""))) jTextField1.requestFocus(); ...
6
public String parse(String input){ String output = input.replace("(SERVERNAME)", pl.getServer().getName()) .replace("(BUKKITVERSIONLONG)", pl.getServer().getVersion()) .replace("(BUKKITVERSION)", pl.getServer().getBukkitVersion()) .replace("(MAXPLAYERS)", "" + pl.getServer().getMaxPlayers()) .replace(...
5
@Override public void setType(BlocType b) { BlocType t = super.getType(); checkInvariants(); super.setType(b); checkInvariants(); if(t==BlocType.MURMETAL){ if(!(super.getType() == BlocType.MURMETAL)){ throw new PostConditionError( "getType(B) == BlocType::MURMETAL et "+ "getType(setType(...
3
@Override public boolean okMessage(final Environmental myHost, final CMMsg msg) { if(!super.okMessage(myHost, msg)) return false; if((affected instanceof MOB) &&(msg.target()==affected) &&(msg.sourceMinor()==CMMsg.TYP_ADVANCE)) { final MOB mob=(MOB)affected; if((mob.getVictim()==msg.source()) &&...
7
public void fillInGenSet(Set in, Set gen) { if (instr != null) instr.fillInGenSet(in, gen); }
1
@Override public void draw(Graphics g) { int x = this.column * Board.CELL_SIZE; int y = this.row * Board.CELL_SIZE; g.setColor(Color.GRAY); g.fillRect(x, y, Board.CELL_SIZE, Board.CELL_SIZE); if (roomInitial == 'X'){ g.setColor(Color.RED.darker().darker()); ...
6
public static void main(String[] args) { RecursionSteps r = new RecursionSteps(); System.out.println(r.Steps(4)); }
0
protected synchronized void initializeJar() { //Check to see if we are already initialized if(isInitialized()) return; //we can't initialize non-jar non-zip resources if(!isJar() && !isZip()) { initialized_flag = true; return; } try { File f = null; ...
9
public void setStatus(boolean status){ currentImage = status ? greenLamp : redLamp; repaint(); }
1
public Object getValueAt(int rowIndex, int columnIndex) { assert((columnIndex >= 0) && (columnIndex <= 2)); Iterator i = scoreSet.iterator(); int j = 0; while(i.hasNext()) { if(j == rowIndex) { Object...
9
protected void _socketReceivingMessage(ByteBuffer _buf) { //将数据放入缓冲中 try { _m_bByteBuffer.put(_buf); } catch (BufferOverflowException e) { //长度不足,此时提示 ALServerLog.Error("_socketReceivingMessage length is too long, Socket Buffer need...
9
public void update() { Window window = vc.getFullScreenWindow(); if (window != null) { BufferStrategy s = window.getBufferStrategy(); if (!s.contentsLost()) s.show(); } }
2
@Override public void keyPressed(KeyEvent e) { if (isAlive) { if (e.getKeyChar() == 'w') { player.setDy(-4); keyDown[2] = true; } else if (e.getKeyChar() == 's') { player.setDy(4); keyDown[3] = true; } else i...
6
public static void disposeImages() { // dispose loaded images { for (Image image : m_imageMap.values()) { image.dispose(); } m_imageMap.clear(); } // dispose decorated images for (int i = 0; i < m_decoratedImageMap.length; i++) { Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decora...
5
public int get(ParameterName variableName, int defaultValue){ if(map.containsKey(variableName)){ if(map.get(variableName) instanceof Integer || map.get(variableName) instanceof Float || map.get(variableName) instanceof Double){ return Math.round(((Number)map.get(variableName)).floatValue()); } throw new ...
4
private static MiniScriptValue readValue(CompileInfo ci, String p){ p = p.trim(); if(p.isEmpty()){ makeDiagnostic(ci, Kind.ERROR, "no.value.empty");//$NON-NLS-1$ return null; }else{ if(p.charAt(0)=='['){ return readPtr(ci, p); }else if(p.charAt(0)=='r' || p.charAt(0)=='R'){ if(p.length()>1 && ...
6
public static void main(String[] args) { String[] words = { "Mary", "had", "a", "little", "lamb" }; Pair<String> mm = ArrayAlg.minmax(words); System.out.println("min = " + mm.getFirst()); System.out.println("max = " + mm.getSecond()); }
0
public void addLiens(List<ZLien> liens) { Iterator<ZLien> e = liens.iterator(); while (e.hasNext()) addLien((ZLien) e.next()); }
1
private boolean validMove(int x, int y, ArrayDeque<Point> path){ if(avatar.getAvilableMoves() == 0) return false; //Return false if it out of bounds of the map array. if(!inBounds(x,y)) return false; //Returns false if the tile does not correspond to a accessible square if(!worldMap[x][y].isIsTile()) ...
6
public synchronized void serviceChanged(ServiceEvent event) { String[] objectClass = (String[]) event.getServiceReference().getProperty("objectClass"); // If a dictionary service was registered, see if we // need one. If so, get a reference to it. if (event.getType() == ServiceEvent.REGISTERED) { if (m_ref ...
6
public LoreBookPanel() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException exception) { exception.printStackTrace(); } catch (InstantiationException exception) { exception.printStackTrace(); } catch (IllegalAccessException exception) { excepti...
7
public void init(){ //setup root Root = new Node(null,new Point(0,0,TreeSize),new Point(TreeSize,0,TreeSize),new Point(0,0,0), new Point(TreeSize,0,0)); Root.Parent = null; //not doing this recursively, because it's not jumping out at me, I think I'm seeing problems with initialization t...
3
@Override public boolean onPointerMove(int mX, int mY, int mDX, int mDY) { if(mX > x && mX < x + width && mY > y && mY < y + height) { pointerOver = true; if(tooltip != null) { tooltip.setLocation(mX+20, mY+20); } } else { point...
5
public static void getModsFrom(File dir, File parentFile) throws Exception { if (dir.isDirectory()) { for (int i = 0; i < dir.listFiles().length; i++) { if (dir.listFiles()[i].isDirectory()) { getModsFrom(dir.listFiles()[i], parentFile); } else if (dir.listFiles()[i].toString().endsWith(...
6
@Override public void execute(VirtualMachine vm) { System.out.println(vm.peekRunTimeStack()); }
0
public void render(Graphics g) { g.setColor(buttonColor); g.fillRect(x, y, w, h); if(disabled) { g.setColor(disabledColor); g.fillRect(x, y, w, h); } else if(shade) { g.setColor(pressed ? shadeColor : hoverColor); g.fillRect(x, ...
3
public static ArrayList<Score> get() { try { String data = "action=" + URLEncoder.encode("get", "UTF-8"); String result = connect(data); return createScores(result); } catch(Exception e) { e.printStackTrace(); } return null; }
1
@Override public void renameDirectory(String directory, String newname) { if (!dirEntries.containsKey(directory.toLowerCase())) return; DirEntry de = dirEntries.get(directory.toLowerCase()); DirEntry parent = de.parentDir; String parentpath = ""; if (parent != nu...
4
private static void checkForRuntimeRetention( Class<? extends Annotation> annotationType ) { Retention retention = annotationType.getAnnotation( Retention.class ); if ( retention == null || RetentionPolicy.RUNTIME != retention.value() ) { throw new IllegalArgumentException( "Anno...
3
public static WordSet generateSet(int tipo){ //Selección de la implementación a utilizar switch (tipo){ case 1: return new SimpleSet(); case 2: return new RedBlackTree(); case 3: return new SplayTree(); case 4: r...
5
public void fixSequence(SAMSequenceRecord sequenceRecord) throws MD5MismatchError { String found_md5 = sequenceRecord.getAttribute(SAMSequenceRecord.MD5_TAG); if (confirmMD5) { if (found_md5 != null) { byte[] bytes = referenceSource.getReferenceBases(sequenceRecord, true); if (bytes == null) { Strin...
8
int syncHeader(byte syncmode) throws BitstreamException { boolean sync; int headerstring; // read additional 2 bytes int bytesRead = readBytes(syncbuf, 0, 3); if (bytesRead!=3) throw newBitstreamException(STREAM_EOF, null); headerstring = ((syncbuf[0] << 16) & 0x00FF0000) | ((syncbuf[1] << 8) & 0x0000FF0...
3
String getMessage() { return this.message; }
0
public static void inversion(Deck in){ int pos1 = (int) (Math.random() * (1+in.cards.size())); int pos2 = (int) (Math.random() * (1+in.cards.size())); if(pos1>pos2){ int temp = pos1; pos1 = pos2; pos2 = temp; } String temp; int j = pos2; for(int i=pos1; i<(j-1); i++){ j--; temp = in....
2
public String getManufacturerId() { return manufacturerId; }
0
public Logger() { log = this; }
0
public String getDescription() { return "JFLAP 3 File"; }
0
public String getNanopostsDir(boolean outbox) { String nanopostsDir; if (!outbox) { nanopostsDir = MainClass.NANOPOSTS_DIR + System.getProperty("file.separator"); } else { nanopostsDir = MainClass.OUTBOX_DIR + System.getProperty("file.separator"); } ...
2
@Override public void show() { System.out.println(name + ", type in the required information for a new auction item." + "\n"); System.out.println("Name of product:"); try { productName = br.readLine(); } catch (IOException e) { e.printStackTrace(); } System.out.println("Description of product:")...
3
public Position findFirstEmptyCell(Direction direction) { if (direction == Direction.DOWN) { for (int x = 0; x < getWidth(); ++x) { for (int y = 0; y < getHeight(); ++y) { Cell cell = getCell(x, y); if (cell.isAccessible() && cell.getContent().equals(Cell.EMPTY_CHARACTER)) { return new Position...
9
public FeatureNode [] parseRow(String [] row) { FeatureNode [] example = new FeatureNode[row.length-1]; int maxindex = 0; for (int i=1; i<row.length; i++) { String [] iv = row[i].split(":"); int index = Integer.parseInt(iv[0...
3
public Exam(int examMark) { if (examMark > 100 || examMark < -1) { invalidCount++; } else if (70 <= examMark && examMark <= 100) { studentCount++; distinctionCount++; } else if (50 <= examMark && examMark <= 69) { studentCount++; passCount++; } else if (0 <= examMark && examMark <= 49) { stude...
8
public void test_02() { readFile("tests/indexer_test_01.fastq"); // Sort all references String latest = ""; Collections.sort(references, seqIndex); // Check that is was sorted correctly for( Long ref : references ) { DnaAndQualitySequence seq = seqIndex.get(SequenceReference.getSeqIdx(ref)); int sta...
2
@Override public void run() { /*if (HyperPVP.games == 19) { this.restart(30, 15); this.restart(15, 5); this.restart(10, 5); this.restart(5, 1); this.restart(4, 1); this.restart(3, 1); this.restart(2, 1); this.restart(1, 1); HyperPVP.needsRestart = true; return; } else { HyperPVP.g...
2
public void setX(int newX) { this.x = newX; }
0
public boolean hasBooleanValue() { switch (constType.type) { case CodeConstants.TYPE_BOOLEAN: case CodeConstants.TYPE_CHAR: case CodeConstants.TYPE_BYTE: case CodeConstants.TYPE_BYTECHAR: case CodeConstants.TYPE_SHORT: case CodeConstants.TYPE_SHORTCHAR: case CodeConstants.T...
9
@SuppressWarnings("unchecked") private void loadFile() { if (fc.showOpenDialog(panel) != JFileChooser.APPROVE_OPTION) { return; } File loadFile = fc.getSelectedFile(); try { BufferedReader reader = new BufferedReader(new FileReader(loadFile)); List<String[]> dataGrid = new ArrayList<String[]>(); St...
8
public static int searchHelper(int[] arr, int tgt, int p, int r) { if ( p > r) { return -1; } int m = (p + r) / 2; int valMid = arr[m]; // trivial case if ( valMid == tgt ) { return m; } // non trivial cases if ( valMid < tgt ) { if ( arr[r] >= tgt ) { return searchHelpe...
5
@Override public void act() { if (!checkLife()) { removeSelfFromGrid(); } while (this.exp > this.nextExp) { this.exp -= this.nextExp; levelUp(); } }
2
@Test(timeout = 500) public void testParesAntesImpares() { int par = 0; int impar = 0; int random = 0; int tam = 0; int ndx = 0; int obtido = 0; int esperado = 0; List<Integer> lista = null; String tmpl = null; String msg = null; random = getRandom(); if (random % 2 == 0) { par = rando...
5
public static void refreshMessages() { String lastMsg = Session.current().get("lastMsg"); ChatRoom chatRoom = getCurrentChatRoom(); if ( chatRoom == null ) return; //do something here ... Date lastDate = new Date(); DateFormat formatter = new SimpleDateFormat(DATE_FORMAT); Session.c...
4
public void drawLevel(Graphics g){ for(int y = (int) ((Game.cameraLocation.y*scale)/tileHeight), yLoc = (int) -((Game.cameraLocation.y*scale)%tileHeight); y < height && yLoc < game.window.getHeight(); y++, yLoc += tileHeight){ for(int x = (int) ((Game.cameraLocation.x*scale)/tileWidth), xLoc = (int) -((Game.camera...
8
public void loadWave(String name, String location, int concurrent) { SoundWave wave = null; URL waveLocation = Thread.currentThread().getContextClassLoader().getResource(location); if (waveLocation != null) { try { wave = new SoundWave(waveLocation, concurrent); } c...
4
private BeanKey findParameterKey(final Object parameterOwner, final Class<?> parameterClass, final Type parameterType, final Annotation[] annotations) { final String qualifier = qualifierHandler.getQualifier(parameterOwner, annotations); if (isProvider(parameterClas...
9
private void doDistrDEEMaster(int numMutable, int strandMut[][], ParamSet sParams, String strandDefault[][], String minPEM, String maxPEM, double initEw, PrunedRotamers<Boolean> prunedRotAtRes, boolean doMinimize, RotamerSearch rs, String sfFile, String rotFile, boolean useSF, int numSpPos, int typeDEE, bo...
7
@Override protected boolean handleInternal(AbstractAction action, Agent agent) { if (messageToSend == null) { AbstractAction interestingPart = getInterestingPart(action); if (interestingPart == null) { // not interested in this action return true; } values = new HashMap<String, String>(); if (...
6
public void setConditionalSentence(boolean b) { final CycSymbol value = b ? CycObjectFactory.t : CycObjectFactory.nil; put(CONDITIONAL_SENTENCE, value); }
1
public SingleTreeNode uct(StateObservation state) { SingleTreeNode selected = null; double bestValue = -Double.MAX_VALUE; for (SingleTreeNode child : this.children) { double hvVal = child.totValue; double childValue = hvVal / (child.nVisits + this.epsilon); ...
3
public static TransactionExecutor newLockingExecutor() { TransactionExecutor.Validator validator = new TransactionExecutor.Validator() { @Override public boolean validate() { if (!WriteSet.getLocal().tryLock()) { return false; } ...
7
public void load() { config = new YamlConfiguration(); worldEntries = new HashSet<WorldEntry>(); worldProperties = new HashSet<WorldProperties>(); try { config.load(new File(plugin.getDataFolder(), "config.yml")); ConfigurationSection worldLinks = config.getConf...
9
public Node nodeAt(int x, int y) { String s = coordString(x, y); if (node_map.containsKey(s)) { Node n = node_map.get(s); if (n.x == x && n.y == y) return n; } return null; }
3
public Liste getListe() { return liste; }
0
@SuppressWarnings("unchecked") public void loadDb() { try { this.setMusicBuffer((HashMap<String, MusicPersisted>) this.getMusicDbIn().readObject()); this.setUserBuffer((HashMap<Email, UserPersisted>) this.getUserDbIn().readObject()); } catch (IOException e) { this.setMusicBuffer(new HashM...
2
static public void compareStrings() { String one = "one"; String two = "two"; String var1 = "one"; String var2 = "Two"; String pieceOne = "o"; String pieceTwo = "ne"; // Comparison is equal if (one.equals(var1)) System.out.println("String o...
8
public void setSolFechaHora(Date solFechaHora) { this.solFechaHora = solFechaHora; }
0
public ThreadingIT() throws FileNotFoundException { out = new PrintStream(new OutputStream() { @Override public void write(int b) throws IOException { // just do nothing } }); xmlRunListener = new TestLinkXmlRunListener(out, "donald"); ...
0
private int digitalSum(int x) { int[] number = new int[1000]; number[0] = 2; int len = 1; int high = 0; for (int i = 2; i <= x; i++) { for (int j = 0; j < len; j++) { number[j] = number[j] * 2 + high; high = number[j] / 10; number[j] = number[j] % 10; } if (high > 0) { number[len] = h...
4
public int [][] multiResultsetWins(int comparisonColumn, int [][] nonSigWin) throws Exception { int numResultsets = getNumResultsets(); int [][] win = new int [numResultsets][numResultsets]; // int [][] nonSigWin = new int [numResultsets][numResultsets]; for (int i = 0; i < numResultsets; i++) {...
8
@Override public void update() { for (Input i : pressedKeys) { switch (i) { case PLR1RIGHT: rp.playerGo(1, Const.right); break; case PLR1LEFT: rp.playerGo(1, Const.left); ...
5
@SuppressWarnings("unchecked") public static LinkedHashMap<String,Object> objectToArray(Object object) { LinkedHashMap<String,Object> data= new LinkedHashMap<String,Object>(); if (object == null) return data; if (Functions.method_exists(object,"toArray")) { Object retObj = Functions.call_method(object,"toArr...
9
public static List<Node> bfs(double graph[][],int s) { int length=graph.length; List<Node> nodeList=NodeUtil.generateNodeList(graph); nodeList.get(s).distance=0; nodeList.get(s).state=1; Queue<Node> queue=new LinkedList<Node>(); queue.add(nodeList.get(s)); while(!queue.isEmpty()) { Node u=queu...
3
public void InitView() { pane = new VBox(); //Stworzenie wykresu lineChart = LinearChartManager.linear(); lineChart.setTitle(""); //Poczatkowo zakres dat to 3M selectedRange = DataRange.THREEMONTH; selectedChart = "line"; //Stworzenie tabelki ta...
7
public void openWindow() throws IOException { openedWindows++; if (frame != null) return; frame = new JFrame(EditorPanel.WINDOW_NAME); frame.setIconImage(U.getAppIcon()); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); Point p = U.Config.readFrameSize(); U.setFrameSize(frame, p.x, p.y...
9
public void HandleKeyboardEvent() { int key = Keyboard.getEventKey(); if (IsInKeyRange(key)) { if (Keyboard.getEventKeyState()) { if (mRecordingKeys) { if (key == 14) { if (inputString.length() > 0) { inputString = inputString.substring(0, inputString.length() - 1); ...
5
public boolean variable_declaration() { // check format: type identifier ["[" "]"] ["=" assignment_expression ] ";" boolean variableHasBeenAdded = false; Variable_SAR variableSar = null; typePush(new Type_SAR(lexicalAnalyzer.getToken(), scope)); if (!typeExists()) { ...
9