text
stringlengths
14
410k
label
int32
0
9
public final static GameFrame getInstance(){ if (GameFrame.gameFrame==null){ synchronized(GameFrame.class){ if(GameFrame.gameFrame==null) { GameFrame.gameFrame= new GameFrame(); } } } return GameFrame.gameFrame; }
2
public boolean isFour() { boolean retBoo = false; if (isTrip()) { for (int i = 0; i < _cards.size()-3; i++) { for (int x = (i+1); x < _cards.size()-2; x++) { if (_cards.get(i).compareTo(_cards.get(x)) == 0) { for (int p = (x+1); p < _cards.size()-1; p++) { if (_cards.get(i).compareTo(_cards.get...
8
@Test public void runTestObfuscation1() throws IOException { InfoflowResults res = analyzeAPKFile("AndroidSpecific_Obfuscation1.apk"); Assert.assertEquals(1, res.size()); }
0
private void layoutTabComponents() { if (JTattooUtilities.getJavaVersion() >= 1.6) { if (tabContainer == null) { return; } Rectangle rect = new Rectangle(); Point delta = new Point(-tabContainer.getX(), -tabContainer.getY())...
5
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) { AGPlayer agp = pH.getAGPlayer(event.getPlayer().getName()); if(agp == null) return; if(agp.isPraying() && ConfigHandler.disableChatAndCommands) { Messenger.sen...
3
@Override public ArrayList<String> getNames(char firstLetter, String session, boolean indexPeople) { //create list to store the names ArrayList<String> speakerList = new ArrayList<>(); //loop through each member of specified session for (int i = firstLetter; i <= 'z'; i++) { ...
5
public static String SentenceTrim(String sentence){ String temp[]; if(sentence.indexOf("null")>-1){ temp=sentence.split("null"); sentence=""; for(int i=0;i<temp.length;i++){ sentence=sentence+temp[i]; } } if(sentence.indexOf("</p>")>-1){ temp=sentence.split("</p>"); sentence=""; f...
8
private GraphListener graphListener() { return new GraphListener() { private UmlDiagramListener[] listeners() { return umlDiagramListeners.toArray( new UmlDiagramListener[umlDiagramListeners.size()] ); } @Override public void itemRemoved( Graph source, GraphItem graphItem ) { if( graphItem instan...
4
public static ServerSocket ramdomAvailableSocket() { Random ran = new Random(); boolean accept = false; ServerSocket socket = null; while (!accept) { int x = ran.nextInt(9999); try { socket = new ServerSocket(x); accept = true; } catch (IOException e) { // TODO Auto-generated catch block ...
2
public void ResetPlayer() { raceWin = false; crashed = false; //place the car on the canvas x = random.nextInt(Framework.frameWidth - carImgWidth); y = (int) (Framework.frameHeight * 0.70); speedX = 0; speedY = 0; }
0
public static java.sql.Date utilDateToSqlDate(java.util.Date uneDate) { return (new java.sql.Date(uneDate.getTime())); }
0
@Override public void create(Object obj) throws OperacionInvalidaException { if (obj instanceof Vendedor) { Vendedor v = (Vendedor) obj; v.setIdentificacion(vendedores.size() + 1); vendedores.add(v); } else if (obj instanceof Mueble) { ...
8
public void init(){ generator = new Random(); playerList = new ArrayList<Entity>(); chargeTime = new double[10]; chargeCanceled = new boolean[10]; pushDelay = new double[10]; /*build trigonometry tables*/ double toRadian = Math.PI/(180*trigScale); //sine sin = new float[(90*trigScale) + 1]; ...
6
protected void loadFields(com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException { super.loadFields(__in, __typeMapper); __in.peekTag(); if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) { ...
9
float[] getBandFactors() { float[] factors = new float[BANDS]; for (int i=0, maxCount=BANDS; i<maxCount; i++) { factors[i] = getBandFactor(settings[i]); } return factors; }
1
public static void createTaxonomySpanningTree(TaxonomyGraph graph, TaxonomyNode node) { if (node.label != Stella.NULL_INTEGER) { return; } node.label = Stella.MARKER_LABEL; { TaxonomyNode maxparent = null; int maxparentvalue = Stella.NULL_INTEGER; { TaxonomyNode parent = null; ...
7
public void paintComponent(Graphics g) { super.paintComponent(g); if (!gameRunning && !deathScreen) { Main.background.paintComponent(g); Main.menu.paintComponent(g); } if (gameRunning && deathScreen) { g.setColor(Color.red); g.setFont(new Font("TimesRoman", Font.PLAIN, 40)); g.drawImage(Main.back...
9
final public void nestedSentence() throws ParseException { /*@bgen(jjtree) nestedSentence */ SimpleNode jjtn000 = new SimpleNode(JJTNESTEDSENTENCE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { jj_consume_token(LPAREN); ...
8
public MeasureKitString(DataStructures inData) { this.inData = inData; outData = new DataArrays<Integer[]>(); }
0
@Override public void handleInput() { if(Keys.isDown(Keys.W)) rect.getPosition().thisAdd(0,-1); if(Keys.isDown(Keys.S)) rect.getPosition().thisAdd(0,1); if(Keys.isDown(Keys.A)) rect.getPosition().thisAdd(-1,0); if(Keys.isDown(Keys.D)) rect.getPosition().thisAdd(1,0); if(Keys....
9
@Override public boolean equals(Object obj){ return this.toString().equals(((Fraction)obj).toString()); }
0
@Override public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String args[]) { if (args.length == 0) args = new String[]{"help"}; outer: for (BaseCommand command : plugin.commands.toArray(new BaseCommand[0])) { String[] cmds = command.name.split(" "); for (int i = 0; i < cmd...
5
public void playGame() throws Exception { Position updatedCell; while (!boardState.isGameOver()) { if (boardState.getTurn() == TicTacToeBoard.PLAYER_X) { updatedCell = playerX.getNextMove(boardState); if (isLegalPosition(updatedCell)) { boardState.setState(updatedCell.row, updatedCell.col, Ti...
6
public int getPort() { return _port; }
0
public static Direction getDirectionByLeeter(final char letter) throws NotValidDirectionException{ switch(letter){ case 'N' : return NORTH ; case 'E' : return EAST ; case 'W' : return WEST ; case 'S' : return SOUTH ; default : throw new NotValidDirectionException();//no valid direction } }
4
public void addParticleSprite(String spriteName, BufferedImage spriteImage) { if (spriteName == null || spriteImage == null) { throw new IllegalArgumentException("Cannot add a null sprite!"); } particleSprites.put(spriteName, spriteImage); }
2
public int compareTo(Gleitpunktzahl r) { if (this.vorzeichen == false && r.vorzeichen == true) return 1; if (this.vorzeichen == true && r.vorzeichen == false) return -1; int compabs = compareAbsTo(r); if (!this.vorzeichen) return compabs; else return -compabs; }
5
private void insertion(String value, String[] oldNode, Node root){ if(oldNode.length > 2){ if(oldNode[2].equals(root.getValue())){ List<Node> children = root.getChildren(); if(oldNode[0].equals(children.get(1).getValue()) && oldNode[1].equals(children.get(0).getValue()) ){ root.setValu...
5
public void rotate(RotationState state) { if (state != RotationState.TurningLeftDrifting && state != RotationState.TurningRightDrifting) { angularVelocity += angleIcrement * .1; if (angularVelocity > maxAngularVel) { ang...
8
float clutching(SensorModel sensors, float clutch) { float maxClutch = clutchMax; // Check if the current situation is the race start if (sensors.getCurrentLapTime()<clutchDeltaTime && getStage()==Stage.RACE && sensors.getDistanceRaced()<clutchDeltaRaced) clutch = maxClutch; // Adjust the cur...
7
static Map<String, Object> convert(Map<String, Object> m) { LinkedHashMap<String, Object> hm = new LinkedHashMap<String, Object>(); Set<Entry<String, Object>> entrySet = m.entrySet(); for (Entry<String, Object> entry : entrySet) { String key = entry.getKey(); key = key.re...
1
public int getClaveles() { return claveles; }
0
private static boolean createImageFile(BufferedImage image) { String name = JOptionPane.showInputDialog("please enter file name."); File f = new File(filesys.getHomeDirectory() + "/Desktop/" + name); if (name == null) return false; if (!f.exists() && name != null) try { ImageIO.write(image, "jpg", f); ...
9
public void step() { boolean[][] newGrid = new boolean[height][width]; // Iterate through all cells for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { // Implement rules boolean cell = grid[y][x]; int aliveNeighbours = getAliveNeighbours(x, y); ...
6
private void getTextFromFields(){ for(int j = 0;j < repository.size();j++){ redQueryList.get(j).clear(); greenQueryList.get(j).clear(); blueQueryList.get(j).clear(); redQueryStrings.get(j).clear(); greenQueryStrings.get(j).clear(); blueQueryStrings.get(j).clear(); } for(int i = 0;i < repository....
8
public static void main(String[] args) throws Exception { String inputPath = "./data/training.txt"; if(args.length > 0){ inputPath = args[0]; } List<String> lines = FileUtils.readLines(new File(inputPath)); long start = System.currentTimeMillis(); for (int ...
4
public static void main(String[] args) { System.out.print("Enter the number of lines: "); Scanner scan = new Scanner(System.in); int num = scan.nextInt(); int noOfGap = num - 1; int index = 1; for (int hrLine = 1; hrLine <= num - 1; hrLine++) { for (int gap = 0; gap < noOfGap; gap++) { System.out.pr...
6
public static String drawRequirementElement(RequirementElement target, RequirementElement reference, String direction) throws ScriptException { // customized parameters String layer = target.getLayer(); double x = 0, y = 0; String position = ""; if (direction.equals("up")) { x = reference.origin_x; ...
9
public int func_27371_a(StatCrafting par1StatCrafting, StatCrafting par2StatCrafting) { int var3 = par1StatCrafting.getItemID(); int var4 = par2StatCrafting.getItemID(); StatBase var5 = null; StatBase var6 = null; if (this.slotStatsItemGUI.field_27271_e == 0) { ...
8
private static void findC(int[][] points, int start, int end) { int firstQ = 0, secondQ = 0, thirdQ = 0, fourthQ = 0; for (int i = start; i <= end; i++) { boolean posX, posY; posX = numChangesX[i]; posY = numChangesY[i]; if (posX && posY) firstQ++; else if (!posX && posY) secondQ++; else ...
7
public SaveGraphPNGAction(Environment environment, JMenu menu) { super("Save Graph as PNG", null); this.environment = environment; this.myMenu = menu; }
0
public void actualizarListaProd() { abrirBase(); tablaProd.setRowCount(0); prodlista = Articulo.where("codigo like ? or descripcion like ?", "%" + textCodProd.getText() + "%", "%" + textCodProd.getText() + "%"); Iterator<Articulo> it = prodlista.iterator(); while (it.hasNext()) {...
6
List<List<Integer>> traverse(Graph g) { int startVertex = 0; List<List<Integer>> connectedComponents = new ArrayList<List<Integer>>(); while(startVertex != ALL_VISITED) { PriorityQueue<Integer> queue = new PriorityQueue<Integer>(g.vcount()); queue.add(startVertex); List<Integer> connectedGraph ...
4
public void process(ShipGame game) { Ship enemy = new Ship(); enemy.name = "Enemy"; while(enemy.hp > 0 && ship.hp > 0){ int enemyAtt = game.random.nextInt(35); int playerAtt = game.random.nextInt(30); int enemyDef = game.random.nextInt(10); int playerDef = game.random.nextInt(15); int enemy...
5
public void turn() { if(x > goalX && dir != Direction.WEST) { this.setDirection(Direction.WEST); }else if(x < goalX && dir != Direction.EAST) { this.setDirection(Direction.EAST); }else if(y > goalY && dir != Direction.NORTH) { this.setDirection(Direction.NORTH); }else if(y < goalY && dir != Direction.S...
8
public void colorChanged(WorldMapObject o, Color c) { core.Point pos = p2o.get(o); System.out.println("color changed: "+o+", "+c.name+", "+pos); //if (ready) { try { mapWidget.objectAt(pos.y, pos.x).setLayer(0, new gui.WidgetImage(c.mfFile)); } catch (java.lang.NullPointerException e) {} //} }
1
public void setjSeparator1(JSeparator jSeparator1) { this.jSeparator1 = jSeparator1; }
0
public void randomCoords(){ Random rnd = new Random(); // Find a random starting y coordinate int x = rnd.nextInt(660); x += 20; this.yCoord = x; // Find a random speed x = rnd.nextInt(5); x += 1; this.speed = x; // random...
2
private VariablePrecisionTime getVorbisReleaseDate() { return vorbisDate(false); }
0
private static boolean matchesAttribute( final boolean html, final SelectorElementBuffer elementBuffer, final String attrName, final MarkupSelectorItem.AttributeCondition.Operator attrOperator, final String attrValue) { boolean found = false; for (int i = 0; i < elementBuffer.at...
7
public void setDocument(IDocument document) { fDocument = document; }
0
public void testToStandardDays_overflow() { Duration test = new Duration((((long) Integer.MAX_VALUE) + 1) * 24L * 60L * 60000L); try { test.toStandardDays(); fail(); } catch (ArithmeticException ex) { // expected } }
1
public void setTemp(long t) { sa.temps[sa.stable][indexI][indexJ] = t; sa.temps[sa.updating][indexI][indexJ] = t; }
0
public static void main(String[] args) { new Menu(); }
0
public void updateSeekMax(Track t) { String lengthString = (String) t.get("length"); if(lengthString != null && lengthString instanceof String) { try { double length = Double.parseDouble(lengthString); seek_slider.setMax(length); seek_slider.s...
3
public static String getTableNameBySql(Cg cg){ String tableName = null; String tableSql = formartSql(cg.getTableSql()); if(tableSql!=null && tableSql.trim().length()>0){ try{ // tableSql=tableSql.replaceAll("--.*\r\n","\r\n"); String[] strs = tableSql.split("\r\n"); if(strs!=null && strs.len...
7
private void recursiveScanDir(String relativePath, File dirOrFile, List<LessFileStatus> lstAddedLfs) { if (dirOrFile.isDirectory()) { File[] subf = dirOrFile.listFiles(); if (subf != null) { for (File current : subf) { String subRelPath = relativePath.isEmpty() ? current.getName() : relativePath + '/' ...
5
@Override public void annulerTransaction() throws SQLException { getConnexion().rollback(); // getConnexion().setAutoCommit(true); }
0
static public BigDecimal calculateMultiItemPrice(Class<? extends Item> genericItem) { BigDecimal price = BigDecimal.ZERO; Item item = getItem(genericItem); if (item.isMultiItem()) { Map<Class<? extends Item>, BigDecimal> prices = new HashMap<Class<? extends Item>, BigDecimal>(); ...
6
public void endMove(int column, int row) { if (checkWin(playingField, column, row)) { VierGewinntAi.mainGUI.showWinMessage(); gameEnd = true; return; } if (checkFull()) { VierGewinntAi.mainGUI.showFullMessage(); gameEnd = true; ...
5
@Override public boolean equals(Object object) { if (!(object instanceof DescricaoPreco)) { return false; } DescricaoPreco other = (DescricaoPreco) object; if ((this.getCodigo() == null && other.getCodigo() != null) || (this.getCodigo() != null && !this.getCodigo().equals...
5
public void SendFileCommand() { if(running==false || paused==true || fileOpened==false || isConfirmed==false || linesProcessed>=linesTotal) return; String line; do { // are there any more commands? line=gcode.get((int)linesProcessed++).trim(); //previewPane.setLinesProcessed(linesProcessed); //s...
8
public String toString() { if (this.title != null && this.year != null) { return String.format("%s (%s)", this.title, this.year); } else { return ""; } }
2
public String getSql() { StringBuffer sbSql = new StringBuffer(); if (tableName != null && tableName.length() > 0) { sbSql.append(" " + tableName); if (tableNode != null) { switch (joinOperate) { case LeftJoin: sbSql.append(" left join "); break; case RightJoin: sbSql.append(" right...
8
public void setDollar(Dollar dollar) { this.dollar = dollar; }
0
protected void splitNextLargeSublist() { if (smallSublistCount < sublists.size()) { if (sublists.isFull()) { sublists = copyTo(sublists, new FixedListInternal<CircularListInternal<T>>( sublists.capacity() << 1)); } int firstLargeSubli...
6
void setCellFont () { if (!instance.startup) { textNode1.setFont (1, cellFont); imageNode1.setFont (1, cellFont); } /* Set the font item's image to match the font of the item. */ Font ft = cellFont; if (ft == null) ft = textNode1.getFont (1); TableItem item = colorAndFontTable.getItem(CELL_FONT); Im...
3
private void close(Connection conn, Statement stmt, ResultSet rs) { try { if (rs != null) { rs.close(); } if (stmt != null) { stmt.close(); } if (conn != null) { conn.close(); } } catch (Exception e) { System.out.println("Erro ao fechar conexao."); e.printStackTrace(); } }
4
public static void main(String[] args) { //Define spaceing int space = 21; int leftSpace = 0; //define starting numbers int left = 1; int right = 1; //first loop for top of the x while (space >= 0) { //Printing out the correct amount of leftspace for (int i = 1; i <= leftSpace; i++) { System...
7
public SetupApplication(String androidJar, String apkFileLocation) { this.androidJar = androidJar; this.apkFileLocation = apkFileLocation; }
0
public String salvarTicket() { Ticket ticket = new Ticket(); ticket.setIdTicket(idTicket); ticket.setTitulo(titulo); ticket.setSistema(sistema); ticket.setComponente(componente); ticket.setDescricao(descricao); ticket.setOperador(operador); ticket.setStatu...
7
public long getRandom() { final Random r=new Random(); final int roomCount=size(); if(roomCount<=0) return -1; final int which=r.nextInt(roomCount); long count=0; for(int i=0;i<intArray.length;i++) { if((intArray[i]&NEXT_FLAG)>0) count=count+1+(intArray[i+1]-(intArray[i]&INT_BITS)); else ...
9
List<Score> matchCoupleChainFind(Map<Person, List<Score>> table, Person start, int limit){ if (!table.containsKey(start)) { return Collections.EMPTY_LIST; } List<Score> path = new LinkedList<>(); HashSet<Person> set = new HashSet<>(); Person next = start; whil...
5
private static synchronized DateFormat getDf() { if (df == null) { df = new SimpleDateFormat("HH:mm:ss.SSS"); } return df; }
1
@Override public Object execute(HttpServletRequest request, HttpServletResponse response) throws Exception { Contexto oContexto = (Contexto) request.getAttribute("contexto"); oContexto.setVista("jsp/alumno/list.jsp"); try { AlumnoDao oAlumnoDao = new AlumnoDao(oContexto.getEnumTi...
2
public static void main(String[] args) { String t = ""; int ejercicio = 0; BufferedReader s = new BufferedReader(new InputStreamReader(System.in)); while (true) { try { System.out.println("Introduce el numero de ejercicio que quieras comprobar. [1 - 2]. 0 para salir"); t = s.readLine(); ejercici...
5
public static void main(String[] args) { Scanner scn = new Scanner(System.in); int q = scn.nextInt(); for (int i = 1; i <= q; i++) { int a = scn.nextInt(); int b = scn.nextInt(); int c = scn.nextInt(); System.out.println("Case " ...
9
void parsePCData() throws java.lang.Exception { char c; // Start with a little cheat -- in most // cases, the entire sequence of // character data will already be in // the readBuffer; if not, fall through to // the normal approach. if (USE_CHEATS) { ...
9
public void randAlgo(){ int cnt = 0; Random rand = new Random(); while(cnt < 25){ int a = rand.nextInt(100); if(cnt == 0){ randlist[cnt] = a; cnt++; } else{ if(isExist(a, cnt)){ randlist[cnt] = a; cnt++; } } } }
3
private void delete(User user){ for (int i = 0; i < userList.size(); i++){ if (userList.get(i).getName().equals(user.getName())){ userList.remove(i); } } }
2
protected void clearTile(Tile t){ for (Item i : t.getInventory()){ t.removeItem(i); } if (t.removeCharacter() instanceof Player){ playerTile = null; } }
2
@FXML private void jacobiResultClick(MouseEvent me) { int curMethod = 1; if (me.getButton().equals(MouseButton.PRIMARY)) { if (coef == null || free == null || results[curMethod] == null) { return; } if (curMode[curMethod]) { curMode[curMethod] = false; jacobiResult.setText(VECTOR + results[cur...
5
public void renderEntities() { Entity entity; for (int i = 0; i < this.theWorld.loadedEntityList.size(); i++) { entity = this.theWorld.loadedEntityList.get(i); if (!entity.getEntityName().equals("Player")) { if (RenderHelper.isOnSc...
4
public void modifyProfile(Line profile) { DataLine rq = new DataLine(); rq.setAPI("user.modify_profile"); try { if (profile.getString("name") != null) rq.set("name", profile.getString("name")); if (profile.getString("twitter") != null) rq.set("twitter", profile.getString("twitter")); if (profile....
8
public static void main(String[] args) throws Exception { File uniDir = new File(args[args.length - 7]); File triDir = new File(args[args.length - 6]); File s1Uni = new File(args[args.length - 5]); File s1Tri = new File(args[args.length - 4]); File s2Uni...
5
private int getFailPosition(Pattern pattern, String input) { for (int i = 0; i <= input.length(); i++) { Matcher matcher = pattern.matcher(input.substring(0, i)); if (!matcher.matches() && !matcher.hitEnd()) { return i - 1; } } return input.len...
3
@RequestMapping(value = "updateRoleAuth", method = RequestMethod.POST) @ResponseBody public Object updateRoleAuth( @RequestParam int roleId, @RequestParam int[] menuIds ) { Map<String, Object> map = new HashMap<>(); Role role = roleService.getById(roleId); Li...
3
public void merge(int A[], int m, int B[], int n) { int a = m - 1; int b = n - 1; for(int i = m + n -1; i >= 0; i--){ if(a >= 0 && b < 0) break; if(a < 0 && b >= 0){ A[i] = B[b--]; continue; } if(a >= 0 && b >= 0){ if(A[a] > B[b]) A[i] = A[a--]; else A...
8
private void updateCurrentLogFile() { // get the log file name from the file system File logFolder = new File(slateComponent.getLogDirectoryName()); File[] listOfLogFiles = logFolder.listFiles(); numLogFiles = listOfLogFiles.length; if (numLogFiles == 0) { return; } if ((RotationParadigm.Boun...
9
private static void testInvalidNode(ListNode p) { System.out.println("p.isValidNode() should be false: " + p.isValidNode()); try { p.item(); System.out.println("p.item() should throw an exception, but didn't."); } catch (InvalidNodeException lbe) { System.out.println("p.item() should throw...
7
public void update() { if(!active) { if(Math.abs(player.getX() - x) < GamePanel.WIDTH) active = true; return; } // check if done flinching if(flinching) { flinchTimer++; if(flinchTimer == 6) flinching = false; } getNextPosition(); checkTileMapCollision(); calculateCorners(x, ydest +...
7
public boolean Benutzernameaendern(String betroffenerBenutzer, String neuerBenutzername) { Benutzer benutzer = dbZugriff.getBenutzervonBenutzername(betroffenerBenutzer); if (benutzer != null){ try{ benutzer.setBenutzername(neuerBenutzername); return true; } catch (SQLException e){ System.out.p...
2
public JPanel getjPanelTitre() { return jPanelTitre; }
0
public void tick() { if ((this.runOnTick) && (isVisible())) { ImageComponent[] arrayOfImageComponent = getImageComponents(); int i = 0; int j = 0; for (int k = 0; k < arrayOfImageComponent.length; k++) { if (!(arrayOfImageComponent[k] instanceof AnimationComponent)) con...
7
@Test public void testLoadGame() { //There MUST be a "testsave.xml" file in the saves/ folder for this to pass. try { int id = games.loadGame("testsave"); boolean condition = false; if(id == games.listGames().size()-1){ condition = true; } else condition = false; assertTrue("Loaded game corr...
2
@SuppressWarnings({ "rawtypes", "unchecked" }) public Newlevel() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } setTitle("New Level"); setBounds(100, 100, 321, 309); getContentPane().setLayout(new BorderLayout()); contentP...
8
private void drawHand() { // the x and z offset from the center-top point of the palm of the hand float[][] fingers = new float[][] { { -2*(this.hand[Y]/3), this.hand[Z]/1.5f }, // pinky :D { -this.hand[Y]/4.5F,...
2
public boolean globtype(char ch, java.awt.event.KeyEvent ev) { if (ch == '\n') { wdgmsg("make", ui.modctrl ? 1 : 0); return (true); } return (super.globtype(ch, ev)); }
2
public Muodostelma kloonaa(){ ArrayList<Palikka> kloonipalikat = new ArrayList<Palikka>(); for (int i = 0; i < this.palikat.size(); i++){ kloonipalikat.add(palikat.get(i).kloonaa()); } return new Muodostelma(this.muoto, this.peli, kloonipalikat); }
1
public static void initializeDB(Library myLibrary){ Statement statement; PreparedStatement pStatement; String query; try { Connection conn = getConnection(); conn.setAutoCommit(false); query = "TRUNCATE TABLE item"; statement = conn.create...
4