text
stringlengths
14
410k
label
int32
0
9
public void paintComponent( Graphics g ) { super.paintComponent( g ); // call the base class constructor ArrayList<Double[]> points;// = new ArrayList<>(); points = getWalkway(); AffineTransform transform = new AffineTransform(); Double[] temp; Graphics2D g2d...
9
public static void inheritSuperclasses(Stella_Class renamed_Class) { { List parentclasses = List.newList(); Stella_Class.collectDirectSuperClasses(renamed_Class, parentclasses); if (!renamed_Class.multipleParentsP()) { { Stella_Class onlyparent = ((Stella_Class)(parentclasses.first())); ...
7
public void addSecond(ImgDate date) { String month = date.getMonth(); for(Object o : children) { if(o instanceof DateTreeHelper) { if(o.toString().equals(month)) { ((DateTreeHelper)o).children.add(date); return; } } } DateTreeHelper dth = new DateTreeHelper(month); add(dth); dth.chil...
3
public DBFiles (Collection<File> collection ){ this.dbFile = collection; }
0
public double getPropagationEnergyRoot(double energy_min, double energy_max) { System.out.println("ENTERING BISECTION in getPropagationEnergyRoot..."); double energy = (energy_min + energy_max) / 2; // double dprop = getPropagationValueLogDerivative(index, // energy); double dpro...
5
@Test public void testSetTipoInteres() { System.out.println("setTipoInteres"); float tipoInteres = 0.0F; Cuenta instance = new Cuenta(); instance.setTipoInteres(tipoInteres); // TODO review the generated test code and remove the default call to fail. fail("The test ca...
0
public static void main(String[] args) { Parameters.load(); Profiler.initialize(false); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); // System.setProperty("awt.useSystemAAFontSettings","on"); // System.setProperty("swing.aatext", ...
4
public ActiveActivities getActiveActivity() { return activeActivity; }
0
public void setAgeCategory(AgeCategories ageCategory) { this.ageCategory = ageCategory; }
0
private File createFile(final String fileName) { final File locFile = addCommand.getFileEndingWith(fileName); if (locFile == null) { // in case the exact match was not achieved using the // getFileEndingWith method // let's try to find the best match possible. ...
9
private static void indexDocs(String url) throws Exception { try { // Crawl links LinkParser lp = new LinkParser(url); URL[] links = lp.ExtractLinks(); if (links.length == 0 || shouldnotVisit(url)) { return; } indexed.add(url); for (URL l : links) { if ((!indexed.contains(l.toURI().toStr...
9
public void onScannedRobot(ScannedRobotEvent e){ if (e.getName() == Observer.TARGET){ robot.setTurnRight(e.getBearing()); } }
1
public String prox() { int sorteio = g.nextInt(100); int iCaso; for (iCaso = 0; iCaso < distribuicao.length; iCaso++) if (sorteio < distribuicao[iCaso]) break; ExpressaoGeradora caso = cartucho[iCaso]; String mtg = ""; ParteDeExpressa...
3
public void paint(Graphics g) { g.setColor(FONDO); g.fillRect(0, 0, ancho, alto); if(Ventana.getTab()!=null) { for (int i = 0; i < Tablero.filas; i++) { for (int j = 0; j < Tablero.columnas; j++) { switch (Tablero.tab[i][j]) { case 0: g.setColor(FONDO); break; case 1: g.s...
8
public void addTableListener(JTable table) { table.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { JTable source = (JTable) e.getSource(); int row = source.rowAtPoint(e.getPoint()); /* * show menu only on right click and if the click was made * in...
4
public ExerciseChooser(List<Exercise> new_exercises) throws BadInput { if (new_exercises.size() < 1) throw new BadInput("Must have at least one exercise to choose from!"); exercises = new_exercises; exercises.add(0, new QuitExercise()); for (Exercise ex : ex...
2
public void sql_lookup() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException { Class.forName("com.mysql.jdbc.Driver").newInstance(); Statement s = GUI.con.createStatement(); //CHANGE FUNCTION BASED ON HIERARCHY if(GUI.Level == 1) { s.executeQuery ("SELECT * FROM all...
6
public void exchange(int[] A,int i,int j){ if(i != j){ int var = A[i]; A[i] = A[j]; A[j] = var; } }
1
public static void main(String[] args) { if (args.length != 2) { System.out.println(USAGE); System.exit(0); } InetAddress addr = null; int port = 0; Socket sock = null; // check args[1] - the IP-adress try { addr = InetAddress...
9
@Test public void testManualStart() throws Exception { Thread.sleep( 5000L ); assertTrue( timedTask.getInvocationsTimedTaskA() == 0 ); scheduler.start(); Thread.sleep( 5000L ); assertTrue( timedTask.getInvocationsTimedTaskA() > 0 ); }
0
public static boolean isTerminal(char ch) { return !isVariable(ch); }
0
public String getDescription() { return description; }
0
public static void main(String[] args) throws Exception { if( args.length != 4) throw new Exception("Example d'appel : recepteur <numero_de_port_en_ecoute> <taille_de_fenetre> <fichier> <pourcentage_perte_segment>"); int port = Integer.parseInt(args[0]); if (port <= 1024) throw new Exception("Erreur : le ...
7
public String listDir() throws IOException{ String[] listGames = charDir.list(); String fileName = ""; if (listGames == null || listGames.length == 0) { fileName = "There are no saved games"; } else{ fileName = "*******Saved Games*******\n"; fo...
3
static final void method610(int i, int i_0_, int i_1_, int i_2_, byte b, int i_3_, int i_4_) { Class262_Sub11.method3175(i_2_, 111); anInt906++; int i_5_ = 0; int i_6_ = i_2_ + -i_4_; if (i_6_ < 0) { i_6_ = 0; } int i_7_ = i_2_; int i_8_ = -i_2_; int i_9_ = i_6_; if (b != -56) { method609((byt...
9
public void setMember(Member member) { this.member = member; }
0
@Override public void deserialize(Buffer buf) { id = buf.readUShort(); if (id < 0 || id > 65535) throw new RuntimeException("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < 0 || id > 65535"); status = buf.readByte(); if (status < 0) ...
5
public int size() { return e1 == null ? 0 : (e2 == null ? 1 : 2); }
2
private static void argsCommand(String[] args) { for(int i = 0; i < args.length; i++) { switch(args[i].toLowerCase()) { case "-ip": if(args[i + 1].trim().split(":").length == 2) { networkIP = args[i + 1].split(":", 2)[0].trim(); rmiPort = Integer.parseInt(args[i + 1].split(":", 2)[1...
7
private static String inputStreamToString(final InputStream inputStream) throws Exception { final StringBuilder outputBuilder = new StringBuilder(); try { String string; if (inputStream != null) { BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, ENCODING))...
3
public static Stella_Object argumentBoundTo(Stella_Object self) { { Surrogate testValue000 = Stella_Object.safePrimaryType(self); if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_PATTERN_VARIABLE)) { { PatternVariable self000 = ((PatternVariable)(self)); { Stella_Object value = (((Qu...
9
public void addHeaderRecord(String line) { if( !line.startsWith("@") ) throw new RuntimeException("Record type must start with '@'. Header line: " + line); // Add line lines.add(line); // Parse records SamHeaderRecord shr = null; if( line.startsWith("@SQ") ) shr = new SamHeaderRecordSq(line); if( shr !...
3
public String GrabLatest() { String Return = null; int i = 0; for(String Line : Log.toString().split(System.getProperty("line.separator"))) { if (i > Log.toString().split(System.getProperty("line.separator")).length) { i++; continue; } Return = Line; } return Return; }
2
public void changeTerrain(Terrain terrain) { Terrain oldTerrain = this.terrain; for (int i = 0; i < 2; i++) { for (Card card : this.duelists[i].deck.cards) { this.applyTerrain(oldTerrain, card, true); } for (Card card : this.duelists[i].hand.cards) { this.applyTerrain(oldTerrain, card, true); } ...
8
public static void method460(byte abyte0[], int j) { if(abyte0 == null) { Class21 class21 = aClass21Array1661[j] = new Class21(); class21.anInt369 = 0; class21.anInt370 = 0; class21.anInt371 = 0; return; } Stream stream = new Stream(abyte0); stream.currentOffset = abyte0.length - 18; Class21...
6
public static Integer getMaxJLPT() { if (JLPT0) return 0; if (JLPT1) return 1; if (JLPT2) return 2; if (JLPT3) return 3; if (JLPT4) return 4; if (JLPT5) return 5; else return 0; }
6
public int getBaud() throws ChannelException { try { return port.getBaudRate(); } catch (NullPointerException ex) { throw new ChannelException(ex); } }
1
public Object [][] getDatos(){ Object[][] data = new String[getCantidad_Cuentas ()][colum_names.length]; //realizamos la consulta sql y llenamos los datos en "Object" try{ if (colum_names.length>=0){ r_con.Connection(); String c...
5
public aos.jack.jak.logic.ChoicePoint getChoicePoint() { if (id != null) return id.getEnv().newChoicePoint(); if (warningCount != null) return warningCount.getEnv().newChoicePoint(); if (upload != null) return upload.getEnv()...
7
public TiedostonlukijaTest() { }
0
@Override public void keyPressed(KeyEvent e) { if(e.getSource().equals(iptf)) { if(e.getKeyCode() == KeyEvent.VK_ENTER) { connectToServer(); } } }
2
final public Unit Ctor(ClassUnit classUnit) throws ParseException { MethodUnit methodUnit = new MethodUnit(); Modifier modifier = null; List<Unit> formalArgs = null; Token t = null; String functionName = null; SimpleNode type = null; block_AST block = null; modifier = Modifier(); functionName = ID...
9
public static void main(String[] args){ MasterMindAI ai = new MasterMindAI(3); String code = "1357"; List<String> guessHistory = new ArrayList<String>(); List<String> feedbackHistory = new ArrayList<String>(); for (int i = 0; i < 10; i ++){ String guess = ai.generateGuess(); guessHistory...
1
public static Matrix readFromFile(String path, DataType dataType) throws MatrixIndexOutOfBoundsException { Matrix matrix = null; int rows; int cols; try { Scanner in = new Scanner(new FileReader(path)); rows = in.nextInt(); cols = in.nextInt(); ...
3
public void step() { if (animation == Animation.WALKING || animation == Animation.FALLING) { cycleCounter++; if (cycleCounter > 5) { cycleIndex = (cycleIndex + 1) % textures[animation.ordinal()].length; texture = textures[animation.ordinal()][cycleIndex]; cycleCounter = 0; } } else if (animatio...
9
public static <T, K extends Goliath.DynamicEnum> T createObject(Class<T> toClass, java.lang.Object[] taParams) throws Goliath.Exceptions.InvalidParameterException { // A Dynamic enum is a core part of the framework. Each enumeration class within a dynamic enum is a singleton, so is dealt with a...
9
public FileConfiguration load() { // Flush any pending save requests first to avoid losing any previous edits not yet committed if (this.isSaveQueued()) this.save(); // Use existing file this.config = YamlConfiguration.loadConfiguration(this.file); if (this.file.exists()) { ...
5
@Before public void setUp(){ Assert.assertNotNull(input); LinkedList<String> records = new LinkedList<String>(); try { FileReader reader = new FileReader(input); int read = reader.read(); while(read > -1){ StringBuilder sb = new StringBuilder(); while('\r' != (char)read && '\n' != (char)read ...
7
private int getX(Dimensions dim){ Face direction = surface.roomView.playerDirection; if (direction == Face.EASTERN){ if (ceiling){ return 100 - dim.getY(); } return dim.getY(); } if (direction == Face.SOUTHERN){ return 100 - dim.getX(); } if (direction == Face.WESTERN){ if (ceiling){ ...
5
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { int var11; for (boolean var6 = false; ((var11 = par1World.getBlockId(par3, par4, par5)) == 0 || var11 == Block.leaves.blockID) && par4 > 0; --par4) { ; } for (int var7 = ...
6
public float getMinValue() { if(!changeMin) return lastMin; changeMin = false; float minValue; minValue = matrix[0][0]; for(int i = 0; i < row; ++i) for(int j = 0; j < column; ++j) { if(matrix[i][j] < minValue) minValue = matrix[i][j]; } lastMin = minValue; return minValue; }
4
@Override public void run() { if (Updater.this.url != null) { // Obtain the results of the project's file feed if (Updater.this.read()) { if (Updater.this.versionCheck(Updater.this.versionName)) { if ((Updater.this.versionLi...
6
/* */ public PlayerState(CraftPlayer p) /* */ { /* 34 */ this.player = p; /* 35 */ this.inventory = p.getInventory().getContents(); /* 36 */ this.armor = p.getInventory().getArmorContents(); /* 37 */ this.hunger = p.getFoodLevel(); /* 38 */ this.health = p.getHealth(); /* 39 */ this.le...
3
public void drawWaveText(int color, String text, int x, int effectSpeed, int y) { // method386 if (text == null) { return; } x -= getANTextWidth(text) / 2; y -= trimHeight; for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (c != ' ') { drawChar(pixels[c], x + horizontalKerning...
3
@Override public ParseResult<T, List<T>> parse(LList<T> tokens) { LList<T> restTokens = tokens; for(T t : this.string) { // I believe it's safe to use Optional.get() here b/c // if the size is greater than 1, that means the Optional // *is* present if(restTokens.size() > 0 && this.comp.compare(t, rest...
3
private static int extract(final File file) { if(file==null || !file.exists()){ setError("error file " +file + " does not exist"); return -1; } String s = file.toString(); //s = s.substring(s.length()-3); if(s.toLowerCase().endsWith("cbz") ...
9
public JoinIterable(Iterable<T> outer, Iterable<TInner> inner, Selector<T, TKey> outerKeySelector, Selector<TInner, TKey> innerKeySelector, Joint<T, TInner, TResult> joint, Comparator<TKey> comparator) { this._outer = outer; this._inner = inner; this._innerKeySelector = innerKeySelector; this._outerKeySel...
0
public Allen() { super("Allen", 12000, 200, 50, 120, as); as.setSkill(0, "HaHa", 150, 60, "Allen laughs maniacally at his enemy."); as.setSkill(1, "Leap Attack", 600, 200, "Allen leaps into the air and lands on his enemy."); as.setSkill(2, "Crush", 1000, 300, "Allen crushes his enemy."); as.setSkill(3, "Avat...
0
public void updateDecreasedElement(E element) { int i = heap.indexOf(element); while (i > 0 && heap.get(parent(i)).compareTo(element) > 0) { swapElementsByIndex(i, parent(i)); i = parent(i); } }
2
public boolean skipPast(String to) throws JSONException { boolean b; char c; int i; int j; int offset = 0; int length = to.length(); char[] circle = new char[length]; /* * First fill the circle buffer with as many characters as are in the...
9
public synchronized Object put(Object pathSpec, Object object) { StringTokenizer tok = new StringTokenizer(pathSpec.toString(),__pathSpecSeparators); Object old =null; while (tok.hasMoreTokens()) { String spec=tok.nextToken(); if (!spec.s...
9
private void jButtonSuivActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSuivActionPerformed //Récupération de la méthode contrôleur 'suivant' ((CtrlVisiteurs)controleur).suivant(); }//GEN-LAST:event_jButtonSuivActionPerformed
0
protected OgexSkeleton toSkeleton( DataStructure ds, Map<BaseStructure, Object> index ) { OgexSkeleton result = new OgexSkeleton(); for( BaseStructure child : ds ) { if( StructTypes.TRANSFORM.equals(child.getType()) ) { // Not a normal transform float[][] arr...
5
public static void DoTurn(PlanetWars pw) { //notice that a PlanetWars object called pw is passed as a parameter which you could use //if you want to know what this object does, then read PlanetWars.java //create a source planet, if you want to know what this object does, then read Planet.java ...
8
@Override public GameState choose(Player player, GameState[] states, Card card) { for(GameState s : states) { s = findSetToTrue(s,card); } //If there's only one choice, we have no choice but to do it if(states.length == 1) { return states[0]; } int alpha = Integer.MIN_VALUE; int beta =...
4
public static void main(String[] args){ int op; System.out.println("=MENU DE OPÇÕES DO PROGRAMA="); System.out.println("1 - Criar Despesa"); System.out.println("2 - Criar Tipo Despesa"); System.out.println("3 - ....."); System.out.println("4 - Resgistar Despesa"); ...
0
@Override public ExecutionContext run(ExecutionContext context) throws InterpretationException { Value val1 = ((AbsValueNode) getChildAt(0)).evaluate(context); if (getChildAt(0) instanceof ThingVNode && val1.getType() == VariableType.ARRAYLIST) { if (((ArrayList<Value>) val1.getValue()...
3
static boolean WordSize() { //Remove words that are the wrongsize String i = JOptionPane.showInputDialog(null, "Please select word legnth (4 - 11)", JOptionPane.ERROR_MESSAGE); if (i.equals("4") || i.equals("5") || i.equals("6") || i.equals("7") || i.equals("8") || i.equals("9")) { System.out.println("[+] ...
6
private void btnUnionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUnionActionPerformed JFileChooser saveFile = new JFileChooser(); int selected = saveFile.showOpenDialog(this); if(selected == JFileChooser.APPROVE_OPTION){ String path = saveFile.getSelectedFile().getAbsoluteP...
7
public Aim getBestDirection(Tile tile) { int value = 0; int max = -100; omaArrayList<Aim> helpTable = new omaArrayList<Aim>(); omaArrayList<Aim> directions = getMovableDirections(tile); if (directions.size() == 0) { return null; } for (int i = 0; i < directions.size(); i++) { value = getMoveValue(ti...
5
public void generate() { System.out.println("Generate is called!"); set = Set.getSet(random.nextInt(Set.maxSets())); for (int i = 0; i < set.entities.length; i++) { Entity e = set.entities[i]; e.move(0, height + 10); spawnEntity(e, true, i); } }
1
public static void inorder(TreeNode root) { if (root == null) return; TreeNode previous = null; Stack<TreeNode> S = new Stack<TreeNode>(); S.push(root); while (!S.empty()) { //get current node from the stack TreeNode current = S.peek(); //going down the tree if (previous == null ...
9
private void back() { if (mUsePrevious || mIndex <= 0) { throw new IllegalStateException("Stepping back two steps is not supported"); //$NON-NLS-1$ } mIndex--; mCharacter--; mUsePrevious = true; mEOF = false; }
2
private void waitForThread() { if ((this.thread != null) && this.thread.isAlive()) { try { this.thread.join(); } catch (final InterruptedException e) { plugin.getLogger().log(Level.SEVERE, null, e); } } }
3
public void setInternalObject(Object internalObject) { this.internalObject = internalObject; }
0
public static ResultSet listeMetaDonneesParTitre(String titre) { Connection connexion; java.sql.Statement requete; ResultSet resultat = null; try { Class.forName("org.sqlite.JDBC"); connexion = DriverManager.getConnection("jdbc:sqlite:dbged"); requete = connexion.createStatement(); resultat = requet...
1
@Override public void configure(Configuration jobConf) { if (parameters == null) { ParameteredGeneralizations.configureParameters(this, jobConf); } try { if (inverseCovarianceFile.get() != null) { FileSystem fs = FileSystem.get(inverseCovarianceFile.get().toUri(), jobConf); Mat...
8
public boolean fileToArrayList(String fileName, ArrayList<String> listArr) { out.println("[+++]\tReading File (" + fileName + ")"); BufferedReader br = new BufferedReader(new InputStreamReader(FileReader.class.getResourceAsStream(fileName))); String line = ""; try { while( (line = br.readLine()...
2
private List<Gate> getAugGates() { List<Gate> res = new ArrayList<Gate>(); int gateNumber = 0; List<Gate> andGates = new ArrayList<Gate>(); /** * Add all the AND gates. We assume r is the 3rd input */ for (int i = 0; i < l; i++) { for (int x = 0; x < t_a; x++) { int leftWire = r + i + x; ...
5
@Override public iDriver orderBy(HashMap<String, String> fields) { if (fields.size() > 0) { String SQL = "ORDER BY "; int i = 0; for (Map.Entry<String, String> field : fields.entrySet()) { if (i > 0) SQL += ", "; SQL += field.getKey() + " " + ((field.getValue().equalsI...
4
@Override public void setValues(AnimatedScore target, int tweenType, float[] newValues) { switch(tweenType) { case ALPHA: target.setColor(target.getColor().r, target.getColor().g, target.getColor().b, newValues[0]); break; default: ...
1
private int getLeftPositionForRow(int rowNumber) { if (rowNumber == 0 || rowNumber == NUMBER_OF_ROWS - 1) { return CARD_DISPLAY_LEFT + cardWidth; } if (rowNumber == 1 || rowNumber == NUMBER_OF_ROWS - 2) { return CARD_DISPLAY_LEFT + cardWidth / 2; } return CARD_DISPLAY_LEFT; }
4
public String doLogin() { String destino = null; if (((dni == null) && (numeroColegiado == null)) || (password == null)) { FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, "No se ha indicado un DNI ó un número de colegiado o una contraseña", "")...
8
public final void performAStarDist(int start, int stop, JPFMap map){ //initialize if (map==null) return; Node node = new Node(null, start, map, stop); PriorityQueue<Node> open = new PriorityQueue<Node>(); //search & visualisation phase while(node.val != stop){ ...
7
public static long dateToJavaMilliS(int year, int month, int day, int hour, int min, int sec){ long[] monthDays = {0L, 31L, 28L, 31L, 30L, 31L, 30L, 31L, 31L, 30L, 31L, 30L, 31L}; long ms = 0L; long yearDiff = 0L; int yearTest = year-1; while(yearTest>=1970)...
4
@Override public void draw() {// draws to image int minX = Math.min(startX, endX); int minY = Math.min(startY, endY); int maxX = Math.max(startX, endX); int maxY = Math.max(startY, endY); int width = maxX - minX; int height = maxY - minY; Graphics2D g = (Graphics2D) canvas.getLayers()[canvas.getLayerS...
4
protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) { Raster source = sources[0]; Rectangle srcRect = source.getBounds(); int formatTag = MediaLibAccessor.findCompatibleTag(sources,dest); M...
9
public void testKeySetRemoveAllArray() { int element_count = 20; int[] keys = new int[element_count]; String[] vals = new String[element_count]; TIntObjectMap<String> map = new TIntObjectHashMap<String>(); for ( int i = 0; i < element_count; i++ ) { keys[i] = i + 1; ...
7
private Class<?> getTypeClass() { Class<?> clazz = (Class<?>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[1]; return clazz; }
3
void parseConditionalSect() throws java.lang.Exception { skipWhitespace(); if (tryRead("INCLUDE")) { skipWhitespace(); require('['); skipWhitespace(); while (!tryRead("]]>")) { parseMarkupdecl(); skipWhitespace(); ...
8
public void sendMessage(String cmsg) { ArrayList<Participant> participants = participantList.getParticipants(); Participant receiver; String msg; for(int k=0; k<participants.size(); ++k) { receiver = participants.get(k); if(receiver.isOnline()) { msg = JsonTools.createChatMessage(settings.getProperty(...
2
public BITalinoFrame[] read(final int[] analogChannels, final int totalBytes, final int numberOfSamples) throws BITalinoException { try { BITalinoFrame[] frames = new BITalinoFrame[numberOfSamples]; byte[] buffer = new byte[totalBytes]; byte[] ...
6
public static void main(String[] args) { final BlockingQueue queue = new ArrayBlockingQueue(3); for(int i=0;i<2;i++){ new Thread(){ @Override public void run(){ while(true){ try { Thread.sleep((long)(Math.random()*1000)); System.out.println(Thread.currentThread().getName() + "准备放...
5
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
public mxRectangle graphModelChanged(mxIGraphModel sender, List<mxUndoableChange> changes) { int thresh = getChangesRepaintThreshold(); boolean ignoreDirty = thresh > 0 && changes.size() > thresh; // Ignores dirty rectangle if there was a root change if (!ignoreDirty) { Iterator<mxUndoableChange> it =...
8
public LinkedList<TailStack<Integer>> search(int size) { LinkedList<TailStack<Integer>> mappers = new LinkedList<TailStack<Integer>>(); LinkedList<TailStack<Integer>> s = new LinkedList<TailStack<Integer>>(); s.push(new TailStack<Integer>()); LinkedList<Integer> allNums = new LinkedList...
7
public static Line closestPair(ArrayList<Point> xPoints, ArrayList<Shapes.Point> yPoints, ArrayList<Shapes.Point> aux, int left, int right, Line s0) { if (left >= right) { return new Line(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE); } int middle = ((right...
7
public void searchTimetable(Search search) { if (timetableURL == null) { System.err.println("ERROR: Timetable URL is null"); timetableResults = null; return; } String postDataString = generatePostDataString(search); String result = null; ...
4
private void loadModuleConfigs() { if (enableKits) { kitConfig = new KitConfig(main, MODULE_NAME_KITS); } if (enableGetPayed) { getPayedConfig = new GetPayedConfig(main, MODULE_NAME_GETPAYED); } if (enableTNTControl) { tntControlConfig = new TNTControlConfig(main, MODULE_NAME_TNT_CONTROL); } i...
7
@Override public void onLoad(OnLoadCallback pOnLoadCallback) throws Exception { final Font defaultFont32 = ResourceManager.getInstance().getDefaultFont32(); // Username this.mUserNameLabel = new Text(RegisterLayer.PADDING_DEFAULT, RegisterLayer.PADDING_DEFAULT * 4, defaultF...
9