text
stringlengths
14
410k
label
int32
0
9
public SegmentGroup joinSplines() { long startTime = System.currentTimeMillis(); System.out.println("Sorting and joining Splines..."); SegmentGroup s = new SegmentGroup(); recalculateAllSplines(splines, sGroups, HIGH_RES); printl(currentID + " curr Id"); ...
9
public void getInput(Circuit c, boolean is_alice, BufferedReader br) { String inpline = null; // Scan through all format objects for (int i = 0; i < FMT.size(); i++) { IO io = FMT.elementAt(i); logger.debug("pulled element from FMT"); // Verify it's an input o...
8
public void additionalDisplayCombo_actionPerformed (ActionEvent e) { int selectedIndex = additionalDisplayCombo.getSelectedIndex(); switch (selectedIndex) { case HackController.SCRIPT_ADDITIONAL_DISPLAY: if (!scriptMenuItem.isSelected()) scriptMenuItem.set...
8
public void setPreference(Preference pref) { this.pref = pref; }
0
public int getWidth() { return width; }
0
MatrixFileReader(String fileName) throws IOException { int ii, jj; Scanner in = new Scanner(new FileReader(fileName)); if (!in.hasNextInt()) { in.close(); throw new IOException("Cannot read matrix file."); } rows = in.nextInt(); if (!in.hasNextInt()) { in.close(); throw new IOException("Can...
6
public int getIndexMin(int start, int end) { if (this.start == start && this.end == end) return minIndexVal; int mid = (this.start + this.end) / 2; if (mid >= start && mid >= end) return left.getIndexMin(start, end); if (mid < start && mid < end) return right.getIndexMin(start, end); return m...
6
public double mean() { //************************** return this.mean; //************************** }
0
private void startFood(){ synchronized(envi.lock_food){ int count = 0; while(count < 15){ envi.addFood(); food_count++; count++; if(food_count == food_needed){ break; } } } }
2
private int nextCharToProcess() throws IOException, LexerException { int ich; if (nextich >= 0) { ich = nextich; nextich = -1; } else ich = this.reader.read(); for (; ich != -1; ich = this.reader.read()) { char ch = (char)ich; if (Character.isSpaceChar(ch) || Character.isISOControl(...
8
public static void restoreDefaults() { for (Entry<String, Fonts> entry : DEFAULTS.entrySet()) { UIManager.put(entry.getKey(), entry.getValue().mDefaultFont); } }
1
protected double[] computeOptimalPositions(double omega, double[] x_0, double[] v_p, double[] u_p) { // -------- initialize all vectors -------- double[] x = x_0; double[] v = new double[unplacedNets.size()]; double[] u = new double[unplacedNets.size()]; // iterate over nets for (int l = 0; l < unplaced...
9
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Map<String, String> errors = new HashMap<String, String>(); UserValidation uservalidate = new UserValidation(); User user; String addressName = request.getParameter("details"); Strin...
9
protected void mapChildrenValues(Map<String, Object> output, ConfigurationSection section, boolean deep) { if (section instanceof MemorySection) { MemorySection sec = (MemorySection) section; for (Map.Entry<String, Object> entry : sec.map.entrySet()) { output.put(createP...
5
public List <String> getAdjacent(String nodeID){ increaseAccess(); Node node = nodeMap.get(nodeID); List <String> result = new ArrayList<String>(); if (node != null) { for(Map.Entry<String, Edge> entrySet : this.edgeMap.entrySet()) { Edge edge = entrySet.getValue(); if (edge.getNode1().equals...
4
public void HashSubtractor(Node Ax) { //given another hashTable head A, add to current hashtable Node Oit = this.mainNode; while(Oit != null && Ax != null) { OverlapType compared = RetOverlap(Oit,Ax,false); switch(compared) { case Equals: ////System.Out.println(ToStrin...
9
public void atualizarTreeMap(){ List<Integer> listaprovisoria = new ArrayList(); List<Integer> listaprovisoriaexcluir = new ArrayList(); Iterator iterador = lista_de_linhas.keySet().iterator(); while(iterador.hasNext()){ Integer valorAtualizar = (Integer) iterador.next(); ...
6
private void loopDir(Context ctx, File dir) { if (dir.isDirectory()) { for (File f : dir.listFiles()) { if (f.isFile() && f.getName().endsWith(".js")) { String name = f.getAbsolutePath().substring(f.getAbsolutePath().indexOf(scriptDir.getAbsolutePath()) + scriptDi...
6
public String next() throws IOException { int next = skipWhite(getChar()); if (next == -1) { return null; } else if (isAlpha(next)) { return getName(next); } else if (isNumber(next)) { return getNumber(next); } else if (isQuote(next)) { return getString(next); } else { return getSymbol(next);...
4
public void setRequest(Request request) { // Fail immediately if there are problems in the glue code. if (request == null) { throw new IllegalArgumentException("request == null"); } if (request.getPath() == null) { throw new RuntimeException("Assertion Failure: re...
5
public Register sibling(Width width) { Register[] family = family(); for(int i=0;i!=family.length;++i) { Register sibling = family[i]; if(sibling.width() == width) { // first match return sibling; } } return null; }
2
public boolean open() { if (isOpen()) { return true; } if (summoned() && select(Option.INTERACT)) { if (Condition.wait(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return !ctx.chat.select().text("Store").isEmpty(); } })) { for (ChatOption option : ctx...
6
private int jjMoveStringLiteralDfa16_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjMoveNfa_0(0, 15); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return jjMoveNfa_0(0, 15); } switch(curChar) { case 66: return jjMoveStringLiter...
6
public void pokemonStats() {// Determines pokemon initial stats and types if (GameFile.pokemonParty[0].equals("Tykepol")) {// Using Turtwig base // stats type = "Fight"; baseHp = 55; baseAtk = 68; baseDef = 64; baseSpAtk = 45; baseSpDef = 55; baseSpeed = 31; } else if (GameFile.p...
3
public void init(FilterConfig filterConfig) { this.filterConfig = filterConfig; if (filterConfig != null) { if (debug) { log("LoginFilter:Initializing filter"); } } }
2
void SetColor(int color) { if (toggling == true) { // System.out.println("Warning! Detected Cyle of dependencies in Parents of Marker lists"); return; } toggling=true; for (int i=0;i<NumPoints;i++) { GetPoint(i).mycolor=color; } if (Parent1Li...
8
private static void errorMessage(String message, String expecting) { // Report error on input. if (readingStandardInput && writingStandardOutput) { // inform user of error and force user to re-enter. out.println(); out.print(" *** Error in input: " + message + "\n"); ...
6
private boolean isIdentifier(String s) { if (s == null) { return false; } s = s.trim(); if (s.length() > 0) { if ( !Character.isLetter(s.charAt(0)) ) { return false; } for (int i = 1; i < s.length(); i++) { ...
7
@Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { if (!(entity instanceof HibernateTree)) { return false; } HibernateTree<?> tree = (HibernateTree<?>) entity; for (int i = 0; i < propertyNames.le...
9
@Override public MedicineDTO getMedicineById(Long id) throws SQLException { Session session = null; MedicineDTO medicine = null; try { session = HibernateUtil.getSessionFactory().openSession(); medicine = (MedicineDTO) session.load(MedicineDTO.class, id); } ...
3
@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==null) return false; if(target.fetchEffect(ID())!=null) { mob.tell(targ...
9
@Override public AState breakTie(AState state1, AState state2) { if(state1.getH() < state2.getH()) return state1; else return state2; }
1
private boolean read() { try { final URLConnection conn = this.url.openConnection(); conn.setConnectTimeout(5000); if (this.apiKey != null) { conn.addRequestProperty("X-API-Key", this.apiKey); } conn.addRequestProperty("User-Agent", Up...
4
private static String formatString(String string){ StringBuilder temp = new StringBuilder(string); boolean hasBeenGood = true; for (int i = 0; i < temp.length(); i++){ char curChar = temp.charAt(i); if ((curChar >= 'a' && curChar <= 'z') || (curChar >= 'A' && curChar <= 'Z') || (curChar >= '0' && ...
9
private static boolean isStringValid(String str, int size) { return str != null && !str.isEmpty() && str.length() <= size; }
2
private void setupLevelsEntities(){ resetPlayerPosition(); entities.clear(); view.actions.clear(); view.questionString = currentDepth.question; view.situationString = currentDepth.exposition; view.contextualString = null; if(0 == currentDepth.entrances.size()){ ...
8
public static void main(String[] args) throws FileNotFoundException { Scanner sc = new Scanner(new File("11grid.txt")); int[][] a = new int[20][20]; int row = 0, column = 0; String nextline; while (sc.hasNextLine()) { column = 0; nextline = sc.nextLine(); Scanner sc2 = new Scanner(nextline); w...
8
@Override public void move(GameBoard currentBoard) { System.out.print(playerName + ", it's your turn. "); int playerColumnInput = 0; if (playerColor == Color.BLUE) { System.out.println("You are player O (blue)."); } else { System.out.println("You are player X (red)."); } currentBoard.draw(); Syst...
5
public static String editString(String s, GameContainer container) { Input input = container.getInput(); for (int key : collection) { if (input.isKeyPressed(key)) { String keyString = Input.getKeyName(key); if (keyString.startsWith("NUMPAD")) { ...
7
@Override public void init(List<String> argumentList) { literalValue = Integer.parseInt(argumentList.get(0)); if (argumentList.size() > 1) { identifier = argumentList.get(1); } }
1
protected void updateCapabilitiesFilter(Capabilities filter) { Instances tempInst; Capabilities filterClass; if (filter == null) { m_AssociatorEditor.setCapabilitiesFilter(new Capabilities(null)); return; } if (!ExplorerDefaults.getInitGenericObjectEditorFilter...
8
private void writeLog() { String correct; String time; if(wasCorrect) { correct = " correctly"; } else { correct = " incorrectly"; } if(duration == 1){ time = " second."; } else{ time = " seconds."; ...
3
@Test public void testConstantReadingAndWriting() { final LockRef<String> mod = new LockRef<String>("Hello World"); final AtomicInteger finished = new AtomicInteger(); final AtomicBoolean running = new AtomicBoolean(true); Runnable writer = new Runnable() { public void run() { String newValue = nul...
2
public final void dotted_attr() throws RecognitionException { try { // Python.g:93:5: ( NAME ( DOT NAME )* ) // Python.g:93:7: NAME ( DOT NAME )* { match(input,NAME,FOLLOW_NAME_in_dotted_attr213); if (state.failed) return; // Python.g:93:12: ( DOT NAME )* loop8: while (true) { int alt8=2; ...
7
private void refreshChatLogs() { File dir = new File(ConfigManager.getInstance().chatlogsDir); if (!dir.exists()) { dir.mkdir(); } File[] logs = dir.listFiles(); if (logs.length == 0) { return; } String[] names = new String[logs.length]; ...
3
private void initComponents() { getStyleClass().add("body"); HBox hbox1 = new HBox(10); GridPane grid1 = new GridPane(); grid1.setHgap(10); grid1.setVgap(10); grid1.getStyleClass().add("grid-region"); grid1.setPadding(new Insets(10, 10, 10, 10)); Button nameButton = new Button("Full Name"); nameBut...
5
public String getFile() { if (file == null) { throw new RuntimeException("missing file name."); } return file; }
1
Field getFieldWithPos(int position_) { if (isPrimitive != null) { // if this is a primitive return null; //throw new ASNException("Cannot get subfield's position for a Primitive Type"); } if (position_ != 6) { // Optimization for Tag 6 Object Identifier. for (...
9
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub }
0
public static void listItem(){ rover = head; while(rover != null){ System.out.println("" + rover.name + " : " + rover.alt + " : " + rover.img); rover = rover.next; } }
1
public static TicketRestrictionEnumeration fromValue(String v) { for (TicketRestrictionEnumeration c: TicketRestrictionEnumeration.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); }
2
public Boolean calcHetero() { // No genotyping information? => Use number of ALT field if (genotypeFieldsStr == null) return isMultiallelic(); Boolean isHetero = null; // No genotype fields => Parse fields (we only parse them if there is only one GT field) if (genotypeFields == null) { // Are there more...
7
protected static String describe(String name,Class[] params) { StringBuilder invp=new StringBuilder(); invp.append(name); invp.append('('); if (params!=null) for(int k=0;k<params.length;k++) { if (k!=0) invp.append(','); invp.append(params[k].toString()); }; invp.ap...
3
public final Method[] getReflectiveMethods() { if (methods != null) return methods; Class baseclass = getJavaClass(); Method[] allmethods = baseclass.getDeclaredMethods(); int n = allmethods.length; int[] index = new int[n]; int max = 0; for (int i = ...
9
public static String unescape(String string) { int length = string.length(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; ++i) { char c = string.charAt(i); if (c == '+') { c = ' '; } else if (c == '%' && i + 2 < length) { ...
6
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof SubCategoria)) { return false; } SubCategoria other = (SubCategoria) object; if ((this.getId() == null && other...
5
private int[][] pasaArregloAMatrizLeft(int[] c0, int[] c1, int[] c2, int[] c3) { int[][] res = new int[4][4]; for (int i = 0; i < 4; i++) res[0][i] = c0[i]; for (int j = 0; j < 4; j++) res[1][j] = c1[j]; for (int k = 0; k < 4; k++) res[2][k] = c2[k]; for (int m = 0; m < 4; m++) res[3][m] = c3[...
4
protected String constructCookies(String... names){ StringBuilder ret = new StringBuilder(); //syntax: //name1=value1; name2=value2 if(names != null && names.length != 0){ //put in name + value boolean start = false; for(int i=0; i<names.length; i++){ if(start){ ret.append("; "); } ...
6
private int CountNumberLines() { int i; for(i = 0; scn.hasNextLine(); i++){ scn.nextLine(); } return i; }
1
private void createUpperLayout() { JPanel upper = new JPanel(); upper.setSize(100, 50); upper.setLayout(new BorderLayout()); JPanel sticks = new JPanel(); sendSticks = new JButton("Send sticks"); sendSticks.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e...
9
public static int mst(PriorityQueue<Edge> edges, Vertex[] noder) { ArrayList<Edge> A = new ArrayList<Edge>(); Edge e = null; while(!edges.isEmpty()) { e = edges.poll(); Vertex from = noder[e.getFrom()]; Vertex fromsParent = from.getParent(); Vertex to = noder[e.getTo()]; Vertex tosParent = to.getPa...
6
private Sundae() { print("Sundae()"); }
0
void event(){ //EFF: plays event if there is a trap Trap trip = curPlayer.curRoom.trap; Wumpus wump = curPlayer.curRoom.wumpus; Random ran = new Random(); if(wump != null){ if(players.length==1){ new GameOver(curPlayer.score, "You were eaten by the Wumpus!"); } ...
9
public void checkFilesExist() { String currDateString = DateModifier.getCurrDate(); fileName = "archives.txt"; File ArchivesFile = new File(fileName); if (!ArchivesFile.exists()) { PrintWriter writer = null; try { writer = new PrintWriter(fileName, "UTF-8"); } catch (FileNotFoundException | Unsuppo...
9
public double haeVuosimyynti(int vuosi) throws DAOPoikkeus { TilastointiDAO tilasto = new TilastointiDAO(); HashMap<Integer, Tilastointi> kktilaukset = tilasto.haeTilaukset(vuosi); double vuosimyynti = 0; for (int i = 1; i < 13; i++) { Tilastointi tilastot = kktilaukset.get(i); v...
1
@Override public void spring(MOB target) { if(target.location()!=null) { if((!invoker().mayIFight(target)) ||(isLocalExempt(target)) ||(invoker().getGroupMembers(new HashSet<MOB>()).contains(target)) ||(target==invoker()) ||(doesSaveVsTraps(target))) target.location().show(target,null,null,CMMs...
7
public Object get(String name) throws IllegalAccessError { int index; if((index = ObjectNames.indexOf(name)) != -1) { if(ObjectType.get(index) == OBJECT_ARRAY) { //technically miss used exception I think, but it fits the purpose throw new IllegalAccessError("You may only access saved Arrays via the getAr...
2
public Date getDate() { return date; }
0
@Override public Intersection findIntersect(Ray r) throws Exception { Intersection closest = null; for (Entity o : entities) { Intersection p = o.findIntersect(r); if (p == null) { continue; } if (closest == null) { closest = p; continue; } if (p.getDistance() < closest.getDistance())...
4
public void writeTRJ(String filename, int reldepth, String release) { File file = new File(filename); BufferedReader br = null; String ln = null; try { br = new BufferedReader(new FileReader(file)); br.readLine(); ln = br.readLine(); while (ln != null) { StringTokenizer stk = new StringTokeniz...
9
protected void processMouseWheelEvent(MouseWheelEvent e) { if (hasFocus()) { int code = InputManager.MOUSE_WHEEL_DOWN; if (e.getWheelRotation() < 0) { code = InputManager.MOUSE_WHEEL_UP; } mapGameAction(code, true); } e.cons...
2
public void setQuantita(Integer quantita) { this.quantita = quantita; }
0
@SuppressWarnings ("unchecked") protected final void delete(final BaseItem item) throws NullPointerException, IllegalArgumentException { switch (item.state()) { case Item.APPEND_STATE: case Item.UPDATE_STATE: case Item.REMOVE_STATE: if (!this.equals(item.pool())) throw new IllegalArgumentException(); ...
5
public static void main(String[] args) { SprinklerSystem sprinklers = new SprinklerSystem(); System.out.println(sprinklers); }
0
public void cancel() throws java.io.IOException { if (!(getStatus() == SubLWorkerStatus.WORKING_STATUS)) { return; } CycAccess cycAccess = getCycServer(); synchronized (cycAccess) { cycAccess.getCycConnection().cancelCommunication(this); } }
1
public void grow(float size) { this.size += size; }
0
public void start() throws IOException { /* Open DB Connection */ MongoClient mongoClient = new MongoClient(new ServerAddress("localhost", 27017)); ObservableThread userInputThread = new ObservableThread() { @Override public void run() { try { new BufferedReader(new InputStreamReader(System.in))...
9
void doLower() { if (gameInProgress == false) { // If the game has ended, it was an error to click "Lower", // So set up an error message and abort processing. message = "Apasa \"Joc nou\" pentru a incepe!"; repaint(); return; } ...
4
public void GetInput() { if (Input.MousePressed(org.newdawn.slick.Input.MOUSE_LEFT_BUTTON)) { if ((Mouse.getX() >= this.x && Mouse.getX() <= this.x+48) && ((Main.SCREEN_HEIGHT-Mouse.getY()) >= this.y && (Main.SCREEN_HEIGHT-Mouse.getY()) <= this.y+48)) { clicked = true; } } if ((Mouse.getX() >= this.x...
9
private static int lcmList(ArrayList<Integer> list) { if (list.size() == 0) throw new NullPointerException(); if (list.size() == 1) return list.get(0); if (list.size() == 2) return lcm(list.get(0), list.get(1)); int result = list.get(list.size() - 1); for (int i = list.size() - 1; i >= 0; i--) res...
4
void draw(Graphics2D g) { this.g = g; if (Main.SELECTED_SUBJECT != null) { reversDrawSubject(Main.SELECTED_SUBJECT, null, GCENTER); } else { drawSubject(Main.system, GCENTER); } drawRuler(100, 1050, 540); }
1
private void writeKeywordFile(String[] keywords, boolean black) { String temp = (black? "": ": "); for (String s: keywords) { temp += s+", "; } try { if(!black){ out = new BufferedWriter(new FileWriter(fileName+"KeywordsList.txt",true)); out.append(fm.format(new Date())+temp+"\n"); }else{ out = ...
4
public void repaintTripleBuffer(Rectangle clip) { if (tripleBuffered && tripleBufferGraphics != null) { if (clip == null) { clip = new Rectangle(tripleBuffer.getWidth(), tripleBuffer.getHeight()); } // Clears and repaints the dirty rectangle using the // graphics canvas of the graph compo...
3
public String getCurrentLightConditions(DemonstratorMain main, String dbName, boolean useJSON, LocalTime currentTime){ String lightConditions = ""; try { //time since last update of the solar altitude (times for sunrise and sunset) long diffInHours = Duration.between(lastUpdateSolarAltitude, LocalDateTime....
9
private List<String> parseParameterTypes(String signature) { int positionOfParameterStart = signature.indexOf("("); int positionOfParameterEnd = signature.indexOf(")"); String allParams = signature.substring(positionOfParameterStart + 1, positionOfParameterEnd); String[] paramsInArray = al...
1
private ServerSocket createServerSocket() { ServerSocket serverSocket = null; try { serverSocket = new ServerSocket(this.serverInfo.getPort()); this.log.info("create Server Socket: " + serverSocket.toString()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); server...
1
public void keyPressed(KeyEvent event) { // println("You pressed: " + event.getKeyCode() + ", " + event.getKeyChar()); if (event.getKeyCode() == KeyEvent.VK_ESCAPE) { System.exit(0); } else if (event.getKeyCode() == KeyEvent.VK_ENTER) { lab.genNewLab(); render(); } else if (event.getKeyCode() == KeyEven...
4
private Route contrueerRoute(RouteMetaData routemd[][], Knooppunt eind) { Route korsteRoute = null; if (routemd[eind.rij][eind.kol] != null) { korsteRoute = new Route(); Knooppunt huidig = eind; while (huidig != null) { korsteRoute.prependKnooppunt(hu...
2
@Override public void simpleUpdate(float tpf) { //For player movement and cam follow Vector3f camDir = cam.getDirection().clone().multLocal(0.6f); camDir.y*=0.3f; camDir.normalize(); Vector3f camLeft = cam.getLeft().clone().multLocal(0.4f); walkDirection.set(0, 0, 0);...
9
private void processThreePlayerActions(AIConnection currentPlayer){ JSONObject first = currentPlayer.getNextMessage(); JSONObject second = currentPlayer.getNextMessage(); JSONObject third = currentPlayer.getNextMessage(); int validActions = 0; if(letPlayerPerformAction(first, currentPlayer, 2)){ broadcastActi...
7
public static void main(String[] args) throws FileNotFoundException { FileInputStream fileInputStream; try { fileInputStream = new FileInputStream("D:\\chapter7_exceptions_test.txt"); System.out.println("File Opened..."); fileInputStream.read(); System....
2
public Config() { File file = new File("config"); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder; try { dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(file); } catch (ParserConfigurationException e) { // TODO Auto-generated catch blo...
3
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Ausencia)) { return false; } Ausencia other = (Ausencia) object; if ((this.id == null && other.id != null) || (...
5
private <T> String getBeanName(Class<T> registeredClass) { Class<?>[] interfaces = registeredClass.getInterfaces(); if (interfaces != null && interfaces.length > 0) { for (Class<?> anInterface : interfaces) { if (matchInterfaceClassName(registeredClass, anInterface)) { ...
6
public static double jauPap(double a[] , double b[] ) { double am, au[] = new double[3], bm, st, ct, xa, ya, za, eta[] = new double[3], xi[] = new double[3], a2b[] = new double[3], pa; /* Modulus and direction of the a vector. */ NormalizedVector nv = jauPn(a ); am = nv.r; au = nv.u; ...
4
public void refresh(){ try { questionDAO = new QuestionDAO(); List<SettingQuestion> questions = null; questions = questionDAO.getAllQuestion(); QuestionTableModel model = new QuestionTableModel(questions); questionTable.setModel(mod...
1
public boolean skipField(final int tag) throws IOException { switch (WireFormat.getTagWireType(tag)) { case WireFormat.WIRETYPE_VARINT: readInt32(); return true; case WireFormat.WIRETYPE_FIXED64: readRawLittleEndian64(); return true; case WireFormat.WIRETYPE_LENGTH_...
6
public void keyTyped(KeyEvent e) { switch (e.getKeyChar()) { case '[': controller.setBrushSize(controller.getBrushSize() - 1); break; case ']': controller.setBrushSize(controller.getBrushSize() + 1); break; } }
2
private void button_add_red_hitboxMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_button_add_red_hitboxMousePressed if(frame_index_selected!=-1) { if(current_frame==null) { Element new_frame = hitboxes_doc.createElement("Frame"); new_frame.setAttribute("num...
7
public int addSoundtrack(OggAudioHeaders audio) { if (w == null) { throw new IllegalStateException("Not in write mode"); } // If it doesn't have a sid yet, get it one OggPacketWriter aw = null; if (audio.getSid() == -1) { aw = ogg.getPacketWriter(); ...
3