query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Update the map and display on the screen
public int[] updateMap() { int[] isObstacle = super.updateMap(); smap.setMap(map); return isObstacle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void refreshMapInformation() {\n\t\t((JLabel)components.get(\"timeElapsedLabel\")).setText(Integer.toString(ABmap.instance().getTimeElapsed()));\n\t\t((JLabel)components.get(\"oilInMapLabel\")).setText(Integer.toString(ABmap.instance().getOilInMap()));\n\t\t((JLabel)components.get(\"oilInStorageLabel\")).setText(Integer.toString(ABmap.instance().getOilInStorage()));\n\t\t((JProgressBar)components.get(\"oilCleanedProgressBar\")).setValue(100-((ABmap.instance().getOilInMap()*100)/ABmap.instance().initialOilCount));\n\t\t((JLabel)components.get(\"fuelUsedLabel\")).setText(Integer.toString(ABmap.instance().getFuelUsed()));\n\t\t((JLabel)components.get(\"simCompletedLabel\")).setText(Boolean.toString(ABmap.instance().isDone()));\n\t}", "public void updateMap(boolean animate) {\n\t\tgetContentPane().add(mapContainer);\n\t\trevalidate();\n\t\t\n\t\t// Setting up map\n\t\tint width = mapContainer.getWidth();\n\t\tint height = mapContainer.getHeight();\n\t\tBufferedImage I = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2d = I.createGraphics();\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\t// Setting up map dimensions\n\t\tdouble xM = width*zoom, yM = height*zoom;\n\t\tdouble xL = Math.abs(mapBounds[1]-mapBounds[3]), yL = Math.abs(mapBounds[0]-mapBounds[2]);\n\t\tdouble xI = (xM-(yM-60)*(xL/yL))/2, yI = 30;\n\t\tif(xM/yM < xL/yL) {\n\t\t\txI = 30;\n\t\t\tyI += (yM-(xM-60)*(yL/xL))/2;\n\t\t}\n\t\tdouble yP = yM*yF-yM/zoom/2, xP = xM*xF-xM/zoom/2;\n\t\t\n\t\tg2d.setColor(Color.white);\n\t\tg2d.fillRect(20, 20, width-40, height-40);\n\t\tg2d.setColor(roadColor);\n\t\tg2d.setStroke(new BasicStroke(roadWidth));\n\t\t\n\t\t// Drawing each road\n\t\tint i, n = G.getSize();\n\t\tdouble[] v1, v2;\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tfor(Edge e : G.getEdges(i)) {\t\t\t\t\n\t\t\t\tv1 = V.get(i);\n\t\t\t\tv2 = V.get(e.next);\n\t\t\t\tif(animate)\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 0, g2d);\n\t\t\t\telse {\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], (int)(v1[2]*v2[2]), g2d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Drawing each path\n\t\tif(animate) {\n\t\t\tn = P.size()-1;\n\t\t\tfor(i = 0; i < n; i++) {\n\t\t\t\t\n\t\t\t\tv1 = V.get(P.get(i));\n\t\t\t\tv2 = V.get(P.get(i+1));\n\t\t\t\t\n\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 1, g2d);\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\t\t\trevalidate();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Creating image base\n\t\tg2d.setStroke(new BasicStroke(1));\n\t\tg2d.setColor(Color.lightGray);\n\t\tg2d.fillRect(0, 0, width, 20);\n\t\tg2d.fillRect(0, 0, 20, height);\n\t\tg2d.fillRect(width-20, 0, 20, height);\n\t\tg2d.fillRect(0, height-20, width, 20);\n\t\tg2d.setColor(Color.black);\n\t\tg2d.drawRect(20, 20, width-40, height-40);\n\t\tg2d.setFont(titleFont);\n\t\tg2d.drawString(title, 40, 15);\n\t\tint tw = g2d.getFontMetrics().stringWidth(title);\n\t\tg2d.setFont(subtitleFont);\n\t\tg2d.drawString(subtitle, 50+tw, 15);\n\t\t\n\t\t\n\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\trevalidate();\n\t}", "private void updateMap(){\n mMap.clear();\n // this instruction clears the Map object from the other object, it's needed in orther to display\n //the right current geofences without having the previous ones still on screen\n\n mOptions.setOption(mOptions.getOption().center(circle.getCenter()));\n mOptions.setOption(mOptions.getOption().radius(circle.getRadius()));\n\n\n circle=mMap.addCircle(mOptions.getOption());//i need to add again the user circle object on screen\n\n //TODO have to implement settings\n //set markers based on the return objects of the geoquery\n for (int ix = 0; ix < LOCATIONS.length; ix++) {\n mMap.addMarker(new MarkerOptions()\n .title(LOCATIONS[ix].getExplaination())\n .snippet(\"TODO\")\n .position(LOCATIONS[ix].getPosition()));\n }\n }", "void updateMap(MapData map);", "public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }", "public void update()\r\n {\n for (MapObject mo : gameData.getMap().getObjects())\r\n {\r\n mo.getAI().advance();\r\n }\r\n \r\n // update the UI\r\n for (UIElement uiEl : ui.getUIElements())\r\n {\r\n uiEl.update();\r\n }\r\n\r\n // Move the map objects\r\n movHandler.moveObjects();\r\n\r\n // Refresh the screen position\r\n Player player = gameData.getPlayer();\r\n this.centerScreen((int) player.getX() + Tile.TILESIZE / 2, (int) player.getY() + Tile.TILESIZE / 2);\r\n }", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "void setMapChanged();", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void repaintMap() {\r\n\t\tpolygonMap.repaint();\r\n\t}", "void display(Map m) {\r\n\t\tm.tour = this;\r\n\t\tm.update(m.getGraphics());\r\n\t}", "private void UpdateMap(){\n Log.d(\"data\", lati + \" \" + longi );\n// sydney = new LatLng(lati, longi);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "public void updateMapGrid() {\n char[][] map = controller.getPopulatedMap();\n\t if (mapGrid == null) {\n mapGrid = new MapGrid(map.length, map[0].length, ICON_SIZE);\n }\n mapGrid.insertCharMap(map);\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }", "private void refreshMapAndFrame()\n\t{\n\t\tMapAccess.refresh();\n\t\tFrameMap.refresh();\n\t}", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "public void update()\n\t{\n\t\tGViewMapManager gViewMapManager = this.guiController.getCurrentStyleMapManager();\n\t\tLayout layout = gViewMapManager.getLayout();\n\n\t\tswitch (layout)\n\t\t{\n\t\t\tcase LINEAR:\n\t\t\t\tthis.linear.setSelected(true);\n\t\t\t\tbreak;\n\t\t\tcase CIRCULAR:\n\t\t\t\tthis.circular.setSelected(true);\n\t\t\t\tbreak;\n default:\n break;\n\t\t}\n\t}", "public void update() {\n\n\t\tdisplay();\n\t}", "private void update() {\n\t\ttheMap.update();\n\t\ttheTrainer.update();\n\t}", "public void showMap(boolean isEnd) {\n\t\t// Map shown inbetween games. Works by grabbing the system time in milliseconds,\n\t\t// adding 5000, and then counting down 1 second every second. Effectively keeping\n\t\t// the map screen up for 5 seconds.\n//\t\tif(legnum == 4) {\n//\t\t\treplay = new JButton(\"Replay\");\n//\t\t\treplay.setSize(frameWidth*5/100, frameHeight*5/100);\n//\t\t\tif(isOsprey) {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*30/100, frameHeight/2);\n//\t\t\t}\n//\t\t\telse {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*15/100, frameWidth/2);\n//\t\t\t}\n//\t\t\tframe.add(replay);\n//\t\t}\n\t\tlong tEnd = System.currentTimeMillis();\n\t\tframe.setVisible(true);\n\t\tlong tStart = tEnd + 3*1000;\n\t\twhile(tStart > tEnd) {\n\t\t\ttStart -= 1000;\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void paint()\n {\n try { Thread.sleep(SPEED); } \n catch (Exception e) { }\n \n this.printMap();\n }", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void onMapLoaded() {\n mMapStatus = new MapStatus.Builder().zoom(9).build();\n mBaiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(mMapStatus));\n }", "public void showmap() {\n MapForm frame = new MapForm(this.mapLayout);\n frame.setSize(750, 540);\n frame.setLocationRelativeTo(null);\n frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n frame.setVisible(true);\n }", "protected void showNotify () {\n if (timer != null) {\n timer.cancel ();\n }\n\n timer = new Timer ();\n timer.schedule (new updateTask (), 500, 500);\n cityMap.addMapListener (this);\n }", "@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}", "public void displaymap(AircraftData data);", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "public void updateLocation();", "public void updateMap(TileMap tileMap){\n\t\tthis.tileMap = tileMap;\n\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n drawGokongweiBuilding();\n getContinuousLocationUpdates();\n }", "public void paint()\n {\n try { Thread.sleep(SPEED); } \n catch (Exception e) { }\n \n this.printMap();\n }", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "@Override\n public void onMapLoaded() {\n mMap.animateCamera(cu);\n\n }", "public void notifyMapLoaded();", "private void updateMap(final PlayerVision vision){\r\n\t\tint i, y, x;\n\t\t\n\t\t// add the current point to the map\n\t\taddToMap(east, north, vision.CurrentPoint);\n\t\t\n\t\t// add everything west to the map\n\t\tfor (i = 0; i < vision.mWest; i++){\n\t\t\tx = east - i - 1;\r\n\t\t\t\n\t\t\taddToMap(x, north, vision.West[i]);\n\t\t}\r\n\t\t\r\n\t\t// add everything east to the map\n\t\tfor (i = 0; i < vision.mEast; i++){\n\t\t\tx = east + i + 1;\r\n\t\t\t\n\t\t\taddToMap(x, north, vision.East[i]);\n\t\t}\r\n\t\t\r\n\t\t// add everything north to the map\n\t\tfor (i = 0; i < vision.mNorth; i++){\n\t\t\ty = north + i + 1;\r\n\t\t\t\n\t\t\taddToMap(east, y, vision.North[i]);\n\t\t}\r\n\t\t\n\t\t// add everything south to the map\n\t\tfor (i = 0; i < vision.mSouth; i++){\n\t\t\ty = north - i - 1;\r\n\t\t\t\n\t\t\taddToMap(east, y, vision.South[i]);\n\t\t}\r\n\t\t\n\t}", "@Override\n public void update(){\n getNextPosition();\n checkTileMapCollision();\n setPosition(xtemp, ytemp);\n animation.update();\n }", "private void drawComponents () {\n // Xoa het nhung gi duoc ve truoc do\n mMap.clear();\n // Ve danh sach vi tri cac thanh vien\n drawMembersLocation();\n // Ve danh sach cac marker\n drawMarkers();\n // Ve danh sach cac tuyen duong\n drawRoutes();\n }", "public void refresh() {\n if (mMarkerView != null) {\n mMarkerView.setLatLng(GeoJSONUtils.toLatLng(mCoordinate));\n }\n }", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "@Override\n public void notifyMapObservers() {\n for(MapObserver mapObserver : mapObservers){\n // needs all the renderInformation to calculate fogOfWar\n System.out.println(\"player map: \" +playerMap);\n mapObserver.update(this.playerNumber, playerMap.returnRenderInformation(), entities.returnUnitRenderInformation(), entities.returnStructureRenderInformation());\n entities.setMapObserver(mapObserver);\n }\n }", "@Override\n public void onMapLoaded() {\n mGoogleMap.animateCamera(cu);\n }", "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getLocationInfo();\n setUpMap(mMap);\n //drawPath(googleMap, pathString);\n }", "public void updateLocation()\r\n {\r\n\t\timg.setUserCoordinator(latitude, longitude);\r\n\t\timg.invalidate();\r\n\t}", "@Override\n public void displayMapTiles(MapTile[][] grid)\n {\n Platform.runLater(() -> {\n MapView mapArea = gui.getMapArea();\n mapArea.displayMapGrid(grid, -3, -3);\n });\n }", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "@Override\n\tpublic void mapInitialized() {\n\t\tfinal LatLong center = new LatLong(32.777, 35.0225);\n\t\tSystem.out.println(\"got here\");\n\t\tmapComponent.addMapReadyListener(() -> checkCenter(center));\n\t\t// lblClick.setText((center + \"\"));\n\t\tfinal MapOptions options = new MapOptions();\n\t\toptions.center(center).zoom(12).overviewMapControl(false).panControl(false).rotateControl(false)\n\t\t\t\t.scaleControl(true).streetViewControl(true).zoomControl(true).mapType(MapTypeIdEnum.ROADMAP);\n\n\t\tmap = mapComponent.createMap(options, false);\n\t\tmap.setHeading(123.2);\n\t\tmap.fitBounds(new LatLongBounds(center, new LatLong(32.779032, 35.024663)));\n\t\tmap.addUIEventHandler(UIEventType.click, (final JSObject obj) -> {\n\t\t\tLatLong newLat = new LatLong((JSObject) obj.getMember(\"latLng\"));\n\t\t\tnewLat = new LatLong(newLat.getLatitude(), newLat.getLongitude());\n\t\t\tlblClick.setText(newLat + \"\");\n\t\t\tmap.addMarker(createMarker(newLat, \"marker at \" + newLat));\n\t\t});\n\t\tmapTypeCombo.setDisable(false);\n\n\t\tmapTypeCombo.getItems().addAll(MapTypeIdEnum.ALL);\n\t\tdirectionsService = new DirectionsService();\n\t\tdirectionsPane = mapComponent.getDirec();\n\t\tscene.getWindow().sizeToScene();\n\t}", "public void update(Observable o, Object arg) {\r\n\t\tBufferedImage background = map.getRm().getEmptyMap();\r\n\t\tthis.setIcon(new ImageIcon(this.getImageMap(background)));\r\n\t\tif (map.isSuccess()) // GameSuccess Like Google Style\r\n\t\t{\r\n\t\t\tthis.setHorizontalTextPosition(JLabel.CENTER);\r\n\t\t\tthis.setText(\"<HTML><B><H1><I><FONT COLOR='BLUE'>S</FONT>\"\r\n\t\t\t\t\t+ \"<FONT COLOR='RED'>U</FONT><FONT COLOR='YELLOW'>CC</FONT>\"\r\n\t\t\t\t\t+ \"<FONT COLOR='BLUE'>E</FONT><FONT COLOR='GREEN'>S</FONT>\"\r\n\t\t\t\t\t+ \"<FONT COLOR='RED'>S</FONT></I></H1></B></HTML>\");\r\n\t\t}\r\n\t}", "public void update(){\n\t\tsetChanged();\n\t\trender();\n\t\tprintTimer();\n\t}", "protected void updateDisplay() {\n\t\t\t// this is called when upload is completed\n\n\t\t\tString filename = getLastFileName();\n\t\t\tfor (SetupMapViewListener listener : listeners)\n\t\t\t\tlistener.shapeFileUploadedEvent(filename, new ByteArrayInputStream((byte[]) getValue()));\n\t\t}", "public void updateInfo()\n\t{\n\t\twidth = Game.frame.getWidth();\n\t\theight = Game.frame.getHeight();\n\t\tGame.frame.revalidate();\n\t\tGame.frame.repaint();\n\t}", "public abstract void updateLocations();", "private void inicMapComponent() {\n\t\tmapView = ((MapFragment) getFragmentManager()\n\t\t\t\t.findFragmentById(R.id.map)).getMap();\n\t\t\n\n\t\tlocationService = new LocationService(MapPage.this);\n\t\tlocationService.getLocation();\n\t\t\n\t\tmapView.setMyLocationEnabled(true);\n\n\t Location location = mapView.getMyLocation();\n\t LatLng myLocation = null; //new LatLng(44.8167d, 20.4667d);\n\t \n\t\tif (location != null) {\n\t myLocation = new LatLng(location.getLatitude(),\n\t location.getLongitude());\n\t } else {\n\t \tLocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);\n\t\t\tCriteria criteria = new Criteria();\n\t\t\tString provider = service.getBestProvider(criteria, false);\n\t\t\tLocation lastKnownLocation = service.getLastKnownLocation(provider);\n\t\t\tmyLocation = new LatLng(lastKnownLocation.getLatitude(),lastKnownLocation.getLongitude());\n\t }\n\t\t\n\t\tmapView.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 13));\n\t\t\n\t\tmapView.setPadding(0, 0, 0, 80);\n\t\t\n\t\tmapView.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t//onMapWindwosClick(marker.getId(),marker.getTitle());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t\n\t}", "public void updateMarkers(){\n markerMap = new HashMap<>();\n googleMap.clear();\n for (Station station : main.getStations()) {\n float fillLevel = station.getFillLevel();\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)));\n marker.setTag(station.getId());\n markerMap.put(station.getId(), marker);\n }\n }", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "private void populateMap() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n //database.updateLatLng(\"Gym\", 34.181243783767364, -117.31866795569658);\n\n while (cursor.moveToNext()) {\n double lat = cursor.getDouble(cursor.getColumnIndex(database.COL_LAT));\n double lng = cursor.getDouble(cursor.getColumnIndex(database.COL_LONG));\n int image = database.getImage(cursor.getString(cursor.getColumnIndex(database.COL_LOC)));\n\n //Log.i(\"ROW\", R.drawable.library + \"\");\n LatLng coords = new LatLng(lat, lng);\n\n GroundOverlayOptions overlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(image))\n .position(coords, 30f, 30f);\n\n mMap.addGroundOverlay(overlayOptions);\n }\n }", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "private void populateView(){\n\n //Display image without blocking, and cache it\n ImageView imageView = (ImageView) findViewById(R.id.activity_location_image);\n Picasso.with(this)\n .load(location.getImageURL()).fit().centerCrop().into(imageView);\n\n //Display description\n TextView description = (TextView) findViewById(R.id.activity_location_description);\n description.setText(location.getDescription());\n\n //Display hours\n TextView hours = (TextView) findViewById(R.id.activity_location_hours);\n hours.setText(location.getStringOpenHours());\n\n //Display google maps, map IF address can be found\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.activity_location_map);\n if (canFindLocationAddress()){\n\n //Set width and height of map\n mapFragment.getView().getLayoutParams().height = getMapHeight();\n mapFragment.getView().offsetLeftAndRight(50);\n mapFragment.getMapAsync(this);\n }\n\n //Hide the map otherwise\n else{\n mapFragment.getView().setVisibility(View.INVISIBLE);\n }\n }", "public void update_map(Player player) \n\t{\n\t\tfor (int i = 0; i < this.map.length; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.map[i].length;j++) \n\t\t\t{\n\t\t\t\tswitch (map[i][j]) \n\t\t\t\t{\n\t\t\t\tcase GRASS:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PATH:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase CROSS_ROADS:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase TA:\n\t\t\t\t\tthis.gc.drawImage(TA_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase RESEARCHER:\n\t\t\t\t\tthis.gc.drawImage(RESEARCHER_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase FIRST_YEAR:\n\t\t\t\t\tthis.gc.drawImage(FIRST_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SECOND_YEAR:\n\t\t\t\t\tthis.gc.drawImage(SECOND_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SCORE_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont titleFont = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(titleFont);\n\t\t\t\t\tString text = \"GPA: \" + player.getGPA();\n\t\t\t\t\tthis.gc.fillText(text, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(text, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\tcase TUITION_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont title = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(title);\n\t\t\t\t\tString Tuition = \"Tuition: \" + (player.getTuition());\n\t\t\t\t\tthis.gc.fillText(Tuition, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(Tuition, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "@Override\n public void run() {\n Map<String, Object> m = new HashMap<>();\n m.put(\"mAMapLocation\", \"mAMapLocation\");\n Graphic graphic = new Graphic(tapPoint, m, pinDestinationSymbol);\n\n finalMarkerOverlay.getGraphics().add(graphic);\n }", "private void updateUI() {\n// if (mCurrentLocation != null) {\n// mLatitudeTextView.setText(String.valueOf(mCurrentLocation.getLatitude()));\n// mLongitudeTextView.setText(String.valueOf(mCurrentLocation.getLongitude()));\n// mLastUpdateTimeTextView.setText(mLastUpdateTime);\n// }\n }", "private void updateScreenLoc(LatLng loc){\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(START_ZOOM), 2000, null);//2000 animates it for 2 seconds. Zoom lvl 10\n }", "private void renderMap(double width, double height, double curZoom) {\n if(curMap != null) { // if it can be obtained, set the width and height using the aspect ratio\n double aspectRatio = curMap.getMap().getWidth()/curMap.getMap().getHeight();\n double scaledW, scaledH;\n // keep the aspect ratio\n scaledH = (1 / ((1 / (width)) * aspectRatio));\n scaledW = ((height)*aspectRatio);\n if(scaledH > height) {\n canvas.setHeight(height*curZoom);\n canvas.setWidth(scaledW*curZoom);\n if(curZoom <= 1) { // If we aren't zoomed, translate the image to the center of the screen\n canvas.setTranslateX(((width - scaledW) / 2));\n canvas.setTranslateY(0);\n } else {\n canvas.setTranslateX(0);\n }\n } else {\n canvas.setHeight(scaledH*curZoom);\n canvas.setWidth(width*curZoom);\n if(curZoom <= 1) { // If we aren't zoomed, translate the image to the center of the screen\n canvas.setTranslateY(((height - scaledH) / 2));\n canvas.setTranslateX(0);\n } else {\n canvas.setTranslateY(0);\n }\n }\n } else {\n canvas.setHeight(height*curZoom);\n canvas.setWidth(width*curZoom);\n }\n render();\n }", "public void update( ) {\n\t\tdraw( );\n\t}", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n\n // Display the user selected map type\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(mContext, R.raw.map_style_night);\n mMap.setMapStyle(style);\n\n // Don't want to display the default location button because\n // we are already displaying using a FAB\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n mMap.setOnMyLocationClickListener(this);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}", "private void updateUi() {\n final int numPoints = map.getPolyLinePoints(featureId).size();\n final MapPoint location = map.getGpsLocation();\n\n // Visibility state\n playButton.setVisibility(inputActive ? View.GONE : View.VISIBLE);\n pauseButton.setVisibility(inputActive ? View.VISIBLE : View.GONE);\n recordButton.setVisibility(inputActive && recordingEnabled && !recordingAutomatic ? View.VISIBLE : View.GONE);\n\n // Enabled state\n zoomButton.setEnabled(location != null);\n backspaceButton.setEnabled(numPoints > 0);\n clearButton.setEnabled(!inputActive && numPoints > 0);\n settingsView.findViewById(R.id.manual_mode).setEnabled(location != null);\n settingsView.findViewById(R.id.automatic_mode).setEnabled(location != null);\n\n if (intentReadOnly) {\n playButton.setEnabled(false);\n backspaceButton.setEnabled(false);\n clearButton.setEnabled(false);\n }\n // Settings dialog\n\n // GPS status\n boolean usingThreshold = isAccuracyThresholdActive();\n boolean acceptable = location != null && isLocationAcceptable(location);\n int seconds = INTERVAL_OPTIONS[intervalIndex];\n int minutes = seconds / 60;\n int meters = ACCURACY_THRESHOLD_OPTIONS[accuracyThresholdIndex];\n locationStatus.setText(\n location == null ? getString(org.odk.collect.strings.R.string.location_status_searching)\n : !usingThreshold ? getString(org.odk.collect.strings.R.string.location_status_accuracy, location.accuracy)\n : acceptable ? getString(org.odk.collect.strings.R.string.location_status_acceptable, location.accuracy)\n : getString(org.odk.collect.strings.R.string.location_status_unacceptable, location.accuracy)\n );\n locationStatus.setBackgroundColor(\n location == null ? getThemeAttributeValue(this, com.google.android.material.R.attr.colorPrimary)\n : acceptable ? getThemeAttributeValue(this, com.google.android.material.R.attr.colorPrimary)\n : getThemeAttributeValue(this, com.google.android.material.R.attr.colorError)\n );\n collectionStatus.setText(\n !inputActive ? getString(org.odk.collect.strings.R.string.collection_status_paused, numPoints)\n : !recordingEnabled ? getString(org.odk.collect.strings.R.string.collection_status_placement, numPoints)\n : !recordingAutomatic ? getString(org.odk.collect.strings.R.string.collection_status_manual, numPoints)\n : !usingThreshold ? (\n minutes > 0 ?\n getString(org.odk.collect.strings.R.string.collection_status_auto_minutes, numPoints, minutes) :\n getString(org.odk.collect.strings.R.string.collection_status_auto_seconds, numPoints, seconds)\n )\n : (\n minutes > 0 ?\n getString(org.odk.collect.strings.R.string.collection_status_auto_minutes_accuracy, numPoints, minutes, meters) :\n getString(org.odk.collect.strings.R.string.collection_status_auto_seconds_accuracy, numPoints, seconds, meters)\n )\n );\n }", "public void moveTheMap() {\n \t if(streetLevelFragment != null && map != null){\n \t\t map.setCenter(streetLevelFragment.getStreetLevelModel().getPosition(), MapAnimation.LINEAR, map.getZoomLevel(), streetLevelFragment.getStreetLevelModel().getHeading(), 0);\n \t }\n }", "private void update() {\n gsm.update();\n }", "public void updateHud() {\r\n\r\n\t\tif (m_planet.getCoordinateSystemType() == Planet.CoordinateSystemType.GEOCENTRIC) {\r\n\t\t\t// Getting longitud and latitud informacion from planet\r\n\t\t\tlon = Hud.getSexagesinal(m_planet.getLongitude(), true);\r\n\t\t\tlat = Hud.getSexagesinal(m_planet.getLatitude(), false);\r\n\t\t\t\r\n\r\n\t\t\t// Updating text information\r\n\t\t\ttextoHud.setText(lonText + \" \" + lon + \" \" + latText + \" \" + lat);\r\n\t\t} else {\r\n\t\t\t// Getting longitud and latitud informacion from planet\r\n\t\t\tlon = Double.toString(m_planet.getLongitude());\r\n\t\t\tlat = Double.toString(m_planet.getLatitude());\r\n\r\n\t\t\t// Updating text information\r\n\t\t\ttextoHud.setText(lonText + \" \" + lon + \" \" + latText + \" \" + lat);\r\n\t\t}\r\n\t\t\r\n\t\tcompass.setScale(new Vec3(75,75,75));\r\n\t\tcompass.setPosition(new Vec3(m_canvas3d.getWidth()-70,m_canvas3d.getHeight()-70,0));\r\n\t\t// Repainting view\r\n\t\tif (m_canvas3d != null)\r\n\t\t\tm_canvas3d.repaint();\r\n\t}", "private void generateMap(){\n if(currDirections != null){\n\n\t \tPoint edge = new Point(mapPanel.getWidth(), mapPanel.getHeight());\n \tmapPanel.paintImmediately(0, 0, edge.x, edge.y);\n\t \t\n\t \t\n\t \t// setup advanced graphics object\n\t Graphics2D g = (Graphics2D)mapPanel.getGraphics();\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);\n\n\t \n\t Route rt = currDirections.getRoute();\n\t\n\t boolean singleStreet = rt.getGeoSegments().size() == 1;\n\t Route contextRoute = (!singleStreet ? rt : \n\t \t\tnew Route( virtualGPS.findFullSegment(rt.getEndingGeoSegment()) ) );\n\t \n\t // calculate the longitude and latitude bounds\n\t int[] bounds = calculateCoverage( contextRoute , edge);\n\t \n\t Collection<StreetSegment> map = virtualGPS.getContext(bounds, contextRoute);\n\t \n\t \n\t // draw every segment of the map\n\t g.setColor(Color.GRAY);\n\t for(GeoSegment gs : map){\n\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t \n\t // draw the path over the produced map in BLUE\n\t g.setColor(Color.BLUE);\n\t for(GeoFeature gf : rt.getGeoFeatures()){\n\t for(GeoSegment gs : gf.getGeoSegments()){\n\t\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t Point start = derivePoint(bounds, edge, gf.getStart());\n\t Point end = derivePoint(bounds, edge, gf.getEnd());\n\t \n\t int dX = (int)(Math.abs(start.x - end.x) / 2.0);\n\t int dY = (int)(Math.abs(start.y - end.y) / 2.0);\n\n if(!jCheckBoxHideStreetNames.isSelected()){\n \tg.setFont(new Font(g.getFont().getFontName(), Font.BOLD, g.getFont().getSize()));\n \tg.drawString(gf.getName(), start.x + (start.x<end.x ? dX : -dX),\n \t\t\tstart.y + (start.y<end.y ? dY : -dY));\n }\n\t }\n }\n }", "private void updateLocationUi() {\n if (mMap == null) {\n return;\n }\n try {\n if (mPermissionCheck.locationPermissionGranted()) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "void updateUI() {\n\n\t\tshowProgress(false, null);\n\t\tclearAll();\n\t\tmResults = floorList.get(mCheckedIndex).getRouteResult();\n\n\t\tif (mResults == null) {\n\t\t\t// Toast.makeText(this, \"本层没有导航信息\", Toast.LENGTH_LONG).show();\n\n\t\t\treturn;\n\t\t}\n\t\tArrayList<LocatorGeocodeResult> shelfList = floorList\n\t\t\t\t.get(mCheckedIndex).getShelfList();\n\t\t//MultiPoint bounds = new MultiPoint();\n\t\tfor (LocatorGeocodeResult result : shelfList) {\n\t\t\tString address = result.getAddress();\n\t\t\tArrayList<ParcelableGoods> goodsList = floorList.get(mCheckedIndex)\n\t\t\t\t\t.getGoodsMap().get(address);\n\t\t\tPoint p = (Point) GeometryEngine.project(result.getLocation(), wm,\n\t\t\t\t\tegs);\n\t\t\tif (goodsList != null && goodsList.size() > 0) {\n\t\t\t\tString names = \"\";\n\t\t\t\tfor (ParcelableGoods goods : goodsList) {\n\t\t\t\t\tif (\"\".equals(names)) {\n\t\t\t\t\t\tnames = \"【\" + goods.getName() + \"】\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnames = names + \" 【\" + goods.getName() + \"】\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmMapViewHelper.addMarkerGraphic(p.getY(), p.getX(),\n\t\t\t\t\t\tgoodsList.size() + \"件商品\", names,\n\t\t\t\t\t\tR.drawable.icon_tip_goods,\n\t\t\t\t\t\tgetResources().getDrawable(R.drawable.icon_mark_goods),\n\t\t\t\t\t\tfalse, 1);\n\t\t\t\t//bounds.add(result.getLocation());\n\t\t\t}\n\t\t}\n\t\tcurRoute = mResults.getRoutes().get(0);\n\t\t// Symbols for the route and the destination (blue line, checker flag)\n\t\tSimpleLineSymbol routeSymbol = new SimpleLineSymbol(Color.BLUE, 5);\n\t\t// Drawable drawable = getResources().getDrawable(R.drawable.arrow);\n\n\t\tint count = ((Polyline) curRoute.getRouteGraphic().getGeometry())\n\t\t\t\t.getPointCount();\n\t\tif (count > 0) {\n\n\t\t\tGraphic routeGraphic = new Graphic(curRoute.getRouteGraphic()\n\t\t\t\t\t.getGeometry(), routeSymbol);\n\t\t\t// Add the full route graphics, start and destination graphic to the\n\t\t\t// routeLayer\n\n\t\t\trouteLayer.addGraphics(new Graphic[] { routeGraphic });\n\t\t\tPoint p = (Point) GeometryEngine.project(((Polyline) curRoute\n\t\t\t\t\t.getRouteGraphic().getGeometry()).getPoint(0), wm, egs);\n\t\t\t// map.centerAt(((Polyline)\n\t\t\t// curRoute.getRouteGraphic().getGeometry())\n\t\t\t// .getPoint(0), true);\n\t\t\t\n\t\t\t\n\t\t\tmMapViewHelper.addMarkerGraphic(p.getY(), p.getX(), \"起始点\",\n\t\t\t\t\tfloorList.get(mCheckedIndex).getStartPoint(),\n\t\t\t\t\tR.drawable.icon_tip_start,\n\t\t\t\t\tgetResources().getDrawable(R.drawable.icon_mark_start),\n\t\t\t\t\tfalse, 1);\n\t\t\t//bounds.add(((Polyline) curRoute\n\t\t\t//\t\t.getRouteGraphic().getGeometry()).getPoint(0));\n\t\t\tp = (Point) GeometryEngine.project(((Polyline) curRoute\n\t\t\t\t\t.getRouteGraphic().getGeometry()).getPoint(count - 1), wm,\n\t\t\t\t\tegs);\n\t\t\tSystem.out.println(\"终点x:\" + p.getX() + \" y:\" + p.getY());\n\t\t\tString endPoint = floorList.get(mCheckedIndex).getEndPoint();\n\t\t\tif (endPoint == null || \"\".equals(endPoint)) {\n\t\t\t\tendPoint = \"终点\";\n\t\t\t}\n\t\t\tmMapViewHelper.addMarkerGraphic(p.getY(), p.getX(), \"终点\", endPoint,\n\t\t\t\t\tR.drawable.icon_tip_end,\n\t\t\t\t\tgetResources().getDrawable(R.drawable.icon_mark_end),\n\t\t\t\t\tfalse, 1);\n\t\t\t//bounds.add(((Polyline) curRoute\n\t\t\t//\t\t.getRouteGraphic().getGeometry()).getPoint(count - 1));\n\t\t\tmap.setExtent(curRoute.getRouteGraphic().getGeometry(), 100, true);\n\t\t}\n\t}", "public void setMap2D(FXMap map);", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "public void update() {\n this.infoWindowManager.update();\n }", "private void updateColorMap() {\n //if (colorMap == null) {\n colorMap = ColorUtil.buildColorMap(colorBar.getCurrentColors(),\n null);\n /* } else {\n colorMap = ColorUtil.updateColorMap(colorBar.getCurrentColors(),\n colorMap);\n }*/\n cmapParams.setColorMap(colorMap);\n cmapParams.setColorMapName(null);\n ((AbstractNcEditor) EditorUtil.getActiveEditor()).refresh();\n }", "public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}", "private void inflateMap() {\n\n // Alter the visibiliity\n waitLayout.setVisibility(View.GONE);\n mapWearFrame.setVisibility(View.VISIBLE);\n\n // Set up fragment manager\n fm = getFragmentManager();\n\n // Set up map fragment\n mapFragment = (MapFragment) fm.findFragmentByTag(TAG_FRAG_MAP);\n if (mapFragment == null) {\n // Initialize map options\n GoogleMapOptions mapOptions = new GoogleMapOptions();\n mapOptions.mapType(GoogleMap.MAP_TYPE_NORMAL)\n .compassEnabled(true)\n .rotateGesturesEnabled(true)\n .tiltGesturesEnabled(true);\n mapFragment = MapFragment.newInstance(mapOptions);\n }\n mapFragment.getMapAsync(this);\n\n // Add map to DismissOverlayView\n fm.beginTransaction().add(R.id.mapWearFrame, mapFragment).commit();\n }", "private void panMap(int x, int y){\r\n Point p = map.getMapCenter();\r\n p.x += x;\r\n p.y += y;\r\n map.setMapCenter(p);\r\n mapPane.render();\r\n }", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mGeocoder = new Geocoder(this, Locale.getDefault());\n\n updateScreenLoc(movement[0]);\n\n loadCrimes(movement[0]);\n //Start MockLocationManager and inject first point\n turnOnLocationManager();\n updateLocation(movement[0]);\n updateRadiusCircle();\n\n\n }", "public void update(){\r\n\t\tupdateTurnLabel();\r\n\t\tupdateCanvas();\r\n\t}", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }", "public void update() {\n\t\tremoveAll();\n\t\tdrawGraph();\n\t\tplotEntries();\n\t}", "public void switchToMap()\n {\n feedbackLabel.setVisible(false);\n d.setVisible(false);\n a.setText(destinations[0].getName());\n b.setText(destinations[1].getName());\n c.setText(destinations[2].getName());\n currentClue=destinations[0].getRandClue();\n questionLabel.setText(currentClue);\n atQuestionStage=false;\n shuffleButtons();\n questionLabel.setBounds(650-questionLabel.getPreferredSize().width,120,600,30);\n mapImageLabel.setVisible(true);\n mapImageLabel.repaint();\n revalidate();\n }", "private void renderMapGrow(double width, double height, double curZoom) {\n if(curMap != null) { // if it can be obtained, set the width and height using the aspect ratio\n double aspectRatio = curMap.getMap().getWidth()/curMap.getMap().getHeight();\n double scaledW, scaledH;\n // keep the aspect ratio\n scaledH = (1 / ((1 / (width)) * aspectRatio));\n scaledW = ((height)*aspectRatio);\n if(scaledH <= pane.getHeight()) {\n canvas.setHeight(height*curZoom);\n canvas.setWidth(scaledW*curZoom);\n if(curZoom <= 1) { // If we aren't zoomed, translate the image to the center of the screen\n canvas.setTranslateX(((width - scaledW) / 2));\n canvas.setTranslateY(0);\n } else {\n canvas.setTranslateX(0);\n }\n }\n\n if(scaledW <= pane.getWidth()) {\n canvas.setHeight(scaledH*curZoom);\n canvas.setWidth(width*curZoom);\n if(curZoom <= 1) { // If we aren't zoomed, translate the image to the center of the screen\n canvas.setTranslateY(((height - scaledH) / 2));\n canvas.setTranslateX(0);\n } else {\n canvas.setTranslateY(0);\n }\n }\n } else {\n canvas.setHeight(height*curZoom);\n canvas.setWidth(width*curZoom);\n }\n render();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n// updateMap(new LocationModel(41.806363, 44.768531, \"Agmasheneblis Xeivani\"));\n if (shoppingList.getLocationReminder() != null) {\n updateMap(shoppingList.getLocationReminder());\n } else {\n updateMap(null);\n }\n }", "@Override\r\n\tpublic void update(Observable observable, Object data) {\r\n\t\tGameWorld gw = (GameWorld) data;\r\n\t\t\r\n\t\tif(counter >= 1)\r\n\t\t\tgw.map();\r\n\t\t\r\n\t\tcounter++;\r\n\t}", "public void update() {\n\t\tupdateCamera();\n\t}", "private void setUpMap() throws IOException {\n // Get last location which means current location\n lastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (lastKnownLocation != null) {\n // shift view to current location\n LatLng latlng = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\n Geocoder geocoder = new Geocoder(this);\n adminArea = geocoder.getFromLocation(latlng.latitude, latlng.longitude, 1).get(0).getAdminArea();\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(latlng, 12);\n mMap.moveCamera(update);\n } else {\n Toast.makeText(this, \"Current Location is not Available\", Toast.LENGTH_SHORT).show();\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }" ]
[ "0.7402983", "0.7271351", "0.72404283", "0.72358674", "0.7211102", "0.71819127", "0.7162863", "0.7152182", "0.7135861", "0.70419806", "0.70275116", "0.6996624", "0.6914765", "0.68855125", "0.6884939", "0.68731314", "0.68308455", "0.68109894", "0.67787355", "0.6695832", "0.66909754", "0.6677777", "0.66747165", "0.66594", "0.6649072", "0.66424334", "0.66384476", "0.66369665", "0.66323006", "0.6631261", "0.6612818", "0.66015214", "0.65985173", "0.6584187", "0.6572469", "0.656772", "0.6545971", "0.65297484", "0.6408429", "0.6393288", "0.6389604", "0.6380768", "0.63675463", "0.6348037", "0.6340217", "0.63222355", "0.63153505", "0.63135934", "0.63134706", "0.63088566", "0.6301325", "0.6282778", "0.6270797", "0.62647235", "0.62603927", "0.6245318", "0.62331146", "0.62211543", "0.62208277", "0.621319", "0.6212397", "0.6209344", "0.62085426", "0.6206743", "0.61869776", "0.6183075", "0.61822444", "0.6170286", "0.6166409", "0.61418664", "0.6140135", "0.61279833", "0.61222655", "0.61201507", "0.61192274", "0.61114824", "0.6106048", "0.6099843", "0.6096323", "0.6092763", "0.60900635", "0.6087519", "0.6073674", "0.6073378", "0.60650223", "0.6061863", "0.6059283", "0.60506654", "0.60500246", "0.6049244", "0.60364825", "0.6031122", "0.6020717", "0.6019646", "0.60161835", "0.60141975", "0.6009946", "0.6008132", "0.6005652", "0.6005652", "0.6005652" ]
0.0
-1
Just for displaying the true map in the simulator
public String toggleMap() { Map temp = sensor.getTrueMap(); if (Map.compare(temp, smap.getMap())) { smap.setMap(map.copy()); return "robot"; } else { smap.setMap(temp.copy()); return "simulated"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }", "public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\t\t\t\tSystem.out.print(' ');\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "public void displaymap(AircraftData data);", "public void showmap() {\n MapForm frame = new MapForm(this.mapLayout);\n frame.setSize(750, 540);\n frame.setLocationRelativeTo(null);\n frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n frame.setVisible(true);\n }", "public boolean getShowMap()\r\n {\r\n return showMap;\r\n }", "public void setShowMap( boolean show )\r\n {\r\n showMap = show;\r\n }", "public void showMap(boolean isEnd) {\n\t\t// Map shown inbetween games. Works by grabbing the system time in milliseconds,\n\t\t// adding 5000, and then counting down 1 second every second. Effectively keeping\n\t\t// the map screen up for 5 seconds.\n//\t\tif(legnum == 4) {\n//\t\t\treplay = new JButton(\"Replay\");\n//\t\t\treplay.setSize(frameWidth*5/100, frameHeight*5/100);\n//\t\t\tif(isOsprey) {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*30/100, frameHeight/2);\n//\t\t\t}\n//\t\t\telse {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*15/100, frameWidth/2);\n//\t\t\t}\n//\t\t\tframe.add(replay);\n//\t\t}\n\t\tlong tEnd = System.currentTimeMillis();\n\t\tframe.setVisible(true);\n\t\tlong tStart = tEnd + 3*1000;\n\t\twhile(tStart > tEnd) {\n\t\t\ttStart -= 1000;\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}", "private static void showMap() {\n\t\tSet<Point> pointSet = map.keySet();\n\t\tfor (Point p : pointSet) {\n\t\t\tSystem.out.println(map.get(p));\n\t\t}\n\t}", "public void printMap(GameMap map);", "public void testMapping() {\n\t\ttry { Thread.sleep(1000); } catch (Exception e) { }\n\t\tPuzzleView view = app.getPuzzleView();\n\t\t\n\t\tapp.setVisible(true);\n\t\t\n\t}", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "public void printMap() {\n String s = \"\";\n Stack st = new Stack();\n st.addAll(map.entrySet());\n while (!st.isEmpty()) {\n s += st.pop().toString() + \"\\n\";\n }\n window.getDHTText().setText(s);\n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void showOpponentMap(Admiral admiral) {\r\n\t\tint[] mapGrid = returnOpponent(admiral).getMapGrid();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"The map of admiral: \"\r\n\t\t\t\t+ returnOpponent(admiral).getAdmiralName());\r\n\t\tSystem.out.print(\" \");\r\n\t\tfor (int i = 0; i < Constants.COLUMNS_TITLES.length; i++) {\r\n\t\t\tSystem.out.print(\" \" + Constants.COLUMNS_TITLES[i]);\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tfor (int j = 0; j < Constants.ROW_LENGTH; j++) {\r\n\t\t\tif (j < 9) {\r\n\t\t\t\tSystem.out.print(j + 1 + \" \");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.print(j + 1);\r\n\t\t\t}\r\n\t\t\tfor (int k = 0; k < Constants.ROW_LENGTH; k++) {\r\n\t\t\t\tString cell = null;\r\n\t\t\t\tif (mapGrid[j * Constants.ROW_LENGTH + k] == 0\r\n\t\t\t\t\t\t|| mapGrid[j * Constants.ROW_LENGTH + k] == 1) {\r\n\t\t\t\t\tcell = \" \" + \"0\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == -1) {\r\n\t\t\t\t\tcell = \" \" + \"*\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == 2) {\r\n\t\t\t\t\tcell = \" \" + \"X\";\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(cell);\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t}", "public void printMap(){\n\n for (Tile [] tile_row : this.layout)\n {\n for (Tile tile : tile_row)\n {\n if (tile.isShelf()){\n System.out.print(\" R \");\n }\n else if (tile.isDP()){\n System.out.print(\" D \");\n }\n\n else {\n System.out.print(\" * \");\n }\n\n }\n System.out.println();\n }\n\n }", "void display(Map m) {\r\n\t\tm.tour = this;\r\n\t\tm.update(m.getGraphics());\r\n\t}", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "public void figure() {\n this.isMap = false;\n System.out.println(\"Switch to figure mode\");\n }", "public void printMiniMap() { }", "private void generateMap(){\n if(currDirections != null){\n\n\t \tPoint edge = new Point(mapPanel.getWidth(), mapPanel.getHeight());\n \tmapPanel.paintImmediately(0, 0, edge.x, edge.y);\n\t \t\n\t \t\n\t \t// setup advanced graphics object\n\t Graphics2D g = (Graphics2D)mapPanel.getGraphics();\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);\n\n\t \n\t Route rt = currDirections.getRoute();\n\t\n\t boolean singleStreet = rt.getGeoSegments().size() == 1;\n\t Route contextRoute = (!singleStreet ? rt : \n\t \t\tnew Route( virtualGPS.findFullSegment(rt.getEndingGeoSegment()) ) );\n\t \n\t // calculate the longitude and latitude bounds\n\t int[] bounds = calculateCoverage( contextRoute , edge);\n\t \n\t Collection<StreetSegment> map = virtualGPS.getContext(bounds, contextRoute);\n\t \n\t \n\t // draw every segment of the map\n\t g.setColor(Color.GRAY);\n\t for(GeoSegment gs : map){\n\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t \n\t // draw the path over the produced map in BLUE\n\t g.setColor(Color.BLUE);\n\t for(GeoFeature gf : rt.getGeoFeatures()){\n\t for(GeoSegment gs : gf.getGeoSegments()){\n\t\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t Point start = derivePoint(bounds, edge, gf.getStart());\n\t Point end = derivePoint(bounds, edge, gf.getEnd());\n\t \n\t int dX = (int)(Math.abs(start.x - end.x) / 2.0);\n\t int dY = (int)(Math.abs(start.y - end.y) / 2.0);\n\n if(!jCheckBoxHideStreetNames.isSelected()){\n \tg.setFont(new Font(g.getFont().getFontName(), Font.BOLD, g.getFont().getSize()));\n \tg.drawString(gf.getName(), start.x + (start.x<end.x ? dX : -dX),\n \t\t\tstart.y + (start.y<end.y ? dY : -dY));\n }\n\t }\n }\n }", "public void showMaps() throws Exception{\r\n MapMaintenanceBaseWindow mapMaintenanceBaseWindow = null;\r\n String unitNumber=mdiForm.getUnitNumber();\r\n \r\n if( ( mapMaintenanceBaseWindow = (MapMaintenanceBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.MAPS_BASE_FRAME_TITLE+\" \"+unitNumber))!= null ){\r\n if( mapMaintenanceBaseWindow.isIcon() ){\r\n mapMaintenanceBaseWindow.setIcon(false);\r\n }\r\n mapMaintenanceBaseWindow.setSelected( true );\r\n return;\r\n }\r\n \r\n MapMaintenanceBaseWindowController mapMaintenanceBaseWindowController = new MapMaintenanceBaseWindowController(unitNumber,false);\r\n mapMaintenanceBaseWindowController.display();\r\n \r\n }", "public static void drawMapPoints(ArrayList<PointOfInterest> points) {\n\t\t// Use a label to display the image\n\t\tJFrame frame = new JFrame();\n\t\tframe.setSize(1080, 540);\n\t\tMap map = new Map(null, (ArrayList<PointOfInterest>)(points), null, 2, 0, 0);\n\t\tframe.add(map);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "public MapDisplay getMap(){\n\t\treturn map; //gibt die Karte zurück\n\t}", "public void drawTextualMap(){\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tif(grid[i][j] instanceof Room){\n\t\t\t\t\tif(((Room)grid[i][j]).getItems().size()>0)\n\t\t\t\t\t\tSystem.out.print(\" I \");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\" R \");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.print(\" = \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tSystem.out.println(\"rows = \"+grid.length+\" cols = \"+grid[0].length);\n\t\tSystem.out.println(\"I = Room has Item, R = Room has no Item, '=' = Is a Hallway\");\n\n\t}", "@Override\r\n public void ShowMaps() throws Exception {\r\n printInvalidCommandMessage();\r\n }", "public String display(PlayMap aPlayMap) {\r\n String tmpOutput = \"\";\r\n Field tmpField;\r\n \r\n tmpOutput = \"<div class=\\\"map\\\" id=\\\"map\\\" style=\\\"width:\" + aPlayMap.getXDimension() * 34.75 + \"px; \";\r\n tmpOutput += \"height:\" + aPlayMap.getYDimension() * 34.75 + \"px;\\\">\\n\";\r\n // loop for row\r\n for (int i = 0; i < aPlayMap.getYDimension(); i++) {\r\n // loop for column\r\n for (int j = 0; j < aPlayMap.getXDimension(); j++) {\r\n tmpField = aPlayMap.getField(j, i);\r\n tmpOutput += \"<div id=\\\"\" + j + \"/\" + i + \"\\\" \";\r\n try {\r\n tmpOutput += \"class=\\\"field \" + Ground.getGroundLabeling(tmpField.getGround()) + \"\\\" \";\r\n } catch (UnknownFieldGroundException e) {\r\n e.printStackTrace();\r\n }\r\n Placeable tmpSetter = tmpField.getSetter();\r\n String tmpColor = new String (\"#000000\");\r\n String tmpPlacable = new String (\"item\");\r\n if (tmpSetter != null) {\r\n if (tmpSetter instanceof Figure) {\r\n tmpColor = new String();\r\n switch (tmpField.getSetter().getId()) {\r\n case 'A':\r\n tmpColor = \"#ff0000\";\r\n break;\r\n case 'B':\r\n tmpColor = \"#0000ff\";\r\n break;\r\n }\r\n tmpPlacable = \"figure\";\r\n }\r\n tmpOutput += \"onClick=\\\"checkUserAction(this);\\\" \";\r\n tmpOutput += \"onMouseOver=\\\"hoverOn(this);\\\" onMouseOut=\\\"hoverOff(this);\\\" status=\\\"placed\\\" filled=\\\"\" + tmpPlacable + \"\\\" placablecolor=\\\"\" + tmpColor + \"\\\" >\";\r\n String tmpImage = tmpSetter.getImage();\r\n tmpOutput += \"<img src=\\\"resources/pictures/\" + tmpImage + \"\\\">\";\r\n } else {\r\n tmpOutput += \"onClick=\\\"checkUserAction(this);\\\" \";\r\n tmpOutput += \"onMouseOver=\\\"hoverOn(this);\\\" onMouseOut=\\\"hoverOff(this);\\\" status=\\\"empty\\\" filled=\\\"no\\\" placablecolor=\\\"#000000\\\" >\";\r\n }\r\n tmpOutput += \"</div>\\n\";\r\n }\r\n }\r\n tmpOutput += \"</div>\\n\";\r\n\r\n return tmpOutput;\r\n }", "@Override\n public void displayMapTiles(MapTile[][] grid)\n {\n Platform.runLater(() -> {\n MapView mapArea = gui.getMapArea();\n mapArea.displayMapGrid(grid, -3, -3);\n });\n }", "public void mapToString() {\r\n for (Square[] x : map) {\r\n for (Square y : x) {\r\n System.out.print(y.getVisual() + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }", "public void show(int i){\n if (i == 0){\n this.showmap();\n } else \n this.showfigure();\n }", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public void showMapTypePanel(){\n mapTypePanel.showMapTypePanel();\n if(mapTypePanel.isVisible() && optionsPanel.isVisible()){\n optionsPanel.setVisible(false);\n if(iconPanel.isVisible()) iconPanel.setVisible(false);\n }\n if(routePanel.isVisible()) routePanel.setVisible(false); closeDirectionList();\n canvas.repaint();\n }", "public void printMap() {\n\t\tmap.printMap();\n\t}", "public static void intro(){\n System.out.println(\"Welcome to Maze Runner!\");\n System.out.println(\"Here is your current position:\");\n myMap.printMap();\n\n }", "public static void map(int location)\n\t{\n\t\tswitch(location)\n\t\t{\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * X # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 7:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 8:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 9:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 10:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 11:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 12:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # X # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\");\n\t\t}//end switch(location)\n\t\t\n\t}", "public void switchToMap()\n {\n feedbackLabel.setVisible(false);\n d.setVisible(false);\n a.setText(destinations[0].getName());\n b.setText(destinations[1].getName());\n c.setText(destinations[2].getName());\n currentClue=destinations[0].getRandClue();\n questionLabel.setText(currentClue);\n atQuestionStage=false;\n shuffleButtons();\n questionLabel.setBounds(650-questionLabel.getPreferredSize().width,120,600,30);\n mapImageLabel.setVisible(true);\n mapImageLabel.repaint();\n revalidate();\n }", "private void drawMap( Graphics2D g2 )\r\n {\r\n MobilityMap map = sim.getMap();\r\n \r\n /* Draw map nodes and their links */\r\n int numNodes = map.getNumberOfNodes();\r\n \r\n for( int i=0; i < numNodes; i++ )\r\n {\r\n MapNode node = map.getNodeAt(i);\r\n Point2D.Double nodeLoc = node.getLocation();\r\n \r\n // Draw the node\r\n drawCircle( g2, nodeLoc, MAP_NODE_COLOUR, MAP_NODE_RADIUS, false );\r\n \r\n // Draw the node's links\r\n int numLinks = node.getNumberOfLinks();\r\n for( int j=0; j < numLinks; j++ )\r\n {\r\n MapNode destNode = node.getLinkAt(j).getGoesTo();\r\n Point2D.Double destNodeLoc = destNode.getLocation();\r\n drawLine( g2, nodeLoc, destNodeLoc, MAP_LINK_COLOUR );\r\n }\r\n }\r\n }", "public String toString()\n {\n return super.toString() + \":\\n\" + getMap();\n }", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "public void setMap2D(FXMap map);", "private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "public void setMap01(){\n\t\tmapSelect = \"map01.txt\";\n\t\treloadMap(mapSelect);\n\t\tsetImg(mapSelect);\n\t}", "public void setMap(String mn){\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n }", "@Override\n protected void setUpMap() {\n super.setUpMap();\n // For showing a move to my location button and a blue\n // dot to show user's location\n MainActivity mainActivity = (MainActivity) getActivity();\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n }", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\n }", "public void paint(Map map, Graphics graphics, Camera camera, GraphicsManager graphicsManager)\r\n\t{\r\n\t\tgraphics.drawImage(graphicsManager.getPanelGaucheBas(), 0, 0, GameConfiguration.WINDOW_WIDTH, GameConfiguration.WINDOW_HEIGHT, null);\r\n\t\tint tileSize = GameConfiguration.TILE_SIZE;\r\n\t\t\r\n\t\tTile[][] tiles = map.getTiles();\r\n\t\tint width = GameConfiguration.WINDOW_WIDTH;\r\n\t\tint height = GameConfiguration.WINDOW_HEIGHT;\r\n\t\tif(GameConfiguration.launchInFullScreen) {\r\n\t\t\twidth = Toolkit.getDefaultToolkit().getScreenSize().width;\r\n\t\t\theight = Toolkit.getDefaultToolkit().getScreenSize().height;\r\n\t\t}\r\n\t\t//draw map\r\n\t\tfor (int lineIndex = 0; lineIndex < map.getLineCount(); lineIndex++) \r\n\t\t{\r\n\t\t\tfor (int columnIndex = 0; columnIndex < map.getColumnCount(); columnIndex++) \r\n\t\t\t{\r\n\t\t\t\tTile tile = tiles[lineIndex][columnIndex];\r\n//tilePos.x + tilePos.w >= 0 && tilePos.y + tilePos.h >= 0 && tilePos.x <= GAME_WIDTH && tilePos.y <= GAME_HEIGHT\r\n\t\t\t\tif(tile.getColumn() * tileSize - camera.getX() + tileSize >= 0 \r\n\t\t\t\t\t&& tile.getLine() * tileSize - camera.getY() + tileSize >= 0 \r\n\t\t\t\t\t&& tile.getColumn() * tileSize - camera.getX() <= width && tile.getLine() * tileSize - camera.getY() <= height) {\r\n\t\t\t\t\tAnimation animation = tile.getAnimation();\r\n\t\t\t\t\tgraphics.drawImage(graphicsManager.getGrassTile(), tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t\t\tgraphics.drawImage(animation.getFrame(), tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t\t\t/*graphics.setColor(Color.white);\r\n\t\t\t\t\tgraphics.drawRect(tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize);*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ImageIcon displayMap(int mapZoomLevel, Map map) {\n try {\n ImageIcon mapImage = new ImageIcon((new ImageIcon(map.getMap(mapZoomLevel))).getImage().getScaledInstance(700,450,java.awt.Image.SCALE_SMOOTH));\n return mapImage; \n\n } catch(Exception e) {\n return null; \n }\n }", "public MapPanel() {\r\n\t\tthis(EarthFlat.class);\r\n\t}", "public void onStartup()\n/* 359: */ {\n/* 360:438 */ super.onStartup();\n/* 361: */ \n/* 362:440 */ this.mapPanel.addMouseListener(new MouseAdapter()\n/* 363: */ {\n/* 364: */ public void mouseClicked(MouseEvent e)\n/* 365: */ {\n/* 366:443 */ if (e.getButton() == 1)\n/* 367: */ {\n/* 368:444 */ Point p = e.getPoint();\n/* 369:445 */ if ((TileGIS.this.mapPanel.courtesyBounds != null) && (TileGIS.this.mapPanel.courtesyBounds.contains(p)))\n/* 370: */ {\n/* 371:446 */ TileGIS.this.getPresentation().openWebSite(TileGIS.this.mapPanel.tip.courtesyLnk);\n/* 372: */ }\n/* 373:447 */ else if ((TileGIS.this.mapPanel.courtesyImgBounds != null) && (TileGIS.this.mapPanel.courtesyImgBounds.contains(p)))\n/* 374: */ {\n/* 375:448 */ TileGIS.this.getPresentation().openWebSite(TileGIS.this.mapPanel.tip.courtesyLnk);\n/* 376: */ }\n/* 377: */ else\n/* 378: */ {\n/* 379:451 */ Point mP = TileGIS.this.mapPanel.panelToMap(p);\n/* 380:452 */ double lon = MercatorProj.XtoLon(mP.x, TileGIS.this.mapPanel.zoom);\n/* 381:453 */ double lat = MercatorProj.YtoLat(mP.y, TileGIS.this.mapPanel.zoom);\n/* 382:454 */ TileGIS.this.onClick(lat, lon);\n/* 383: */ }\n/* 384: */ }\n/* 385: */ }\n/* 386:458 */ });\n/* 387:459 */ getPresentation().getPanel().addContainerListener(new ContainerListener()\n/* 388: */ {\n/* 389: */ public void componentAdded(ContainerEvent e)\n/* 390: */ {\n/* 391:461 */ if (e.getChild() == TileGIS.this.placeholder.getJComponent()) {\n/* 392:462 */ TileGIS.this.getPresentation().getPanel().add(TileGIS.this.mapPanel);\n/* 393: */ }\n/* 394: */ }\n/* 395: */ \n/* 396: */ public void componentRemoved(ContainerEvent e)\n/* 397: */ {\n/* 398:467 */ if (e.getChild() == TileGIS.this.placeholder.getJComponent()) {\n/* 399:468 */ TileGIS.this.getPresentation().getPanel().remove(TileGIS.this.mapPanel);\n/* 400: */ }\n/* 401: */ }\n/* 402:472 */ });\n/* 403:473 */ this.placeholder.getJComponent().addComponentListener(new ComponentListener()\n/* 404: */ {\n/* 405: */ public void componentShown(ComponentEvent e) {}\n/* 406: */ \n/* 407: */ public void componentHidden(ComponentEvent e) {}\n/* 408: */ \n/* 409: */ public void componentResized(ComponentEvent e)\n/* 410: */ {\n/* 411:478 */ TileGIS.this.mapPanel.setSize(TileGIS.this.placeholder.getJComponent().getSize());\n/* 412: */ }\n/* 413: */ \n/* 414: */ public void componentMoved(ComponentEvent e)\n/* 415: */ {\n/* 416:482 */ TileGIS.this.mapPanel.setLocation(TileGIS.this.placeholder.getJComponent().getLocation());\n/* 417: */ }\n/* 418: */ });\n/* 419: */ }", "public GameField() { //generation of maze size and more\n for (int i = 0; i < 18; i++) {\n for (int j = 0; j < 18; j++) {\n System.out.print(\" \" + Map[i][j] + \" \");\n }\n System.out.println();\n }\n width = height = 40;\n }", "public void updateMap(boolean animate) {\n\t\tgetContentPane().add(mapContainer);\n\t\trevalidate();\n\t\t\n\t\t// Setting up map\n\t\tint width = mapContainer.getWidth();\n\t\tint height = mapContainer.getHeight();\n\t\tBufferedImage I = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2d = I.createGraphics();\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\t// Setting up map dimensions\n\t\tdouble xM = width*zoom, yM = height*zoom;\n\t\tdouble xL = Math.abs(mapBounds[1]-mapBounds[3]), yL = Math.abs(mapBounds[0]-mapBounds[2]);\n\t\tdouble xI = (xM-(yM-60)*(xL/yL))/2, yI = 30;\n\t\tif(xM/yM < xL/yL) {\n\t\t\txI = 30;\n\t\t\tyI += (yM-(xM-60)*(yL/xL))/2;\n\t\t}\n\t\tdouble yP = yM*yF-yM/zoom/2, xP = xM*xF-xM/zoom/2;\n\t\t\n\t\tg2d.setColor(Color.white);\n\t\tg2d.fillRect(20, 20, width-40, height-40);\n\t\tg2d.setColor(roadColor);\n\t\tg2d.setStroke(new BasicStroke(roadWidth));\n\t\t\n\t\t// Drawing each road\n\t\tint i, n = G.getSize();\n\t\tdouble[] v1, v2;\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tfor(Edge e : G.getEdges(i)) {\t\t\t\t\n\t\t\t\tv1 = V.get(i);\n\t\t\t\tv2 = V.get(e.next);\n\t\t\t\tif(animate)\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 0, g2d);\n\t\t\t\telse {\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], (int)(v1[2]*v2[2]), g2d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Drawing each path\n\t\tif(animate) {\n\t\t\tn = P.size()-1;\n\t\t\tfor(i = 0; i < n; i++) {\n\t\t\t\t\n\t\t\t\tv1 = V.get(P.get(i));\n\t\t\t\tv2 = V.get(P.get(i+1));\n\t\t\t\t\n\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 1, g2d);\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\t\t\trevalidate();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Creating image base\n\t\tg2d.setStroke(new BasicStroke(1));\n\t\tg2d.setColor(Color.lightGray);\n\t\tg2d.fillRect(0, 0, width, 20);\n\t\tg2d.fillRect(0, 0, 20, height);\n\t\tg2d.fillRect(width-20, 0, 20, height);\n\t\tg2d.fillRect(0, height-20, width, 20);\n\t\tg2d.setColor(Color.black);\n\t\tg2d.drawRect(20, 20, width-40, height-40);\n\t\tg2d.setFont(titleFont);\n\t\tg2d.drawString(title, 40, 15);\n\t\tint tw = g2d.getFontMetrics().stringWidth(title);\n\t\tg2d.setFont(subtitleFont);\n\t\tg2d.drawString(subtitle, 50+tw, 15);\n\t\t\n\t\t\n\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\trevalidate();\n\t}", "public void paint(Graphics g)\n\t\t{\n\t\t\t\n\t\t\tif (!gameStarted)\n\t\t\t\ttown.show (g); //when the game first starts draws the map\n//\t\t\ttown.show(g);\n//\t\t\ttestPlayer.show(g);\n//\t\t\thouse1.show (g);\n//\t\t\thome.show (g);\n//\t\t\thouse2.show (g);\n//\t\t\tpokecentre.show (g);\n//\t\t\toakLab.show(g);\n\t\t}", "private void setUpMap() {\n mMap.getUiSettings().setZoomControlsEnabled(false);\n \n // Setting an info window adapter allows us to change the both the\n // contents and look of the\n // info window.\n mMap.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater()));\n \n // Add lots of markers to the map.\n addMarkersToMap();\n \n }", "@Override\r\n public void mapshow()\r\n {\r\n printInvalidCommandMessage();\r\n }", "private void m12811c(Map<String, String> map) {\n Rect rect = new Rect();\n this.f10118e.getGlobalVisibleRect(rect);\n map.put(\"pt\", String.valueOf(rect.top));\n map.put(\"pl\", String.valueOf(rect.left));\n map.put(\"ph\", String.valueOf(this.f10118e.getMeasuredHeight()));\n map.put(\"pw\", String.valueOf(this.f10118e.getMeasuredWidth()));\n WindowManager windowManager = (WindowManager) this.f10116c.getSystemService(\"window\");\n DisplayMetrics displayMetrics = new DisplayMetrics();\n windowManager.getDefaultDisplay().getMetrics(displayMetrics);\n map.put(\"vph\", String.valueOf(displayMetrics.heightPixels));\n map.put(\"vpw\", String.valueOf(displayMetrics.widthPixels));\n }", "private void inicMapComponent() {\n\t\tmapView = ((MapFragment) getFragmentManager()\n\t\t\t\t.findFragmentById(R.id.map)).getMap();\n\t\t\n\n\t\tlocationService = new LocationService(MapPage.this);\n\t\tlocationService.getLocation();\n\t\t\n\t\tmapView.setMyLocationEnabled(true);\n\n\t Location location = mapView.getMyLocation();\n\t LatLng myLocation = null; //new LatLng(44.8167d, 20.4667d);\n\t \n\t\tif (location != null) {\n\t myLocation = new LatLng(location.getLatitude(),\n\t location.getLongitude());\n\t } else {\n\t \tLocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);\n\t\t\tCriteria criteria = new Criteria();\n\t\t\tString provider = service.getBestProvider(criteria, false);\n\t\t\tLocation lastKnownLocation = service.getLastKnownLocation(provider);\n\t\t\tmyLocation = new LatLng(lastKnownLocation.getLatitude(),lastKnownLocation.getLongitude());\n\t }\n\t\t\n\t\tmapView.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 13));\n\t\t\n\t\tmapView.setPadding(0, 0, 0, 80);\n\t\t\n\t\tmapView.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t//onMapWindwosClick(marker.getId(),marker.getTitle());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t\n\t}", "public BorderPane getMapView() {\n final WebEngine webEngine = new WebEngine(getClass().getResource(\"/racesearcher/ui/map/map.html\").toString());\n final WebView webView = new WebView(webEngine);\n // create map type buttons\n final ToggleGroup mapTypeGroup = new ToggleGroup();\n final ToggleButton road = new ToggleButton(\"Road\");\n road.setSelected(true);\n road.setToggleGroup(mapTypeGroup);\n final ToggleButton satellite = new ToggleButton(\"Satellite\");\n satellite.setToggleGroup(mapTypeGroup);\n final ToggleButton hybrid = new ToggleButton(\"Hybrid\");\n hybrid.setToggleGroup(mapTypeGroup);\n final ToggleButton terrain = new ToggleButton(\"Terrain\");\n terrain.setToggleGroup(mapTypeGroup);\n mapTypeGroup.selectedToggleProperty().addListener(\n new ChangeListener<Toggle>() {\n\n public void changed(\n ObservableValue<? extends Toggle> observableValue,\n Toggle toggle, Toggle toggle1) {\n if (road.isSelected()) {\n webEngine.executeScript(\"document.setMapTypeRoad()\");\n } else if (satellite.isSelected()) {\n webEngine.executeScript(\n \"document.setMapTypeSatellite()\");\n } else if (hybrid.isSelected()) {\n webEngine.executeScript(\n \"document.setMapTypeHybrid()\");\n } else if (terrain.isSelected()) {\n webEngine.executeScript(\n \"document.setMapTypeTerrain()\");\n }\n }\n });\n\n Button zoomIn = new Button(\"Zoom In\");\n zoomIn.setOnAction(new EventHandler<ActionEvent>() {\n\n public void handle(ActionEvent actionEvent) {\n webEngine.executeScript(\"document.zoomIn()\");\n }\n });\n Button zoomOut = new Button(\"Zoom Out\");\n zoomOut.setOnAction(new EventHandler<ActionEvent>() {\n\n public void handle(ActionEvent actionEvent) {\n webEngine.executeScript(\"document.zoomOut()\");\n }\n });\n // create toolbar\n ToolBar toolBar = new ToolBar();\n toolBar.getStyleClass().add(\"map-toolbar\");\n toolBar.getItems().addAll(\n road, satellite, hybrid, terrain,\n createSpacer(),\n new Label(\"Location:\"), zoomIn, zoomOut);\n // create root\n BorderPane root = new BorderPane();\n root.getStyleClass().add(\"map\");\n root.setCenter(webView);\n root.setTop(toolBar);\n\n return root;\n }", "public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}", "private void setUpMap() {\n mMap.setMyLocationEnabled(true);\n }", "public MapScreen() {\n\t\tthis(DEFAULT_WIDTH, DEFAULT_HEIGHT); // default size for map screen.\n\t}", "public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}", "public static void printAvailableMaps() {\n \tFile folder = new File(\"./examples/\");\n \tFile[] listOfFiles = folder.listFiles();\n \tSystem.out.println(\"Available maps (choose one and start game with command 'game map_name' ) : \");\n\n \t for (int i = 0; i < listOfFiles.length; i++) {\n \t if (listOfFiles[i].isFile()) {\n \t System.out.println(\"\\t\"+listOfFiles[i].getName());\n \t } \n \t }\n }", "public void buildEmptyMap() {\n this.emptyMap = new BufferedImage(this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, BufferedImage.TYPE_INT_RGB);\n final Graphics2D graphics = (Graphics2D) this.emptyMap.getGraphics();\n graphics.drawImage(this.boulderDashModel.getArea().getImage(), 0, 0, this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, null);\n }", "private void setMapMode(boolean mapMode) {\n\t\tif (this.isShowingMap != mapMode) {\n\n\t\t\tif (mapMode) {\n\n\t\t\t\tlargeStatsFragment.setVisibility(View.GONE);\n\t\t\t\tsmallStatsFragment.setVisibility(View.VISIBLE);\n\t\t\t\t// pnlLargeTiles.setVisibility(View.GONE);\n\t\t\t\t// pnlSmallTiles.setVisibility(View.VISIBLE);\n\t\t\t\tpnlMap.setVisibility(View.VISIBLE);\n\n\t\t\t\t// float alpha = getResources().getFraction(fraction.alpha_semi_transparent, 1, 1);\n\t\t\t\t// float alpha = ALPHA_TRANSPARENT;\n\t\t\t\t// pnlSmallTiles.setAlpha(alpha);\n\t\t\t\t// pnlBottomButtons.setAlpha(alpha);\n\t\t\t\t// pnlTopButtons.setAlpha(alpha);\n\t\t\t\t// pnlStopwatch.setAlpha(alpha);\n\n\t\t\t} else {\n\n\t\t\t\tlargeStatsFragment.setVisibility(View.VISIBLE);\n\t\t\t\tsmallStatsFragment.setVisibility(View.GONE);\n\t\t\t\t// pnlSmallTiles.setVisibility(View.GONE);\n\t\t\t\tpnlMap.setVisibility(View.GONE);\n\t\t\t\t// pnlLargeTiles.setVisibility(View.VISIBLE);\n\n\t\t\t\t// float alpha = getResources().getFraction(fraction.alpha_lighter, 1, 1);\n\t\t\t\t// float alpha = ALPHA_OPAQUE;\n\t\t\t\t// pnlSmallTiles.setAlpha(OPAQUE);\n\t\t\t\t// pnlBottomButtons.setAlpha(alpha);\n\t\t\t\t// pnlTopButtons.setAlpha(alpha);\n\t\t\t\t// pnlStopwatch.setAlpha(OPAQUE);\n\n\t\t\t}\n\n\t\t\tthis.isShowingMap = mapMode;\n\t\t\tthis.btnToggleMap.setChecked(mapMode);\n\n\t\t}\n\n\t\tif (this.isShowingMap) {\n\t\t\tLocation loc = workoutService == null ? null : workoutService.getService().getLastKnownLocation();\n\t\t\tif (loc != null) {\n\t\t\t\tshowOnMap(loc);\n\t\t\t}\n\t\t}\n\t}", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "private void PrintFineMap() {\n\t\tif (fineMap.isEmpty()) {\n\t\t\tviolationProcess.CalculateFinesPerCapita(populationReader.getPopulationMap());\n\t\t\tfineMap = violationProcess.getFineMap();\n\t\t}\n\t\tSystem.out.println(fineMap);\n\t}", "private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}", "private void setUpMap() {\n // Crear all map elements\n mGoogleMap.clear();\n // Set map type\n mGoogleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n // If we cant find the location now, we call a Network Provider location\n if (mLocation != null) {\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(mLocation.getLatitude(), mLocation.getLongitude());\n // Show the current location in Google Map\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n // Draw the first circle in the map\n mCircleOptions = new CircleOptions().fillColor(0x5500ff00).strokeWidth(0l);\n // Zoom in the Google Map\n mGoogleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n // Zoom in the Google Map\n //icon = BitmapDescriptorFactory.fromResource(R.drawable.logo2);\n\n // Creation and settings of Marker Options\n mMarkerOptions = new MarkerOptions().position(latLng).title(\"You are here!\");//.icon(icon);\n // Creation and addition to the map of the Marker\n mMarker = mGoogleMap.addMarker(mMarkerOptions);\n // set the initial map radius and draw the circle\n drawCircle(RADIUS);\n }\n }", "void setMapChanged();", "@Override\n\tpublic void render(Bitmap map) {\n\t\t\n\t}", "public void SetupMap()\n {\n mMap.setMyLocationEnabled(true);\n\n // GAME LatLng\n LatLng latLng = new LatLng(53.227668, -0.540038);\n\n // Create instantiate Marker\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(false);\n markerOptions.title(\"GAME\");\n\n MapsInitializer.initialize(getActivity());\n // Create Marker at pos\n mMap.addMarker(markerOptions);\n // Position Map Camera to pos\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(latLng, 100, 0, 0)));\n }", "static void printTheSpecifiedMap(MapLM mapToPrint){\n List<List<List<Ansi>>> mapAnsi = mapLMToAnsi(mapToPrint.getMap());\n for(int mapRow = 0; mapRow < GeneralInfo.ROWS_MAP; mapRow++){\n /*mapAnsi.get(mapRow).get(0) is the first square of the current mapRow,\n assuming the other squares on the same mapRow have the same\n number of rows (in other words, the same .size())\n */\n for(int squareRow=0; squareRow < mapAnsi.get(mapRow).get(0).size() ; squareRow++){\n //for each square on the specified mapRow(mapRow is a list of squares)\n for(List<Ansi> square: mapAnsi.get(mapRow)){\n AnsiConsole.out.print(square.get(squareRow));\n /*after the last character of the second line of the last square of\n each row of the map, print the corresponding vertical coordinate\n */\n if((/*last square of the foreach*/ square.equals(mapAnsi.get(mapRow).get(mapAnsi.get(mapRow).size()-1)))\n && squareRow == 1){\n //print vertical coordinate coordinate\n System.out.print(\" \" + verticalCoordinateForUser(mapRow));\n }\n }\n /*after printing the whole specified line of the map (the specified line of all\n the squares on the specified row of squares of the map), start a new line\n */\n System.out.print(\"\\n\");\n }\n }\n //print horizontal coordinates\n System.out.print(\"\\n\");\n for(int i=0; i < GeneralInfo.COLUMNS_MAP; i++){\n System.out.print(\" \" + horizontalCoordinateForUser(i) + \" \");\n }\n }", "public void mapIsClicked(View view) {\n Controller.viewMappa();\n }", "private void drawMap(final Graphics2D theGraphics) {\n for (int y = 0; y < myGrid.length; y++) {\n final int topy = y * SQUARE_SIZE;\n\n for (int x = 0; x < myGrid[y].length; x++) {\n final int leftx = x * SQUARE_SIZE;\n\n switch (myGrid[y][x]) {\n case STREET:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n drawStreetLines(theGraphics, x, y);\n break;\n\n case WALL:\n theGraphics.setPaint(Color.BLACK);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case TRAIL:\n theGraphics.setPaint(Color.YELLOW.darker().darker());\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case LIGHT:\n // draw a circle of appropriate color\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n \n case CROSSWALK:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n \n drawCrossWalkLines(theGraphics, x, y);\n \n // draw a small circle of appropriate color centered in the square\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n topy + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n SQUARE_SIZE / 2, SQUARE_SIZE / 2);\n break;\n\n default:\n }\n\n drawDebugInfo(theGraphics, x, y);\n }\n }\n }", "private void showBounds(){\n\n LatLngBounds.Builder boundBuilder = new LatLngBounds.Builder();\n\n\n for (int i = 0; i < points.size(); i++) {\n LatLng b_position = new LatLng(points.get(i).getLatitude(),points.get(i).getLongitude());\n boundBuilder.include(b_position);\n }\n\n LatLngBounds bounds = boundBuilder.build();\n\n int deviceWidth = getResources().getDisplayMetrics().widthPixels;\n int deviceHeight = getResources().getDisplayMetrics().heightPixels;\n int devicePadding = (int) (deviceHeight * 0.20); // offset from edges of the map 10% of screen\n\n CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, deviceWidth, deviceHeight, devicePadding);\n mMap.animateCamera(cu);\n\n }", "@Override\n public void run() {\n Map<String, Object> m = new HashMap<>();\n m.put(\"mAMapLocation\", \"mAMapLocation\");\n Graphic graphic = new Graphic(tapPoint, m, pinDestinationSymbol);\n\n finalMarkerOverlay.getGraphics().add(graphic);\n }", "public RadarMap() {\n initComponents();\n }", "@Override\r\n protected void setUpMap() {\n mMap.addMarker(new MarkerOptions()\r\n .position(BRISBANE)\r\n .title(\"Brisbane\")\r\n .snippet(\"Population: 2,074,200\")\r\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\r\n\r\n // Uses a custom icon with the info window popping out of the center of the icon.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(SYDNEY)\r\n .title(\"Sydney\")\r\n .snippet(\"Population: 4,627,300\")\r\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow))\r\n .infoWindowAnchor(0.5f, 0.5f));\r\n\r\n // Creates a draggable marker. Long press to drag.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(MELBOURNE)\r\n .title(\"Melbourne\")\r\n .snippet(\"Population: 4,137,400\")\r\n .draggable(true));\r\n\r\n // A few more markers for good measure.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(PERTH)\r\n .title(\"Perth\")\r\n .snippet(\"Population: 1,738,800\"));\r\n mMap.addMarker(new MarkerOptions()\r\n .position(ADELAIDE)\r\n .title(\"Adelaide\")\r\n .snippet(\"Population: 1,213,000\"));\r\n\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(BRISBANE, 10));\r\n }", "public void setupPlainVariables_xjal()\n/* 422: */ {\n/* 423:492 */ this.mapPanel = \n/* 424:493 */ new TileMapPanel(new TileImageProvider());\n/* 425: */ }", "public void ShowAll (View paramView)\n\t{\n\t\tfinal MapView mapView = (MapView) findViewById(R.id.mapView);\n\n\n\t\tmapView.getOverlays().clear();\n\t\titemizedoverlay.clear();\n\t\tmapView.setBuiltInZoomControls(false);\n\n\t\t// add our position to map\n\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\tmapView.postInvalidate();\n\n\t\tfinal List<Overlay> mapOverlays = mapView.getOverlays();\n\t\tmyLocationOverlay.enableMyLocation();\n\n\t\t// add our position to map and refresh it\n\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\tmapView.postInvalidate();\n\t\tmyLocationOverlay.enableMyLocation();\n\n\t\t// add all points from list to map\n\t\tfor(int i = 0; i<MiejscaArray.length; i++)\n\t\t{\t\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tHashMap MojaMapa = (HashMap) MiejscaArray[i];\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tHashMap MyMap = (HashMap) MojaMapa.get(\"Category\");\n\t\t\tSystem.out.println(MojaMapa);\n\n\t\t\tfloat Lat = Float.parseFloat(\"\"+MojaMapa.get(\"latitude\"));\n\t\t\tfloat Long = Float.parseFloat(\"\"+MojaMapa.get(\"longitude\"));\n\t\t\tint MicroLat = (int) (Lat*1e6);\n\t\t\tint MicroLong = (int) (Long*1e6);\n\n\t\t\tGeoPoint point = new GeoPoint(MicroLat, MicroLong);\n\t\t\tMyOverlayItem overlayitem = new MyOverlayItem(point, \n\t\t\t\t\t\"\"+i, \n\t\t\t\t\t\"\"+category, \n\t\t\t\t\t\"\"+MojaMapa.get(\"address\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"city\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"zip_code\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"country\"),\n\t\t\t\t\tString.format(\"%.2f\", Float.parseFloat(MojaMapa.get(\"kilometers\").toString())),\n\t\t\t\t\t\"\"+MojaMapa.get(\"latitude\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"longitude\"),\n\t\t\t\t\t\"\"+MyMap.get(\"icon\"), \n\t\t\t\t\tLat+\",\"+Long);\n\n\t\t\tSetDrawable(\"\"+MyMap.get(\"icon\"), \"\"+MyMap.get(\"color\"));\n\t\t\titemizedoverlay = new HelloItemizedOverlay(drawable, this);\n\t\t\titemizedoverlay.addOverlay(overlayitem);\n\t\t\tmapOverlays.add(itemizedoverlay);\n\t\t}\n\n\t\t// Remove WebView and place MapView in his place\n\t\tWebView webView = (WebView) findViewById(R.id.webView);\n\t\twebView.setVisibility(View.GONE);\n\n\t\tmylistView =(ListView)findViewById(android.R.id.list);\n\n\t\tif (isThisTablet == false)\n\t\t{\n\t\t\tmylistView.setVisibility(View.GONE);\n\t\t\tmapView.setVisibility(View.VISIBLE);\n\n\t\t\tButton Mapbutton = (Button) findViewById(R.id.map_button);\n\t\t\tMapbutton.setBackgroundColor(Color.BLUE);\n\n\t\t\tButton ListButton = (Button) findViewById(R.id.list_button);\n\t\t\tListButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t\tButton SzczeButton = (Button) findViewById(R.id.szczegoly_button);\n\t\t\tSzczeButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Button Mapbutton = (Button) findViewById(R.id.map);\n\t\t\t//Mapbutton.setVisibility(View.GONE);\n\n\t\t\t//Button Szczebutton = (Button) findViewById(R.id.szczegoly);\n\t\t\t//Szczebutton.setVisibility(View.VISIBLE);\n\n\t\t\tmapView.setVisibility(View.VISIBLE);\t\n\t\t}\n\t}", "public MapView(int height, int width)\n {\n stats = new FieldStats();\n colors = new LinkedHashMap<>();\n\n setTitle(\"Map Environment Viewer\");\n stepLabel = new JLabel(STEP_PREFIX, JLabel.CENTER);\n infoLabel = new JLabel(\" \", JLabel.CENTER);\n population = new JLabel(POPULATION_PREFIX, JLabel.CENTER);\n\n currentEnvironment = \"Savanna\";\n\n setLocation(500, 50);\n\n fieldView = new FieldView(height, width);\n\n Container contents = getContentPane();\n\n JPanel infoPane = new JPanel(new BorderLayout());\n infoPane.add(stepLabel, BorderLayout.WEST);\n infoPane.add(infoLabel, BorderLayout.CENTER);\n contents.add(infoPane, BorderLayout.NORTH);\n contents.add(fieldView, BorderLayout.CENTER);\n contents.add(population, BorderLayout.SOUTH);\n pack();\n setVisible(true);\n }", "public void printDetailedMap(GameMap map, List<String> playersNames);", "public static MapView makeMapView(Map map) {\n TileView tileViews[][] = new TileView[map.getWidth()][map.getHeight()];\n for (int x = 0; x < map.getWidth(); x++) {\n for (int y = 0; y < map.getHeight(); y++) {\n Tile tile = map.getTile(x, y);\n if (tile instanceof Grass) {\n tileViews[x][y] = new TileView(tile, Assets.GRASSHEXTILE);\n } else if (tile instanceof Water) {\n tileViews[x][y] = new TileView(tile, Assets.WATERHEXTILE);\n } else if (tile instanceof Mountain) {\n tileViews[x][y] = new TileView(tile, Assets.MOUNTAINHEXTILE);\n } else {\n tileViews[x][y] = new TileView(tile, Assets.GRASSHEXTILE);\n }\n }\n }\n return new MapView(map, tileViews);\n }", "public void initMap() {\r\n\r\n\t\tproviders = new AbstractMapProvider[3];\t\r\n\t\tproviders[0] = new Microsoft.HybridProvider();\r\n\t\tproviders[1] = new Microsoft.RoadProvider();\r\n\t\tproviders[2] = new Microsoft.AerialProvider();\r\n\t\t/*\r\n\t\t * providers[3] = new Yahoo.AerialProvider(); providers[4] = new\r\n\t\t * Yahoo.RoadProvider(); providers[5] = new OpenStreetMapProvider();\r\n\t\t */\r\n\t\tcurrentProviderIndex = 0;\r\n\r\n\t\tmap = new InteractiveMap(this, providers[currentProviderIndex],\r\n\t\t\t\tUtilities.mapOffset.x, Utilities.mapOffset.y,\r\n\t\t\t\tUtilities.mapSize.x, Utilities.mapSize.y);\r\n\t\tmap.panTo(locationUSA);\r\n\t\tmap.setZoom(minZoom);\r\n\r\n\t\tupdateCoordinatesLimits();\r\n\t}", "@Override\r\n\tpublic boolean hasHiddenMiniMap() {\n\t\treturn false;\r\n\t}", "private void configMap() {\n\n googleMap.getUiSettings().setMapToolbarEnabled(false);//an buton dieu huong bat snag map\n\n googleMap.getUiSettings().setMyLocationButtonEnabled(true);//nut vi tri cua minh tru se hien thi\n googleMap.getUiSettings().setZoomControlsEnabled(true);//co the zoom\n\n// b2\n googleMap.setInfoWindowAdapter(new MyInfoWindown());//cutom titlemap\n\n try {//them lenh nay de no cap location thì cai nut tren moi hoat dong\n\n googleMap.setMyLocationEnabled(true);//cung cap vi tri cua minh,can try cacth xin quyen\n } catch (SecurityException e) {\n\n }\n googleMap.setOnMyLocationButtonClickListener(this);//dNG KY\n\n\n }", "public static void createMap()\n\t\t\t{\n\t\t\tmap = new Vector<Location>(4);\n\t\n\t\t\tLocation location1 = new Location(\"the southwest room.\",\"You see doors to the north and east.\");\n\t\t\tLocation location2 = new Location(\"the southeast room.\",\"You see doors to the north and west.\");\n\t\t\tLocation location3 = new Location(\"the northwest room.\",\"You see doors to the south and east.\");\n\t\t\tLocation location4 = new Location(\"the northeast room.\",\"You see doors to the south and west.\");\n\n\t\t\tmap.addElement(location1);\n\t\t\tmap.addElement(location2);\n\t\t\tmap.addElement(location3);\n\t\t\tmap.addElement(location4);\n\t\t\t\n\t\t\t// This section defines the exits found in each location and the \n\t\t\t// locations to which they lead.\n\t\t\tlocation1.addExit(new Exit(Exit.north, location3));\n\t\t\tlocation1.addExit(new Exit(Exit.east, location2));\n\t\t\tlocation2.addExit(new Exit(Exit.north, location4));\n\t\t\tlocation2.addExit(new Exit(Exit.west, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.south, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.east, location4));\n\t\t\tlocation4.addExit(new Exit(Exit.west, location3));\n\t\t\tlocation4.addExit(new Exit(Exit.south, location2));\n\t\t\t\n\t\t\tcurrentLocation = location1;\t\t\t\t\n\t\t\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n// MapContainer = (LinearLayout) findViewById(R.id.testampmap);\n\n// if (USE_XML_LAYOUT) {\n// setContentView(R.layout.activity_map);\n//\n//// mMapView = (NMapView) findViewById(R.id.mapView);\n// }\n\n\n //네이버 지도 MapView를 생성해준다.\n mMapView = new NMapView(this);\n //지도에서 ZoomControll을 보여준다\n mMapView.setBuiltInZoomControls(true, null);\n //네이버 OPEN API 사이트에서 할당받은 KEY를 입력하여 준다.\n mMapView.setApiKey(API_KEY);\n //이 페이지의 레이아웃을 네이버 MapView로 설정해준다.\n// setContentView(mMapView);\n setContentView(R.layout.activity_map);\n mLinearLayout = (LinearLayout)findViewById(R.id.mapmap);\n mLinearLayout.addView(mMapView);\n //네이버 지도의 클릭이벤트를 처리 하도록한다.\n mMapView.setClickable(true);\n //맵의 상태가 변할때 이메소드를 탄다.\n mMapView.setOnMapStateChangeListener(new NMapView.OnMapStateChangeListener() {\n public void onZoomLevelChange(NMapView arg0, int arg1) {\n\n }\n\n public void onMapInitHandler(NMapView arg0, NMapError arg1) {\n\n if (arg1 == null) {\n // 표시해줄 위치\n mMapController.setMapCenter(new NGeoPoint(126.978371, 37.5666091), 11);\n } else {\n Toast.makeText(getApplicationContext(), arg1.toString(), Toast.LENGTH_SHORT).show();\n }\n }\n\n public void onMapCenterChangeFine(NMapView arg0) {\n\n }\n\n public void onMapCenterChange(NMapView arg0, NGeoPoint arg1) {\n\n }\n\n public void onAnimationStateChange(NMapView arg0, int arg1, int arg2) {\n\n }\n });\n //맵뷰의 이벤트리스너의 정의.\n mMapView.setOnMapViewTouchEventListener(new NMapView.OnMapViewTouchEventListener() {\n\n public void onTouchDown(NMapView arg0, MotionEvent arg1) {\n\n }\n\n @Override\n public void onTouchUp(NMapView nMapView, MotionEvent motionEvent) {\n\n }\n\n public void onSingleTapUp(NMapView arg0, MotionEvent arg1) {\n\n }\n\n public void onScroll(NMapView arg0, MotionEvent arg1, MotionEvent arg2) {\n\n }\n\n public void onLongPressCanceled(NMapView arg0) {\n\n }\n\n public void onLongPress(NMapView arg0, MotionEvent arg1) {\n\n }\n });\n mMapController = mMapView.getMapController();\n super.setMapDataProviderListener(new OnDataProviderListener() {\n\n public void onReverseGeocoderResponse(NMapPlacemark arg0, NMapError arg1) {\n\n }\n });\n }", "@Override\n\tpublic void mapInitialized() {\n\t\tfinal LatLong center = new LatLong(32.777, 35.0225);\n\t\tSystem.out.println(\"got here\");\n\t\tmapComponent.addMapReadyListener(() -> checkCenter(center));\n\t\t// lblClick.setText((center + \"\"));\n\t\tfinal MapOptions options = new MapOptions();\n\t\toptions.center(center).zoom(12).overviewMapControl(false).panControl(false).rotateControl(false)\n\t\t\t\t.scaleControl(true).streetViewControl(true).zoomControl(true).mapType(MapTypeIdEnum.ROADMAP);\n\n\t\tmap = mapComponent.createMap(options, false);\n\t\tmap.setHeading(123.2);\n\t\tmap.fitBounds(new LatLongBounds(center, new LatLong(32.779032, 35.024663)));\n\t\tmap.addUIEventHandler(UIEventType.click, (final JSObject obj) -> {\n\t\t\tLatLong newLat = new LatLong((JSObject) obj.getMember(\"latLng\"));\n\t\t\tnewLat = new LatLong(newLat.getLatitude(), newLat.getLongitude());\n\t\t\tlblClick.setText(newLat + \"\");\n\t\t\tmap.addMarker(createMarker(newLat, \"marker at \" + newLat));\n\t\t});\n\t\tmapTypeCombo.setDisable(false);\n\n\t\tmapTypeCombo.getItems().addAll(MapTypeIdEnum.ALL);\n\t\tdirectionsService = new DirectionsService();\n\t\tdirectionsPane = mapComponent.getDirec();\n\t\tscene.getWindow().sizeToScene();\n\t}" ]
[ "0.78509957", "0.77925456", "0.7731738", "0.763553", "0.7490266", "0.7387814", "0.72391254", "0.7217444", "0.71638805", "0.70984805", "0.7080332", "0.7047627", "0.70192975", "0.6987343", "0.69760066", "0.69073516", "0.68992335", "0.6886998", "0.68369746", "0.68015", "0.6794883", "0.6783711", "0.67834854", "0.6755115", "0.6753676", "0.67050934", "0.67037946", "0.6694366", "0.66779333", "0.6676174", "0.65591145", "0.6531765", "0.6526705", "0.65051645", "0.6472845", "0.64710563", "0.6467708", "0.6459941", "0.6434576", "0.6408337", "0.6402641", "0.63867545", "0.63427496", "0.632031", "0.6308427", "0.62997633", "0.6297513", "0.6296923", "0.6296061", "0.6288166", "0.62602234", "0.623574", "0.62157995", "0.6204319", "0.62027156", "0.6199187", "0.6198968", "0.6192802", "0.61839825", "0.61748254", "0.6170939", "0.615762", "0.6153504", "0.6147695", "0.61453056", "0.6135579", "0.61174506", "0.60980165", "0.6086314", "0.6086125", "0.6075072", "0.6070672", "0.6064518", "0.60640466", "0.6051183", "0.60430634", "0.6041472", "0.6036972", "0.60369223", "0.6035005", "0.6032794", "0.60241544", "0.6020259", "0.60136086", "0.6013402", "0.6012492", "0.60121614", "0.60043776", "0.6003192", "0.59998614", "0.5986033", "0.59847844", "0.597914", "0.597308", "0.597093", "0.59691566", "0.5959577", "0.59595084", "0.5959462", "0.59546703" ]
0.6517761
33
Move the robot to move forward on the screen as well
@Override public void forward(int step) { String s; this.x = checkValidX(this.x + Constant.SENSORDIRECTION[this.getDirection()][0]); this.y = checkValidX(this.y + Constant.SENSORDIRECTION[this.getDirection()][1]); switch (this.getDirection()) { case Constant.NORTH: s = "Up"; break; case Constant.EAST: s = "Right"; break; case Constant.SOUTH: s = "Down"; break; case Constant.WEST: s = "Left"; break; default: s = "Error"; } toggleValid(); for (int i = 0; i < step * Constant.GRIDWIDTH; i++) { t.schedule(new MoveImageTask(robotImage, s, 1), delay * (i + 1)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void moveForward();", "public void moveForward(){\n\t\tSystem.out.println(\"Vehicle moved forward\");\n\t}", "public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}", "public void DriveForwardSimple() {\n \ttheRobot.drive(-0.5, 0.0);\n }", "public void moveForward()\r\n\t{\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading-90))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading-90))*distance;\r\n\t\t}\r\n\t}", "abstract public void moveForward();", "public void stepForward() {\n\t\tposition = forwardPosition();\n\t}", "public void moveForward(int speed) throws JposException;", "public void forward()\n\t{ \n\t\tupdateState( MotorPort.FORWARD);\n\t}", "public void forward() {\n forward(DEFAULT_SPEED);\n }", "public void move() {\n if(Objects.nonNull(this.position)) {\n Position position = this.getPosition();\n Function<Position, Position> move = moveRobotInDirectionMap.get(position.getDirection());\n this.position = move.apply(position);\n }\n }", "public void move() {\r\n\t\tSystem.out.print(\"This Goose moves forward\");\r\n\t}", "public void move()\n {\n move(WALKING_SPEED);\n }", "private void move() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n int newX = -1;\n int newY = -1;\n switch (direction) {\n case EAST:\n newX = currentPosition.getX() + 1;\n newY = currentPosition.getY();\n break;\n case WEST:\n newX = currentPosition.getX() - 1;\n newY = currentPosition.getY();\n break;\n case NORTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() + 1;\n break;\n case SOUTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() - 1;\n break;\n }\n\n if(newX < lowerBound.getX() || newY < lowerBound.getY()\n || newX > upperBound.getX() || newY > upperBound.getY()) {\n System.out.println(\"Cannot move to \" + direction);\n return;\n }\n\n currentPosition.setX(newX);\n currentPosition.setY(newY);\n }", "public void travelForward (double x, double y){\r\n\r\n\t\t\tdouble xDistance = x - odometer.getX();//the distance the robot has to travel in x to get to its destination from current position.\r\n\t\t\tdouble yDistance = y - odometer.getY();//the distance the robot has to travel in y to get to its destination from current position.\r\n\t\t\tdouble distance = Math.sqrt(xDistance*xDistance + yDistance*yDistance);//the overall distance the robot has to travel from current position.\r\n\t\t\r\n\t\t\tdouble xStart = odometer.getX();\r\n\t\t\tdouble yStart = odometer.getY();\r\n\t\t\t\r\n\t\t\tboolean isTravelling = true;\r\n\t\t\t\r\n\t\t\twhile(isTravelling){\r\n\t\t\t\t\r\n\t\t\t\tleftMotor.setSpeed(FORWARD_SPEED);\r\n\t\t\t\trightMotor.setSpeed(FORWARD_SPEED);\r\n\r\n\t\t\t\tleftMotor.rotate(convertDistance(wheelRadius, distance - distanceTravelled), true);\r\n\t\t\t\trightMotor.rotate(convertDistance(wheelRadius, distance - distanceTravelled), true);\r\n\t\t\t\t\r\n\t\t\t\txTravelled =(odometer.getX() - xStart); //update xTravelled\r\n\t\t\t\tyTravelled =(odometer.getY() - yStart);\t//update yTravelled\r\n\t\t\t\t\r\n\t\t\t\tdistanceTravelled = Math.sqrt(xTravelled*xTravelled +yTravelled*yTravelled); //update the distance travelled\r\n\t\t\t\tif (distanceTravelled >= distance){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(getFilteredData() < 15 ){ // if the robot sees an object on the path\r\n\t\t\t\t\tisTravelling = false; //set to false so we exit the loop \r\n\t\t\t\t}\r\n\t\t\t\tLCD.drawString(\"x \", 0, 5);\r\n\t\t\t\tLCD.drawString(\"x \"+odometer.getX(), 0, 5);\r\n\t\t\t\tLCD.drawString(\"y \", 0, 6);\r\n\t\t\t\tLCD.drawString(\"y \"+odometer.getY(), 0, 6);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tleftMotor.setSpeed(0);\r\n\t\t\trightMotor.setSpeed(0);\r\n\t\t\t\t\r\n\t\t\t}", "private static void go_forward()throws AWTException {\n\t\ttry{\r\n\t\t\t// Robot robot = new Robot();\r\n\r\n\t\t\trobot.keyPress(KeyEvent.VK_ALT);\r\n\t\t\trobot.keyPress(KeyEvent.VK_RIGHT);\r\n\t\t\trobot.keyRelease(KeyEvent.VK_RIGHT);\r\n\t\t\trobot.keyRelease(KeyEvent.VK_ALT);\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e1) {\r\n\t\t\tSystem.err.println(\"Use: java Renderer <Local IPAddress> <Localport> <Remote IPAddress> <Remote Port>\");\r\n\t\t}\r\n\r\n\t}", "public void move() {\r\n\t\tSystem.out.print(\"This Tiger moves forward\");\r\n\t}", "void move() {\n\t\tif (reachedEdge()) {\n\t\t\tvelocityX = velocityX * -1;\n\t\t\ty = y + 50;\n\t\t}\n\t\tif (reachedLeft()) {\n\t\t\tvelocityX = velocityX * -1;\n\t\t\ty = y + 50;\n\t\t}\n\n\t\tx = x + velocityX;\n\t}", "public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}", "public void move() {\r\n\t\tSystem.out.print(\"This animal moves forward\");\r\n\t}", "@Override\n public void move(){\n setDirectionSpeed(180, 7);\n this.moveTowardsAPoint(target.getCenterX(), target.getCenterY());\n }", "public void forward() {\n\t\t\n\t\tif(hasEaten()) {\n\t\t\taddBodyPart();\n\t\t} else {\n\t\t\tshuffleBody();\n\t\t}\n\t\t\n\t\tthis.setLocation(this.getX()+dX, this.getY()+dY); // move head\n\t\tthis.display(w); \n\t}", "private void move() {\n acceleration.accelerate(velocity, position);\r\n }", "protected void execute() {\n \tRobot.driveSubsystem.runLeftSide(howFastWeWantToMove);\n }", "public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}", "public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }", "public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t}", "public void grip(){\n\t\tthis.motor.backward();\n\t}", "public void move()\n {\n if(!pause)\n {\n if(up)\n { \n list.remove(0); \n head = new Location(head.getA(),head.getB()-15); \n list.add(head); \n }\n else if(down)\n {\n list.remove(0); \n head = new Location(head.getA(),head.getB()+15); \n list.add(head); \n }\n else if(left)\n {\n list.remove(0); \n head = new Location(head.getA()-15,head.getB()); \n list.add(head);\n }\n else if(right)\n {\n list.remove(0); \n head = new Location(head.getA()+15,head.getB()); \n list.add(head); \n }\n \n repaint();\n }\n }", "public void stepForward(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\n\t\t//check to see if we have reached the last frame\n\t\tif(frameIndex == frames.length-1){ frameIndex = 0; }\n\t\telse{ frameIndex++; }\n\t\n\t\tframes[frameIndex].display();\n frames[frameIndex].clearDisplay();\n\t}", "public void move(){\n x+=xDirection;\n y+=yDirection;\n }", "@Override\n protected void execute() \n {\n move(Robot.oi.mechJoystick);\n }", "public void move(){\n super.move();\n if(getX() >= Main.WIDTH - getWidth() * 1.5) {\n setDirection(-1);\n } else if(getX() <= 50) {\n setDirection(1);\n }\n }", "public void move() {\n\t\tSystem.out.println(\"Robot Can Move\");\n\t}", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}", "@Override\n\tpublic void goForward() {\n\t\t// check side and move the according room and side\n\t\tif (side.equals(\"hRight\")) {\n\t\t\tthis.side = \"bFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"hFront\")) {\n\t\t\tthis.side = \"mFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"bLeft\")) {\n\t\t\tthis.side = \"rLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(4);\n\n\t\t} else if (side.equals(\"rBack\")) {\n\t\t\tthis.side = \"bBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"bBack\")) {\n\t\t\tthis.side = \"hLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else if (side.equals(\"kBack\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"lLeft\")) {\n\t\t\tthis.side = \"kRight\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(6);\n\n\t\t} else if (side.equals(\"lBack\")) {\n\t\t\tthis.side = \"mBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"mFront\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"mBack\")) {\n\t\t\tthis.side = \"hBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else {\n\t\t\trandomRoom();\n\t\t\tSystem.out.println(\"Entered Wormhole!\");\n\t\t\tSystem.out.println(\"Location was chosen at random\");\n\t\t\tSystem.out.println(\"New location is: \" + room + \" room and \" + side.substring(1) + \" side\");\n\n\t\t}\n\t}", "public void move() {\n\t\tif (!visible) {\r\n\t\t\thideTurtle();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void goForward() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void move(Robot robot)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(robot.canMoveOneStep())\r\n\t\t\t{\r\n\t\t\t\trobot.moveOneStep();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"This robot cannot move in its current state.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IllegalStateException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"A terminated robot cannot be moved.\");\r\n\t\t}\r\n\t}", "protected void execute() {\r\n\r\n Robot.drive.driveForward(DRIVE_SPEED);\r\n }", "public void move() {\n Grid<Actor> gr = getGrid();\n if (gr == null) {\n return;\n }\n Location loc = getLocation();\n if (gr.isValid(next)) {\n setDirection(getLocation().getDirectionToward(next));\n moveTo(next);\n } else {\n removeSelfFromGrid();\n }\n Flower flower = new Flower(getColor());\n flower.putSelfInGrid(gr, loc);\n }", "public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }", "public void move() {\n\t\tif(right) {\n\t\t\tgoRight();\n\t\t\tstate++;\n\t\t\tif(state > 5) {\n\t\t\t\tstate = 3;\n\t\t\t}\n\t\t}\n\t\telse if(left) {\n\t\t\tgoLeft();\n\t\t\tstate++;\n\t\t\tif(state > 2) {\n\t\t\t\tstate = 0;\n\t\t\t}\n\t\t}\n\t}", "public void move() {\n\t\tthis.hero.setPF(1);\n\t\tthis.hero.setState(this.hero.getMoved());\n\t}", "public void teleopArcadeDrive(){\r\n\t\tmyRobot.arcadeDrive(-m_controls.driver_Y_Axis(), -m_controls.driver_X_Axis());\r\n\t}", "private void turnAround() {\r\n this.setCurrentDirection(-getCurrentDirection());\r\n }", "public void move(float turn, float forward) throws Exception {\r\n if(forward < 0) {\r\n throw new Exception(\"Robot cannot move backwards\");\r\n }\r\n orientation = orientation + turn + (float)random.nextGaussian() * turnNoise;\r\n orientation = circle(orientation, 2f * (float)Math.PI);\r\n \r\n double dist = forward + random.nextGaussian() * forwardNoise;\r\n \r\n x += Math.cos(orientation) * dist;\r\n y += Math.sin(orientation) * dist;\r\n x = circle(x, worldWidth);\r\n y = circle(y, worldHeight); \r\n }", "void moveForward(Lawn lawn);", "public void implement(){\n this.rb.moveForward(1);\n \n \n if(this.rb.canPickThing()){\n this.rb.pickThing();\n }\n\n //turn the rb 90 degree to the south\n this.rb.turnLeft();\n\n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n\n //turn the navigator 90 degree to the east\n this.rb.turnRight();\n\n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n\n //turn the navigator 90 degree to the north\n this.rb.turnLeft();\n\n //move the navigator\n this.rb.moveForward(2);\n\n //turn Right the robot\n this.rb.turnRight();\n\n //stop at the starting position per move()\n this.rb.moveForward(1); \n \n this.rb.putThing();\n \n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n \n //turn the navigator 90 degree to the west\n this.rb.turnRight();\n \n this.rb.moveForward(1);\n \n this.rb.turnLeft();\n \n this.rb.moveForward(1);\n \n this.rb.turnRight();\n \n this.rb.moveForward(2);\n \n this.rb.turnLeft();\n }", "private void move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}", "public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tif (gr.isValid(next)) {\n\t\t\tsetDirection(getLocation().getDirectionToward(next));\n\t\t\tmoveTo(next);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t\tFlower flower = new Flower(getColor());\n\t\tflower.putSelfInGrid(gr, loc);\n\t}", "public void move();", "public void move();", "public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}", "public void move()\n {\n double angle = Math.toRadians( getRotation() );\n int x = (int) Math.round(getX() + Math.cos(angle) * WALKING_SPEED);\n int y = (int) Math.round(getY() + Math.sin(angle) * WALKING_SPEED);\n setLocation(x, y);\n }", "public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }", "public float MoveForward(){\n motorLeft1Power = normalSpeed;\n motorLeft2Power = normalSpeed;\n motorRight1Power = normalSpeed;\n motorRight2Power = normalSpeed;\n\n startOrientation = imu.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX).firstAngle;\n motorPID = new PIDController(startOrientation);\n return startOrientation;\n }", "private void moveForward(double length) {\n\t\tsens.setXPos(sens.getXPos() + (Math.cos(Math.toRadians(sens.getDirection())) * length));\n\t\tsens.setYPos(sens.getYPos() + (Math.sin(Math.toRadians(sens.getDirection())) * length));\n\t}", "public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }", "@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }", "public void move() {\n float xpos = thing.getX(), ypos = thing.getY();\n int xdir = 0, ydir = 0;\n if (left) xdir -= SPEED; if (right) xdir += SPEED;\n if (up) ydir -= SPEED; if (down) ydir += SPEED;\n xpos += xdir; ypos += ydir;\n\n VeggieCopter game = thing.getGame();\n int w = game.getWindowWidth(), h = game.getWindowHeight();\n int width = thing.getWidth(), height = thing.getHeight();\n if (xpos < 1) xpos = 1; if (xpos + width >= w) xpos = w - width - 1;\n if (ypos < 1) ypos = 1; if (ypos + height >= h) ypos = h - height - 1;\n thing.setPos(xpos, ypos);\n }", "public void move() {\n switch (dir) {\n case 1:\n this.setX(getX() + this.speed);\n moveHistory.add(new int[] {getX() - this.speed, getY()});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 2:\n this.setY(getY() - this.speed);\n moveHistory.add(new int[] {getX(), getY() + this.speed});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 3:\n this.setX(getX() - this.speed);\n moveHistory.add(new int[] {getX() + this.speed, getY()});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 4:\n this.setY(getY() + this.speed);\n moveHistory.add(new int[] {getX(), getY() - this.speed});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n default:\n break;\n }\n }", "private void moveOrTurn() {\n\t\t// TEMP: look at center of canvas if out of bounds\n\t\tif (!isInCanvas()) {\n\t\t\tlookAt(sens.getXMax() / 2, sens.getYMax() / 2);\n\t\t}\n\n\t\t// if we're not looking at our desired direction, turn towards. Else, move forward\n\t\tif (needToTurn()) {\n\t\t\tturnToDesiredDirection();\n\t\t} else {\n\t\t\tmoveForward(2.0);\n\t\t}\n\n\t\t// move in a random direction every 50 roaming ticks\n\t\tif (tickCount % 100 == 0) {\n\t\t\tgoRandomDirection();\n\t\t}\n\t\ttickCount++;\n\t}", "public void move()\r\n\t{\r\n\t\tmoveHor(xVel);\r\n\t\tmoveVert(yVel);\r\n\t}", "public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);\n }\n }", "public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }", "public void move(boolean up, boolean down, boolean left, boolean right){\t\n\t\tif (up) {\n\t\t\tframesAccelerated++;\n\t\t\tspeed -= ACCELERATION;\n\t\t\tif (speed < MAX_SPEED)\n\t\t\t\tspeed = MAX_SPEED;\n\t\t} else {\n\t\t\tframesAccelerated = 0;\n\t\t}\n\t\tif (down) {\n\t\t\tspeed += BACKING_ACCELERATION;\n\t\t\tif (speed > MAX_BACKING_SPEED)\n\t\t\t\tspeed = MAX_BACKING_SPEED;\n\t\t}\n\t\t// Simulate turning the driving wheel by adding \"acceleration\" to\n\t\t// turning speed. We use ints for this since integer math is exact.\n\t\tif ((left && speed < 0) || (speed > 0 && right)) {\n\t\t\tturningFrame ++;\n\t\t\tif (turningFrame > FRAMES_FOR_TURNING){\n\t\t\t\tturningFrame = FRAMES_FOR_TURNING;\n\t\t\t}\n\t\t}\n\t\tif ((right && speed < 0) || (speed > 0 && left)) {\n\t\t\tturningFrame --;\n\t\t\tif (turningFrame < -FRAMES_FOR_TURNING) {\n\t\t\t\tturningFrame = -FRAMES_FOR_TURNING;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Math.abs(turningFrame) == FRAMES_FOR_TURNING) {\n\t\t\tframesAtMaxTurning++;\n\t\t} else framesAtMaxTurning = 0;\n\t\t\n\t\t// Turn the wheels back if not turning.\n\t\tif (!left && !right) {\n\t\t\tif (turningFrame > 0) turningFrame --;\n\t\t\telse if (turningFrame < 0) turningFrame++;\n\t\t}\n\t\t\n\t\t// Slow down if not accelerating or reversing.\n\t\tif (!up && !down) {\n\t\t\tspeed *= FRICTION;\n\t\t}\n\t\t// Break\n\t\tif (speed > 0 && up) {\n\t\t\tspeed *= BACK_BREAK_FRICTION;\n\t\t} else if (speed < 0 && down) {\n\t\t\tspeed *= BREAK_FRICTION;\n\t\t}\n\t\t\n\t\t// Lower max turning speed if velocity is low.\n\t\tdouble maxTurnSpeed = vel.len2() / 0.01 * TURN_SPEED;\n\t\tif (maxTurnSpeed > TURN_SPEED)\n\t\t\tmaxTurnSpeed = TURN_SPEED;\n\t\tdouble angleChange = ((float)turningFrame / FRAMES_FOR_TURNING) * maxTurnSpeed;\n\t\t\n\t\t\n\t\t// Calculate front and back wheel positions.\n\t\tVector2 fWheel = temp;\n\t\tVector2 bWheel = temp2;\n\t\tfWheel.set((float)Math.cos(angle), (float)Math.sin(angle)).scl(WHEEL_DIST/2).add(pos);\n\t\tbWheel.set((float)Math.cos(angle), (float)Math.sin(angle)).scl(-WHEEL_DIST/2).add(pos);\n\t\t\n\t\t// Move the wheels forward in the car's direction. angleChange is added\n\t\t// to the front wheels since they are doing the turning.\n\t\tbWheel.add((float)Math.cos(angle)*speed, (float)Math.sin(angle)*speed);\n\t\tfWheel.add((float)Math.cos(angle+angleChange)*speed, (float)Math.sin(angle+angleChange)*speed);\n\t\t\n\t\tangle -= angleChange;\n\t\t\n\t\t// Scale down the velocity from previous frame.\n\t\tvel.scl(0.95f);\n\t\tif (vel.len2() > MAX_VEL) {\n\t\t\tvel.setLength2(MAX_VEL);\n\t\t}\n\t\t\n\t\t// Add this frames movement to the velocity.\n\t\tif (!locked) {\n\t\t\tvel.add(fWheel.add(bWheel).scl(0.5f).sub(pos));\n\t\t}\n\t\t\n\t\t// Add velocity to car and update position\n\t\toldPos.set(pos);\n\t\tpos.add(vel);\n\t\tcar.setPosition(pos.x, posAboveGround, pos.y);\n\t\t\n\t\ttestForWallCollision();\n\t}", "@Override\n public void robotInit() {\n myRobot = new DifferentialDrive(leftfrontmotor, rightfrontmotor);\n leftrearmotor.follow(leftfrontmotor);\n rightrearmotor.follow(rightfrontmotor);\n leftfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\trightfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\tleftrearmotor.setInverted(InvertType.FollowMaster);\n rightrearmotor.setInverted(InvertType.FollowMaster);\n \n CameraServer.getInstance().startAutomaticCapture();\n\n \n\n comp.setClosedLoopControl(true);\n \n\n /* Set up Dashboard widgets */\n SmartDashboard.putNumber(\"L Stick\", gamepad.getRawAxis(1));\n\t\tSmartDashboard.putNumber(\"R Stick\", gamepad.getRawAxis(5));\n\t\tSmartDashboard.putBoolean(\"Back Button\", gamepad.getRawButton(5));\n\t\tSmartDashboard.putBoolean(\"Fwd Button\", gamepad.getRawButton(6));\n\t\t\n SmartDashboard.putNumber(\"LF\", pdp.getCurrent(leftfrontmotorid));\n\t\tSmartDashboard.putNumber(\"LR\", pdp.getCurrent(leftrearmotorid));\n\t\tSmartDashboard.putNumber(\"RF\", pdp.getCurrent(rightfrontmotorid));\n\t\tSmartDashboard.putNumber(\"RR\", pdp.getCurrent(rightrearmotorid));\n SmartDashboard.putNumber(\"Total\", pdp.getCurrent(0) + pdp.getCurrent(1) + pdp.getCurrent(2) + pdp.getCurrent(3) + pdp.getCurrent(4) + pdp.getCurrent(5) + pdp.getCurrent(6) + pdp.getCurrent(7) + pdp.getCurrent(8) + pdp.getCurrent(9) + pdp.getCurrent(10) + pdp.getCurrent(11) + pdp.getCurrent(12) + pdp.getCurrent(13) + pdp.getCurrent(14) + pdp.getCurrent(15));\n }", "public void move(){\n\t\t\n\t}", "public void move() {\n\t\tx+= -1;\n\t\tif (x < 0) {\n\t\t\tx = (processing.width - 1);\n\t\t}\n\t\ty+= 1;\n\t\tif (y > processing.height-1)\n\t\t\ty=0;\n\t}", "public void up() {\n double speed = RobotContainer.m_BlackBox.getPotValueScaled(Constants.OIConstants.kControlBoxPotY, 0.0, 1.0);\n m_hook.set(speed);\n SmartDashboard.putNumber(\"forward speed\", speed);\n }", "protected void execute() {\n \tif (isIntaking) {\n \t\tRobot.conveyor.forward();\n \t} else {\n \t\tRobot.conveyor.backward();\n \t}\n }", "public void go()\n {\n for( int i = 0; i<3; i++)m[i].setSpeed(720);\n step();\n for( int i = 0; i<3; i++)m[i].regulateSpeed(false);\n step();\n }", "public void move()\n\t{\n\t\tx = x + frogVelocityX;\n\t}", "@Override\n public void step(double deltaTime) {\n // wheel radius, in meters\n double wheelCircumference = 2 * simulatorConfig.driveBase.wheelRadius * Math.PI;\n\n double leftRadians = 0;\n double rightRadians = 0;\n for (SimMotor simMotor : motorStore.getSimMotorsSorted()) {\n if (simMotor.isLeftDriveMotor()) {\n leftRadians = simMotor.position / simulatorConfig.driveBase.gearRatio;\n } else if (simMotor.isRightDriveMotor()) {\n rightRadians = simMotor.position / simulatorConfig.driveBase.gearRatio;\n }\n }\n\n // invert the left side because forward motor movements mean backwards wheel movements\n rightRadians = -rightRadians;\n\n double currentLinearRadians = (leftRadians + rightRadians) / 2;\n\n double deltaRadians = currentLinearRadians - lastLinearRadians;\n double metersPerRadian = wheelCircumference / (Math.PI * 2);\n double deltaLinearPosition = deltaRadians * metersPerRadian;\n double newHeading = ((leftRadians - rightRadians) * metersPerRadian / simulatorConfig.driveBase.radius);\n\n // for next loop\n lastLinearRadians = currentLinearRadians;\n\n robotPosition.heading = newHeading + startHeading;\n\n robotPosition.velocity = deltaLinearPosition / deltaTime;\n robotPosition.x += deltaLinearPosition * Math.sin(robotPosition.heading);\n robotPosition.y += deltaLinearPosition * Math.cos(robotPosition.heading);\n\n SimNavX simNavX = SimSPI.getNavX(SPI.Port.kMXP.value);\n if (simNavX != null) {\n float degrees = (float)((robotPosition.heading - simulatorConfig.startPosition.heading) * 360 / (Math.PI * 2));\n\n // degrees are between 0 and 360\n if (degrees < 0) {\n degrees = 360 - (Math.abs(degrees) % 360);\n } else {\n degrees = degrees % 360;\n }\n simNavX.heading = degrees;\n }\n\n }", "void forward(float steps) {\n _x += _rotVector.x * steps;\n _y += _rotVector.y * steps;\n }", "public void forward(int speed) {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(speed);\n leftMotor.setSpeed(speed);\n rightMotor.forward();\n leftMotor.forward();\n }", "private void move()\n\t{\n\t\tif(moveRight)\n\t\t{\n\t\t\tif(position.getX() + speedMovement <= width)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() +speedMovement+speedBoost);\n\t\t\t\tmoveRight = false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tif(moveLeft)\n\t\t{\n\t\t\tif(position.getX() - speedMovement > 0)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() -speedMovement - speedBoost + gravitationalMovement);\n\t\t\t\tmoveLeft = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * If a gravitational field is pushing the ship, set the movement accordingly\n\t\t */\n\t\tif(gravitationalMovement>0)\n\t\t{\n\t\t\tif(position.getX()+gravitationalMovement <= width)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(position.getX() + gravitationalMovement > 0)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t}", "public void move() {\n\t\tdouble xv = 0;\r\n\t\tdouble yv = 0;\r\n\t\t//this method allows the entity to hold both up and down (or left and right) and not move. gives for smooth direction change and movement\r\n\t\tif (moveRight) {\r\n\t\t\txv+=getSpeed();\r\n\t\t\torientation = Orientation.EAST;\r\n\t\t}\r\n\t\tif (moveLeft) {\r\n\t\t\txv-=getSpeed();\r\n\t\t\torientation = Orientation.WEST;\r\n\t\t}\r\n\t\tif (moveUp)\r\n\t\t\tyv-=getSpeed();\r\n\t\tif (moveDown)\r\n\t\t\tyv+=getSpeed();\r\n\t\tif (!doubleEquals(xv,0) || !doubleEquals(yv,0)) {\r\n\t\t\t((Player)this).useMana(0.1);\r\n\t\t\tImageIcon img = new ImageIcon(\"lib/assets/images/fireball.png\");\r\n\t\t\tBufferedImage image = new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics g = image.getGraphics();\r\n\t\t\tg.drawImage(img.getImage(), 0, 0, image.getWidth(), image.getHeight(), null);\r\n\t\t\tColor n = loop[ind%loop.length];\r\n\t\t\tind++;\r\n\t\t\timage = ImageProcessor.scaleToColor(image, n);\r\n\t\t\t//PopMessage.addPopMessage(new PopMessage(image,getX(),getY()));\r\n\t\t}\r\n\t\telse\r\n\t\t\t((Player)this).useMana(-0.1);\r\n\t\tmove(xv,yv);\r\n\t}", "public void move() {\r\n\t\tx = x + speed;\r\n\t}", "public void move(float forwardSpeed, float strafeSpeed);", "public void move() {\n\r\n\t}", "protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }", "void move(int steps);", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "@Override\n public void start() {\n this.mob.getNavigation().startMovingTo(\n this.mob.getPositionTarget().getX(),\n this.mob.getPositionTarget().getY(),\n this.mob.getPositionTarget().getZ(),\n this.speed\n );\n }", "public void movePointerForward() throws EndTaskException {\n\t\tpickBeeper();\n\t\tmove();\n\t\tputBeeper();\n\t}", "public void goForward(int motor, int speed, boolean abrupt) {\n move(motor, speed, (byte)DIR_FORWARD, abrupt);\n }", "public void Move()\n {\n this.x += this.speed;\n\n //Cutoff the position\n if (this.x <= 2)\n {\n this.x = 2;\n }\n else if (this.x >= GameConstants.SCREEN_WIDTH - 2 * this.imageWidth)\n {\n this.x = GameConstants.SCREEN_WIDTH - 2 * this.imageWidth;\n }\n }", "private void goAcrossWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move();\n\t\tthis.turnRight();\n\t}", "@Override\r\n public void act() {\r\n boolean willMove = canMove();\r\n if (isEnd) {\r\n // to show step count when reach the goal\r\n if (!hasShown) {\r\n String msg = stepCount.toString() + \" steps\";\r\n JOptionPane.showMessageDialog(null, msg);\r\n hasShown = true;\r\n }\r\n } else if (willMove) {\r\n move();\r\n // increase step count when move\r\n stepCount++;\r\n // 把当前走过的位置加入栈顶的arrayList\r\n crossLocation.peek().add(getLocation());\r\n // 当前方向的概率+1\r\n probablyDir[getDirection() / 90]++;\r\n } else if (!willMove) {\r\n // 这时候必须一步一步返回栈顶arrayList的开头\r\n ArrayList<Location> curCrossed = crossLocation.peek();\r\n curCrossed.remove(curCrossed.size() - 1);\r\n next = curCrossed.get(curCrossed.size() - 1);\r\n move();\r\n stepCount++;\r\n // 当前方向反向的概率-1\r\n probablyDir[((getDirection() + Location.HALF_CIRCLE)\r\n % Location.FULL_CIRCLE) / Location.RIGHT]--;\r\n if (curCrossed.size() == 1) {\r\n // 返回之后pop\r\n crossLocation.pop();\r\n }\r\n }\r\n }", "public void moveCam() {\n float x = this.cam_bind_x; //current pos the camera is binded to\n float y = this.cam_bind_y;\n\n //this amazing camera code is from: https://stackoverflow.com/questions/24047172/libgdx-camera-smooth-translation\n Vector3 target = new Vector3(x+MathUtils.cos(Global.m_angle)*20,y+MathUtils.sin(Global.m_angle)*20,0);\n final float speed = 0.1f, ispeed=1.0f-speed;\n\n Vector3 cameraPosition = cam.position;\n cameraPosition.scl(ispeed);\n target.scl(speed);\n cameraPosition.add(target);\n cam.position.set(cameraPosition);\n\n this.updateCam();\n\n }", "public void go_to_reverse_position() {\n stop_hold_arm();\n Pneumatics.get_instance().set_solenoids(false);\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_reverse, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "public void moveForward(boolean endWithBrake){\r\n \r\n Motor.B.rotate(DEGREES_PER_TILE, true);//Accesses Motor thread\r\n Motor.C.rotate(DEGREES_PER_TILE, true);\r\n while(Motor.B.isMoving() || Motor.C.isMoving())\r\n ;//wait for motors to be done\r\n return;\r\n }", "private void goTo(double x, double y) \n\t{\n\t\t/* Transform our coordinates into a vector */\n\t\tx -= getX();\n\t\ty -= getY();\n\t \n\t\t/* Calculate the angle to the target position */\n\t\tdouble angleToTarget = Math.atan2(x, y);\n\t \n\t\t/* Calculate the turn required get there */\n\t\tdouble targetAngle = Utils.normalRelativeAngle(angleToTarget - getHeadingRadians());\n\t \n\t\t/* \n\t\t * The Java Hypot method is a quick way of getting the length\n\t\t * of a vector. Which in this case is also the distance between\n\t\t * our robot and the target location.\n\t\t */\n\t\tdouble distance = Math.hypot(x, y);\n\t \n\t\t/* This is a simple method of performing set front as back */\n\t\tdouble turnAngle = Math.atan(Math.tan(targetAngle));\n\t\tsetTurnRightRadians(turnAngle);\n\t\tif(targetAngle == turnAngle) {\n\t\t\tsetAhead(distance);\n\t\t} else {\n\t\t\tsetBack(distance);\n\t\t}\n\t}", "public void goForward(double distance) {\n \t\tthis.travelTo(Math.cos(Math.toRadians(this.myOdometer.getAng())) * distance, Math.cos(Math.toRadians(this.myOdometer.getAng())) * distance);\n \t}", "public void move(TrackerState state) {\n\t\t\n\t\tcurrentPosition[0] = state.devicePos[0];\n\t\tcurrentPosition[1] = state.devicePos[1];\n\t\tcurrentPosition[2] = state.devicePos[2];\n\t\t\n\t\tboolean processMove = false;\n\t\t\n\t\tboolean isWheel = (state.actionType == TrackerState.TYPE_WHEEL);\n\t\tboolean isZoom = (isWheel || state.ctrlModifier);\n\t\t\n\t\tif (isZoom) {\n\t\t\t\n\t\t\tdirection[0] = 0;\n\t\t\tdirection[1] = 0;\n\t\t\t\n\t\t\tif (isWheel) {\n\t\t\t\tdirection[2] = state.wheelClicks * 0.1f;\n\t\t\t\t\n\t\t\t} else if (state.ctrlModifier) {\n\t\t\t\tdirection[2] = (currentPosition[1] - startPosition[1]);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdirection[2] = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (direction[2] != 0) {\n\t\t\t\t\n\t\t\t\tdirection[2] *= 16;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tinVector.x = startViewMatrix.m02;\n\t\t\t\tinVector.y = startViewMatrix.m12;\n\t\t\t\tinVector.z = startViewMatrix.m22;\n\t\t\t\tinVector.normalize();\n\t\t\t\tinVector.scale(direction[2]);\n\t\t\t\t\n\t\t\t\tpositionVector.add(inVector);\n\t\t\t\t\n\t\t\t\t// stay above the floor\n\t\t\t\tif (positionVector.y > 0) {\n\t\t\t\t\tdestViewMatrix.set(startViewMatrix);\n\t\t\t\t\tdestViewMatrix.setTranslation(positionVector);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\tdirection[0] = -(startPosition[0] - currentPosition[0]);\n\t\t\tdirection[1] = -(currentPosition[1] - startPosition[1]);\n\t\t\tdirection[2] = 0;\n\t\t\t\n\t\t\tfloat Y_Rotation = direction[0];\n\t\t\tfloat X_Rotation = direction[1];\n\t\t\t\n\t\t\tif( ( Y_Rotation != 0 ) || ( X_Rotation != 0 ) ) {\n\t\t\t\t\n\t\t\t\tdouble theta_Y = -Y_Rotation * Math.PI;\n\t\t\t\tdouble theta_X = -X_Rotation * Math.PI;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tpositionVector.x -= centerOfRotation.x;\n\t\t\t\tpositionVector.y -= centerOfRotation.y;\n\t\t\t\tpositionVector.z -= centerOfRotation.z;\n\t\t\t\t\n\t\t\t\tif (theta_Y != 0) {\n\n\t\t\t\t\trot.set(0, 1, 0, (float)theta_Y);\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (theta_X != 0) {\n\t\t\t\t\t\n\t\t\t\t\tvec.set(positionVector);\n\t\t\t\t\tvec.normalize();\n\t\t\t\t\tfloat angle = vec.angle(Y_AXIS);\n\t\t\t\t\t\n\t\t\t\t\tif (angle == 0) {\n\t\t\t\t\t\tif (theta_X > 0) {\n\t\t\t\t\t\t\trightVector.x = startViewMatrix.m00;\n\t\t\t\t\t\t\trightVector.y = startViewMatrix.m10;\n\t\t\t\t\t\t\trightVector.z = startViewMatrix.m20;\n\t\t\t\t\t\t\trightVector.normalize();\n\t\t\t\t\t\t\trot.set(rightVector.x, 0, rightVector.z, (float)theta_X);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trot.set(0, 0, 1, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((theta_X + angle) < 0) {\n\t\t\t\t\t\t\ttheta_X = -(angle - 0.0001f);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvec.y = 0;\n\t\t\t\t\t\tvec.normalize();\n\t\t\t\t\t\trot.set(vec.z, 0, -vec.x, (float)theta_X);\n\t\t\t\t\t}\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpositionPoint.x = positionVector.x + centerOfRotation.x;\n\t\t\t\tpositionPoint.y = positionVector.y + centerOfRotation.y;\n\t\t\t\tpositionPoint.z = positionVector.z + centerOfRotation.z;\n\t\t\t\t\n\t\t\t\t// don't go below the floor\n\t\t\t\tif (positionPoint.y > 0) {\n\t\t\t\t\t\n\t\t\t\t\tmatrixUtils.lookAt(positionPoint, centerOfRotation, Y_AXIS, destViewMatrix);\n\t\t\t\t\tmatrixUtils.inverse(destViewMatrix, destViewMatrix);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (processMove) {\n\t\t\t\n\t\t\tboolean collisionDetected = \n\t\t\t\tcollisionManager.checkCollision(startViewMatrix, destViewMatrix);\n\t\t\t\n\t\t\tif (!collisionDetected) {\n\t\t\t\tAV3DUtils.toArray(destViewMatrix, array);\n\t\t\t\tChangePropertyTransientCommand cptc = new ChangePropertyTransientCommand(\n\t\t\t\t\tve, \n\t\t\t\t\tEntity.DEFAULT_ENTITY_PROPERTIES, \n\t\t\t\t\tViewpointEntity.VIEW_MATRIX_PROP,\n\t\t\t\t\tarray,\n\t\t\t\t\tnull);\n\t\t\t\tcmdCntl.execute(cptc);\n\t\t\t\tif (statusManager != null) {\n\t\t\t\t\tstatusManager.fireViewMatrixChanged(destViewMatrix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstartPosition[0] = currentPosition[0];\n\t\tstartPosition[1] = currentPosition[1];\n\t\tstartPosition[2] = currentPosition[2];\n\t}", "public void move(String direction) {\n \n }", "private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }" ]
[ "0.77038807", "0.7486732", "0.74634475", "0.7307323", "0.72728574", "0.7202067", "0.71321523", "0.71164477", "0.70417976", "0.70370734", "0.6962168", "0.69563675", "0.6862728", "0.6813814", "0.68058616", "0.68038917", "0.67867357", "0.67712075", "0.6759447", "0.67122936", "0.67095673", "0.6671229", "0.6632037", "0.66134894", "0.6592714", "0.65835357", "0.657126", "0.6557729", "0.6548378", "0.65429395", "0.65300477", "0.6526823", "0.65114546", "0.6492427", "0.64862597", "0.6484058", "0.6480786", "0.64634126", "0.6460291", "0.64491814", "0.64379126", "0.6436932", "0.64367825", "0.64305955", "0.641804", "0.641328", "0.6408368", "0.64011484", "0.63973993", "0.6396451", "0.6393486", "0.6385119", "0.6380508", "0.6380508", "0.63718414", "0.6369692", "0.6366763", "0.63640046", "0.6361689", "0.63559103", "0.63462955", "0.6342584", "0.6340194", "0.63356483", "0.63289243", "0.6321862", "0.63210934", "0.63125485", "0.631", "0.62970346", "0.6286592", "0.62825876", "0.62811977", "0.6280069", "0.62759584", "0.6275884", "0.62624586", "0.6260254", "0.6249871", "0.6241247", "0.6238977", "0.623828", "0.62371457", "0.62289375", "0.6220914", "0.62192863", "0.6218723", "0.6209267", "0.62043625", "0.6203989", "0.6198232", "0.61942273", "0.6181047", "0.61767757", "0.6174855", "0.6174395", "0.61739594", "0.61628294", "0.61626905", "0.6161714" ]
0.6809704
14
Move the robot backward. Only used in real run in case of failed movement from Ardurino
public void backward(int step) { String s; this.x = checkValidX(this.x + Constant.SENSORDIRECTION[(this.getDirection()+2)%4][0]); // Move back without turning this.y = checkValidX(this.y + Constant.SENSORDIRECTION[(this.getDirection()+2)%4][1]); switch (this.getDirection()) { case Constant.NORTH: s = "Up"; break; case Constant.EAST: s = "Right"; break; case Constant.SOUTH: s = "Down"; break; case Constant.WEST: s = "Left"; break; default: s = "Error"; } toggleValid(); for (int i = 0; i < step * Constant.GRIDWIDTH; i++) { t.schedule(new MoveImageTask(robotImage, s, 1), delay * (i + 1)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveBackward(int speed) throws JposException;", "public void backward()\n\t{\n\t\tupdateState( MotorPort.BACKWARD);\n\t}", "public void stepBackward() {\n\t\tposition = backwardPosition();\n\t}", "public void movePointerBackward() throws EndTaskException {\n\t\tpickBeeper();\n\t\tturnAround();\n\t\tmove();\n\t\tputBeeper();\n\t}", "public void moveBackward(boolean endWithBrake){\r\n \r\n Motor.B.rotate(-1*DEGREES_PER_TILE, true);//Accesses Motor thread\r\n Motor.C.rotate(-1*DEGREES_PER_TILE, true);\r\n while(Motor.B.isMoving() || Motor.C.isMoving())\r\n ;//wait for motors to be done\r\n return;\r\n }", "private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}", "public void go_to_reverse_position() {\n stop_hold_arm();\n Pneumatics.get_instance().set_solenoids(false);\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_reverse, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "public void grip(){\n\t\tthis.motor.backward();\n\t}", "public void goReverse(int motor, int speed, boolean abrupt) {\n move(motor, speed, (byte)DIR_REVERSE, abrupt);\n }", "public void backwards(double x, double y){\r\n\r\n\t\t\tdouble xDistance = x - odometer.getX();//the distance the robot has to travel in x to get to its destination from current position.\r\n\t\t\tdouble yDistance = y - odometer.getY();//the distance the robot has to travel in y to get to its destination from current position.\r\n\t\t\tdouble distance = Math.sqrt(xDistance*xDistance + yDistance*yDistance);//the overall distance the robot has to travel from current position.\r\n\t\t\t\t\r\n\t\t\tleftMotor.setSpeed(FORWARD_SPEED);\r\n\t\t\trightMotor.setSpeed(FORWARD_SPEED);\r\n\r\n\t\t\tleftMotor.rotate(-convertDistance(wheelRadius, distance), true);\r\n\t\t\trightMotor.rotate(-convertDistance(wheelRadius, distance), false);\r\n\t\t}", "protected void down() {\n move(positionX, positionY + 1);\n orientation = BattleGrid.RIGHT_ANGLE;\n }", "public void down(){\n\t\tmoveX=0;\n\t\tmoveY=1;\n\t}", "public void stepBackward(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\n\t\t//check to see if we are back to the first frame\n\t\tif(frameIndex == 0){ frameIndex = frames.length-1; }\n\t\telse{ frameIndex--; }\n\t\n\t\tframes[frameIndex].display();\n frames[frameIndex].clearDisplay();\n\t}", "public void moveDown() {\n locY = locY - 1;\n }", "public void moveDown() {\n \t if(!move.moveDown()) {\n \t\t if(physinteractor(this.getX(),this.getY()+1)) {\n \t\t\t move.moveDown();\n \t\t\t nonphysinteractor(getX(),getY());\n \t\t\t updatemove();\n \t\t }\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "private void moveClawDown() {\n\t\tMotor.A.setSpeed(45);\n\t\tMotor.A.rotate(-90);\n\t}", "@Override\n public void backward() {\n }", "public void back() {\n\t\tif (path.isEmpty()) {\n\t\t\tpath = crossLocation.pop();\n\t\t\tLocation loc = path.get(path.size() - 1);\n\t\t\tint dir = getLocation().getDirectionToward(loc);\n\t\t\tif (dir == Location.HALF_CIRCLE) {\n\t\t\t\tdirsCount[0]--;\n\t\t\t} else if (dir == Location.AHEAD) {\n\t\t\t\tdirsCount[1]--;\n\t\t\t} else if (dir == Location.RIGHT) {\n\t\t\t\tdirsCount[2]--;\n\t\t\t} else {\n\t\t\t\tdirsCount[3]--;\n\t\t\t}\n\t\t}\n\t\tnext = path.remove(path.size() - 1);\n\t\tmove();\n\t}", "public void moveDown() {\n\t\tstate.updateFloor(state.getFloor()-1);\n\t}", "public void moveDown(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.DOWN;\n\t\tif(animation!=ANIMATION.MOVEDOWN) {\n\t\t\tanimation=ANIMATION.MOVEDOWN;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tdirection=\"down\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelY=spd/2;\n\t\tvelX=0;\n\t}", "public void moveBack(int time) {\n\t\tdouble rotationInRadius = rotation * (Math.PI / 180.0);\r\n\t\tposition.subVector(new DoublePoint(velocity * Math.cos(rotationInRadius), velocity * Math.sin(rotationInRadius)));\r\n\t}", "public void moveDown()\n {\n if (yPos == yBound)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - positive Y because we are moving DOWN!\n movementY = 0.5;\n movementX = 0;\n }", "public void moveDown() {\n speedY -= (speedY > 0) ? acceleration * 2 : acceleration;\n if (speedY < -maxSpeed) {\n speedY = -maxSpeed;\n }\n direction = Direction.DOWN;\n }", "public void backDown(){\n backSolenoid.set(DoubleSolenoid.Value.kReverse);\n }", "public void moveDown() {\n\t\tsetPosY(getPosY() + steps);\n\t}", "public void move_down() {\n\t\tlocation.setY(location.getY()+y_velocity);\n\t\timage.setTranslateY(location.getY());\n\t}", "public void up(){\n\t\tmoveX=0;\n\t\tmoveY=-1;\n\t}", "void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}", "public void moveDown()\n\t{\n\t\trow--;\n\t}", "static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }", "public static void moveBackFor(double distance) {\n leftMotor.rotate(-convertDistance(distance * TILE_SIZE), true);\n rightMotor.rotate(-convertDistance(distance * TILE_SIZE), false);\n }", "public void moveDown()\n\t{\n\t\ty = y + STEP_SIZE;\n\t}", "@Override\n\tpublic void moveBackward(int inches) throws ObstacleHitException {\n\t\t\n\t}", "public void reverseDirection(Position ep) throws InvalidPositionException;", "protected void end() {\n\t\t// we are ending the, stop moving the robot\n\t\tRobot.driveSubsystem.arcadeDrive(0, 0);\n\t}", "public void reverseY()\r\n {\r\n\t if(moveY < 0)\r\n\t\t moveY = moveY * (-1);\r\n\t else if(moveY > 0)\r\n\t\t moveY = moveY * (-1);\r\n }", "public void stopMoving()\n {\n mouthPosition = 0;\n }", "public void down() {\n\t\tmotor1.set( -Constants.CLAW_MOTOR_SPEED );\n\t\t}", "public void autoStopBackward(boolean flag) throws JposException;", "protected void up() {\n move(positionX, positionY - 1);\n orientation = BattleGrid.RIGHT_ANGLE * 3;\n }", "public void stopMovement() {\n this.movementComposer.stopMovement();\n }", "public void arm_down() {\n arm_analog(-RobotMap.Arm.arm_speed);\n }", "public void walkDownWall() {\r\n\t\tthis.move();\r\n\t\tthis.turnRight();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.turnLeft();\r\n\t}", "public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }", "public static void turnRight() {\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.backward();\n }", "public void down() {\n\t\tswitch (facing){\n\t\tcase \"RIGHT\" :\n\t\t\tvely = 0;\n\t\t\tvelx = -1.5;\n\t\t\tbreak;\n\t\tcase \"LEFT\" :\n\t\t\tvely = 0;\n\t\t\tvelx = 1.5;\n\t\t\tbreak;\n\t\tcase \"UP\" :\n\t\t\tvely = 1.5;\n\t\t\tvelx = 0;\n\t\t\tbreak;\n\t\tcase \"DOWN\" :\n\t\t\tvely = -1.5;\n\t\t\tvelx = 0;\n\t\t\tbreak;\n\t\t}\n\t}", "public void moveDown() {\n\t\t\n\t}", "protected void end() {\n Robot.arm.moveArm(0, 1);\n }", "public void moveUp() {\r\n\t\tmy_cursor_location.y--;\r\n\t}", "public void moveDown()\n\t{\n\t\tthis.grid.moveDown();\n\t}", "public void moveDown(){\n if(currentText != null) {\n //If this is not the very last text\n if (lineIndex < texts.size() - 1) {\n //Move down\n lineIndex++;\n currentText = texts.get(lineIndex);\n\n //Try to use the saved character index as the character index\n if (savedCharacterIndex != -1) {\n characterIndex = savedCharacterIndex;\n }\n\n //Ensure that character index is within the bounds of the text\n if (characterIndex > currentText.getCharacterEdges().length - 1) {\n //Save the character index\n if (characterIndex > savedCharacterIndex) {\n savedCharacterIndex = characterIndex;\n }\n characterIndex = currentText.getCharacterEdges().length - 1;\n }\n\n //Update the position\n updatePosition();\n }\n //If this is the last line then the cursor should be moved to the end of the line\n else {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n characterIndex = currentText.getCharacterEdges().length - 1;\n updateXPosition(true);\n }\n }\n }", "void atras(){\n\t\tMotorA.stop();\n\t\tMotorB.setSpeed(700);\n\t\tMotorC.setSpeed(700);\n\t\t\n\t\tMotorB.backward();\n\t\tMotorC.backward();\n\t}", "public void autoStopBackwardDelayTime(int delay) throws JposException;", "public void moveDown(double speed){\n speed *= ARM_SPEED_MULT;\n arm.setPower(-speed);\n if (arm.getCurrentPosition() <= ARM_LOWER_BOUND) {\n arm.setPower(0);\n }\n }", "public void reverseDirectionY()\n\t{\n\t\t\n\t\tvy = -vy;\n\t}", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}", "public void moveDown()\n\t{\n\t\ty = Math.min(y + 1, main.HEIGHT-1);\n\t\tsprite.setPosition(x*sprite.getWidth(),y*sprite.getHeight());\n\t}", "public void moveUp()\n\t{\n\t\ty = y - STEP_SIZE;\n\t}", "public void reverseLastTranslation() {\r\n this.translate(-lastDx,-lastDy);\r\n }", "void moveUp() {\n\t\tsetY(y-1);\r\n\t\tdx=0;\r\n\t\tdy=-1;\r\n\t}", "protected void end ()\n\t{\n\t\tSubsystems.transmission.drive(0.0, 0.0);\n\t\t\n \t//returning driver control.\n \tSubsystems.transmission.setLeftJoystickReversed(false);\n \tSubsystems.transmission.setRightJoystickReversed(false);\n\t}", "private void turnRight() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.SOUTH;\n break;\n case WEST:\n direction = Position.Direction.NORTH;\n break;\n case NORTH:\n direction = Position.Direction.EAST;\n break;\n case SOUTH:\n direction = Position.Direction.WEST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "public void goUp()\r\n\t{\r\n\t\tthis.Y--;\r\n\t}", "protected void end() {\n \tRobot.drivetrain.leftDrive1.set(0); \n \tRobot.drivetrain.leftDrive2.set(0);\n \tRobot.drivetrain.leftDrive3.set(0);\n \t\n \tRobot.drivetrain.rightDrive1.set(0);\n \tRobot.drivetrain.rightDrive2.set(0);\n \tRobot.drivetrain.rightDrive3.set(0);\n \tRobot.twoGearAngle = Robot.drivetrain.gyro.getYaw();\n }", "public void laserMoveUp()\r\n\t{\r\n\r\n\t\tif (y > 0)\r\n\t\t\ty -= 20;\r\n\r\n\t\telse\r\n\t\t\tdestroyed = true;\r\n\r\n\t}", "public void moveDown() {\n this.accelerateYD();\n this.moveY(this.getySpeed());\n this.setPicX(0);\n this.setPicY(0);\n this.setLoopCells(true);\n }", "public void moveDown() {\n if (ycoor <= Game.heightOfGameBoard - movingSpeed) {\n ycoor = ycoor + movingSpeed;\n }\n\n }", "public void moveUp() {\n\t\tsetPosY(getPosY() - steps);\n\t}", "public void moveDown() {\n Coordinate downCoord = new Coordinate(getX(), getY() + 1);\n handleMove(downCoord, InteractionHandler.DOWN);\n }", "@Override\n protected void end() {\n //return control to joystick\n drivetrain.setStopArcadeDrive(false);\n drivetrain.tankDrive(0,0);\n System.out.println(\"STOPPED LINE FOLLOWER\");\n // led.setLEDB(false);\n // led.setLEDR(false);\n }", "public void moveUp()\n {\n if (yPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative Y because we are moving UP!\n movementY = -0.5;\n movementX = 0;\n }", "public void moveUp() {\n if (ycoor >= movingSpeed) {\n ycoor = ycoor - movingSpeed;\n }\n }", "private void backward() {\n index--;\n if(column == 0) {\n line--;\n linecount = column = content.getColumnCount(line);\n }else{\n column--;\n }\n }", "public void moveDown() {\n\t\tposY -= speed;\n\t}", "public void moveRight(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.RIGHT;\n\t\tif(animation!=ANIMATION.MOVERIGHT) {\n\t\t\tanimation=ANIMATION.MOVERIGHT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.RIGHT;\n\t\tdirection=\"right\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=spd/2;\n\t\tvelY=0;\n\t}", "public void moveUp() {\n locY = locY + 1;\n }", "private void moveClawUp() {\n\t\tMotor.A.setSpeed(45);\n\t\tMotor.A.rotate(90);\n\t\t\n\t}", "private void goDownWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move(2);\n\t\tthis.turnLeft();\n\t}", "public void stopWheel()\n {\n setVectorTarget(Vector2D.ZERO);\n\n turnMotor.setPosition(0.5);\n\n if (driveMotor != null)\n driveMotor.setVelocity(0);\n }", "void moveDown() {\n\t\tsetY(y+1);\r\n\t\tdx=0;\r\n\t\tdy=1;\r\n\t}", "public void goReverse(int motor, int speed) {\n move(motor, speed, (byte)DIR_REVERSE, false);\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tgame.getController().undoLastMove();\r\n\t}", "private static void turnAwayFromWall() {\n while (true) {\n if (readUsDistance() > OPEN_SPACE) {\n leftMotor.stop();\n rightMotor.stop();\n // re-calibrate theta, offset will be added to this angle\n odometer.setTheta(0);\n System.out.println(\"starting localization...\");\n prevDist = 255;\n dist = prevDist;\n break;\n }\n }\n }", "protected void end() {\n \tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.PercentVbus);\n \tRobotMap.motorRightOne.changeControlMode(TalonControlMode.PercentVbus);\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.PercentVbus);\n \tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.PercentVbus);\n \tRobotMap.motorLeftOne.set(0);\n \tRobotMap.motorRightOne.set(0);\n \tRobotMap.motorLeftTwo.set(0);\n \tRobotMap.motorRightTwo.set(0);\n \tSystem.out.println(this.startAngle- RobotMap.navx.getAngle());\n\n\n \t\n }", "public void moveDown()\n {\n if (!this.search_zone.isDownBorder(this.y_position))\n {\n this.y_position = (this.y_position + 1);\n }\n }", "public String navigateBackward(String object, String data) {\n\n\t\ttry {\n\t\t\tdriver.navigate().back();\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + e.getMessage();\n\n\t\t}\n\t\treturn Constants.KEYWORD_PASS + \" clicked on back button\";\n\t}", "public void moveRight() {\n\t\tsetPosX(getPosX() + steps);\n\t}", "public void moveDown(int speed)\n {\n if(getRotation()==0)\n {\n turn(90);\n move(speed);\n }\n else if(getRotation()==90)\n {\n move(speed);\n }\n else if(getRotation()==180)\n {\n turn(-90);\n move(speed);\n }\n else if(getRotation()==270)\n {\n turn(180);\n move(speed);\n }\n }", "public void moveRight() {\n if (!this.state.equals(\"onRightWall\")) {\n this.dir = 1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "void reverseDirection();", "public void driveStraightBackwards(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tint angle = getGyroAngle();\r\n \tdrivetrain.drive(-1 * speed, angle * kP);\r\n \tTimer.delay(0.004); //4 millisecond delay to allow for gyro to calibrate\r\n }", "void moveDown(double speed, double destination)\n {\n this.destination = shaftHeight-(destination*floorHeight);\n if(speed == 1.75) speed = 1.25;\n else if(speed == 0.875) speed = 0.6;\n\n elevatorOffset = 1*speed;\n motorTimeline.play();\n }", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "void moveForward();", "public void moveUp() {\n if(!move.moveUp()) {\n \t if(physinteractor(getX(),getY()-1)) {\n \t\t move.moveUp();\n \t\t nonphysinteractor(getX(),getY());\n \t\t updatemove();\n \t }\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "void moveDown();", "void moveDown();", "protected void end() {\n \t//Robot.motor.disable();\n \tRobot.motor.disable();\n }", "@Test\n public void shouldPredictByRotatingPreviousMoveInReverseDirection() {\n ReverseRotationStrategy strategy = new ReverseRotationStrategy();\n\n strategy.addHistory(Shape.ROCK, Shape.PAPER);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.ROCK.defeatedBy()));\n\n strategy.addHistory(Shape.ROCK, Shape.ROCK);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.SPOCK.defeatedBy()));\n }" ]
[ "0.7699588", "0.7441442", "0.73875475", "0.7220936", "0.71981335", "0.71038604", "0.69606566", "0.6886541", "0.6848855", "0.6804309", "0.6801229", "0.672629", "0.67056257", "0.6635053", "0.6632972", "0.6548235", "0.65159756", "0.64490026", "0.644392", "0.6436798", "0.6426651", "0.64260656", "0.6403044", "0.63644594", "0.6322915", "0.6322761", "0.6320602", "0.6317127", "0.63139343", "0.63044685", "0.63038206", "0.6301861", "0.6279673", "0.6251565", "0.6248652", "0.6242112", "0.6237703", "0.6232021", "0.62273276", "0.6190012", "0.6180337", "0.61795574", "0.61696315", "0.6169441", "0.61672986", "0.6121832", "0.6113603", "0.61127126", "0.6102724", "0.60934716", "0.6092998", "0.60860085", "0.6082587", "0.60708135", "0.6064821", "0.60635275", "0.60574436", "0.6052763", "0.60525244", "0.604752", "0.60472345", "0.60452855", "0.60419375", "0.60414165", "0.60092026", "0.6003009", "0.6001285", "0.5999817", "0.59991837", "0.59968406", "0.5965067", "0.5963268", "0.59533685", "0.5943748", "0.5929948", "0.5916897", "0.5913226", "0.59124905", "0.59091187", "0.589768", "0.58967865", "0.5891832", "0.5888912", "0.58752143", "0.5866844", "0.5846697", "0.58425575", "0.58287054", "0.5828274", "0.5827474", "0.5815887", "0.58117443", "0.5810624", "0.5807089", "0.5803337", "0.57888705", "0.5779165", "0.5779165", "0.5776813", "0.5764757" ]
0.7365213
3
In the actual robot, this will also send the command to rotate right
@Override public void rotateRight() { setDirection((this.getDirection() + 1) % 4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public void RotateRight(double speed, int distance) {\n // Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n sleep(500);\n\n robot2.DriveRightFront.setTargetPosition(0);\n robot2.DriveRightRear.setTargetPosition(0);\n robot2.DriveLeftFront.setTargetPosition(0);\n robot2.DriveLeftRear.setTargetPosition(0);\n\n // Set RUN_TO_POSITION\n\n robot2.DriveRightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // Set Motor Power to 0\n robot2.DriveRightFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n\n\n double InchesMoving = (distance * COUNTS_PER_INCH);\n\n // Set Target to RotateRight\n robot2.DriveRightFront.setTargetPosition((int) -InchesMoving);\n robot2.DriveRightRear.setTargetPosition((int) -InchesMoving);\n robot2.DriveLeftRear.setTargetPosition((int) InchesMoving);\n robot2.DriveLeftFront.setTargetPosition((int) InchesMoving);\n\n while (robot2.DriveRightFront.isBusy() && robot2.DriveRightRear.isBusy() && robot2.DriveLeftRear.isBusy() && robot2.DriveLeftFront.isBusy()) {\n\n // wait for robot to move to RUN_TO_POSITION setting\n\n double MoveSpeed = speed;\n\n // Set Motor Power\n robot2.DriveRightFront.setPower(MoveSpeed);\n robot2.DriveRightRear.setPower(MoveSpeed);\n robot2.DriveLeftFront.setPower(MoveSpeed);\n robot2.DriveLeftRear.setPower(MoveSpeed);\n\n } // THis brace close out the while Loop\n\n //Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n\n robot2.DriveRightFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n }", "public void rotateRight (View view){\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(90f).setDuration(50); //turn toy robot LEFT\n\n rotateRight++; //counter to determine orientation\n System.out.println(\"rotateRight \" + rotateRight);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight));\n\n } else errorMessage(\"Please place toy robot\");\n }", "private void robotMovement()\n {\n\n /* If it will be rotating, don't drive */\n if (!joystick.rightShouldMove()) {\n\n if (joystick.leftShouldMove()) {\n\n /* Derive movement values from gamepad */\n Joystick.Direction direction = joystick.getLeftDirection();\n double power = joystick.getLeftPower();\n\n int[] modifier;\n\n if (direction == Joystick.Direction.UP) {\n modifier = modUP;\n } else if (direction == Joystick.Direction.DOWN) {\n modifier = modDOWN;\n } else if (direction == Joystick.Direction.RIGHT) {\n modifier = modRIGHT;\n } else {\n modifier = modLEFT;\n }\n\n motorLeftFront.setPower(modifier[0] * ((power * 0.8) + (0.01 * frontInc)));\n motorRightFront.setPower(modifier[1] * ((power * 0.8) + (0.01 * frontInc)));\n motorLeftBack.setPower(modifier[2] * ((power * 0.8) + (0.01 * backInc)));\n motorRightBack.setPower(modifier[3] * ((power * 0.8) + (0.01 * backInc)));\n\n } else {\n setMotorPowerToZero();\n }\n\n } else {\n\n /* Rotation modifiers for sides of bot */\n Joystick.Direction d = joystick.getRightDirection();\n double power = joystick.getRightPower();\n boolean left = d == Joystick.Direction.LEFT;\n double sideMod = left ? 1 : -1;\n\n /* Set motor power */\n motorLeftFront.setPower(sideMod * power);\n motorLeftBack.setPower(sideMod * power);\n motorRightFront.setPower(sideMod * power);\n motorRightBack.setPower(sideMod * power);\n\n }\n\n }", "@Test\n public void rotateCommand() {\n ICommand cmd = Commands.getComand(\"rotate\");\n Robot robot = new Robot(0, 0);\n Vector2Di dir = robot.getDir();\n int rot_amount = 90;\n double orig_angle = dir.angle();\n cmd.exec(rot_amount, robot, null);\n assertEquals(orig_angle + rot_amount, dir.angle(), 0.1);\n }", "public void rotateLeft (View view){ //onClick for LEFT Button\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(-90f).setDuration(50); //turn toy robot LEFT\n\n rotateLeft--; //counter to determine orientation\n System.out.println(\"rotateLeft \" + rotateLeft);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight)); //chk params in Logs\n\n } else errorMessage(\"Please place toy robot\");\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "private static void turnRight(Robot r) \n {\n for(int i=0; i<3;i++)\n {\n r.turnLeft();\n }\n }", "public void rotate180 (View view){\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(180f).setDuration(50); //turn toy robot AROUND (180')\n\n rotateRight += 2; //counter to determine orientation\n System.out.println(\"rotateRight \" + rotateRight);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight));\n\n } else errorMessage(\"Please place toy robot\");\n }", "private void turnRight() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.SOUTH;\n break;\n case WEST:\n direction = Position.Direction.NORTH;\n break;\n case NORTH:\n direction = Position.Direction.EAST;\n break;\n case SOUTH:\n direction = Position.Direction.WEST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "public void turnRight()\r\n\t{\r\n\t\theading += 2; //JW\r\n\t\t//Following the camera\r\n\t\t//heading += Math.sin(Math.toRadians(15)); \r\n\t\t//heading += Math.cos(Math.toRadians(15));\r\n\t}", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }", "public static void turnRight() {\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.backward();\n }", "public abstract void rotateRight();", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "protected void execute() {\n \tRobot.m_oi.messageDriverStation(\"COMMAND AutoTurnRight reported angle is = \" + Robot.driveBase.getGyroAngle());\n \tdouble angle = Robot.driveBase.getGyroAngle();\n \tdouble increment = (requiredAngle - angle) * kP * -0.08;\n \tRobot.driveBase.autoDrive(0.1,0.5);\n }", "private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }", "public static void hookMotor() {\n\t\thookMotor.rotate(45);\n\t}", "private void rotate(int degrees, double power) {\n telemetry.addData(\"command\", \"turn %f.1\\u00B0 turn.\");\n // restart imu angle tracking.\n resetAngle();\n\n // if degrees > 359 we cap at 359 with same sign as original degrees.\n if (Math.abs(degrees) > 359)\n degrees = (int) Math.copySign(359, degrees);\n\n // Start pid controller. PID controller will monitor the turn angle with\n // respect to the target angle and reduce power as we approach the target\n // angle. This is to prevent the robots momentum from overshooting the\n // turn after we turn off the power. The PID controller reports onTarget\n // () = true when the difference between turn angle and target angle is\n // within 1% of target (tolerance) which is about 1 degree. This helps\n // prevent overshoot. Overshoot depends on the motor and gearing\n // configuration, starting power, weight of the robot and the on target\n // tolerance. If the controller overshoots, it will reverse the sign of\n // the output turning the robot back toward the setpoint value.\n\n pidRotate.reset();\n pidRotate.setSetpoint(degrees);\n pidRotate.setInputRange(0, degrees);\n pidRotate.setOutputRange(0, power);\n pidRotate.setTolerance(0.01);\n pidRotate.enable();\n\n // getAngle() returns + when rotating counter clockwise (left) and - when\n // rotating clockwise (right).\n\n // rotate until turn is completed.\n\n if (degrees < 0) {\n do {\n power = pidRotate.performPID(getAngle()); // power will be - on right\n // turn.\n robot.leftDrive.setPower(-power);\n robot.rightDrive.setPower(power);\n } while (opModeIsActive() && !pidRotate.onTarget());\n } else // left turn.\n do {\n power = pidRotate.performPID(getAngle()); // power will be + on left\n // turn.\n robot.leftDrive.setPower(-power);\n robot.rightDrive.setPower(power);\n } while (opModeIsActive() && !pidRotate.onTarget());\n // reset angle tracking on new heading.\n stopMotors();\n pidDrive.disable();\n\n // wait for motors to calm down.\n sleep(500);\n\n rotation = getAngle();\n resetAngle();\n }", "protected void execute() {\n \twrist.rotateWrist(OI.getInstance().getXbox().getAxis(XboxController.XboxAxis.kYRight));\n }", "@Override\n public void rotate(Command command) {\n switch (command){\n case UP:\n setOrientation(Orientation.UP);\n break;\n\n case DOWN:\n setOrientation(Orientation.DOWN);\n break;\n\n case LEFT:\n setOrientation(Orientation.LEFT);\n break;\n\n case RIGHT:\n setOrientation(Orientation.RIGHT);\n break;\n\n default:\n }\n }", "public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT_5){\n\t\t\t\tfb5.turnLeftBy(2);\n\t\t\t\tangle = (angle+360+5)%360;\n\t\t\t}\n\t\t}", "private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}", "public void turnRight() { turn(\"RIGHT\"); }", "@Override\n\tpublic void rotateRight(int degrees) {\n\t\t\n\t}", "public void rotateRight() {\n\t\tif (rotRight == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(-90), 0f);\n\t\t\trotRight = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotRight);\n\t}", "private void RightLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n \t\t}}\n \t\t\n\t\t\n\t}", "public static void setRightMotorPosition(double rotations){\n rightFrontMotor.getPIDController().setReference(rotations, ControlType.kPosition);\n }", "protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }", "public static void turnrightBy(double angle) {\n leftMotor.rotate(convertAngle(angle), true);\n rightMotor.rotate(-convertAngle(angle), false);\n }", "private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}", "public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveRight();\n\t\t\t\tSystem.out.println(\"Heading +20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "@Override\n protected void execute() {\n headingPID.setSetpoint(-angle); //should be -angle \n Robot.driveBase.DriveAutonomous();\n }", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "public void rotateRight() {\n// tileLogic = getRotateRight();\n tileLogic = getRotateLeft();\n// rotateRightTex();\n rotateLeftTex();\n }", "public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n\n // Ensure that the opmode is still activ\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = leftmotor.getCurrentPosition() + moveCounts;\n newRightTarget = rightmotor.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n leftmotor.setTargetPosition(newLeftTarget);\n rightmotor.setTargetPosition(newRightTarget);\n\n leftmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n\n maxSpeed = speed;\n speed = INCREMENT;\n rampUp = true;\n\n leftmotor.setPower(speed);\n rightmotor.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while ((leftmotor.isBusy() && rightmotor.isBusy())) {\n if (rampUp){\n speed += INCREMENT ;\n if (speed >= maxSpeed ) {\n speed = maxSpeed;\n }\n }\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n leftmotor.setPower(leftSpeed);\n rightmotor.setPower(rightSpeed);\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n leftmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n gyroHold(TURN_SPEED,angle,0.166);\n\n }", "public void changeDirOnGear(IRobot robot) {\n String objectName = getObjectNameOnPos(tiledMap, robot.getPos());\n if (\"Counter_Clockwise\".equals(objectName)) {\n robot.rotateCounterClockwise();\n } else if (\"Clockwise\".equals(objectName)) {\n robot.rotateClockwise();\n }\n }", "public void teleopArcadeDrive(){\r\n\t\tmyRobot.arcadeDrive(-m_controls.driver_Y_Axis(), -m_controls.driver_X_Axis());\r\n\t}", "public void rotateServos() {\n if (gamepad1.x) { //change to y and x\n left.setPosition(.69); //.63 with other arms\n right.setPosition(.24); //.3 with other arms\n }\n \n if (gamepad1.y) {\n left.setPosition(0);\n right.setPosition(1);\n }\n }", "public void execute(Robot robot)\r\n\t{\r\n\t\tif(this.getDirection() == Direction.CLOCKWISE)\r\n\t\t{\r\n\t\t\trobot.turnClockwise();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\trobot.turnCounterClockwise();\r\n\t\t}\r\n\t}", "@Override\n public void giveCommands(Robot robot) {\n super.giveCommands(robot);\n\n arcadeDrive(robot.getDrivetrain());\n\n }", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "public void onRightPressed(){\n player.setRotation(player.getRotation()+3);\n\n }", "@Override\r\n\tpublic void setRight(MoveRightCommand right) {\n\r\n\t}", "public void TurnCommand() {\n\n requires(Robot.driveSubsystem);\n\n }", "public void execute() {\n RobotContainer.drive.turnToAngle(this.angle, turnSpeed);\n }", "private void turn(String rotate) {\n if(Objects.nonNull(this.position)) {\n int currentIntDirection = this.directionConversionMap.get(this.position.getDirection());\n int newIntDirection = this.rotateRobotMap.get(rotate).apply(currentIntDirection,directionConversionMap);\n Optional<Direction> direction = findDirection(newIntDirection);\n this.position = new Position(this.position.getX(), this.position.getY(), direction.get());\n }\n }", "public void openArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(-80, true);\n\t\tleftArmMotor.rotate(-80, false);\n\t}", "public void turn(int degree) {\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.rotate((int) Math.round(TURN_RATIO * degree), true);\n leftMotor.rotate((int) Math.round(-TURN_RATIO * degree), true);\n }", "@Override\n\tprotected void execute() {\n\t\tdouble speed = Robot.oi.getSpeed();\n\t\tdouble turn = Robot.oi.getTurn();\n\t\tdouble leftSpeed;\n\t\tdouble rightSpeed;\n\n\t\tif (Robot.oi.getGyroReset()) {\n\t\t\tRobot.chassisSubsystem.resetGyroHeading();\n\t\t}\n\n\t\tif (Robot.oi.getGyroCalibrate()) {\n\t\t\tRobot.chassisSubsystem.calibrateGyro();\n\t\t}\n\n\t\t/**\n\t\t * If the chassisSubsystem says that we should be in high gear, switch\n\t\t * to high gear, otherwise, switch to low gear.\n\t\t */\n\t\tif (Robot.oi.getGearShiftButton() >= 0.5) {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.HIGH);\n\t\t} else {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.LOW);\n\t\t}\n\n\t\t\n\n\t\t/**\n\t\t * If the user is not turning, then follow the gyro using the GoStraight\n\t\t * command.\n\t\t */\n\t\t/*\n\t\t * if (Math.abs(turn) < 0.03) { Scheduler.getInstance().add(new\n\t\t * GoStraightCommand(Robot.chassisSubsystem.getCurrentAngle())); return;\n\t\t * }\n\t\t */\n\n\t\t/*\n\t\t * double defaultValue = 0; Robot.chassisSubsystem.resetGyroHeading();\n\t\t * double angle = Robot.oi.table.getNumber(\"angle\", defaultValue);\n\t\t * System.out.println(angle);\n\t\t * \n\t\t * if(Robot.oi.getAlignShotButton()) { Scheduler.getInstance().add(new\n\t\t * PivotToAngleCommand(angle)); return; }\n\t\t */\n\n\n\t\tdouble targetCenterX = 0;\n\t\tif (Robot.oi.getAutoAlignShotButton() && targetCenterX != RobotMap.NO_VISION_TARGET) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Robot.oi.getManualAlignShotButton()) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\n\t\t// Use the driver input to set the speed and direction.\n\t\tif (Math.abs(speed) < 0.03) {\n\t\t\tleftSpeed = turn / 2.0;\n\t\t\trightSpeed = -turn / 2.0;\n\t\t} else {\n\t\t\tleftSpeed = (turn < 0.0) ? speed * (1.0 + turn) : speed;\n\t\t\trightSpeed = (turn < 0.0) ? speed : speed * (1.0 - turn);\n\t\t}\n\n\t\tRobot.chassisSubsystem.setSpeed(leftSpeed, rightSpeed);\n\t}", "public void moveRight() {\n\t\t\n\t}", "public void gyroTurn(int degrees, double power) throws InterruptedException{\n //restart angle tracking\n resetAngle();\n\n if(degrees < 0){\n turnClockwise(power);\n }else if(degrees > 0){\n turnCounterClockwise(power);\n }else{\n return;\n }\n\n //Rotate until current angle is equal to the target angle\n if (degrees < 0){\n while (opMode.opModeIsActive() && getAngle() > degrees){\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }else{\n while (opMode.opModeIsActive() && getAngle() < degrees) {\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }\n\n completeStop();\n //Wait .5 seconds to ensure robot is stopped before continuing\n Thread.sleep(500);\n resetAngle();\n }", "public void target()\n {\n if(noRotation == false)\n {\n if(timer % 3 == 0)\n {\n int currentRotation = getRotation();\n turnTowards(xMouse, yMouse);\n int newRotation = getRotation();\n if (Math.abs(currentRotation-newRotation) > 180)\n {\n if (currentRotation < 180) currentRotation += 360;\n else newRotation += 360;\n }\n if(currentRotation != newRotation)\n { \n setRotation(currentRotation+direction()*8);\n }\n }\n }\n }", "public void moveRight(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.RIGHT;\n\t\tif(animation!=ANIMATION.MOVERIGHT) {\n\t\t\tanimation=ANIMATION.MOVERIGHT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.RIGHT;\n\t\tdirection=\"right\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=spd/2;\n\t\tvelY=0;\n\t}", "public void rotate(double theta, boolean waitLeft, boolean waitRight) {\n\t\tint angle = LengthConverter.convertAngle(MotorConstants.WIDTH, theta);\n\t\tleftMotor.rotate(-angle, waitLeft);\n\t\trightMotor.rotate(angle, waitRight);\n\t}", "protected void execute() {\n \n \n \torientation.updatePID(RobotMap.navx.getAngle());\n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tSystem.out.println(RobotMap.navx.getAngle()-desiredAngle);\n }", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n int newLeftTarget;\n int newRightTarget;\n int moveCounts;\n double max;\n double error;\n double steer;\n double leftSpeed;\n double rightSpeed;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = robot.leftDrive.getCurrentPosition() + moveCounts;\n newRightTarget = robot.rightDrive.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n robot.leftDrive.setTargetPosition(newLeftTarget);\n robot.rightDrive.setTargetPosition(newRightTarget);\n\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n robot.leftDrive.setPower(speed);\n robot.rightDrive.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while (opModeIsActive() &&\n (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) {\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n robot.leftDrive.setPower(leftSpeed);\n robot.rightDrive.setPower(rightSpeed);\n\n // Display drive status for the driver.\n telemetry.addData(\"Err/St\", \"%5.1f/%5.1f\", error, steer);\n telemetry.addData(\"Target\", \"%7d:%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Actual\", \"%7d:%7d\", robot.leftDrive.getCurrentPosition(),\n robot.rightDrive.getCurrentPosition());\n telemetry.addData(\"Speed\", \"%5.2f:%5.2f\", leftSpeed, rightSpeed);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n }", "public abstract void rotateLeft();", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "protected void execute() {\n\t\t//System.out.println(\"Hello\");\n\t\tdouble rightVal = HumanInput.getJoystickAxis(HumanInput.rightJoystick,\n\t\t\t\tAxisType.kY);\n\t\t\n\t\tRobot.driveSys.set(rightVal, Robot.driveSys.talonFrontRight);\n\t\tRobot.driveSys.set(rightVal, Robot.driveSys.talonBackRight);\n\n\t\t\n\n\t\tdouble leftVal = HumanInput.getJoystickAxis(HumanInput.leftJoystick, AxisType.kY);\n\t\t\n\t\tRobot.driveSys.set(-leftVal, Robot.driveSys.talonFrontLeft);\n\t\tRobot.driveSys.set(-leftVal, Robot.driveSys.talonBackLeft);\n\t\t\n\t}", "@Override\n public void loop() {\n\n //double armRot = robot.Pivot.getPosition();\n\n double deadzone = 0.2;\n\n double trnSpdMod = 0.5;\n\n float xValueRight = gamepad1.right_stick_x;\n float yValueLeft = -gamepad1.left_stick_y;\n\n xValueRight = Range.clip(xValueRight, -1, 1);\n yValueLeft = Range.clip(yValueLeft, -1, 1);\n\n // Pressing \"A\" opens and closes the claw\n if (gamepad1.a) {\n\n if (robot.Claw.getPosition() < 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(1);}\n else if (robot.Claw.getPosition() > 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(0.4);}\n else\n while(gamepad1.a)\n robot.Claw.setPosition(1);\n }\n\n // Pressing \"B\" changes the wrist position\n if (gamepad1.b) {\n\n if (robot.Wrist.getPosition() == 1)\n while(gamepad1.b)\n robot.Wrist.setPosition(0.5);\n else if (robot.Wrist.getPosition() == 0.5)\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n else\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n }\n\n // Turn left/right, overrides forward/back\n if (Math.abs(xValueRight) > deadzone) {\n\n robot.FL.setPower(xValueRight * trnSpdMod);\n robot.FR.setPower(-xValueRight * trnSpdMod);\n robot.BL.setPower(xValueRight * trnSpdMod);\n robot.BR.setPower(-xValueRight * trnSpdMod);\n\n\n } else {//Forward/Back On Solely Left Stick\n if (Math.abs(yValueLeft) > deadzone) {\n robot.FL.setPower(yValueLeft);\n robot.FR.setPower(yValueLeft);\n robot.BL.setPower(yValueLeft);\n robot.BR.setPower(yValueLeft);\n }\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n\n telemetry.addData(\"Drive Encoder Ticks\", robot.FL.getCurrentPosition());\n telemetry.addData(\"Winch Encoder Ticks\", robot.Winch.getCurrentPosition());\n telemetry.addData(\"ColorArm Position\", robot.ColorArm.getPosition());\n telemetry.addData(\"Wrist Position\", robot.Wrist.getPosition());\n telemetry.addData(\"Claw Position\", robot.Claw.getPosition());\n telemetry.addData(\"Grip Position\", robot.Grip.getPosition());\n telemetry.addData(\"Color Sensor Data Red\", robot.Color.red());\n telemetry.addData(\"Color Sensor Data Blue\", robot.Color.blue());\n\n /*\n\n // This is used for an Omniwheel base\n\n // Group a is Front Left and Rear Right, Group b is Front Right and Rear Left\n float a;\n float b;\n float turnPower;\n if(!gamepad1.x) {\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n\n a = Range.clip(yValueLeft + xValueLeft, -1, 1);\n b = Range.clip(yValueLeft - xValueLeft, -1, 1);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n } else {\n\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n a = Range.clip(yValueLeft + xValueLeft, -0.6f, 0.6f);\n b = Range.clip(yValueLeft - xValueLeft, -0.6f, 0.6f);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n }\n\n\n if (gamepad1.dpad_up) {\n\n robot.Swing.setPower(.6);\n\n } else if (gamepad1.dpad_down) {\n\n robot.Swing.setPower(-.6);\n\n } else {\n\n robot.Swing.setPower(0);\n }\n\n if(gamepad1.a){\n\n robot.Claw.setPosition(.4);\n\n } else if(gamepad1.b){\n\n robot.Claw.setPosition(0);\n }\n\n if(gamepad1.left_bumper) {\n\n robot.Pivot.setPosition(armRot+0.0005);\n\n } else if(gamepad1.right_bumper) {\n\n robot.Pivot.setPosition(armRot-0.0005);\n\n } else{\n\n robot.Pivot.setPosition(armRot);\n }\n\n telemetry.addData(\"position\", position);\n\n */\n\n /*\n * Code to run ONCE after the driver hits STOP\n */\n }", "public void move() {\n\t\tSystem.out.println(\"Robot Can Move\");\n\t}", "@Override\n public void loop() {\n double left;\n double right;\n\n // // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n left = -gamepad1.left_stick_y;\n right = -gamepad1.right_stick_y;\n \n // double Target = 0;\n // robot.rightBack.setTargetPosition((int)Target);\n // robot.rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n rightFront.setPower(left);\n rightBack.setPower(right);\n // robot.rightDrive.setPower(right);\n\n // // Use gamepad left & right Bumpers to open and close the claw\n // if (gamepad1.right_bumper)\n // clawOffset += CLAW_SPEED;\n // else if (gamepad1.left_bumper)\n // clawOffset -= CLAW_SPEED;\n\n // // Move both servos to new position. Assume servos are mirror image of each other.\n // clawOffset = Range.clip(clawOffset, -0.5, 0.5);\n // robot.leftClaw.setPosition(robot.MID_SERVO + clawOffset);\n // robot.rightClaw.setPosition(robot.MID_SERVO - clawOffset);\n\n // Use gamepad buttons to move the arm up (Y) and down (A)\n // if (gamepad1.y)\n // armPosition += ARM_SPEED;\n \n // if (gamepad1.a)\n // armPosition -= ARM_SPEED;\n \n // armPosition = Range.clip(armPosition, robot.ARM_MIN_RANGE, robot.ARM_MAX_RANGE); \n \n\n // // Send telemetry message to signify robot running;\n // telemetry.addData(\"arm\", \"%.2f\", armPosition);\n // telemetry.addData(\"left\", \"%.2f\", left);\n // telemetry.addData(\"right\", \"%.2f\", right);\n }", "public void rotateRight(int time) {\n\t\tdouble step = 3;\r\n\t\t\r\n\t\tif( rotation + step > 360 )\r\n\t\t\trotation = rotation + step - 360;\r\n\t\telse\r\n\t\t\trotation += step;\r\n\t}", "public final void GyroTurn (int degrees, double power)\n {\n //Define gyro angle\n float GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n\n //While the gyro is reading degrees that is not the desired, turn right or left\n while (GyroAngle != degrees)\n {\n //\n robot.DriveLeftBack.setPower(-.1);\n robot.DriveRightBack.setPower(.1);\n robot.DriveRightFront.setPower(.1);\n robot.DriveLeftFront.setPower(-.1);\n\n //Update gyro angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n\n //Stop\n Stop();\n }", "public void rotateConveyor(IRobot robot, String conveyor, Direction dir) {\n // robot should only rotate when coming from a conveyor.\n if (robot.getCameFromConveyor()) {\n if (conveyor.contains(\"CounterClockwise\")) {\n robot.rotateCounterClockwise();\n } else if (conveyor.contains(\"Clockwise\")) {\n robot.rotateClockwise();\n } else {\n rotateConveyorJunction(robot, conveyor, dir);\n }\n } else {\n System.out.println(\"Cannot rotate on conveyor!\");\n }\n }", "@Override\n protected void execute() \n {\n move(Robot.oi.mechJoystick);\n }", "public void cameraRotation() throws InterruptedException {\n\t\tint lowSide = (int)random(1,4);\r\n\t\tint highSide = (int)random(5,10);\r\n\t\tint medLowSide = (int)random(10,15);\r\n\t\tint medHighSide = (int)random(35,60);\r\n\t\tint highLowSide = (int)random(70,100);\r\n\t\tint highHighSide = (int)random(200,300);\r\n\t\tint cameraRotRandom = (int)random(0,1000);\r\n\t\tint cameraAngle = (int)camera.getPitchAngle(); // did we want to do anything with this?\r\n\t\t\r\n\t\t// twitch\r\n\t\tif (cameraRotRandom <= 200) {\r\n\t\t\t//log(\"antiban, move camera, twitch\");\r\n\t\t\tint twitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (twitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (twitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// medium movements\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 900) {\r\n\t\t\t//log(\"antiban, move camera, medium\");\r\n\t\t\tint medtwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (medtwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (medtwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// complete rotations\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 1000) {\r\n\t\t\t//log(\"antiban, move camera, long rotation\");\r\n\t\t\tint hightwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (hightwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (hightwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tlog(\"something went wrong with antiban camera rotation\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void cameraRotation() throws InterruptedException {\n\t\tint lowSide = (int)random(1,4);\r\n\t\tint highSide = (int)random(5,10);\r\n\t\tint medLowSide = (int)random(10,15);\r\n\t\tint medHighSide = (int)random(35,60);\r\n\t\tint highLowSide = (int)random(70,100);\r\n\t\tint highHighSide = (int)random(200,300);\r\n\t\tint cameraRotRandom = (int)random(0,1000);\r\n\t\t//int cameraAngle = (int)camera.getPitchAngle(); // did we want to do anything with this?\r\n\t\t\r\n\t\t// twitch\r\n\t\tif (cameraRotRandom <= 200) {\r\n\t\t\t//log(\"antiban, move camera, twitch\");\r\n\t\t\tint twitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (twitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (twitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// medium movements\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 900) {\r\n\t\t\t//log(\"antiban, move camera, medium\");\r\n\t\t\tint medtwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (medtwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (medtwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// complete rotations\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 1000) {\r\n\t\t\t//log(\"antiban, move camera, long rotation\");\r\n\t\t\tint hightwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (hightwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (hightwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tlog(\"something went wrong with antiban camera rotation\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void xRotate() {\n\t\t\n\t}", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "public void operatorDrive() {\n\n changeMode();\n checkForGearShift();\n\n if (Robot.rightJoystick.getRawButton(1)) {\n currentMode = DriveMode.AUTO;\n\n } else if (Robot.rightJoystick.getRawButton(2)) {\n currentMode = DriveMode.CLIMB;\n } else {\n currentMode = DEFAULT_MODE;\n }\n\n isDeploying = false;\n\n if (currentMode == DriveMode.AUTO) {\n currentMode_s = \"Auto\";\n } else if (currentMode == DriveMode.ARCADE) {\n currentMode_s = \"Arcade\";\n } else {\n currentMode_s = \"Tank\";\n }\n\n double leftY = 0;\n double rightY = 0;\n\n switch (currentMode) {\n\n case AUTO:\n rotateCam(4, Robot.visionTargetInfo.visionPixelX);\n\n // driveFwd(4, .25);\n\n break;\n\n case CLIMB:\n\n climb();\n\n break;\n\n case ARCADE:\n resetAuto();\n double linear = 0;\n double turn = 0;\n\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n linear = -Robot.rightJoystick.getY();\n }\n if (Math.abs(Robot.leftJoystick.getX()) > deadband) {\n turn = Math.pow(Robot.leftJoystick.getX(), 3);\n }\n\n leftY = -linear - turn;\n rightY = linear - turn;\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n\n break;\n\n case TANK:\n\n resetAuto();\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n rightY = -Math.pow(Robot.rightJoystick.getY(), 3 / 2);\n }\n if (Math.abs(Robot.leftJoystick.getY()) > deadband) {\n leftY = Math.pow(Robot.leftJoystick.getY(), 3 / 2);\n }\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n break;\n\n default:\n break;\n }\n\n updateTelemetry();\n }", "@Override\r\n\tpublic void turn(Robot robot)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(robot.canTurn(Direction.CLOCKWISE))\r\n\t\t\t{\r\n\t\t\t\trobot.turnClockwise();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"This robot cannot turn in its current state.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IllegalStateException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"A terminated robot cannot be turned.\");\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}", "protected void execute() {\n\t//\tif (Math.abs(Robot.launcher.getDegrees()) < 5.5) {\n\t\t\tif (up)\n\t\t\t\tRobot.launcher.tiltDown();\n\t\t\telse\n\t\t\t\tRobot.launcher.tiltUp();\n//\t\t} else {\n//\t\t\tLog.warn(\"Turret rotated too much to tilt\");\n//\t\t\tend();\n//\t\t}\n\t}", "private void rotate(int direction){\n\t\t//Gdx.app.debug(TAG, \"rotating, this.x: \" + this.x + \", this.y: \" + this.y);\n\t\tif (direction == 1 || direction == -1){\n\t\t\tthis.orientation = (this.orientation + (direction*-1) + 4) % 4;\n\t\t\t//this.orientation = (this.orientation + direction) % 4;\n\t\t} else{\n\t\t\tthrow new RuntimeException(\"Tile invalid direction\");\n\t\t}\n\t}", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "private void driveRight() {\n setSpeed(MAX_SPEED, MIN_SPEED);\n }", "public void executeCommand(Turtle turtle)\n {\n\tturtle.moveCurrentOrientationRight(radiansRight);\n\treturn;\n }", "public void turnRight ()\n\t{\n\t\t//changeFallSpeed (1);\n\t\tturnInt = 1;\n\t}", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "void drive(double power, double leftInches, double rightInches, double seconds) {\n\n //Make new integer to set left and right motor targets\n int leftTarget;\n int rightTarget;\n\n if (opModeIsActive()) {\n\n //Determine left and right target to move to\n leftTarget = robot.leftMotor.getCurrentPosition() + (int) (leftInches * COUNTS_PER_INCH);\n rightTarget = robot.rightMotor.getCurrentPosition() + (int) (rightInches * COUNTS_PER_INCH);\n\n //Set target and move to position\n robot.leftMotor.setTargetPosition(leftTarget);\n robot.rightMotor.setTargetPosition(rightTarget);\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //Reset runtime and start motion\n robot.leftMotor.setPower(Math.abs(power));\n robot.rightMotor.setPower(Math.abs(power));\n\n //Test if motors are busy, runtime is less than timeout and motors are busy and then run code\n while (opModeIsActive() && (runtime.seconds() < seconds) && (robot.leftMotor.isBusy() && robot.rightMotor.isBusy())) {\n\n //Tell path to driver\n telemetry.addData(\"Path1\", \"Running to: \", leftTarget, rightTarget);\n telemetry.addData(\"Path2\", \"Running at: \", robot.leftMotor.getCurrentPosition(), robot.rightMotor.getCurrentPosition());\n telemetry.update();\n }\n\n //Stop motors after moved to position\n robot.leftMotor.setPower(0);\n robot.rightMotor.setPower(0);\n\n //Set motors back to using run using encoder\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "private void rightBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rightBtnActionPerformed\n if (rotateL == 0) {\n rotateL = 1;\n r.stop();\n l.start();\n } else {\n rotateL = 0;\n l.stop();\n }\n\n }", "public void rightPressed() \n\t{\n\t\tkeys.get(keys.put(Keys.RIGHT, true));\n\t}", "public void turnRight(boolean endWithBrake){\r\n Motor.B.rotate(DEGREES_PER_TURN, true);//Accesses Motor thread\r\n Motor.C.rotate(-1*DEGREES_PER_TURN, true);\r\n while(Motor.B.isMoving() || Motor.C.isMoving())\r\n ;//wait for motors to be done\r\n return;\r\n }", "@Override\n protected void execute() {\n Robot.elevatorRear.setElevatorRear(Robot.oi.controller.getY(Hand.kLeft), rearLiftLocked);\n }", "public void moveRight()\n\t{\n\t\tmoveRight = true;\n\t}", "private void moveClawDown() {\n\t\tMotor.A.setSpeed(45);\n\t\tMotor.A.rotate(-90);\n\t}", "public void rotateTurtle(double deg){\n\t\tSystem.out.println(\"in rotate\");\n\n\t\tmyTurtle.turn(deg);\n\t\tthis.updateTurtleOnView();\n\t}", "protected void execute() {\n \tdouble a = 0.5;\n \tdouble x = Robot.oi.getPilotAxis(Robot.oi.LOGITECH_F510_AXIS_RIGHT_STICK_X);\n \tdouble y = Robot.oi.getPilotAxis(Robot.oi.LOGITECH_F510_AXIS_LEFT_STICK_Y);\n \tx = 0.5*((a * Math.pow(x, 3)) + ((1-a) * x));\n \ty = a * Math.pow(y, 3) + (1-a) * y;\n \tdouble left = y + x;\n\t\tdouble right = y - x;\n\t\t\n\t\t// Apply values to motors\n\t\tRobot.chassis.setLeft(left);\n\t\tRobot.chassis.setRight(right);\n }", "public abstract void rotate();", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n int newLeftTarget;\n int newRightTarget;\n int moveCounts;\n double max;\n double error;\n double steer;\n double leftSpeed;\n double rightSpeed;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = leftMotor.getCurrentPosition() + moveCounts;\n newRightTarget = rightMotor.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n leftMotor.setTargetPosition(newLeftTarget);\n rightMotor.setTargetPosition(newRightTarget);\n\n leftMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n leftMotor.setPower(speed);\n rightMotor.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while (opModeIsActive() &&\n (leftMotor.isBusy() && rightMotor.isBusy())) {\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if any one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n leftMotor.setPower(leftSpeed);\n rightMotor.setPower(rightSpeed);\n\n // Display drive status for the driver.\n telemetry.addData(\"Err/St\", \"%5.1f/%5.1f\", error, steer);\n telemetry.addData(\"Target\", \"%7d:%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Actual\", \"%7d:%7d\", leftMotor.getCurrentPosition(),\n rightMotor.getCurrentPosition());\n telemetry.addData(\"Speed\", \"%5.2f:%5.2f\", leftSpeed, rightSpeed);\n telemetry.update();\n }\n\n // Stop all motion;\n\n rightMotor.setPower(0);\n leftMotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public void moveRight() {\n\t\tsetPosX(getPosX() + steps);\n\t}", "@Override\n\t\tpublic void driveRobot(double power, double pivot) {\n\t\t\tclosedLoopArcade(power, pivot);\n\t\t}" ]
[ "0.79613024", "0.75925475", "0.7438983", "0.73553956", "0.7327816", "0.71441513", "0.712878", "0.7037574", "0.70062417", "0.70000434", "0.69996464", "0.6982124", "0.6965744", "0.69405377", "0.6914746", "0.68930465", "0.6889825", "0.68296957", "0.68229324", "0.6705401", "0.66668993", "0.666281", "0.6657625", "0.6632586", "0.6627445", "0.6617351", "0.66155505", "0.6571402", "0.65644354", "0.65598124", "0.6533703", "0.65060836", "0.6502151", "0.6477991", "0.64686465", "0.646315", "0.6432001", "0.64040565", "0.63954407", "0.63745356", "0.6374347", "0.63621724", "0.63587445", "0.63562196", "0.6351681", "0.63507295", "0.6332053", "0.63285685", "0.63269436", "0.63209134", "0.62985814", "0.62978077", "0.6295729", "0.6290374", "0.62748754", "0.62683856", "0.62583154", "0.62572974", "0.6252546", "0.62469816", "0.6193032", "0.6177862", "0.6166607", "0.6157188", "0.61558545", "0.61506695", "0.6149779", "0.613484", "0.6134357", "0.61338407", "0.6117967", "0.6114015", "0.6113549", "0.61034715", "0.6097949", "0.6094849", "0.6090334", "0.60871035", "0.60861355", "0.6082897", "0.60815376", "0.60786307", "0.6075364", "0.6065257", "0.6055585", "0.6053233", "0.60501665", "0.6045732", "0.6044865", "0.6044617", "0.60382116", "0.6037762", "0.6032394", "0.60321826", "0.6032036", "0.6023232", "0.60185313", "0.601701", "0.6016487", "0.6008268" ]
0.68542236
17
In the actual robot, this will also send the command to rotate left
@Override public void rotateLeft() { setDirection((this.getDirection() + 3) % 4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }", "public void rotateLeft (View view){ //onClick for LEFT Button\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(-90f).setDuration(50); //turn toy robot LEFT\n\n rotateLeft--; //counter to determine orientation\n System.out.println(\"rotateLeft \" + rotateLeft);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight)); //chk params in Logs\n\n } else errorMessage(\"Please place toy robot\");\n }", "public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveLeft();\n\t\t\tSystem.out.println(\"Heading +10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public abstract void rotateLeft();", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "@Test\n public void rotateCommand() {\n ICommand cmd = Commands.getComand(\"rotate\");\n Robot robot = new Robot(0, 0);\n Vector2Di dir = robot.getDir();\n int rot_amount = 90;\n double orig_angle = dir.angle();\n cmd.exec(rot_amount, robot, null);\n assertEquals(orig_angle + rot_amount, dir.angle(), 0.1);\n }", "public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }", "@Override\n\tpublic void rotateLeft(int degrees) {\n\t\t\n\t}", "public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "private void robotMovement()\n {\n\n /* If it will be rotating, don't drive */\n if (!joystick.rightShouldMove()) {\n\n if (joystick.leftShouldMove()) {\n\n /* Derive movement values from gamepad */\n Joystick.Direction direction = joystick.getLeftDirection();\n double power = joystick.getLeftPower();\n\n int[] modifier;\n\n if (direction == Joystick.Direction.UP) {\n modifier = modUP;\n } else if (direction == Joystick.Direction.DOWN) {\n modifier = modDOWN;\n } else if (direction == Joystick.Direction.RIGHT) {\n modifier = modRIGHT;\n } else {\n modifier = modLEFT;\n }\n\n motorLeftFront.setPower(modifier[0] * ((power * 0.8) + (0.01 * frontInc)));\n motorRightFront.setPower(modifier[1] * ((power * 0.8) + (0.01 * frontInc)));\n motorLeftBack.setPower(modifier[2] * ((power * 0.8) + (0.01 * backInc)));\n motorRightBack.setPower(modifier[3] * ((power * 0.8) + (0.01 * backInc)));\n\n } else {\n setMotorPowerToZero();\n }\n\n } else {\n\n /* Rotation modifiers for sides of bot */\n Joystick.Direction d = joystick.getRightDirection();\n double power = joystick.getRightPower();\n boolean left = d == Joystick.Direction.LEFT;\n double sideMod = left ? 1 : -1;\n\n /* Set motor power */\n motorLeftFront.setPower(sideMod * power);\n motorLeftBack.setPower(sideMod * power);\n motorRightFront.setPower(sideMod * power);\n motorRightBack.setPower(sideMod * power);\n\n }\n\n }", "public static void turnleftBy(double angle) {\n leftMotor.rotate(-convertAngle(angle), true);\n rightMotor.rotate(convertAngle(angle), false);\n }", "public void rotateLeft() {\n\t\tif (rotLeft == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(90), 0f);\n\t\t\trotLeft = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotLeft);\n\t}", "private void rotate(int degrees, double power) {\n telemetry.addData(\"command\", \"turn %f.1\\u00B0 turn.\");\n // restart imu angle tracking.\n resetAngle();\n\n // if degrees > 359 we cap at 359 with same sign as original degrees.\n if (Math.abs(degrees) > 359)\n degrees = (int) Math.copySign(359, degrees);\n\n // Start pid controller. PID controller will monitor the turn angle with\n // respect to the target angle and reduce power as we approach the target\n // angle. This is to prevent the robots momentum from overshooting the\n // turn after we turn off the power. The PID controller reports onTarget\n // () = true when the difference between turn angle and target angle is\n // within 1% of target (tolerance) which is about 1 degree. This helps\n // prevent overshoot. Overshoot depends on the motor and gearing\n // configuration, starting power, weight of the robot and the on target\n // tolerance. If the controller overshoots, it will reverse the sign of\n // the output turning the robot back toward the setpoint value.\n\n pidRotate.reset();\n pidRotate.setSetpoint(degrees);\n pidRotate.setInputRange(0, degrees);\n pidRotate.setOutputRange(0, power);\n pidRotate.setTolerance(0.01);\n pidRotate.enable();\n\n // getAngle() returns + when rotating counter clockwise (left) and - when\n // rotating clockwise (right).\n\n // rotate until turn is completed.\n\n if (degrees < 0) {\n do {\n power = pidRotate.performPID(getAngle()); // power will be - on right\n // turn.\n robot.leftDrive.setPower(-power);\n robot.rightDrive.setPower(power);\n } while (opModeIsActive() && !pidRotate.onTarget());\n } else // left turn.\n do {\n power = pidRotate.performPID(getAngle()); // power will be + on left\n // turn.\n robot.leftDrive.setPower(-power);\n robot.rightDrive.setPower(power);\n } while (opModeIsActive() && !pidRotate.onTarget());\n // reset angle tracking on new heading.\n stopMotors();\n pidDrive.disable();\n\n // wait for motors to calm down.\n sleep(500);\n\n rotation = getAngle();\n resetAngle();\n }", "public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }", "private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}", "public void RotateRight(double speed, int distance) {\n // Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n sleep(500);\n\n robot2.DriveRightFront.setTargetPosition(0);\n robot2.DriveRightRear.setTargetPosition(0);\n robot2.DriveLeftFront.setTargetPosition(0);\n robot2.DriveLeftRear.setTargetPosition(0);\n\n // Set RUN_TO_POSITION\n\n robot2.DriveRightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // Set Motor Power to 0\n robot2.DriveRightFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n\n\n double InchesMoving = (distance * COUNTS_PER_INCH);\n\n // Set Target to RotateRight\n robot2.DriveRightFront.setTargetPosition((int) -InchesMoving);\n robot2.DriveRightRear.setTargetPosition((int) -InchesMoving);\n robot2.DriveLeftRear.setTargetPosition((int) InchesMoving);\n robot2.DriveLeftFront.setTargetPosition((int) InchesMoving);\n\n while (robot2.DriveRightFront.isBusy() && robot2.DriveRightRear.isBusy() && robot2.DriveLeftRear.isBusy() && robot2.DriveLeftFront.isBusy()) {\n\n // wait for robot to move to RUN_TO_POSITION setting\n\n double MoveSpeed = speed;\n\n // Set Motor Power\n robot2.DriveRightFront.setPower(MoveSpeed);\n robot2.DriveRightRear.setPower(MoveSpeed);\n robot2.DriveLeftFront.setPower(MoveSpeed);\n robot2.DriveLeftRear.setPower(MoveSpeed);\n\n } // THis brace close out the while Loop\n\n //Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n\n robot2.DriveRightFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n }", "@Test\n\t public void processLeftCommands()\n\t {\n\t Rover rover = createFrontFacingRoverAt(0, 0);\n\t rover.executeCommands(\"l\");\n\t assertTrue(0 == rover.facing.x);\n\t assertTrue(-1 == rover.facing.y);\n\n\t }", "public static void setLeftMotorPosition(double rotations){\n leftFrontMotor.getPIDController().setReference(rotations, ControlType.kPosition);\n }", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "@Override\n protected void execute() {\n headingPID.setSetpoint(-angle); //should be -angle \n Robot.driveBase.DriveAutonomous();\n }", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "private void RightLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\t\n \t\t\n \t\n \t}\n \t}", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext ())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveLeft();\n\t\t\t\tSystem.out.println(\"Heading -20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "public void rotateServos() {\n if (gamepad1.x) { //change to y and x\n left.setPosition(.69); //.63 with other arms\n right.setPosition(.24); //.3 with other arms\n }\n \n if (gamepad1.y) {\n left.setPosition(0);\n right.setPosition(1);\n }\n }", "public void turnLeft() { turn(\"LEFT\"); }", "public void rotateRight (View view){\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(90f).setDuration(50); //turn toy robot LEFT\n\n rotateRight++; //counter to determine orientation\n System.out.println(\"rotateRight \" + rotateRight);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight));\n\n } else errorMessage(\"Please place toy robot\");\n }", "@Override\n public void rotate(Command command) {\n switch (command){\n case UP:\n setOrientation(Orientation.UP);\n break;\n\n case DOWN:\n setOrientation(Orientation.DOWN);\n break;\n\n case LEFT:\n setOrientation(Orientation.LEFT);\n break;\n\n case RIGHT:\n setOrientation(Orientation.RIGHT);\n break;\n\n default:\n }\n }", "public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}", "protected void execute() {\n \twrist.rotateWrist(OI.getInstance().getXbox().getAxis(XboxController.XboxAxis.kYRight));\n }", "public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}", "@Override\r\n\tpublic void setLeft(MoveLeftCommand left) {\n\r\n\t}", "public void turnLeft();", "private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}", "public void rotateLeft(int time) {\n\t\tdouble step = 3;\r\n\t\t\r\n\t\tif( rotation - step < 0 )\r\n\t\t\trotation = rotation - step + 360;\r\n\t\telse\r\n\t\t\trotation -= step;\r\n\t\t\t\r\n\t}", "public void moveLeft() {\n\t\t\n\t}", "public void rotate180 (View view){\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(180f).setDuration(50); //turn toy robot AROUND (180')\n\n rotateRight += 2; //counter to determine orientation\n System.out.println(\"rotateRight \" + rotateRight);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight));\n\n } else errorMessage(\"Please place toy robot\");\n }", "public void openArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(-80, true);\n\t\tleftArmMotor.rotate(-80, false);\n\t}", "private void moveLeft(){\n \n setGlobalLocation(getGlobalX() - speed, getGlobalY());\n animationSpeedLeft();\n }", "protected void execute() {\n \tRobot.driveSubsystem.runLeftSide(howFastWeWantToMove);\n }", "@Override\n protected void execute() {\n\n int leftMultiplier = -1;\n if (IsLeft) {\n leftMultiplier = 1;\n }\n Robot.m_drivetrain.drive(leftMultiplier * .5, -leftMultiplier * .5);\n\n }", "public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT_5){\n\t\t\t\tfb5.turnLeftBy(2);\n\t\t\t\tangle = (angle+360+5)%360;\n\t\t\t}\n\t\t}", "public static void hookMotor() {\n\t\thookMotor.rotate(45);\n\t}", "public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }", "@Override\n \t\t\t\tpublic void doRotateX() {\n \n \t\t\t\t}", "public void spinLeft(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tleftTopMotor.set(-1 * speed);\r\n \tleftBottomMotor.set(-1 * speed);\r\n \trightTopMotor.set(-1 * speed);\r\n \trightBottomMotor.set(-1 * speed);\r\n }", "@Override\n public void turnLeft(Double angle) {\n angle = Math.toRadians(angle);\n double temp = vector.x;\n vector.x = vector.x * Math.cos(angle) - vector.y * Math.sin(angle);\n vector.y = temp * Math.sin(angle) + vector.y * Math.cos(angle);\n }", "public void rotate(double theta, boolean waitLeft, boolean waitRight) {\n\t\tint angle = LengthConverter.convertAngle(MotorConstants.WIDTH, theta);\n\t\tleftMotor.rotate(-angle, waitLeft);\n\t\trightMotor.rotate(angle, waitRight);\n\t}", "private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}", "public void moveLeft(int speed)\n {\n if(getRotation()==0)\n {\n turn(180);\n move(speed);\n }\n else if(getRotation()==90)\n {\n turn(90);\n move(speed);\n }\n else if(getRotation()==180)\n {\n move(speed);\n }\n else if(getRotation()==270)\n {\n turn(-90);\n move(speed);\n }\n }", "public void xRotate() {\n\t\t\n\t}", "public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }", "private void turn(String rotate) {\n if(Objects.nonNull(this.position)) {\n int currentIntDirection = this.directionConversionMap.get(this.position.getDirection());\n int newIntDirection = this.rotateRobotMap.get(rotate).apply(currentIntDirection,directionConversionMap);\n Optional<Direction> direction = findDirection(newIntDirection);\n this.position = new Position(this.position.getX(), this.position.getY(), direction.get());\n }\n }", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "public void onLeftPressed(){\n player.setRotation(player.getRotation()-3);\n\n }", "public void moveLeft() {\n\t\tsetPosX(getPosX() - steps);\n\t}", "public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }", "public abstract void turnLeft();", "public void changeDirOnGear(IRobot robot) {\n String objectName = getObjectNameOnPos(tiledMap, robot.getPos());\n if (\"Counter_Clockwise\".equals(objectName)) {\n robot.rotateCounterClockwise();\n } else if (\"Clockwise\".equals(objectName)) {\n robot.rotateClockwise();\n }\n }", "public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public void TurnCommand() {\n\n requires(Robot.driveSubsystem);\n\n }", "public void turn(int degree) {\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.rotate((int) Math.round(TURN_RATIO * degree), true);\n leftMotor.rotate((int) Math.round(-TURN_RATIO * degree), true);\n }", "public void setMoveLeft(boolean TorF) {\n moveLeft = TorF;\n }", "private void leftBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_leftBtnActionPerformed\n if (rotateR == 0) {\n rotateR = 1;\n\n l.stop();\n r.start();\n } else {\n rotateR = 0;\n r.stop();\n }\n }", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "public void turnLeft(boolean endWithBrake){\r\n Motor.B.rotate(-1*DEGREES_PER_TURN, true);//Accesses Motor thread\r\n Motor.C.rotate(DEGREES_PER_TURN, true);\r\n while(Motor.B.isMoving() || Motor.C.isMoving())\r\n ;//wait for motors to be done\r\n return;\r\n }", "public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "public void moveLeft(){\n myRectangle.setX(myRectangle.getX() - PADDLE_SPEED);\n }", "public void moveLeft()\n {\n if (xPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative X because we are moving LEFT! \n movementX = -0.5;\n movementY = 0;\n }", "@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}", "public void rotateArms(int angle) {\n\t\tleftArmMotor.setSpeed(8);\n\t\trightArmMotor.setSpeed(8);\n\t\t\n\t\tleftArmMotor.rotate(angle, true);\n\t\trightArmMotor.rotate(angle, true);\n\t}", "public void turnLeft(double speed) {\n\t\tRobotMap.frontLeft.set(-speed);\n\t\tRobotMap.backLeft.set(-speed);\n\t\tRobotMap.frontRight.set(-speed);\n\t\tRobotMap.backRight.set(-speed);\n\t}", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}", "@Override\n public void giveCommands(Robot robot) {\n super.giveCommands(robot);\n\n arcadeDrive(robot.getDrivetrain());\n\n }", "public void teleopArcadeDrive(){\r\n\t\tmyRobot.arcadeDrive(-m_controls.driver_Y_Axis(), -m_controls.driver_X_Axis());\r\n\t}", "public void execute() {\n RobotContainer.drive.turnToAngle(this.angle, turnSpeed);\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "private void RightLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n \t\t}}\n \t\t\n\t\t\n\t}", "public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }", "private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }", "private static void turnRight(Robot r) \n {\n for(int i=0; i<3;i++)\n {\n r.turnLeft();\n }\n }", "private void turnRight() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.SOUTH;\n break;\n case WEST:\n direction = Position.Direction.NORTH;\n break;\n case NORTH:\n direction = Position.Direction.EAST;\n break;\n case SOUTH:\n direction = Position.Direction.WEST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "public void degrees() throws InterruptedException{\n\n\t\tif(keyPressed){\n\t\t\twhile(deg < 90){\n\t\t\t\tdeg += 15;\n\t\t\t\tSystem.out.println(\"Rotating UP \" + opcode);\n\t\t\t}\n\t\t}\n\t\telse if(!keyPressed){\n\t\t\twhile(deg > 0){\n\t\t\t\tdeg -= 15;\n\t\t\t\tSystem.out.println(\"Rotating Down \" + opcode);\n\t\t\t}\n\t\t}\n\t}", "public void moveLeft() {\n speedX -= (speedX > 0) ? acceleration * 2 : acceleration;\n if (speedX < -maxSpeed) {\n speedX = -maxSpeed;\n }\n direction = Direction.LEFT;\n }", "private boolean moveLeft() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() - rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() - rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}", "public void moveLeft() {\r\n\t\t\r\n\t\tint leftSteps=10;\r\n\t\t\ttopX-= leftSteps;\r\n\t}", "@Override\n protected void execute()\n {\n Robot.driveBase.drive(OI.pilot.leftStick.getY(), OI.pilot.rightStick.getX());\n }", "protected void execute() {\n \tRobot.m_oi.messageDriverStation(\"COMMAND AutoTurnRight reported angle is = \" + Robot.driveBase.getGyroAngle());\n \tdouble angle = Robot.driveBase.getGyroAngle();\n \tdouble increment = (requiredAngle - angle) * kP * -0.08;\n \tRobot.driveBase.autoDrive(0.1,0.5);\n }", "public void moveLeftRight(double power){\n\t\trobot.motor0.setPower(-power);\n\t\trobot.motor1.setPower(-power);\n\t\trobot.motor2.setPower(power);\n\t\trobot.motor3.setPower(power);\n\t}", "public void move() {\n\t\tSystem.out.println(\"Robot Can Move\");\n\t}", "protected void initialize() {\n \tSystem.out.println(\"Running: TurnXDegrees\");\n \tstartingAngle = Robot.gyro.getRawAngleDegrees();\n \tisFin = false;\n \tsetTimeout(5);\n \tif(angleTarget < 0) {\n \t\tSystem.out.println(\"Turning Left...\");\n \t\tisTurningLeft = true;\n \t}else {\n \t\tSystem.out.println(\"Turning Right...\");\n \t\tisTurningLeft = false;\n \t}\n \t\n }", "public static void turnByDegree(double degree) {\n LEFT_MOTOR.rotate(convertAngle(WHEEL_RAD, TRACK, degree), true);\n RIGHT_MOTOR.rotate(-convertAngle(WHEEL_RAD, TRACK, degree), false);\n }" ]
[ "0.8003784", "0.78414905", "0.743276", "0.7412244", "0.71889687", "0.7132984", "0.7114874", "0.7093058", "0.7057164", "0.70551634", "0.70002604", "0.6923541", "0.6914615", "0.689078", "0.6883466", "0.687876", "0.6842742", "0.68406296", "0.6747887", "0.67373043", "0.67247885", "0.6695518", "0.666578", "0.6663124", "0.66249305", "0.6615303", "0.66077", "0.660682", "0.6602201", "0.6554907", "0.65440845", "0.65383667", "0.65303755", "0.652857", "0.65279067", "0.6526009", "0.6512612", "0.6509346", "0.6499352", "0.64918107", "0.6458908", "0.6447671", "0.64463294", "0.64448094", "0.6433835", "0.641889", "0.64143246", "0.6408067", "0.6405424", "0.6396445", "0.6389672", "0.63723755", "0.636789", "0.635776", "0.63494146", "0.63268524", "0.63092744", "0.63008827", "0.6300649", "0.62917966", "0.6291559", "0.6272918", "0.6271707", "0.6269385", "0.6268262", "0.62630117", "0.62527955", "0.62237966", "0.62155974", "0.621138", "0.6208429", "0.62064964", "0.61930573", "0.6187466", "0.61841047", "0.6181794", "0.6150957", "0.6142081", "0.613955", "0.61379343", "0.6135694", "0.6127057", "0.6125311", "0.6124157", "0.6122693", "0.61185974", "0.6112078", "0.6107039", "0.6105798", "0.6090227", "0.6085139", "0.6084336", "0.60824704", "0.6064731", "0.60565394", "0.60440946", "0.6043061", "0.6042187", "0.6033206", "0.6033018" ]
0.7199411
4
Set the map of the robot
public void setMap(Map map) { this.map = map; smap.setMap(map); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "void setMap(Map aMap);", "public void setMapPosition() {\n\t\txmap = levelState.getx();\n\t\tymap = levelState.gety();\n\t}", "public void setMap01(){\n\t\tmapSelect = \"map01.txt\";\n\t\treloadMap(mapSelect);\n\t\tsetImg(mapSelect);\n\t}", "private void setUpMap() {\n mMap.setMyLocationEnabled(true);\n }", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "private void setMap(final Map map) {\n\t\tthis.map = map;\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}", "public void setMap2D(FXMap map);", "public void setMap(String mn){\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n }", "@Override\r\n\tpublic void setRobot(Robot r) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\trobot = (BasicRobot) r;\r\n\t\t//robot.setMaze(this.mC);\r\n\t\t\r\n\t}", "private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}", "public void setRobotLocation(Point p);", "private void setMapPos()\r\n {\r\n try\r\n {\r\n Thread.sleep(1000);//so that you can see players move\r\n }\r\n catch(Exception e){}\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int unitPos = 0;\r\n int firstX = 0;\r\n int firstY = 0;\r\n if (currentPlayer == 1)\r\n {\r\n unitPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n }\r\n if (currentPlayer == 2)\r\n {\r\n unitPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n }\r\n int tempX = unitPos % mapWidth;\r\n int tempY = unitPos - tempX;\r\n if (tempY == 0) {}\r\n else\r\n tempY = tempY / mapHeight;\r\n tempX = tempX - 11;\r\n tempY = tempY - 7;\r\n if (tempX >= 0)\r\n firstX = tempX;\r\n else\r\n firstX = tempX + mapWidth;\r\n if (tempY >= 0)\r\n firstY = tempY;\r\n else\r\n firstY = tempY + mapWidth;\r\n\r\n int drawWidth = worldPanel.getDrawWidth();\r\n int drawHeight = worldPanel.getDrawHeight();\r\n worldPanel.setNewXYPos(firstX, firstY);\r\n miniMap.setNewXY(firstX, firstY, drawWidth, drawHeight);\r\n }", "public static void SetMap(MapHelper controller) {\n mapHelper = controller;\n }", "public void setActiveMap(IMap map) {\n\t\tm_activeMap = map;\n\t\t\n\t\tFile imageLocation = map.getImage();\n\t\tif (! imageLocation.exists()) {\n\t\t\tFile altImage = map.getAltImage();\n\t\t\tif ( altImage != null && altImage.exists()) {\n\t\t\t\timageLocation = altImage;\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadImage(imageLocation);\n\t\tupdateZoomCanvas();\n\t}", "@Override\n protected void setUpMap() {\n super.setUpMap();\n // For showing a move to my location button and a blue\n // dot to show user's location\n MainActivity mainActivity = (MainActivity) getActivity();\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n }", "public Simulator useMap(Map map) {\n this.map = map;\n return this;\n }", "void setMapChanged();", "public final native void setMap(MapJSO map) /*-{\n\t\tthis.setMap(map);\n\t}-*/;", "private void setUpMap() {\n // Crear all map elements\n mGoogleMap.clear();\n // Set map type\n mGoogleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n // If we cant find the location now, we call a Network Provider location\n if (mLocation != null) {\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(mLocation.getLatitude(), mLocation.getLongitude());\n // Show the current location in Google Map\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n // Draw the first circle in the map\n mCircleOptions = new CircleOptions().fillColor(0x5500ff00).strokeWidth(0l);\n // Zoom in the Google Map\n mGoogleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n // Zoom in the Google Map\n //icon = BitmapDescriptorFactory.fromResource(R.drawable.logo2);\n\n // Creation and settings of Marker Options\n mMarkerOptions = new MarkerOptions().position(latLng).title(\"You are here!\");//.icon(icon);\n // Creation and addition to the map of the Marker\n mMarker = mGoogleMap.addMarker(mMarkerOptions);\n // set the initial map radius and draw the circle\n drawCircle(RADIUS);\n }\n }", "public final void setMap(MapWidget mapWidget) {\n impl.setMap(mapWidget);\n }", "public void set_map(int[][] map) \n\t{\n\t\tthis.map = map;\n\t}", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "private void initializeMap() {\n FLMotor = hardwareMap.get(DcMotor.class, \"FLMotor\");\n FRMotor = hardwareMap.get(DcMotor.class, \"FRMotor\");\n BLMotor = hardwareMap.get(DcMotor.class, \"BLMotor\");\n BRMotor = hardwareMap.get(DcMotor.class, \"BRMotor\");\n //ods = hardwareMap.get(OpticalDistanceSensor.class, \"ods\");\n //color = hardwareMap.get(ColorSensor.class, \"color\");\n //touch = hardwareMap.get(TouchSensor.class, \"touch\");\n gyro = hardwareMap.get(GyroSensor.class, \"gyro\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n BRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n BLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n FRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n FLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n }", "private void setMapView()\n\t{\n\t\tMapContainer.mapView = new MapView(SubMainActivity.this, this.getString(R.string.apiKey));\n\t\tMapContainer.mapView.setClickable(true);\n\t\tMapContainer.mapView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));;\n\t}", "public void SetupMap()\n {\n mMap.setMyLocationEnabled(true);\n\n // GAME LatLng\n LatLng latLng = new LatLng(53.227668, -0.540038);\n\n // Create instantiate Marker\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(false);\n markerOptions.title(\"GAME\");\n\n MapsInitializer.initialize(getActivity());\n // Create Marker at pos\n mMap.addMarker(markerOptions);\n // Position Map Camera to pos\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(latLng, 100, 0, 0)));\n }", "public void updateMap(TileMap tileMap){\n\t\tthis.tileMap = tileMap;\n\n\t}", "public void setTileMap(Tile[][] tileMap) {\r\n\t\tthis.tileMap = tileMap;\r\n\t}", "void setPosition(Unit unit, MapLocation position);", "private void setUpMap() throws IOException {\n // Get last location which means current location\n lastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (lastKnownLocation != null) {\n // shift view to current location\n LatLng latlng = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\n Geocoder geocoder = new Geocoder(this);\n adminArea = geocoder.getFromLocation(latlng.latitude, latlng.longitude, 1).get(0).getAdminArea();\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(latlng, 12);\n mMap.moveCamera(update);\n } else {\n Toast.makeText(this, \"Current Location is not Available\", Toast.LENGTH_SHORT).show();\n }\n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }", "private static void setUpMap() {\n onMapReady();\n /*mMap.setMyLocationEnabled(true);\n // For dropping a marker at a point on the Map\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));*/\n }", "private void setUpMap() {\n mMap.getUiSettings().setZoomControlsEnabled(false);\n \n // Setting an info window adapter allows us to change the both the\n // contents and look of the\n // info window.\n mMap.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater()));\n \n // Add lots of markers to the map.\n addMarkersToMap();\n \n }", "private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }", "public void setPosicionMapa() {\n\t\txmapa = mapaTile.getx();\n\t\tymapa = mapaTile.gety();\n\t}", "private void setUpMap() {\n //Starts map somewhat zoomed in over user location.\n float zoom = 12;\n LatLng target = new LatLng(lat, lng);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(target, zoom));\n\n // Adds the marker ( using coordinates from MainActivty).\n marker = mMap.addMarker(new MarkerOptions()\n .position(target)\n .title(\"Incident\"));\n marker.setDraggable(true);\n }", "private void setUpMap() {\n Log.i(TAG, \"in setUpMap()\");\n // Set listeners for marker events. See the bottom of this class for their behavior.\n mMap.setOnMarkerClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n //just for testing\n// int uniqueId = generateMarkerId();\n// Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title(\"Marker\"));\n// markers.put(marker, uniqueId);\n //////\n // create UiSetting instance and default ui settings of the map\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(this.compassEnabled);\n mUiSettings.setRotateGesturesEnabled(this.rotateEnabled);\n mUiSettings.setScrollGesturesEnabled(this.scrollEnabled);\n mUiSettings.setZoomControlsEnabled(this.zoomControlEnabled);\n mUiSettings.setZoomGesturesEnabled(this.zoomGesturesEnabled);\n\n // after this method is called, user can add markers and change other settings.\n //TODO: Actions(Functions) that are called within MapIsReady() are not working\n MapIsReady();\n\n }", "public void set_map(int[][] map, Random_map_generator generator) \n\t{\n\t\tthis.start_edge_coord_x = generator.get_start_x();\n\t\tthis.start_edge_coord_y = generator.get_start_y();\n\t\tthis.end_edge_coord_x = generator.get_end_x();\n\t\tthis.end_edge_coord_y = generator.get_end_y();\n\t\tthis.random_map = true;\n\t\tthis.map = map;\n\t\tif ((map[1][2] == 0) && (map[2][2] == 0)) \n\t\t{\n\t\t\tmap[1][2] = SCORE_AREA;\n\t\t\tmap[2][2] = TUITION_AREA;\n\t\t}\n\t\telse if ((map[1][14] == 0) && (map[2][14] == 0)) \n\t\t{\n\t\t\tmap[1][14] = SCORE_AREA;\n\t\t\tmap[2][14] = TUITION_AREA;\n\t\t}\n\t\telse if ((map[10][2] == 0) && (map[11][2] == 0)) \n\t\t{\n\t\t\tmap[10][2] = SCORE_AREA;\n\t\t\tmap[11][2] = TUITION_AREA;\n\t\t}\n\t\telse if ((map[10][14] == 0) && (map[11][14] == 0)) \n\t\t{\n\t\t\tmap[10][14] = SCORE_AREA;\n\t\t\tmap[11][14] = TUITION_AREA;\n\t\t}\n\t}", "protected void initialize() {\n ////TEST CODE\n \tRobotMap.frontLeftTurn.set(0);\n \tRobotMap.frontRightTurn.set(0);\n \tRobotMap.backLeftTurn.set(0);\n \tRobotMap.backRightTurn.set(0);\n \t\n \t//Spin motors\n \tRobotMap.frontLeftTurn.set(85);\n \tRobotMap.frontRightTurn.set(85);\n \tRobotMap.backLeftTurn.set(85);\n \tRobotMap.backRightTurn.set(85);\n \tTimer.delay(2.75);\n \t\n \t//Stop Spin\n \tRobotMap.frontLeftTurn.set(0);\n \tRobotMap.frontRightTurn.set(0);\n \tRobotMap.backLeftTurn.set(0);\n \tRobotMap.backRightTurn.set(0);\n \tTimer.delay(2.75);\n \t\n \t//Move Back\n \tRobotMap.frontLeftDrive.set(0.2);\n \tRobotMap.frontRightDrive.set(0.2);\n \tRobotMap.backLeftDrive.set(0.2);\n \tRobotMap.backRightDrive.set(0.2); \t\n \tTimer.delay(2.75); \n \t\n \t//Stop\n \t\n \tRobotMap.frontLeftDrive.set(0);\n \tRobotMap.frontRightDrive.set(0);\n \tRobotMap.backLeftDrive.set(0);\n \tRobotMap.backRightDrive.set(0);\n }", "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "private void setup() {\n\t\t map.setMyLocationEnabled(true);\n\t \n\t CameraPosition cameraPosition = new CameraPosition.Builder()\n\t .target(USMP_LOCATION) // Sets the center of the map to\n\t // Golden Gate Bridge\n\t .zoom(16) // Sets the zoom\n\t .bearing(90) // Sets the orientation of the camera to east\n\t .tilt(60) // Sets the tilt of the camera to 30 degrees\n\t .build(); // Creates a CameraPosition from the builder\n\t \n\t CameraUpdate cameraUpdate=CameraUpdateFactory.newCameraPosition(\n\t \t cameraPosition);\n\t\t map.animateCamera(cameraUpdate);\n\t\t \n\t map.addMarker(new MarkerOptions()\n\t .position(USMP_LOCATION)\n\t .title(\"DevFest 2013 Season 2\"));\n\t}", "public void setPositionOnMap(Point positionOnMap)\n {\n this.positionOnMap = positionOnMap;\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "private void configMap() {\n\n googleMap.getUiSettings().setMapToolbarEnabled(false);//an buton dieu huong bat snag map\n\n googleMap.getUiSettings().setMyLocationButtonEnabled(true);//nut vi tri cua minh tru se hien thi\n googleMap.getUiSettings().setZoomControlsEnabled(true);//co the zoom\n\n// b2\n googleMap.setInfoWindowAdapter(new MyInfoWindown());//cutom titlemap\n\n try {//them lenh nay de no cap location thì cai nut tren moi hoat dong\n\n googleMap.setMyLocationEnabled(true);//cung cap vi tri cua minh,can try cacth xin quyen\n } catch (SecurityException e) {\n\n }\n googleMap.setOnMyLocationButtonClickListener(this);//dNG KY\n\n\n }", "public void mapMode() {\n\t\ttheTrainer.setUp(false);\n\t\ttheTrainer.setDown(false);\n\t\ttheTrainer.setLeft(false);\n\t\ttheTrainer.setRight(false);\n\n\t\tinBattle = false;\n\t\tred = green = blue = 255;\n\t\tthis.requestFocus();\n\t}", "private void setupGoogleMap()\n {\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(45.5436018, 10.1886594), 10);\n googleMap.animateCamera(cameraUpdate);\n }", "@Override\n\tpublic void setMap(ServerMap map, Direction dir)\n\t{\n\t\tchar direction = 'n';\n\t\tif(dir != null)\n\t\t\tswitch(dir)\n\t\t\t{\n\t\t\t\tcase Up:\n\t\t\t\t\tdirection = 'u';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Down:\n\t\t\t\t\tdirection = 'd';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Left:\n\t\t\t\t\tdirection = 'l';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Right:\n\t\t\t\t\tdirection = 'r';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\tsuper.setMap(map, dir);\n\t\tclearRequests();\n\t\t/* Send the map switch packet to the client. */\n\t\tServerMessage message = new ServerMessage(ClientPacket.SET_MAP_AND_WEATHER);\n\t\tmessage.addString(java.lang.Character.toString(direction));\n\t\tmessage.addInt(map.getX());\n\t\tmessage.addInt(map.getY());\n\t\tmessage.addInt(map.isWeatherForced() ? map.getWeatherId() : TimeService.getWeatherId());\n\t\tgetSession().Send(message);\n\t\tCharacter c;\n\t\tString packet = \"\";\n\t\t/* Send all player information to the client. */\n\t\tfor(Player p : map.getPlayers().values())\n\t\t{\n\t\t\tc = p;\n\t\t\tpacket = packet + c.getName() + \",\" + c.getId() + \",\" + c.getSprite() + \",\" + c.getX() + \",\" + c.getY() + \",\"\n\t\t\t\t\t+ (c.getFacing() == Direction.Down ? \"D\" : c.getFacing() == Direction.Up ? \"U\" : c.getFacing() == Direction.Left ? \"L\" : \"R\") + \",\" + p.getAdminLevel() + \",\";\n\t\t}\n\t\t/* Send all npc information to the client. */\n\t\tfor(int i = 0; i < map.getNpcs().size(); i++)\n\t\t{\n\t\t\tc = map.getNpcs().get(i);\n\t\t\tif(!c.getName().equalsIgnoreCase(\"NULL\"))\n\t\t\t\t/* Send no name to indicate NPC */\n\t\t\t\tpacket = packet + \"!NPC!,\" + c.getId() + \",\" + c.getSprite() + \",\" + c.getX() + \",\" + c.getY() + \",\"\n\t\t\t\t\t\t+ (c.getFacing() == Direction.Down ? \"D\" : c.getFacing() == Direction.Up ? \"U\" : c.getFacing() == Direction.Left ? \"L\" : \"R\") + \",0,\";\n\t\t}\n\t\t/* Only send the packet if there were players on the map */\n\t\t/* TODO: Clean this stuff up? */\n\t\tif(packet.length() > 2)\n\t\t{\n\t\t\tServerMessage initPlayers = new ServerMessage(ClientPacket.INIT_PLAYERS);\n\t\t\tinitPlayers.addString(packet);\n\t\t\tgetSession().Send(initPlayers);\n\t\t}\n\t}", "private void setUpMap() {\n if (mGoogleMap != null && mParkingField != null) {\n LatLng latLng = new LatLng(mParkingField.getLatitude(), mParkingField.getLongitude());\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));\n mGoogleMap.addMarker(mMapFactory.createParkingFieldMakerOptions(mParkingField, getContext()));\n }\n }", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "void updateMap(MapData map);", "public void setMap(Map map, int layer, int i, int j) {\n assert map != null;\n //remove from previous map\n this.map.ifPresent((value)->value.removeTile(this));\n this.map = Optional.of(map);\n setPosition(layer, i, j);\n }", "public void setMap(MapAssembly demoMap) {\n this.map = demoMap;\n }", "public void setMapa(Mapa mapa) {\n\t\tif ( visorEscenario != null )\n\t\t\tvisorEscenario.setMapa(mapa);\n\t}", "@Override\n public void onMapLoaded() {\n mMap.animateCamera(cu);\n\n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }", "public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}", "protected abstract void setMarkers();", "public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }", "void setMaze(IMaze maze);", "public void loadMap() {\n\n try {\n new File(this.mapName).mkdir();\n FileUtils.copyDirectory(\n new File(this.plugin.getDataFolder() + \"/maps/\" + this.mapName), new File(this.mapName));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n WorldCreator wc = new WorldCreator(this.mapName);\n World world = wc.createWorld();\n world.setAutoSave(false);\n world.setPVP(false);\n world.setDifficulty(Difficulty.PEACEFUL);\n world.setGameRuleValue(\"doDaylightCycle\", \"false\");\n world.setGameRuleValue(\"mobGriefing\", \"false\");\n world.setGameRuleValue(\"doMobSpawning\", \"false\");\n world.setGameRuleValue(\"doFireTick\", \"false\");\n world.setGameRuleValue(\"keepInventory\", \"true\");\n world.setGameRuleValue(\"commandBlockOutput\", \"false\");\n world.setSpawnFlags(false, false);\n\n try {\n final JsonParser parser = new JsonParser();\n final FileReader reader =\n new FileReader(this.plugin.getDataFolder() + \"/maps/\" + this.mapName + \"/config.json\");\n final JsonElement element = parser.parse(reader);\n this.map = JumpyJumpMap.fromJson(element.getAsJsonObject());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n setInitialLocation(VehicleData.getLatitude(), VehicleData.getLongitude());\n }", "public RadarMap() {\n initComponents();\n }", "public void setMap(java.util.Map map)\n {\n _assert(map != null && getMap() == null, \"Map is not resettable\");\n __m_Map = (map);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }", "public void initMap() {\r\n\r\n\t\tproviders = new AbstractMapProvider[3];\t\r\n\t\tproviders[0] = new Microsoft.HybridProvider();\r\n\t\tproviders[1] = new Microsoft.RoadProvider();\r\n\t\tproviders[2] = new Microsoft.AerialProvider();\r\n\t\t/*\r\n\t\t * providers[3] = new Yahoo.AerialProvider(); providers[4] = new\r\n\t\t * Yahoo.RoadProvider(); providers[5] = new OpenStreetMapProvider();\r\n\t\t */\r\n\t\tcurrentProviderIndex = 0;\r\n\r\n\t\tmap = new InteractiveMap(this, providers[currentProviderIndex],\r\n\t\t\t\tUtilities.mapOffset.x, Utilities.mapOffset.y,\r\n\t\t\t\tUtilities.mapSize.x, Utilities.mapSize.y);\r\n\t\tmap.panTo(locationUSA);\r\n\t\tmap.setZoom(minZoom);\r\n\r\n\t\tupdateCoordinatesLimits();\r\n\t}", "protected void initialize() {\r\n\t \tRobotMap.armarm_talon.changeControlMode(CANTalon.ControlMode.Position);\r\n\t }", "private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n drawGokongweiBuilding();\n getContinuousLocationUpdates();\n }", "private void setupGoogleMapScreenSettings(GoogleMap mMap) {\n mMap.setBuildingsEnabled(true);\n mMap.setIndoorEnabled(true);\n UiSettings mUiSettings = mMap.getUiSettings();\n mUiSettings.setZoomControlsEnabled(true);\n mUiSettings.setCompassEnabled(true);\n mUiSettings.setMyLocationButtonEnabled(true);\n mUiSettings.setScrollGesturesEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n mUiSettings.setTiltGesturesEnabled(true);\n mUiSettings.setRotateGesturesEnabled(true);\n }", "public void setNeighbors(){\t\t\t\t\n\t\tint row = position[0];\n\t\tint column = position[1];\t\t\n\t\tif(column+1 < RatMap.SIDELENGTH){\n\t\t\teastCell = RatMap.getMapCell(row,column+1);\t\t\t\n\t\t}else{\n\t\t\teastCell = null;\n\t\t}\t\n\t\tif(row+1 < RatMap.SIDELENGTH){\n\t\t\tnorthCell = RatMap.getMapCell(row+1,column);\n\t\t}else{\n\t\t\tnorthCell = null;\n\t\t}\t\n\t\tif(column-1 > -1){\n\t\t\twestCell = RatMap.getMapCell(row, column-1);\t\t\t\n\t\t}else{\n\t\t\twestCell = null;\n\t\t}\n\t\tif(row-1 > -1){\n\t\t\tsouthCell = RatMap.getMapCell(row-1, column);\n\t\t}else{\n\t\t\tsouthCell = null;\n\t\t}\n\t}", "public void setMap(int idRoom, int x, int y, Stack<AuxiliarElement> cjtElem, String nameRoom, int[][] doors, int[][] windows){ \r\n int key = sequence.getValue();\r\n sequence.increase();\r\n Map map = new Map(x, y, idRoom, nameRoom, doors, windows);\r\n map.setCjtElement(cjtElem);\r\n cjtMap.put(key, map);\r\n }", "@Override\n public void setCameraCoordinate(double latitude, double longitude) {\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(latitude, longitude)));\n }", "public void setRobot(Robot robot) {\n this.robot = robot;\n }", "public String toggleMap() {\r\n\t\tMap temp = sensor.getTrueMap();\r\n\t\tif (Map.compare(temp, smap.getMap())) {\r\n\t\t\tsmap.setMap(map.copy());\r\n\t\t\treturn \"robot\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsmap.setMap(temp.copy());\r\n\t\t\treturn \"simulated\";\r\n\t\t}\r\n\t}", "public void moveTheMap() {\n \t if(streetLevelFragment != null && map != null){\n \t\t map.setCenter(streetLevelFragment.getStreetLevelModel().getPosition(), MapAnimation.LINEAR, map.getZoomLevel(), streetLevelFragment.getStreetLevelModel().getHeading(), 0);\n \t }\n }", "public interface RobotMap {\n\t// CAN Device IDs\n\n\tpublic static final int WINCH_TALON = 1;\n\t// winch motors\n\n\tpublic static final int LEFT_ALIGN_TALON = 3;\n\tpublic static final int RIGHT_ALIGN_TALON = 4;\n\t// allignment wheels\n\n\tpublic static final int REAR_RIGHT_TALON = 5;\n\tpublic static final int REAR_LEFT_TALON = 6;\n\tpublic static final int FRONT_RIGHT_TALON = 7;\n\tpublic static final int FRONT_LEFT_TALON = 8;\n\t// drivetrain wheels\n\n\tpublic static final int PCM_MAIN = 9;\n\n\t/******************\n ** PNEUMATICS ** \n ******************/ \n\tpublic static final int FLIPPER_RIGHT = 0;\n\tpublic static final int FLIPPER_LEFT = 1;\n\tpublic static final int ARMS_A = 2;\n\tpublic static final int ARMS_B = 3;\n\t// End Pneumatic Channels\n\n\t/******************\n **PID CONTROLLER** \n ******************/ \n public static final double ABS_TOL = 100;\n public static final double P = .4;\n public static final double I = .01;\n public static final double D = 11;\n public static final double OUT_RANGE_L = -0.8;\n public static final double OUT_RANGE_H = 0.8;\n\n}", "@SuppressWarnings(\"all\")\r\n\tpublic Map(String map, Location mapLocation){\r\n\t\tMapPreset preset = MapPreset.presets.get(map);\r\n\t\tif (preset != null){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfinal World world = mapLocation.getWorld();\r\n\t\t\t\tfinal double x = mapLocation.getX();\r\n\t\t\t\tfinal double y = mapLocation.getY();\r\n\t\t\t\tfinal double z = mapLocation.getZ();\r\n\t\t\t\tfinal float pitch = mapLocation.getPitch();\r\n\t\t\t\tfinal float yaw = mapLocation.getYaw();\r\n\t\t\t\t\t\t\r\n\t\t\t\tfinal Float[] alliesBase = preset.getSpawnAllies();\r\n\t\t\t\tfinal Float[] axisBase = preset.getSpawnAxis();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] bombA = preset.getBombA();\r\n\t\t\t\tfinal Float[] bombB = preset.getBombB();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] domA = preset.getDomA();\r\n\t\t\t\tfinal Float[] domB = preset.getDomB();\r\n\t\t\t\tfinal Float[] domC = preset.getDomC();\r\n\t\t\t\t\r\n\t\t\t\tmainSpawn = mapLocation;\r\n\t\t\t\talliesSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + alliesBase[0], \r\n\t\t\t\t\t\ty + alliesBase[1], \r\n\t\t\t\t\t\tz + alliesBase[2],\r\n\t\t\t\t\t\talliesBase[3], \r\n\t\t\t\t\t\talliesBase[4]);\r\n\t\t\t\t\r\n\t\t\t\taxisSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + axisBase[0], \r\n\t\t\t\t\t\ty + axisBase[1], \r\n\t\t\t\t\t\tz + axisBase[2],\r\n\t\t\t\t\t\taxisBase[3], \r\n\t\t\t\t\t\taxisBase[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombA[0], \r\n\t\t\t\t\t\ty + bombA[1], \r\n\t\t\t\t\t\tz + bombA[2],\r\n\t\t\t\t\t\tbombA[3], \r\n\t\t\t\t\t\tbombA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombB[0], \r\n\t\t\t\t\t\ty + bombB[1], \r\n\t\t\t\t\t\tz + bombB[2],\r\n\t\t\t\t\t\tbombB[3], \r\n\t\t\t\t\t\tbombB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domA[0], \r\n\t\t\t\t\t\ty + domA[1], \r\n\t\t\t\t\t\tz + domA[2],\r\n\t\t\t\t\t\tdomA[3], \r\n\t\t\t\t\t\tdomA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domB[0], \r\n\t\t\t\t\t\ty + domB[1], \r\n\t\t\t\t\t\tz + domB[2],\r\n\t\t\t\t\t\tdomB[3], \r\n\t\t\t\t\t\tdomB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domC = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domC[0], \r\n\t\t\t\t\t\ty + domC[1], \r\n\t\t\t\t\t\tz + domC[2],\r\n\t\t\t\t\t\tdomC[3], \r\n\t\t\t\t\t\tdomC[4]);\r\n\t\t\t\t\r\n\t\t\t\tfor (Float[] spawnpoint : preset.getSpawnpoints()){\r\n\t\t\t\t\tspawnsList.add(new Location(\r\n\t\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\t\tx + spawnpoint[0], \r\n\t\t\t\t\t\t\ty + spawnpoint[1], \r\n\t\t\t\t\t\t\tz + spawnpoint[2], \r\n\t\t\t\t\t\t\tspawnpoint[3], \r\n\t\t\t\t\t\t\tspawnpoint[4]));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tmapID = maps.size()+1;\r\n\t\t\t\tmapName = map;\r\n\t\t\t\tmapAvailable.add(mapID);\r\n\t\t\t\tmaps.put(maps.size()+1, this);\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\tFPSCaste.log(\"Something went wrong! disabling map: \" + map, Level.WARNING);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tFPSCaste.log(\"Could not initialise the Map \" + map, Level.WARNING);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void mapInitialized() {\n\t\tfinal LatLong center = new LatLong(32.777, 35.0225);\n\t\tSystem.out.println(\"got here\");\n\t\tmapComponent.addMapReadyListener(() -> checkCenter(center));\n\t\t// lblClick.setText((center + \"\"));\n\t\tfinal MapOptions options = new MapOptions();\n\t\toptions.center(center).zoom(12).overviewMapControl(false).panControl(false).rotateControl(false)\n\t\t\t\t.scaleControl(true).streetViewControl(true).zoomControl(true).mapType(MapTypeIdEnum.ROADMAP);\n\n\t\tmap = mapComponent.createMap(options, false);\n\t\tmap.setHeading(123.2);\n\t\tmap.fitBounds(new LatLongBounds(center, new LatLong(32.779032, 35.024663)));\n\t\tmap.addUIEventHandler(UIEventType.click, (final JSObject obj) -> {\n\t\t\tLatLong newLat = new LatLong((JSObject) obj.getMember(\"latLng\"));\n\t\t\tnewLat = new LatLong(newLat.getLatitude(), newLat.getLongitude());\n\t\t\tlblClick.setText(newLat + \"\");\n\t\t\tmap.addMarker(createMarker(newLat, \"marker at \" + newLat));\n\t\t});\n\t\tmapTypeCombo.setDisable(false);\n\n\t\tmapTypeCombo.getItems().addAll(MapTypeIdEnum.ALL);\n\t\tdirectionsService = new DirectionsService();\n\t\tdirectionsPane = mapComponent.getDirec();\n\t\tscene.getWindow().sizeToScene();\n\t}", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "public void initializeMaps() {\n\t\t//can use any map\n\n\t\t//left map\n\t int x = 0, y = 0;\n\t int Lvalue;\n\t \n\t try {\n\t \t//***change to your local path for the map you want to test\n\t \tBufferedReader input = new BufferedReader(new FileReader(\"/Users/NeeCee/Classes/4444/MirrorUniverse/maps/g6maps/lessEasyLeft.txt\"));\n\t \tString line;\n\t \twhile((line = input.readLine()) != null) {\n\t \t\tString[] vals = line.split(\" \");\n\t \t\tfor(String str : vals) {\n\t \t\t\tLvalue = Integer.parseInt(str);\n\t \t\t\tleftMap[x][y] = Lvalue;\n\t \t\t\t++y;\n\t \t\t}\n\t \t\t\n\t \t\t++x;\n\t \t\ty = 0;\n\t \t}\n\t \t\n\t \tinput.close();\n\t } catch (IOException ioex) {\n\t \tSystem.out.println(\"error reading in map for testing\");\n\t }\n\t \n\t //right map\n\t x = 0;\n\t y = 0;\n\t int Rvalue;\n\t \n\t try {\n\t \t//***change to your local path for the map you want to test\n\t \t//change to map you want to test\n\t \tBufferedReader input = new BufferedReader(new FileReader(\"/Users/NeeCee/Classes/4444/MirrorUniverse/maps/g6maps/lessEasyRight.txt\"));\n\t \tString line;\n\t \twhile((line = input.readLine()) != null) {\n\t \t\tString[] vals = line.split(\" \");\n\t \t\tfor(String str : vals) {\n\t \t\t\tRvalue = Integer.parseInt(str);\n\t \t\t\trightMap[x][y] = Rvalue;\n\t \t\t\t++y;\n\t \t\t}\n\t \t\t++x;\n\t \t\ty = 0;\n\t \t}\n\t \t\n\t \tinput.close();\n\t } catch (IOException ioex) {\n\t \tSystem.out.println(\"error reading in map for testing\");\n\t }\n\t \n\t //print each map for testing\n\t for(int i = 0; i < leftMap.length; i++ )\n\t \tfor(int j = 0; j < leftMap[i].length; j++ )\n\t \t\tSystem.out.println(leftMap[i][j]);\n\t System.out.println(\"*-----------------*\");\n\t for(int i = 0; i < rightMap.length; i++ )\n\t \tfor(int j = 0; j < rightMap[i].length; j++ )\n\t \t\tSystem.out.println(rightMap[i][j]);\n\t}", "public void setUp()\n {\n map = new Map(5, 5, null);\n }", "public void sendMap ( MapView map ) {\n\t\texecute ( handle -> handle.sendMap ( map ) );\n\t}", "private void applySettingsOnMapView() {\n mapView.getMapSettings().setMapRotationEnabled(true);\n mapView.getMapSettings().setMapZoomingEnabled(true);\n mapView.getMapSettings().setMapPanningEnabled(true);\n mapView.getMapSettings().setZoomWithAnchorEnabled(true);\n mapView.getMapSettings().setInertiaRotatingEnabled(true);\n mapView.getMapSettings().setInertiaZoomingEnabled(true);\n mapView.getMapSettings().setInertiaPanningEnabled(true);\n }", "private void applySettingsOnMapView() {\n mapView.getMapSettings().setMapRotationEnabled(true);\n mapView.getMapSettings().setMapZoomingEnabled(true);\n mapView.getMapSettings().setMapPanningEnabled(true);\n mapView.getMapSettings().setZoomWithAnchorEnabled(true);\n mapView.getMapSettings().setInertiaRotatingEnabled(true);\n mapView.getMapSettings().setInertiaZoomingEnabled(true);\n mapView.getMapSettings().setInertiaPanningEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n final LatLng update = getLastKnownLocation();\n if (update != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(update, 11.0f)));\n }\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n mIsNeedLocationUpdate = false;\n moveToLocation(latLng, false);\n }\n\n });\n\n }\n }\n }", "@Override\r\n protected void setUpMap() {\n mMap.addMarker(new MarkerOptions()\r\n .position(BRISBANE)\r\n .title(\"Brisbane\")\r\n .snippet(\"Population: 2,074,200\")\r\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\r\n\r\n // Uses a custom icon with the info window popping out of the center of the icon.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(SYDNEY)\r\n .title(\"Sydney\")\r\n .snippet(\"Population: 4,627,300\")\r\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow))\r\n .infoWindowAnchor(0.5f, 0.5f));\r\n\r\n // Creates a draggable marker. Long press to drag.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(MELBOURNE)\r\n .title(\"Melbourne\")\r\n .snippet(\"Population: 4,137,400\")\r\n .draggable(true));\r\n\r\n // A few more markers for good measure.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(PERTH)\r\n .title(\"Perth\")\r\n .snippet(\"Population: 1,738,800\"));\r\n mMap.addMarker(new MarkerOptions()\r\n .position(ADELAIDE)\r\n .title(\"Adelaide\")\r\n .snippet(\"Population: 1,213,000\"));\r\n\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(BRISBANE, 10));\r\n }", "@Override\n\tpublic void setInputMap(HashMap<String, Controller> map)\n\t{\n\t\tthis.map = map;\n\t}", "public void changeMap(int x, int y, TipoCelda t) throws Exception {\n\t\tthis.itfPlanificadorMRS.changeMap(x,y,t);\n\t}", "private void setDefaultMonsterCords()\n {\n this.xBeginMap=0;\n this.yBeginMap=0;\n this.xEndMap=16;\n this.yEndMap=16;\n\n this.xBeginSrc=0;\n this.yBeginSrc=0;\n this.xEndSrc=0;\n this.yEndSrc=0;\n\n }", "@Override\n public void onMapReady(GoogleMap map) {\n googleMap = map;\n googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n googleMap.setTrafficEnabled(true);\n googleMap.setIndoorEnabled(true);\n googleMap.setBuildingsEnabled(true);\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "public void setGuidoMap(GuidoMapView guidoMap) {\r\n\t\tthis.guidoMap = guidoMap;\r\n\t}", "@Override\n\tpublic void changeMapPointer(ImageView posView) {\n\t\tif (room.equals(properties.getRoomFromProperties().get(1))) {\n\t\t\tposView.relocate(789, 272);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(2))) {\n\t\t\tposView.relocate(788, 185);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(3))) {\n\t\t\tposView.relocate(880.0, 281);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(4))) {\n\t\t\tposView.relocate(867.0, 200);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(5))) {\n\t\t\tposView.relocate(880.0, 64.0);\n\n\t\t} else {\n\t\t\tposView.relocate(788.0, 60.0);\n\t\t}\n\t}", "public void setValues(Map map)\n\t\t{\n\t\t\tm_structuredArtifact = map;\n\n\t\t}", "public void setRobot(Robot robot) {\n\t\tthis.robot = robot;\n\t}" ]
[ "0.72527796", "0.706791", "0.70641094", "0.69641495", "0.69305277", "0.68748343", "0.6867545", "0.68646836", "0.6813801", "0.67672586", "0.67335075", "0.67308867", "0.67132765", "0.66826886", "0.6608901", "0.65876466", "0.65853184", "0.65780777", "0.65493524", "0.65443355", "0.6543906", "0.6533558", "0.6519312", "0.6502534", "0.6496917", "0.64907306", "0.6470813", "0.641786", "0.6416059", "0.6398557", "0.6363352", "0.6322009", "0.62683606", "0.62445855", "0.62431335", "0.623832", "0.62334204", "0.6229755", "0.622291", "0.62199444", "0.62033355", "0.61963123", "0.61792773", "0.61669135", "0.61531454", "0.61421806", "0.6115658", "0.6114659", "0.61129004", "0.6098022", "0.6095485", "0.6084579", "0.6083736", "0.60836345", "0.6076139", "0.60656756", "0.6063713", "0.6061345", "0.6054178", "0.60488576", "0.60355335", "0.6024486", "0.6024292", "0.6012334", "0.59971863", "0.59841394", "0.5983039", "0.59634995", "0.59510994", "0.5945372", "0.5939559", "0.5936003", "0.5928406", "0.5927875", "0.59271353", "0.59263057", "0.592574", "0.59226435", "0.5918575", "0.59115225", "0.5904239", "0.5890702", "0.58804286", "0.5874268", "0.5862736", "0.58576894", "0.58542544", "0.58474797", "0.58474797", "0.58472115", "0.5837386", "0.5827148", "0.5816967", "0.5812904", "0.58122504", "0.58096504", "0.5807948", "0.5805589", "0.58031106", "0.5801357" ]
0.6894076
5
Restart the timer so it does not make the image move
public void restartRobotUI() { t.cancel(); t.purge(); t = new Timer(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void restart() {\n \tanimation.stop();\n \tspeed = 1;\n \tstart(stage);\n }", "public void startAnimation()\n {\n if ( animationTimer == null )\n {\n currentImage = 0; // display first image\n \n // Create timer\n animationTimer = new Timer ( ANIMATION_DELAY, new TimerHandler() );\n \n animationTimer.start(); // start Timer\n } // end if statement\n else // animationTimer already exists, restart animation\n {\n if ( ! animationTimer.isRunning() )\n animationTimer.restart();\n } // end else statement\n }", "public void restart() \n {\n xPosition = (int)(FlappyMain.WIDTH/2.5);\n yPosition = FlappyMain.HEIGHT/2;\n xVelocity = yVelocity = 0;\n secret = false;\n }", "public void reset(){\r\n \tif (resetdelay<=0){//if he didn't just die\r\n \t\tsetLoc(400,575);\r\n \t\timg = imgs[4];\r\n \t}\r\n }", "public void tick(){\n\t\ttimer += System.currentTimeMillis() - lastTime;\n\t\tif(timer > speed){\n\t\t\tcurrent = image.next();\n\t\t\ttimer = 0;\n\t\t}\n\t\tlastTime = System.currentTimeMillis();\n\t}", "private void restartTimer() {\r\n\t\tthis.timer.restart();\r\n\t\tthis.countdown.restart();\r\n\t\tthis.controlView.setTimerSeconds(10);\r\n\t}", "private void idleAnimation(){\n timer++;\n if( timer > 4 ){\n setImage(loadTexture());\n animIndex++;\n timer= 0;\n if(animIndex > maxAnimIndex ){\n animIndex = 0;\n }\n }\n }", "@SuppressWarnings(\"static-access\")\n\t@Override\n\tpublic void run() \n\t{\n\t\tint currentdx = 0;\n\t\tint currentdy = 0;\n\t\twhile(currentdy < Math.abs(dy) || currentdx < Math.abs(dx))\n\t\t{\n\t\t\tif(time == 0)\n\t\t\t{\n\t\t\t\tif(dx < 0 || dy < 0){\n\t\t\t\tdy = -dy;\n\t\t\t\tdx = -dx;\n\t\t\t\tcurrentdy = dy;\n\t\t\t\tcurrentdx = dx;\n\t\t\t\tMainController.getInstance().moveImage(name, -dx, -dy);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcurrentdy = dy;\n\t\t\t\t\tcurrentdx = dx;\n\t\t\t\t\tMainController.getInstance().moveImage(name, dx, dy);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(currentdy < Math.abs(dy) && currentdx < Math.abs(dx)){\n\t\t\t\tcurrentdy++;\n\t\t\t\tcurrentdx++;\t\t\t\t\n\t\t\t\tMainController.getInstance().moveImage(name, dx/Math.abs(dx), dy/Math.abs(dy));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(currentdy < Math.abs(dy)){\n\t\t\t\t\tcurrentdy++;\t\n\t\t\t\t\tMainController.getInstance().moveImage(name, 0, dy/Math.abs(dy));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(currentdx < Math.abs(dx)){\n\t\t\t\t\tcurrentdx++;\t\t\t\t\n\t\t\t\t\tMainController.getInstance().moveImage(name, dx/Math.abs(dx), 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tthis.sleep(time * 1000 / (( Math.max(Math.abs(dx), Math.abs(dy) ))+1));\n\t\t\t\tMainController.getInstance().repaint();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t\tif((currentdx % 100 == 0 && currentdx != dx )|| (currentdy % 100 == 0&& currentdy!=dy))\n\t\t\t\tSystem.out.println(currentdx + \" \" + currentdy);\n\t\t}\n\t}", "public void PerformTimerTask() {\n \tif(refreshRate !=0){\n x+=px;\n y+=py;\n if (x+width >= panelW) {\n x = panelW - width;\n px = -px;\n }\n if (y+height >= panelH) {\n y = panelH - height;\n py = -py;\n }\n if (x < 0) {\n x = 0;\n px = -px;\n }\n if (y < 0) {\n y = 0;\n py = -py;\n }\n repaint();\n \t}\n }", "private void restartTimer(long delay) {\n\t\trestartTimer.schedule(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tvisible = false;\n\t\t\t\tif(moveTimer != null) {\n\t\t\t\t\tmoveTimer.cancel();\n\t\t\t\t}\n\t\t\t\tif(startTimer != null) {\n\t\t\t\t\tstartTimer.cancel();\n\t\t\t\t}\t\n\t\t\t\tstartTimer = new Timer();\n\t\t\t\tstartTimer(getStartSeconds() * 1000, LOOP_PERIOD_MILLISECOND);\n\t\t\t}\n\t\t}, delay);\n\t}", "public void flash(){\n //stop movement\n tState.stop();\n tMovement.stop();\n\n //store final image\n BufferedImage finalState = display; \n\n //update position for \"flash\" animation\n int xFin = x - 9;\n int yFin = y - 9; \n\n tEnd = new Timer(40,new ActionListener(){\n\n private int i = 0;\n\n @Override\n public void actionPerformed(ActionEvent e){\n x = xFin;\n y = yFin;\n \n BufferedImage b = new BufferedImage(50,50,BufferedImage.TYPE_INT_ARGB);\n Graphics g = b.getGraphics();\n if (i < 10){ \n BufferedImage img = flash[i];\n g.drawImage(img,25-img.getWidth()/2,25-img.getHeight()/2,null); \n g.drawImage(finalState,9,9,null);\n } else if (i == 20){\n tEnd.stop();\n caught = true;\n System.out.println(\"You caught \"+pok.getName().toUpperCase()+\"!\");\n } else {\n BufferedImage img = flash[19-i];\n g.drawImage(img,25-img.getWidth()/2,25-img.getHeight()/2,null); \n }\n g.dispose(); \n display = b;\n i++;\n } \n });\n tEnd.start();\n }", "public void resume()\r\n {\n timerStart(); // ...Restarts the update timer.\r\n }", "private void startTimer() {\n myTimer.start();\n enableGamePlayKeys();\n repaint();\n }", "private synchronized void reStartTimer(){\n handler.removeCallbacks(null);\n handler.postDelayed(new Runnable(){\n @Override\n public void run(){\n if (running) reStartTimer();\n update();\n }\n }, TURN_DELAY_MILLIS);\n }", "private void loopButton(ActionEvent e) {\n if (loop) {\n if (drawPanel.animationDone()) {\n this.tick = 0;\n atTick(this.tick);\n timer.restart();\n }\n }\n }", "public static void initTimer(){\r\n\t\ttimer = new Timer();\r\n\t timer.scheduleAtFixedRate(new TimerTask() {\r\n\t public void run() {\r\n\t \t//se o player coletar todas os lixos, o tempo para\r\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }\r\n\t\t}, 1000, 1000);\r\n\t}", "public void restart() {\n\t\td1 = 6;\n\t\td2 = 6;\n\t\tthis.rolled = false;\n\t}", "@Override\n public void startGame() {\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n update();\n }\n }, 0, 2);\n }", "public void circle(int time){\n int[][] ordinance = {{0,-1},{1,0},{0,1},{-1,0}}; \n tMovement = new Timer(time,new ActionListener(){\n private int ordinanceInd = 0;\n private int distance = 1;\n private int[][] moveOrdinance = ordinance; \n\n @Override \n public void actionPerformed(ActionEvent e){\n //update velocity values\n xVel = distance*moveOrdinance[ordinanceInd][0];\n yVel = distance*moveOrdinance[ordinanceInd][1]; \n\n //update image display fields\n if (ordinanceInd == 2){\n direction = Player.SOUTH;\n } else if (ordinanceInd == 1){\n direction = Player.WEST; \n } else if (ordinanceInd == 3){\n direction = Player.EAST; \n } else{\n direction = Player.NORTH; \n }\n displayVal = direction;\n\n //change direction\n ordinanceInd = (ordinanceInd+1)%4;\n }\n\n });\n \n tMovement.setInitialDelay(1);\n tMovement.start();\n tState.start();\n }", "public void tick() {\n long elapsed = (System.nanoTime()-startTime)/1000000;\n\n if(elapsed>delay) {\n currentFrame++;\n startTime = System.nanoTime();\n }\n if(currentFrame == images.length){\n currentFrame = 0;\n }\n }", "public void restart() {\n eaten = 0;\n }", "public void circleOpp(int time){\n int[][] ordinance = {{0,1},{-1,0},{0,-1},{1,0}}; \n \n tMovement = new Timer(time,new ActionListener(){\n private int ordinanceInd = 0;\n private int distance = 1;\n private int[][] moveOrdinance = ordinance; \n\n @Override \n public void actionPerformed(ActionEvent e){\n //update velocity values\n xVel = distance*moveOrdinance[ordinanceInd][0];\n yVel = distance*moveOrdinance[ordinanceInd][1]; \n\n //update image display fields\n if (ordinanceInd == 0){\n direction = Player.SOUTH;\n } else if (ordinanceInd == 3){\n direction = Player.WEST; \n } else if (ordinanceInd == 1){\n direction = Player.EAST; \n } else{\n direction = Player.NORTH; \n }\n displayVal = direction;\n\n //change direction\n ordinanceInd = (ordinanceInd+1)%4;\n }\n\n });\n \n tMovement.setInitialDelay(1);\n tMovement.start();\n tState.start();\n }", "public void run() {\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }", "private void startTimer(){\n scoreboard.disableStart(true);\n timer.scheduleAtFixedRate(new TimerTask(){\n @Override\n public void run(){\n Platform.runLater(new Runnable(){\n @Override\n public void run() {\n scoreboard.updateTime();\n }\n });\n }\n },0,1000);\n }", "public void anim() {\n // start the timer\n t.start();\n }", "private void rewindButton(ActionEvent e) {\n timer.stop();\n drawPanel.removeAll();\n this.tick = 0;\n atTick(this.tick);\n render();\n timer.start();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n timer.start();\n if (!gameOver) {\n checkApple();\n checkCollision();\n move();\n }\n repaint();\n\n }", "public void start() {\n if (animationTimer != null) {\n animationTimer.cancel();\n }\n animationTimer = new Timer();\n animationTimer.scheduleAtFixedRate(new AnimationTask(), 0, 25);\n }", "private void animate() {\r\n\t\tif (spriteCounter > 50) {\r\n\t\t\tanimationFrame = 0;\r\n\t\t} else {\r\n\t\t\tanimationFrame = -16;\r\n\t\t}\r\n\t\t\r\n\t\tif (spriteCounter > 100) {\r\n\t\t\tspriteCounter = 0;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tspriteCounter++;\r\n\t\tsetImage((Graphics2D) super.img.getGraphics());\r\n\t}", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "@Override\n public void secondTick(int ms) {\n if (this.interactionTimeout == 0) {\n this.image = image_on;\n }\n super.secondTick(ms);\n }", "protected void restart() {\r\n\t\tthis.stop();\r\n\t\tthis.start();\r\n\t}", "public void restart() {\n\t\tmadeMove = false;\n\t\tcurrentPit = -1;\n\t\tnewGame(player1.getName(), player2.getName(), originalCount); \n\t}", "public void restart() {\r\n\t\tstart();\r\n\t}", "private void rerunAnimation() {\n transition.playFromStart();\r\n}", "public void restartGame() {\n orientate(Orientation.DOWN);\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n gameOver = false;\n strengthen(MAX_HP);\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n handler.postDelayed(myRun, speed);\n }", "abstract public void modifyImage(long dt, long curTime, BufferedImage image) ;", "public void playEnd ()\r\n {\r\n hauntedHouse = new ImageIcon(\"HauntedHouse.png\");\r\n frame.add(this);\r\n animationLoop = new Timer (2, new ActionListener ()\r\n {\r\n public void actionPerformed (ActionEvent ae)\r\n {\r\n count++; \r\n revalidate();\r\n repaint ();\r\n if (count >= 2320)\r\n {\r\n animationLoop.stop();\r\n frame.dispose();\r\n }\r\n }\r\n });\r\n animationLoop.start();\r\n }", "public void restart() {\n\t\telements[currentElement - 1].turnOff();\n\t\tstart();\n\t}", "void resetLoop () {\n try {\n timer.cancel();\n timer.purge();\n } catch (Exception e) {\n\n }\n timer = new Timer();\n timer.schedule(new LoopTask(), stepDelay, stepDelay);\n }", "public void startTimer() {\n animationTimer = new AnimationTimer() {\n @Override\n public void handle(final long now) {\n videoController.update(now);\n if (videoController.isClosed()) {\n stopTimer();\n return;\n }\n roomController.update(now);\n timeLogController.update(now);\n }\n };\n timeLogController.clearInformationArea();\n animationTimer.start();\n }", "public void resetTimer(){\n timerStarted = 0;\n }", "public void restart()\n\t{\n\t\tstop();\n\t\treset();\n\t\tstart();\n\t}", "public void act() \n {\n // Add your action code here.\n /*\n if ( pixelsMoved >= 20 )\n {\n moving = false;\n pixelsMoved = 0;\n }\n */\n if ( moving )\n {\n move(1);\n pixelsMoved++;\n \n if ( pixelsMoved >= 20 )\n {\n setMoving( false );\n }\n }\n }", "private void startClock() {\r\n\t\tTimer timer = new Timer(500, new ActionListener() {\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent theEvent) {\r\n\t\t\t\tadvanceTime();\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n timer.setRepeats(true);\r\n timer.setCoalesce(true);\r\n timer.setInitialDelay(0);\r\n timer.start();\r\n\t}", "public void makeTimer(){\n\t\n\t\tframeIndex = 0;\n\t\n\t\t//Create a new interpolator\n\t\tInterpolator lint = new Interpolator();\n\t\n\t\t//interpolate between all of the key frames in the list to fill the array\n\t\tframes = lint.makeFrames(keyFrameList);\n\t\n\t\t//timer delay is set in milliseconds, so 1000/fps gives delay per frame\n\t\tint delay = 1000/fps; \n\t\n\t\n\t\tActionListener taskPerformer = new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tif(frameIndex == frames.length){ frameIndex = 0;}\n\n\t\t\t\tframes[frameIndex].display();\n\t\t\t\tframes[frameIndex].clearDisplay();\n\t\t\t\tframeIndex++;\n\t\t\t}\n\t\t};\n\n\t\ttimer = new Timer(delay, taskPerformer);\t\n\t}", "@Override\r\n\t//Event handler for the Timer action\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tmoveSnake();\r\n\t}", "@Override\n\tpublic void caretUpdate(CaretEvent e) {\n\t\ttimer.restart();\n\t}", "void startUpdateTimer();", "public void startAnimation() {\n timer.start();\n }", "public void starteSpiel(ActionEvent actionEvent) {\n System.out.println(\"Started\");\n //https://www.programcreek.com/java-api-examples/?api=javafx.animation.AnimationTimer\n //60 fps\n new AnimationTimer() {\n public void handle(long currentNanoTime) {\n // calculate time since last update.\n moveBall();\n }\n }.start(); // Was diese?\n\n\n }", "public static String _timeranimacion_tick() throws Exception{\nif (mostCurrent._imgmosquito.getLeft()>0 || mostCurrent._imgmosquito.getTop()>0) { \n //BA.debugLineNum = 338;BA.debugLine=\"imgMosquito.Left = imgMosquito.Left - 15\";\nmostCurrent._imgmosquito.setLeft((int) (mostCurrent._imgmosquito.getLeft()-15));\n //BA.debugLineNum = 339;BA.debugLine=\"imgMosquito.Top = imgMosquito.Top - 15\";\nmostCurrent._imgmosquito.setTop((int) (mostCurrent._imgmosquito.getTop()-15));\n }else {\n //BA.debugLineNum = 341;BA.debugLine=\"TimerAnimacion.Enabled = False\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5.setEnabled(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 343;BA.debugLine=\"butPaso1.Visible = False\";\nmostCurrent._butpaso1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 344;BA.debugLine=\"imgMosquito1.Left = -60dip\";\nmostCurrent._imgmosquito1.setLeft((int) (-anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (60))));\n //BA.debugLineNum = 345;BA.debugLine=\"imgMosquito1.Top = 50dip\";\nmostCurrent._imgmosquito1.setTop(anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (50)));\n //BA.debugLineNum = 346;BA.debugLine=\"imgMosquito1.Visible = True\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 347;BA.debugLine=\"TimerAnimacionEntrada.Initialize(\\\"TimerAnimacion\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.Initialize(processBA,\"TimerAnimacion_Entrada\",(long) (10));\n //BA.debugLineNum = 348;BA.debugLine=\"TimerAnimacionEntrada.Enabled = True\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.setEnabled(anywheresoftware.b4a.keywords.Common.True);\n };\n //BA.debugLineNum = 351;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "private float resetTimer() {\r\n final float COUNTDOWNTIME = 10;\r\n return COUNTDOWNTIME;\r\n }", "private void animateLeft(){\n if(frame == 1){\n setImage(run1_l);\n }\n else if(frame == 2){\n setImage(run2_l);\n }\n else if(frame == 3){\n setImage(run3_l);\n }\n else if(frame == 4){\n setImage(run4_l);\n }\n else if(frame == 5){\n setImage(run5_l);\n }\n else if(frame == 6){\n setImage(run6_l);\n }\n else if(frame == 7){\n setImage(run7_l);\n }\n else if(frame == 8){\n setImage(run8_l);\n frame =1;\n return;\n }\n frame ++;\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getSource() instanceof Timer) {\r\n if (animatedPos == canvas.size() - 1)\r\n animatedDir = -1;\r\n if (animatedPos == 0)\r\n animatedDir = 1;\r\n animatedPos += animatedDir;\r\n repaint();\r\n }\r\n }", "public void resume()\r\n {\r\n\t timer.start();\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==time)\n\t\t{\n\t\t\tn=(n+1)%count;\n\t\t\timageButton.setIcon(imageIcon[n]);\n\t\t\t\n\t\t}\n\t\telse if(e.getSource()==bStart)\n\t\t{\n\t\t\ttime.start();\n\t\t}\n\t\telse if(e.getSource()==bStop)\n\t\t{\n\t\t\ttime.stop();\n\t\t}\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\trepaint(); //Timer will invoke this method which then refreshes the screen\r\n\t\t\t\t // for the \"animation\"\r\n\t}", "public void stop() {\n this.setCurrentCell(0);\n this.setPicX(0);\n slowDownX();\n slowDownY();\n setMoving(false);\n if (moveDown) {\n this.setPicY(0);\n } else if (moveUp) {\n this.setPicY(211);\n } else if (moveLeft) {\n this.setPicY(141);\n } else if (moveRight) {\n this.setPicY(74);\n }\n }", "private void moveTimer(long period) {\n\t\tmoveTimer.schedule(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tif (Math.abs(relativeX + MOVE_DISTANCE * (getMoveRight() ? 1 : -1)) > onLog.getImageWidth() / 2) {\n\t\t\t\t\tsetMoveRight(!getMoveRight());\n\t\t\t\t\trelativeX += MOVE_DISTANCE * (getMoveRight() ? 1 : -1);\n\t\t\t\t} else {\n\t\t\t\t\trelativeX += MOVE_DISTANCE * (getMoveRight() ? 1 : -1);\n\t\t\t\t}\n\t\t\t}\n\t\t}, period, period);\n\t}", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r\n\t if (Seconds.getValue() == 0) \r\n\t {\r\n\t \tMinutes.tick();\r\n\t \r\n\t \tif (Minutes.getValue() == 0)\r\n\t \t{\r\n\t \t\tHours.tick();\r\n\t \t\t\r\n\t \t\tif(Hours.getValue() == 0)\r\n\t \t\t{\r\n\t \t\t\tHours.tick();\r\n\t \t\t}\r\n\t \t}\r\n\t }\t\t\r\n\t \r\n\t updateTime();\r\n\t }", "private void startNewTimer(){\n timer.cancel();\n timer = null;\n timesUp();\n timer = new MainGameTimer(this);\n timer.startNewRoundCountDown();\n }", "public void restart() {\n\n\t\t//Reset the list of Mho locations\n\t\tmhoLocations.clear();\n\n\t\t//Generate a unique map of game elements again\n\t\tgenerateMap();\n\n\t\t//reset gameOver and win variables\n\t\tgameOver = false;\n\t\twin = false;\n\n\t\t//repaint the board\n\t\tboard.repaint();\n\t}", "public void frameForward()\n{\n stop();\n setTime(getTime() + getInterval());\n}", "public void restartViewChangeTimer(){\n revokeViewChange();\n scheduleViewChange();\n }", "private void pauseTimer() {\n myTimer.stop();\n disableGamePlayKeys();\n repaint();\n }", "public void init() {\n\t\tSystem.out.println(\"Started \" + duration + \" minute timer.\");\n\t\tTimer timer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tif(!images.isEmpty()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tch.change(images.poll().getFile().getAbsolutePath());\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Changed wallpaper\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Out of wallpapers, program exiting.\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}, 0, duration * 60 * 1000);\n\t}", "public void restartGame() {\n\t\tclearGame();\n\t\tstartGame();\n\t}", "public void act() \n {\n if(images != null)\n {\n if(animationState == AnimationState.ANIMATING)\n {\n if(animationCounter++ > delay)\n {\n animationCounter = 0;\n currentImage = (currentImage + 1) % images.length;\n setImage(images[currentImage]);\n }\n }\n else if(animationState == AnimationState.SPECIAL)\n {\n setImage(specialImage);\n }\n else if(animationState == AnimationState.RESTING)\n {\n animationState = AnimationState.FROZEN;\n animationCounter = 0;\n currentImage = 0;\n setImage(images[currentImage]);\n }\n }\n }", "public void resume() {\n moveStop = true;\n }", "@Override\n\tpublic void update() {\n\t\tif(!canSwoop)\n\t\tif(System.currentTimeMillis() - lastAnim >= 200){\t\n\t\t\tif(currentAnim < 2){\n\t\t\t\tcurrentAnim++;\n\t\t\t} else {\n\t\t\t\tcurrentAnim = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"ANIMATING image: \" + currentAnim);\n\t\t\tlastAnim = System.currentTimeMillis();\t\t\n\t\t\t}\n\t\t\n\t\tthis.texture = Assets.shadowAnim[currentAnim];\n\t}", "private void animateRight(){\n if(frame == 1){\n setImage(run1);\n }\n else if(frame == 2){\n setImage(run2);\n }\n else if(frame == 3){\n setImage(run3);\n }\n else if(frame == 4){\n setImage(run4);\n }\n else if(frame == 5){\n setImage(run5);\n }\n else if(frame == 6){\n setImage(run6);\n }\n else if(frame == 7){\n setImage(run7);\n }\n else if(frame == 8){\n setImage(run8);\n frame =1;\n return;\n }\n frame ++;\n }", "public void restartGame() {\n\t\tplayerTurn = 1;\n\t\tgameStart = true;\n\t\tdispose();\n\t\tplayerMoves.clear();\n\t\tboardSize();\n\t\tnew GameBoard();\n\t}", "public void act() \n {\n //plays animation with a delay between frames\n explosionSound.play();\n i = (i+1)%(frames.length); \n setImage(frames[i]);\n if(i == 0) getWorld().removeObject(this);\n }", "public void updateScreen() {\n\t\t++this.panoramaTimer;\n\t}", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tdimensionclip2.start(); // 두번째 효과음 재생\r\n\t\t\t\t\tTimer thirdeffect = new Timer();\r\n\t\t\t\t\tTimerTask thirdeffecttask = new TimerTask() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tdimensionclip3.start();\r\n\t\t\t\t\t\t\tTimer fourtheffect = new Timer();\r\n\t\t\t\t\t\t\tTimerTask fourtheffecttask = new TimerTask() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\tdimensionclip4.start();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tfourtheffect.schedule(fourtheffecttask, 1300);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\tthirdeffect.schedule(thirdeffecttask, 1400);\r\n\t\t\t\t}", "public void updateTimerDisplay(){\n int seconds = timeCounter / 60;\n setImage(new GreenfootImage(\"Time: \"+timeElapsed + \": \" + seconds, 24, Color.BLACK, Color.WHITE));\n }", "public void act() \r\n {\r\n if(timeInterval > 0) {\r\n timeInterval--;\r\n }else{\r\n if(currentSprite < 30) {\r\n currentSprite++;\r\n GreenfootImage img = new GreenfootImage(\"explosion_\" + currentSprite + \".png\");\r\n img.scale(img.getWidth() / 2 + 25, img.getHeight() / 2 + 25);\r\n setImage(img);\r\n timeInterval = timeIntervalDef;\r\n }else{\r\n getWorld().removeObject(this);\r\n }\r\n }\r\n }", "public void startGame() {\n\t\timages = new ImageContainer();\n\t\ttimer = new Timer(15, this);\n\t\ttimer.setRepeats(true);\n\t\tlevelStartTimer = new Timer(2000, this);\n\t\thighScore = new HighScore();\n\t\tpacmanAnimation = new PacmanAnimation(images.pacman, new int[] { 3, 2,\n\t\t\t\t0, 1, 2 });\n\t\tactualLevel = 1;\n\t\tinitNewLevel();\n\t}", "private void pauseGame() {\n\t\ttimer.cancel();\n\t}", "public void respawn() {\n\t\t\t\n\t\t\tslider.resize(100, 20);//resize and position image\n\t\t\tslider.setX(GamePlay.getMiddleX() - slider.getWidth()/2);//reset the x to the orignal position\n\t\t\tslider.setY(GamePlay.getScreenHeight() - 100);\n\t\t\t\n\t\t\tball.setX(slider.getX() + slider.getWidth()/2 - ball.getWidth()/2);//set the ball to the center of the slider\n\t\t\tball.setY(slider.getY()-ball.getHeight()-5);\n\t\t\t\n\t\t\tballVX=1;\n\t\t\tballVY=-1;//reset the velocity to a 45 degree angle up to the right\n\t\t\t\n\t\t\tdied=false;//no longer died.\n\t\t}", "@Override\n\tprotected void onRestart() {\n\t\tshowPhoto(0);\n\t\tsuper.onRestart();\n\t}", "public void start(){\n\t\tthis.timer.start();\n\t\t\n\t\t/*this.BGM.play();\t//make it play once we have the background after the game start\n\t\tthis.BGM.loop(1);\t//make it loop constantly\n\t\t\n\t\t//once we start the BGM, start calculating the time\n\t\t//we minus this.time because if the game is restarted, we want to adjust the time displayed\n\t\t//on the label since the paused time does not account\n\t\tthis.startTime = System.nanoTime() - this.time;\t//in nanoTime*/\n\t\t\n\t\tthis.stop = false;\n\t}", "public void createTimer() {\n timer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n if (animal.changeScore()) {\n setNumber(animal.getPoints());\n }\n if (animal.getStop()) {\n System.out.println(\"Game Ended\");\n background.stopMusic();\n stop();\n background.stop();\n\n ArrayList list = null;\n try {\n list = scoreFile.sortFile(animal.getPoints());\n } catch (IOException e) {\n e.printStackTrace();\n }\n popUp(list);\n }\n }\n };\n }", "public void restart();", "public void play(){\n\t\tif(timer == null){ return; }\n\t\t//1000ms in a second, so divided by frames per second gives ms interval \n\t\ttimer.setDelay(1000/fps);\n\t\ttimer.start();\n\t}", "@Override\r\n protected void onResume() {\n mDjiGLSurfaceView.resume();\r\n \r\n mTimer = new Timer();\r\n Task task = new Task();\r\n mTimer.schedule(task, 0, 500); \r\n \r\n DJIDrone.getDjiMC().startUpdateTimer(1000);\r\n super.onResume();\r\n }", "public void move() {\r\n\t\tsetY(getY() + 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 300, 60);\r\n\r\n\t}", "public void startReloading() {\n reload.setTimeOffset(1);\n reload.play();\n }", "public void moveLeft() {\r\n speedX = -6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/leftWalk1.png\");\r\n img = new Sprite (r1);\r\n }", "@Override\n protected void swimAction(long timer){}", "public void reset()\r\n\t{\r\n\t\ttimer.stop();\r\n\t\ttimer.reset();\r\n\t\tautoStep = 0;\r\n\t}", "@Override\r\n public void update() {\r\n // Animate sprite\r\n if (this.spriteTimer++ >= 4) {\r\n this.spriteIndex++;\r\n this.spriteTimer = 0;\r\n }\r\n if (this.spriteIndex >= this.animation.length) {\r\n this.destroy();\r\n } else {\r\n this.sprite = this.animation[this.spriteIndex];\r\n }\r\n }", "public void restart() {\n Board.gameOver = false;\n CollisionUtility.resetScore();\n loadMenu();\n }", "public void restart() {\r\n\t\tthis.cancel = false;\r\n\t}", "public abstract void animation(double seconds);", "void turn2Start() throws InterruptedException {\r\n\t\t \r\n\t\t secondTurn = true;\r\n\t\t \r\n\t\t displayMessage.setText(\"TIME'S UP!\");\r\n\t\t timeSeconds2 = 1; //duration\r\n\t\t \r\n\t\t Timer clock2 = new Timer();\r\n\t\t clock2.scheduleAtFixedRate(new TimerTask() {\r\n\t\t public void run() {\r\n\t\t if(timeSeconds2 >= 0)\r\n\t\t {\r\n\t\t timeSeconds2--; \r\n\t\t }\r\n\t\t else {\r\n\t\t clock2.cancel();\r\n\t\t \r\n\t\t try {\r\n\t\t\t\t\t\t\t\tgetReadyMessage2();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t} \r\n\t\t \r\n\t\t ////////////////////////////////reset everything///////////////////\r\n\t\t wordCount.setVisible(false);\r\n\t\t wordMax.setVisible(false);\r\n\t\t slash.setVisible(false);\r\n\t\t counterBox.setVisible(false);\r\n\t\t countDownTimer.setVisible(false);\r\n\t\t countDownTimer.setText(\"20\");\r\n\t\t outOf=0;\r\n\t\t wordCount.setText(Integer.toString(outOf));\r\n\t\t \r\n\t\t String sequenceText = \"\" ;\r\n\t\t \t\t\t\tfor (int i = 0; i < DupMeClient.myPattern.size(); i++) {\r\n\t\t \t\t\t\t\tsequenceText = sequenceText + Integer.toString(DupMeClient.myPattern.get(i));\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\tlastPattern.setText(sequenceText);\r\n\t\t \t\t\t\t\r\n\t\t DupMeClient.opponentPattern = DupMeClient.myPattern;\r\n\t\t DupMeClient.myPattern = new ArrayList<Integer>();\r\n\t\t \r\n\t\t \r\n\t\t }\r\n\t\t }\r\n\t\t }, 1000,1000);\r\n }", "void restart() {\n\t\t\tthis.t = 0;\n\t\t\tthis.w = 0;\n\t\t\tthis.balls.clear();\n\t\t\tthis.visited.clear();\n\t\t\tthis.bitRep = 0;\n\t\t\tthis.numConsecutiveRepeats = 0;\n\n\n\t\t\tRandom random = new Random();\n\t\t\t\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (random.nextBoolean()) {\n\t\t\t\t\tthis.addBall(bag.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.visited.add(this.bitRep);\n\t\t}" ]
[ "0.72172886", "0.6954868", "0.6895342", "0.6876597", "0.6826018", "0.68234485", "0.66681266", "0.65858924", "0.658263", "0.6522216", "0.6476294", "0.6418804", "0.6386241", "0.637444", "0.63695794", "0.63638896", "0.6351144", "0.63336253", "0.62906134", "0.6281676", "0.6275055", "0.62651664", "0.6254556", "0.62521315", "0.624966", "0.62427396", "0.6242186", "0.6228835", "0.6220374", "0.62073284", "0.6201751", "0.61871207", "0.61788976", "0.6176128", "0.61550903", "0.6150267", "0.6133342", "0.61287415", "0.6127286", "0.6121568", "0.6111367", "0.6090018", "0.60829765", "0.6082965", "0.60764337", "0.6072835", "0.6072666", "0.60650563", "0.6064618", "0.60629207", "0.6058072", "0.6057348", "0.60559046", "0.6051671", "0.6047338", "0.6030486", "0.60279506", "0.60268986", "0.60251784", "0.6024445", "0.60124606", "0.60025257", "0.6001257", "0.5996705", "0.5992265", "0.59908134", "0.5978981", "0.5977919", "0.59775186", "0.5962204", "0.59616363", "0.59591997", "0.5956834", "0.5948548", "0.594422", "0.59431463", "0.5938969", "0.5936852", "0.5926599", "0.59174997", "0.5917026", "0.5914264", "0.59104854", "0.5894963", "0.5891722", "0.588783", "0.5884418", "0.5883229", "0.58789957", "0.58759165", "0.58736455", "0.58535177", "0.5850815", "0.58500254", "0.58441335", "0.5843164", "0.58397096", "0.5838605", "0.58345366", "0.5831833" ]
0.6608978
7
Simulate the delay in capturing image
public boolean captureImage(int[][] image_pos) { buttonListener.displayMessage("Capturing image at " + Arrays.toString(getPosition()) + " now", 1); System.out.println("Capturing Image"); try { TimeUnit.SECONDS.sleep(2); } catch (Exception e){ System.out.println(e.getMessage()); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void takePicture() {\n\n captureStillPicture();\n }", "public native void setDelay(int delay) throws MagickException;", "public static void take(WebDriver driver){\n try {\n Thread.sleep(5000);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n\n\n Screenshot screenshot = new AShot()\n .shootingStrategy(ShootingStrategies.viewportPasting(100))\n .takeScreenshot(driver);\n\n try {\n ImageIO.write(screenshot.getImage(), \"png\", new File(\"/home/stanislav/123.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void takePicture() {\n LightMeter lightMeter = new LightMeter(film.getSpeed());\n shutter.setSeconds(lightMeter.getRecommendedSpeed());\n aperture.setSize(lightMeter.getRecommendedAperture());\n shutter.trigger();\n }", "protected void sleepOnDrawFrame(final long duration) {\n runOnDrawFrame(new ResultRunnable() {\n @Override\n public Object run() {\n try {\n Thread.sleep(duration);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return null;\n }\n });\n }", "abstract public void modifyImage(long dt, long curTime, BufferedImage image) ;", "private void updateDeviceImage(Shell shell) {\r\n mBusyLabel.setText(\"Capturing...\"); // no effect\r\n\r\n shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));\r\n\r\n for (int i = 0; i < 10; i++) {\r\n long start = System.currentTimeMillis();\r\n getDeviceImage();\r\n long end = System.currentTimeMillis();\r\n System.out.println(\"count \" + i + \" take \" + (end-start) + \"ms\");\r\n }\r\n mRawImage = getDeviceImage();\r\n System.out.println(\"size is \" + mRawImage.size);\r\n for (int i = 0; i < mRotateCount; i++) {\r\n mRawImage = mRawImage.getRotated();\r\n }\r\n\r\n updateImageDisplay(shell);\r\n }", "public void sleep()\r\n\t{\r\n\t\tif (regulate)\r\n\t\t{\r\n\t\t\tDisplay.sync(fps);\r\n\t\t}\r\n\t}", "private void takePhotosGoogle() throws Exception \n {\n UiObject swipeScreen = new UiObject(new UiSelector().resourceId(\"com.android.camera2:id/mode_options_overlay\"));\n swipeScreen.swipeRight(5);\n\n // switch to video mode\n UiObject changeModeToCapture = new UiObject(new UiSelector().descriptionMatches(\"Switch to Camera Mode\"));\n changeModeToCapture.click();\n sleep(sleepTime);\n\n // click to capture photos\n UiObject clickCaptureButton = new UiObject(new UiSelector().descriptionMatches(\"Shutter\"));\n\n for (int i = 0; i < iterations; i++) {\n clickCaptureButton.longClick();\n sleep(timeDurationBetweenEachCapture);\n }\n }", "void delayForDesiredFPS(){\n delayMs=(int)Math.round(desiredPeriodMs-(float)getLastDtNs()/1000000);\n if(delayMs<0) delayMs=1;\n try {Thread.currentThread().sleep(delayMs);} catch (java.lang.InterruptedException e) {}\n }", "@Test\n\tpublic void testStartTiming() {\n\t\tip = new ImagePlus();\n\t\tip.startTiming();\n\t}", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "private void takePhotosAosp() throws Exception \n {\n UiObject clickModes = new UiObject(new UiSelector().descriptionMatches(\"Camera, video or panorama selector\"));\n clickModes.click();\n sleep(sleepTime);\n\n UiObject changeModeToCapture = new UiObject(new UiSelector().descriptionMatches(\"Switch to photo\"));\n\n changeModeToCapture.click();\n sleep(sleepTime);\n\n // click to capture photos\n UiObject clickCaptureButton = new UiObject(new UiSelector().descriptionMatches(\"Shutter button\"));\n\n for (int i = 0; i < iterations; i++) {\n clickCaptureButton.longClick();\n sleep(timeDurationBetweenEachCapture);\n }\n getUiDevice().pressBack();\n }", "void captureHold(float[] point, float seconds, int sequenceNumber);", "private void delay() {\n\ttry {\n\t\tThread.sleep(500);\n\t} catch (InterruptedException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\t\n\t}", "public native int getDelay() throws MagickException;", "public void delay(){\n try {\n Thread.sleep((long) ((samplingTime * simulationSpeed.factor)* 1000));\n } catch (InterruptedException e) {\n started = false;\n }\n }", "private void takePicture() {\n lockFocus();\n }", "public CaptureImage()\r\n\t{\r\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n\t\tcapturedFrame = new Mat();\r\n\t\tprocessedFrame = new Mat();\r\n\t\tboard = new byte[32];\r\n\t\tfor (int i=0;i<board.length;i++){\r\n\t\t\tboard[i] = 0;\r\n\t\t}\r\n\t\tcaptured = new byte[12];\r\n\t}", "public void tick() {\n long elapsed = (System.nanoTime()-startTime)/1000000;\n\n if(elapsed>delay) {\n currentFrame++;\n startTime = System.nanoTime();\n }\n if(currentFrame == images.length){\n currentFrame = 0;\n }\n }", "private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }", "private void waitFPS() {\n try {\n Thread.sleep((int) (1000.0f / 60.0f));\n } catch (InterruptedException e) {\n logger.error(\"Unable to wait some milli's !\", e);\n }\n }", "private int getFramePerSecond(Rectangle rect){\n final long recordTime=1000;\n int countFrame=0;\n try {\n Robot bot=new Robot();\n final long startTime=System.currentTimeMillis();\n while((System.currentTimeMillis()-startTime)<=recordTime){\n bot.createScreenCapture(rect);\n countFrame++;\n }\n System.out.println(\"FramePerSecond is : \"+countFrame);\n return countFrame;\n } catch (AWTException e) {\n e.printStackTrace();\n }\n return 0;\n }", "public static void captureScreenShot(WebDriver driver) {\n\t\tlogger.info(\"Taking the screenshot\");\n\t\ttry {\n\t\t\tString timeStamp = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\").format(new Date());\n\n\t\t\tTakesScreenshot ScrObj = (TakesScreenshot) driver;\n\n\t\t\tThread.sleep(3000);\n\n\t\t\tFile CaptureImg = ScrObj.getScreenshotAs(OutputType.FILE);\n\t\t\tFileUtils.copyFile(CaptureImg, new File(\"./Screenshots/\" + timeStamp + \"_screenshot.png\"));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(\"Error occured while Capturing Screenshot\");\n\t\t}\n\t}", "private void emulateDelay() {\n try {\n Thread.sleep(700);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void open (int nMilliseconds)\n {\n if (image_ == null) return;\n \n Timer timer = new Timer (Integer.MAX_VALUE, new ActionListener() {\n @Override\n public void actionPerformed (ActionEvent event) {\n ((Timer) event.getSource()).stop();\n close();\n };\n });\n \n timer.setInitialDelay (nMilliseconds);\n timer.start();\n\n setBounds (x_, y_, width_, height_);\n setVisible (true);\n }", "void onCaptureStart();", "private void QueryScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm1.setIcon(new ImageIcon(images.get(currentFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "@Override\n public native void delay(int ms);", "public static void delay() {\n\n long ONE_SECOND = 1_000;\n\n try {\n Thread.sleep(ONE_SECOND);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void tomafoto() throws InterruptedException {\n sleep(1000);\n tomafoto.click();\n sleep(1000);\n capturar.click();\n sleep(1000);\n // waitVisibilityOfElement(btnnext);\n /*tomaEvidencia(evidencia,\"PantallaCargadaImagen\");*/\n btnnext.click();\n }", "private void changeDelay() {\n delay = ((int) (Math.random() * 10000) + 1000) / MAX_FRAMES;\n }", "public void screenShot() {\n\n\t}", "@Override\n public void capture() {\n captureScreen();\n }", "public void takeScreenShot();", "private void takeScreenshot(Activity activity) {\n uiDevice.waitForIdle(2000);\n\n // Create a file and save it\n Date start = new Date();\n final File screenFile = new File(Environment.getExternalStorageDirectory(), \"screen_\" + start.toString() + \"_\" + rand.nextInt());\n uiDevice.takeScreenshot(screenFile, 0.5f, 50);\n\n // Finally, attempt to send that file over websockets\n socket.sendScreenshot(screenFile, activity, start);\n\n }", "private void StartSyncCapture() {\n\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n SetTextOnUIThread(\"\");\n isCaptureRunning = true;\n try {\n FingerData fingerData = new FingerData();//predefined class to get result data\n\n //Method to capture finger print with in time out session\n int ret = mfs100.AutoCapture(fingerData, timeout,false);\n Log.e(\"StartSyncCapture.RET\", \"\"+ret);\n if (ret != 0) {\n SetTextOnUIThread(mfs100.GetErrorMsg(ret));\n } else {\n lastCapFingerData = fingerData;\n final Bitmap bitmap = BitmapFactory.decodeByteArray(fingerData.FingerImage(), 0,\n fingerData.FingerImage().length);\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //set bitmap image to the image view\n imgFinger.setImageBitmap(bitmap);\n }\n });\n\n SetTextOnUIThread(\"Capture Success\");\n String log = \"\\nQuality: \" + fingerData.Quality()\n + \"\\nNFIQ: \" + fingerData.Nfiq()\n + \"\\nWSQ Compress Ratio: \"\n + fingerData.WSQCompressRatio()\n + \"\\nImage Dimensions (inch): \"\n + fingerData.InWidth() + \"\\\" X \"\n + fingerData.InHeight() + \"\\\"\"\n + \"\\nImage Area (inch): \" + fingerData.InArea()\n + \"\\\"\" + \"\\nResolution (dpi/ppi): \"\n + fingerData.Resolution() + \"\\nGray Scale: \"\n + fingerData.GrayScale() + \"\\nBits Per Pixal: \"\n + fingerData.Bpp() + \"\\nWSQ Info: \"\n + fingerData.WSQInfo();\n SetLogOnUIThread(log);\n\n SetData2(fingerData);\n\n }\n } catch (Exception ex) {\n SetTextOnUIThread(ex.toString());\n } finally {\n isCaptureRunning = false;\n }\n }\n }).start();\n }", "private void m4810f() {\n long startTime = System.currentTimeMillis();\n if (startTime - this.f3855m < this.f3854l) {\n try {\n Thread.sleep((this.f3854l - startTime) + this.f3855m);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n this.f3855m = System.currentTimeMillis();\n synchronized (sBitmap) {\n sByteBuffer.clear();\n sBitmap.copyPixelsToBuffer(sByteBuffer);\n }\n }", "public void awaitNewImage() {\n final int TIMEOUT_MS = 2500;\n\n synchronized (mFrameSyncObject) {\n while (!mFrameAvailable) {\n try {\n // Wait for onFrameAvailable() to signal us. Use a timeout to avoid\n // stalling the test if it doesn't arrive.\n mFrameSyncObject.wait(TIMEOUT_MS);\n if (!mFrameAvailable) {\n throw new RuntimeException(\"Camera frame wait timed out\");\n }\n } catch (InterruptedException ie) {\n // shouldn't happen\n throw new RuntimeException(ie);\n }\n }\n mFrameAvailable = false;\n }\n\n // Latch the data.\n mTextureRender.checkGlError(\"before updateTexImage\");\n mSurfaceTexture.updateTexImage();\n }", "private void DBScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm2.setIcon(new ImageIcon(dbImages.get(currentDBFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "void doOneFrame(DrawSurface d, double dt);", "@Override\r\n public void run() {\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }", "private void delay() {\n\t\tDelay.msDelay(1000);\n\t}", "@Test\n public void testPinCheckDelay() throws Exception {\n LockscreenHelper.getInstance().setScreenLockViaShell(PIN, LockscreenHelper.MODE_PIN);\n if (isTracesEnabled()) {\n createTraceDirectory();\n }\n for (int i = 0; i < mIterationCount; i++) {\n mDevice.sleep();\n if (null != mAtraceLogger) {\n mAtraceLogger.atraceStart(mTraceCategoriesSet, mTraceBufferSize,\n mTraceDumpInterval, mRootTrace,\n String.format(\"%s-%d\", TEST_PINCHECK_DELAY, i));\n }\n\n // Make sure not to launch camera with \"double-tap\".\n Thread.sleep(300);\n mDevice.wakeUp();\n LockscreenHelper.getInstance().unlockScreen(PIN);\n mDevice.waitForIdle();\n if (null != mAtraceLogger) {\n mAtraceLogger.atraceStop();\n }\n }\n LockscreenHelper.getInstance().removeScreenLockViaShell(PIN);\n mDevice.pressHome();\n }", "public void loop() {\n telemetry.addData(\"loop count:\", mLoopCount++);\n telemetry.addData(\"version: \", \"1.3\");\n\n int[] topScan;\n int[] middleScan;\n int[] bottomScan;\n\n // get most recent frame from camera (may be same as last time or null)\n CameraLib.CameraImage frame = mCamAcqFr.loop();\n\n // log debug info ...\n if (frame != null) {\n\n // process the current frame\n // ... \"move toward the light...\"\n\n // log data about the most current image to driver station every loop so it stays up long enough to read\n Camera.Size camSize = frame.cameraSize();\n telemetry.addData(\"preview camera size: \", String.valueOf(camSize.width) + \"x\" + String.valueOf(camSize.height));\n telemetry.addData(\"preview data size:\", frame.dataSize());\n telemetry.addData(\"preview rgb(center):\", String.format(\"%08X\", frame.getPixel(camSize.width / 2, camSize.height / 2)));\n telemetry.addData(\"frame number: \", mCamAcqFr.frameCount());\n\n // log text representations of several significant scanlines\n\n topScan = frame.scanlineValue(camSize.height / 3);\n middleScan = frame.scanlineValue(camSize.height / 2);\n bottomScan = frame.scanlineValue(camSize.height * 2 / 3);\n\n //telemetry.addData(\"value a(1/3): \", topScan);\n //telemetry.addData(\"value b(1/2): \", middleScan);\n //telemetry.addData(\"value c(2/3): \", bottomScan);\n\n final int bandSize = 10;\n telemetry.addData(\"hue a(1/3): \", frame.scanlineHue(camSize.height / 3, bandSize));\n telemetry.addData(\"hue b(1/2): \", frame.scanlineHue(camSize.height / 2, bandSize));\n telemetry.addData(\"hue c(2/3): \", frame.scanlineHue(2*camSize.height / 3, bandSize));\n\n int topThresh = threshFind(topScan);\n int middleThresh = threshFind(middleScan);\n int bottomThresh = threshFind(bottomScan);\n\n telemetry.addData(\"Top Thresh\", topThresh);\n telemetry.addData(\"Middle Thresh\", middleThresh);\n telemetry.addData(\"Bottom Thresh\", bottomThresh);\n\n int topPos = findAvgOverThresh(topScan, topThresh);\n int middlePos = findAvgOverThresh(middleScan, middleThresh);\n int bottomPos = findAvgOverThresh(bottomScan, bottomThresh);\n\n telemetry.addData(\"Top Pos\", topPos);\n telemetry.addData(\"Middle Pos\", middlePos);\n telemetry.addData(\"Bottom Pos\", bottomPos);\n }\n }", "public void testSurfaceRecordingTimeLapse() {\n assertTrue(testRecordFromSurface(false /* persistent */, true /* timelapse */));\n }", "public GIFMaker withDelay(int delay);", "public void doVideoCapture() {\n /*\n r6 = this;\n r0 = r6.mPaused;\n if (r0 != 0) goto L_0x0043;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 != 0) goto L_0x0009;\n L_0x0008:\n goto L_0x0043;\n L_0x0009:\n r0 = r6.mMediaRecorderRecording;\n if (r0 == 0) goto L_0x0042;\n L_0x000d:\n r0 = r6.mNeedGLRender;\n if (r0 == 0) goto L_0x0029;\n L_0x0011:\n r0 = r6.isSupportEffects();\n if (r0 == 0) goto L_0x0029;\n L_0x0017:\n r0 = r6.mCameraDevice;\n r1 = 0;\n r0.enableShutterSound(r1);\n r0 = r6.mAppController;\n r0 = r0.getCameraAppUI();\n r1 = r6.mPictureTaken;\n r0.takePicture(r1);\n goto L_0x0041;\n L_0x0029:\n r0 = r6.mSnapshotInProgress;\n if (r0 != 0) goto L_0x0041;\n L_0x002d:\n r0 = java.lang.System.currentTimeMillis();\n r2 = r6.mLastTakePictureTime;\n r2 = r0 - r2;\n r4 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321;\n r2 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r2 >= 0) goto L_0x003c;\n L_0x003b:\n return;\n L_0x003c:\n r6.mLastTakePictureTime = r0;\n r6.takeASnapshot();\n L_0x0041:\n return;\n L_0x0042:\n return;\n L_0x0043:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.doVideoCapture():void\");\n }", "@Override\n public void setup(){\n frameRate(60);\n noStroke();\n }", "@Override\n public void secondTick(int ms) {\n if (this.interactionTimeout == 0) {\n this.image = image_on;\n }\n super.secondTick(ms);\n }", "public void grabBlock(double timeout) {\n {\n\n robot.grabber.setTargetPosition(GRABBING_POSITION);\n // Turn On RUN_TO_POSITION\n robot.grabber.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n // reset the timeout time and start motion.\n runtime.reset();\n robot.grabber.setPower(0.7);\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n while (\n (runtime.seconds() < timeout) &&\n (robot.grabber.isBusy()))\n // Display it for the driver.\n\n telemetry.addData(\"Path2\", \"grabber position: %7d target position: %7d\",\n robot.grabber.getCurrentPosition(),\n GRABBING_POSITION);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.grabber.setPower(0);\n\n\n robot.grabber.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // sleep(250); // optional pause after each move\n }", "private void handleRawCaptureResult(CaptureResult result) {\n if (test_wait_capture_result) {\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n if (onRawImageAvailableListener != null) {\n onRawImageAvailableListener.setCaptureResult(result);\n }\n }", "private void runPrecaptureSequence() {\n try {\n // This is how to tell the camera to trigger.\n mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,\n CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_START);\n // Tell #mCaptureCallback to wait for the precapture sequence to be set.\n mState = STATE_WAITING_PRECAPTURE;\n mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback,\n mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public RoeImage takePicture() \r\n {\r\n // return variable\r\n RoeImage result = new RoeImage();\r\n \r\n // take picture \r\n this.cam.read(this.frame);\r\n \r\n // update timestamp for image capturing\r\n this.timestamp = System.currentTimeMillis();\r\n \r\n // add picture to result\r\n result.SetImage(this.frame);\r\n \r\n // add timestamp of captured image\r\n result.setTimeStamp(this.timestamp);\r\n\r\n // the image captured with properties\r\n return result;\r\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tMat frame = grabFrame();\n\t\t\t\t\t\t// convert and show the frame\n\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\n\t\t\t\t\t\tupdateImageView(imgPanel, imageToShow);\n\t\t\t\t\t}", "void notifyCapture(Pit capturedPit);", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "private void onImageProcessed() {\n /* creating random bitmap and then using in TextureView.getBitmap(bitmap) instead of simple TextureView.getBitmap() will not cause lags & memory leaks */\n if (captureBitmap == null) {\n captureBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);\n }\n captureBitmap = Bitmap.createScaledBitmap(targetView.getBitmap(captureBitmap), captureW, captureH, false);\n\n if (captureProcessor != null) {\n if (isThreadingEnabled) {\n cameraThreadHandler.Queue(captureBitmap);\n }\n else {\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n }\n /*\n else if (!skipNextFrame){\n long time = System.currentTimeMillis();\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n time = System.currentTimeMillis() - time;\n if (time > 0.035)\n skipNextFrame = true;\n }\n else {\n skipNextFrame = false;\n }*/\n }\n }", "public void takeScreenShot() {\r\n \t\tgraph.clearSelection();\r\n \t\tgraph.showScreenShotDialog();\r\n \t}", "public void grabaaudio() throws InterruptedException {\n sleep(1000);\n cargaraudio.click();\n sleep(5000);\n cargaraudio.click();\n /* tomaEvidencia(evidencia, \"PantallaGraboAudio\");\n waitVisibilityOfElement(btnnext);*/\n //btnnext.click();\n }", "private void sleep() {\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@FXML\n public void startCapture(ActionEvent event) throws IOException, PcapNativeException, NotOpenException {\n \tex = Executors.newScheduledThreadPool(3);\n \tallThreads = Executors.newFixedThreadPool(6);\n handle = DeviceListController.getPcapNetworkInterface().openLive(65535, PromiscuousMode.PROMISCUOUS, 50);\n \n //set to capture network in\n handle.setDirection(PcapDirection.IN);\n\n //start capture thread\n Capture cap = new Capture(handle);\n allThreads.execute(cap);\n \n //turn on defragmenter\n Runnable defrag = new Defragmenter();\n ex.scheduleAtFixedRate(defrag, 0, 1000, TimeUnit.MILLISECONDS);\n\n //detection engine\n DetectionHandler detectionHandler = new DetectionHandler();\n allThreads.execute(detectionHandler); \n \n //start db handler - has to be started last\n DatabaseHandler dbHandler = new DatabaseHandler();\n allThreads.execute(dbHandler);\n\n editRuleFileButton.setDisable(true);\n editRuleFilePath.setDisable(true);\n startButton.setDisable(true);\n stopButton.setDisable(false);\n }", "public static void takeScreenshotAtEndOfTest() throws IOException {\n\t\t//Take screenshot.\n\t\t\t\tFile scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);//output type is file type//coverting driver to take a screen shot TakesScreenshot(I) and then getScreenshotAs this method will execute \n\t\t//Copy to a file\t\t\n\t\t\t\tString currentDir = System.getProperty(\"user.dir\");\n\t\t\t\tFileUtils.copyFile(scrFile, new File(currentDir + \"/screenshots/\" + System.currentTimeMillis() + \".png\"));\n\t\t\t\t\n\t\t\t\t}", "private void takePhotoPartial() {\n if (MyDebug.LOG)\n Log.d(TAG, \"takePhotoPartial\");\n\n ErrorCallback push_take_picture_error_cb = null;\n\n synchronized (background_camera_lock) {\n if (slow_burst_capture_requests != null) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"need to execute the next capture\");\n Log.d(TAG, \"time since start: \" + (System.currentTimeMillis() - slow_burst_start_ms));\n }\n if (burst_type != BurstType.BURSTTYPE_FOCUS) {\n try {\n if (camera != null && captureSession != null) { // make sure camera wasn't released in the meantime\n captureSession.capture(slow_burst_capture_requests.get(n_burst_taken), previewCaptureCallback, handler);\n }\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to take next burst\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n jpeg_todo = false;\n raw_todo = false;\n picture_cb = null;\n push_take_picture_error_cb = take_picture_error_cb;\n }\n } else if (previewBuilder != null) { // make sure camera wasn't released in the meantime\n if (MyDebug.LOG)\n Log.d(TAG, \"focus bracketing\");\n\n if (!focus_bracketing_in_progress) {\n if (MyDebug.LOG)\n Log.d(TAG, \"focus bracketing was cancelled\");\n // ideally we'd stop altogether, but instead we take one last shot, so that we can mark it with the\n // RequestTagType.CAPTURE tag, so onCaptureCompleted() is called knowing it's for the last image\n if (MyDebug.LOG) {\n Log.d(TAG, \"slow_burst_capture_requests size was: \" + slow_burst_capture_requests.size());\n Log.d(TAG, \"n_burst size was: \" + n_burst);\n Log.d(TAG, \"n_burst_taken: \" + n_burst_taken);\n }\n slow_burst_capture_requests.subList(n_burst_taken + 1, slow_burst_capture_requests.size()).clear(); // resize to n_burst_taken\n // if burst_single_request==true, n_burst is constant and we stop when pending_burst_images.size() >= n_burst\n // if burst_single_request==false, n_burst counts down and we stop when n_burst==0\n if (burst_single_request) {\n n_burst = slow_burst_capture_requests.size();\n if (n_burst_raw > 0) {\n n_burst_raw = slow_burst_capture_requests.size();\n }\n } else {\n n_burst = 1;\n if (n_burst_raw > 0) {\n n_burst_raw = 1;\n }\n }\n if (MyDebug.LOG) {\n Log.d(TAG, \"size is now: \" + slow_burst_capture_requests.size());\n Log.d(TAG, \"n_burst is now: \" + n_burst);\n Log.d(TAG, \"n_burst_raw is now: \" + n_burst_raw);\n }\n RequestTagObject requestTag = (RequestTagObject) slow_burst_capture_requests.get(slow_burst_capture_requests.size() - 1).getTag();\n requestTag.setType(RequestTagType.CAPTURE);\n }\n\n // code for focus bracketing\n try {\n float focus_distance = slow_burst_capture_requests.get(n_burst_taken).get(CaptureRequest.LENS_FOCUS_DISTANCE);\n if (MyDebug.LOG) {\n Log.d(TAG, \"prepare preview for next focus_distance: \" + focus_distance);\n }\n previewBuilder.set(CaptureRequest.CONTROL_AF_MODE, CameraMetadata.CONTROL_AF_MODE_OFF);\n previewBuilder.set(CaptureRequest.LENS_FOCUS_DISTANCE, focus_distance);\n\n setRepeatingRequest(previewBuilder.build());\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to take set focus distance for next focus bracketing burst\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n jpeg_todo = false;\n raw_todo = false;\n picture_cb = null;\n push_take_picture_error_cb = take_picture_error_cb;\n }\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n if (MyDebug.LOG)\n Log.d(TAG, \"take picture after delay for next focus bracket\");\n if (camera != null && captureSession != null) { // make sure camera wasn't released in the meantime\n if (picture_cb.imageQueueWouldBlock(imageReaderRaw != null ? 1 : 0, 1)) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"...but wait for next focus bracket, as image queue would block\");\n }\n handler.postDelayed(this, 100);\n //throw new RuntimeException(); // test\n } else {\n // For focus bracketing mode, we play the shutter sound per shot (so the user can tell when the sequence is complete).\n // From a user mode, the gap between shots in focus bracketing mode makes this more analogous to the auto-repeat mode\n // (at the Preview level), which makes the shutter sound per shot.\n\n playSound(MediaActionSound.SHUTTER_CLICK);\n try {\n captureSession.capture(slow_burst_capture_requests.get(n_burst_taken), previewCaptureCallback, handler);\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to take next focus bracket\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n jpeg_todo = false;\n raw_todo = false;\n picture_cb = null;\n if (take_picture_error_cb != null) {\n take_picture_error_cb.onError();\n take_picture_error_cb = null;\n }\n }\n }\n }\n }\n }, 500);\n }\n }\n }\n\n // need to call callbacks without a lock\n if (push_take_picture_error_cb != null) {\n push_take_picture_error_cb.onError();\n }\n }", "@Override\n public void run() {\n Mat frame = grabFrame();\n // convert and show the frame\n Image imageToShow = FXDIPUtils.mat2Image(frame);\n updateImageView(getCurrentFrame(), imageToShow);\n }", "public void moveDelay ( )\r\n\t{\r\n\t\ttry {\r\n\t\t\tThread.sleep( 1000 );\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void finishCapturing() {\n //YOUR CODE HERE\n\t pieceCaptured = false;\n\t \n }", "public void takePictureInternal() {\n if (!this.isPictureCaptureInProgress.getAndSet(true)) {\n this.mCamera.takePicture(null, null, null, new Camera.PictureCallback() {\n /* class com.master.cameralibrary.Camera1.AnonymousClass3 */\n\n public void onPictureTaken(byte[] bArr, Camera camera) {\n Camera1.this.isPictureCaptureInProgress.set(false);\n Camera1.this.mCallback.onPictureTaken(bArr);\n camera.cancelAutoFocus();\n camera.startPreview();\n }\n });\n }\n }", "@Test\n\tprivate void takeScreenshot() throws IOException {\n\t\tFile screenshot = ((TakesScreenshot) this.driver).getScreenshotAs(OutputType.FILE);\n\t\tString fileName = this.getTimestamp() + \".png\";\n\t\tFileUtils.copyFile(screenshot, new File(fileName));\n\n\t}", "public void run() {\n\t\t\n sleep(1000);\n recordLocation();\n //writeImage(k);\n\n while (!Thread.currentThread().isInterrupted()) {\n\t\t \t\t if(recordImage){\n\t\t\t\t \t\t//Record INS Readings and create image\n\t\t\t\t \t\tsetWaypoint(); \n\t\t\t\t \t\t//wipe(); \n \t\t \t\trecordSensors();\n\t\t\t\t\t\t\trecordSensors2();\n\t\t\t\t\t\t\trecordVictims();\n\t\t\t\t\t\t\trecordWaypoints();\n \t\t \t\twriteImage();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n sleep(1000);\n }\n }", "public static void getScreenShot(String description, WebDriver driver, long milliseconds) throws IOException {\n\t\t DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd, HH.mm.ss\");\n\t\t File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\t String outputFile = Common.outputFileDir + description + \" (\" + dateFormat.format(milliseconds) + \").png\";\n\t\t fileWriterPrinter(outputFile);\n\t\t FileUtils.copyFile(scrFile, new File(outputFile));\n\t\t }", "protected void pause() {\n sleep(300);\n }", "@Override\n\tpublic void draw() {\n\t\tdouble t = System.currentTimeMillis();\n\t\tdouble dt = t - currentTime;\n\t\tcurrentTime = t;\n\n\t\t// Fetch current animation\n\t\tBaseAnimation animation = AnimationManager.getInstance().getCurrentAnimation();\n\t\tif (animation == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Draw animation frame with delta time\n\t\tanimation.draw(dt);\n\n\t\t// Send image to driver\n\t\tdriver.displayImage(animation.getImage());\n\n\t\t// Display previews\n\t\tbackground(0);\n\t\tif (ledPreviewEnabled) {\n\t\t\timage(preview.renderPreview(animation.getImage()), 0, 0);\n\t\t} else {\n\t\t\ttextAlign(CENTER);\n\t\t\ttextSize(16);\n\t\t\ttext(\"Press W to preview the animation.\", previewRect.width/2, previewRect.height/2);\n\t\t}\n\t\t\n\t\tif (sourcePreviewEnabled && BaseCanvasAnimation.class.isAssignableFrom(animation.getClass())) {\n\t\t\timage(((BaseCanvasAnimation) animation).getCanvasImage(), 0, 0);\n\t\t} else if (sourcePreviewEnabled) {\n\n\t\t\t// Copy animation image (else the animation image gets resized)\n\t\t\t// and scale it for better visibility\n\t\t\tPImage sourcePreview = animation.getImage().get();\n\t\t\tsourcePreview.resize(130, 405);\n\n\t\t\timage(sourcePreview, 0, 0);\n\t\t}\n\n\t}", "public static void main(String[] args) throws Exception {\n String fileName = args[0];\n\n // transform the image file to an Image\n Image image = null;\n\n Frame observer = new Frame();\n\n try {\n MediaTracker tracker = new MediaTracker(observer);\n image = Toolkit.getDefaultToolkit().getImage(fileName);\n tracker.addImage(image, 1);\n try {\n tracker.waitForID(1);\n } catch (InterruptedException e) {\n }\n } catch (Exception e) {\n System.out.println(\"some problem getting the image\");\n System.exit(0);\n }\n\n // get the actual size of the image:\n int actualWidth, actualHeight;\n actualWidth = image.getWidth(observer);\n actualHeight = image.getHeight(observer);\n\n System.out.println(\"found actual size of \"\n + actualHeight + \" by \" + actualWidth);\n\n // obtain the image data \n int[] pixels = new int[actualWidth * actualHeight];\n try {\n PixelGrabber pg = new PixelGrabber(image, 0, 0, actualWidth,\n actualHeight, pixels, 0, actualWidth);\n pg.grabPixels();\n if ((pg.status() & ImageObserver.ABORT) != 0) {\n System.out.println(\"error while grabbing pixels\");\n System.exit(0);\n }\n } catch (InterruptedException e) {\n System.out.println(\"pixel grabbing was interrupted\");\n System.exit(0);\n }\n\n // pull each int apart to obtain the individual pieces\n // and write them to the output file\n // prepare the output file\n String outFileName\n = fileName.substring(0, fileName.indexOf('.')) + \".raw\";;\n\n System.out.println(\n \"about to work on output file named: [\" + outFileName + \"]\");\n\n PrintWriter outFile = new PrintWriter(new File(outFileName));\n\n int alpha, red, green, blue, pixel;\n int k;\n\n outFile.println(actualWidth + \" \" + actualHeight);\n\n for (k = 0; k < actualWidth * actualHeight; k++) {\n pixel = pixels[k];\n alpha = (pixel >> 24) & 0xff;\n red = (pixel >> 16) & 0xff;\n green = (pixel >> 8) & 0xff;\n blue = (pixel) & 0xff;\n\n outFile.println(red + \" \" + green + \" \" + blue + \" \" + alpha);\n\n }\n\n outFile.close();\n\n }", "public static void main(String[] args) {\n\n\t\tOpenIMAJGrabber grabber = new OpenIMAJGrabber();\n\n\t\tDevice device = null;\n\t\tPointer<DeviceList> devices = grabber.getVideoDevices();\n\t\tfor (Device d : devices.get().asArrayList()) {\n\t\t\tdevice = d;\n\t\t\tbreak;\n\t\t}\n\n\t\tboolean started = grabber.startSession(320, 240, 30, Pointer.pointerTo(device));\n\t\tif (!started) {\n\t\t\tthrow new RuntimeException(\"Not able to start native grabber!\");\n\t\t}\n\n\t\tlong t1 = System.currentTimeMillis();\n\n\t\tint n = 1000;\n\t\tint i = 0;\n\t\tdo {\n\t\t\tgrabber.nextFrame();\n\t\t\tgrabber.getImage().getBytes(320 * 240 * 3); // byte[]\n\t\t} while (++i < n);\n\n\t\tlong t2 = System.currentTimeMillis();\n\n\t\tSystem.out.println(\"Capturing time: \" + (t2 - t1));\n\n\t\tgrabber.stopSession();\n\t}", "@Override\r\n\tpublic void onTestSuccess(ITestResult tr) {\n\t\tLog.info(tr.getName() + \"---Test method passed---\\n\");\r\n \ttry {\r\n\t\t\ttakeScreenShot(tr);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void sleep() {\n\t\t\n\t}", "void startCapturing() {\n //YOUR CODE HERE\n\t if (hasCaptured() == false) {\n\t\t pieceCaptured = true;\n\t }\n }", "private void manuallyPushImageToImageReader(){\n mImageReader = VNCUtility.createImageReader(this);\n mImageReader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() {\n @Override\n public void onImageAvailable(ImageReader reader) {\n Log.d(TAG, \"NEW IMAGE AVAILABLE\");\n\n DisplayMetrics metrics = getResources().getDisplayMetrics();\n\n\n Image image = reader.acquireLatestImage();\n VNCUtility.printReaderFormat(image.getFormat());\n Log.d(TAG, \"IMAGE FORMAT: \" + image.getFormat());\n final Image.Plane[] planes = image.getPlanes();\n final ByteBuffer buffer = planes[0].getBuffer();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * mWidth;\n int w = mWidth + rowPadding / pixelStride;\n Bitmap bmp = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.RGB_565);\n bmp.copyPixelsFromBuffer(buffer);\n mBmp = bmp;\n\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //saveScreen(mBmp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n });\n t.start();\n\n image.close();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mImageView.setImageBitmap(mBmp);\n }\n });\n\n\n /*\n Image img = reader.acquireLatestImage();\n Image.Plane[] planes = img.getPlanes();\n int width = img.getWidth();\n int height = img.getHeight();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * width;\n ByteBuffer buffer = planes[0].getBuffer();\n byte[] data = new byte[buffer.capacity()];\n buffer.get(data);\n\n for(int i = 10000; i < 100; i++){\n Log.d(TAG, getColourForInt(data[i]));\n }\n\n int offset = 0;\n Bitmap bitmap = Bitmap.createBitmap(metrics, width, height, Bitmap.Config.ARGB_8888);\n for (int i = 0; i < height; ++i) {\n for (int j = 0; j < width; ++j) {\n int pixel = 0;\n pixel |= (buffer.get(offset) & 0xff) << 16; // R\n pixel |= (buffer.get(offset + 1) & 0xff) << 8; // G\n pixel |= (buffer.get(offset + 2) & 0xff); // B\n pixel |= (buffer.get(offset + 3) & 0xff) << 24; // A\n bitmap.setPixel(j, i, pixel);\n offset += pixelStride;\n }\n offset += rowPadding;\n }\n mBmp = bitmap;\n img.close();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mImageView.setImageBitmap(mBmp);\n }\n });\n */\n }\n }, null);\n Surface surface = mImageReader.getSurface();\n if(surface == null){\n Log.d(TAG, \"SURFACE IS NULL\");\n }\n else{\n Log.d(TAG, \"SURFACE IS NOT NULL\");\n Canvas canvas = surface.lockCanvas(null);\n\n int[] ints = new int[mWidth * mHeight];\n for (int i = 0; i < mWidth * mHeight; i++) {\n ints[i] = Color.MAGENTA;//0x00FF0000;\n }\n\n //final Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, ints.length);\n Bitmap bitmap = Bitmap.createBitmap(ints, mWidth, mHeight, Bitmap.Config.RGB_565);\n //canvas.drawARGB(255, 255, 0, 255);\n canvas.drawBitmap(bitmap,0,0,null);\n surface.unlockCanvasAndPost(canvas);\n }\n }", "@Override\n public void onClick(View v) {\n Cam.takePicture(shutterCallback, null, mPicture);\n// Cam.takePicture();\n }", "private void stepTiming() {\n\t\tdouble currTime = System.currentTimeMillis();\n\t\tstepCounter++;\n\t\t// if it's been a second, compute frames-per-second\n\t\tif (currTime - lastStepTime > 1000.0) {\n\t\t\tdouble fps = (double) stepCounter * 1000.0\n\t\t\t\t\t/ (currTime - lastStepTime);\n\t\t\t// System.err.println(\"FPS: \" + fps);\n\t\t\tstepCounter = 0;\n\t\t\tlastStepTime = currTime;\n\t\t}\n\t}", "void onCaptureEnd();", "@FXML\r\n protected void startCamera(Event event)\r\n {\n if (this.rootElement != null)\r\n {\r\n // get the ImageView object for showing the video stream\r\n final ImageView frameView = currentFrame;\r\n final BorderPane root = (BorderPane) this.rootElement;\r\n // check if the capture stream is opened\r\n if (!this.capture.isOpened())\r\n {\r\n \t\tSystem.out.println(\"Starting Camera ...\");\r\n // start the video capture\r\n this.capture.open(0);\r\n // grab a frame every 33 ms (30 frames/sec)\r\n TimerTask frameGrabber = new TimerTask() {\r\n @Override\r\n public void run()\r\n {\r\n javafx.scene.image.Image tmp = grabFrame();\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n frameView.setImage(tmp);\r\n }\r\n });\r\n\r\n }\r\n };\r\n this.timer = new Timer();\r\n //set the timer scheduling, this allow you to perform frameGrabber every 33ms;\r\n this.timer.schedule(frameGrabber, 0, 33);\r\n this.start_btn.setText(\"Stop Camera\");\r\n }\r\n else\r\n {\r\n this.start_btn.setText(\"Start Camera\");\r\n // stop the timer\r\n if (this.timer != null)\r\n {\r\n this.timer.cancel();\r\n this.timer = null;\r\n }\r\n // release the camera\r\n this.capture.release();\r\n // clear the image container\r\n frameView.setImage(null);\r\n }\r\n }\r\n }", "private void handleImage(byte[] b) throws IOException {\n Log.i(\"ScrencapHandler\",\"handleImage\");\n long utime = System.currentTimeMillis();\n byte[] unixTime = toByteArray(utime);\n int start = b.length - unixTime.length - 1; //-1 for the seqnum\n for (int i = 0; i < unixTime.length; i++) {\n b[start + i] = unixTime[i];\n }\n\n if (jitterControl.channelIsFree()) {\n int seq = jitterControl.sendt(utime, b.length);\n\n // Add seq number.\n b[b.length - 1] = (byte) seq;\n\n // Send out the data to the network.\n Log.i(\"ScrencapHandler\",\"Send out the data to the network\");\n mWebkeyVisitor.send(b);\n }\n }", "@After\t\n public void takeScreenShot() {\n File scrFile = ((TakesScreenshot)getDriver()).getScreenshotAs(OutputType.FILE);\n // now save the screenshot to a file some place\n try {\n\t\t\tFileUtils.copyFile(scrFile, new File(\"c:\\\\tmp\\\\TC_EditAppAddNewApiSTTC.png\"));\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n }", "void sleep()\r\n\t{\r\n\t\t\r\n\t}", "public void updateCam()\r\n {\n \ttry{\r\n \tSystem.out.println();\r\n \tNIVision.IMAQdxGrab(curCam, frame, 1);\r\n \tif(curCam == camCenter){\r\n \t\tNIVision.imaqDrawLineOnImage(frame, frame, NIVision.DrawMode.DRAW_VALUE, new Point(320, 0), new Point(320, 480), 120);\r\n \t}\r\n server.setImage(frame);}\n \tcatch(Exception e){}\r\n }", "private void dormirSensor() {\n\ttry {\n\t Thread.sleep(sens.getFrec_lect()\n\t\t * IrrisoftConstantes.DELAY_FREC_LECT);\n\t} catch (InterruptedException e) {\n\t if (logger.isErrorEnabled()) {\n\t\tlogger.error(\"Hilo interrumpido: \" + e.getMessage());\n\t }\n\t}\n }", "public void capture()\r\n\t{ \r\n\t VideoCapture camera = new VideoCapture();\r\n\t \r\n\t camera.set(12, -20); // change contrast, might not be necessary\r\n\t \r\n\t //CaptureImage image = new CaptureImage();\r\n\t \r\n\t \r\n\t \r\n\t camera.open(0); //Useless\r\n\t if(!camera.isOpened())\r\n\t {\r\n\t System.out.println(\"Camera Error\");\r\n\t \r\n\t // Determine whether to use System.exit(0) or return\r\n\t \r\n\t }\r\n\t else\r\n\t {\r\n\t System.out.println(\"Camera OK\");\r\n\t }\r\n\t\t\r\n\t\t \r\n\t\tboolean success = camera.read(capturedFrame);\r\n\t\tif (success)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tprocessWithContours(capturedFrame, processedFrame);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t //image.processFrame(capturedFrame, processedFrame);\r\n\t\t // processedFrame should be CV_8UC3\r\n\t\t \r\n\t\t //image.findCaptured(processedFrame);\r\n\t\t \r\n\t\t //image.determineKings(capturedFrame);\r\n\t\t \r\n\t\t int bufferSize = processedFrame.channels() * processedFrame.cols() * processedFrame.rows();\r\n\t\t byte[] b = new byte[bufferSize];\r\n\t\t \r\n\t\t processedFrame.get(0,0,b); // get all the pixels\r\n\t\t // This might need to be BufferedImage.TYPE_INT_ARGB\r\n\t\t img = new BufferedImage(processedFrame.cols(), processedFrame.rows(), BufferedImage.TYPE_INT_RGB);\r\n\t\t int width = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);\r\n\t\t int height = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT);\r\n\t\t //img.getRaster().setDataElements(0, 0, width, height, b);\r\n\t\t byte[] a = new byte[bufferSize];\r\n\t\t System.arraycopy(b, 0, a, 0, bufferSize);\r\n\r\n\t\t Highgui.imwrite(\"camera.jpg\",processedFrame);\r\n\t\t System.out.println(\"Success\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unable to capture image\");\r\n\t\t\r\n\t camera.release();\r\n\t}", "private void getSampleImage() {\n\t\t_helpingImgPath = \"Media\\\\\"+_camType.toString()+_downStream.toString()+_camProfile.toString()+\".bmp\";\n//\t\tswitch( _downStream ){\n//\t\tcase DownstreamPage.LEVER_NO_DOWNSTREAM:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.LEVER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_OUTER_CAM:\n//\t\t\t\tbreak;\t\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_CRANK:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_FOUR_JOIN:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_PUSHER_TUGS:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_CRANK:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.SLIDER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_OUTER_CAM:\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_DOUBLE_SLIDE:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_NO_DOWNSTREAM:\n//\t\t\tbreak;\n//\t\t}\n\t\t\n\t}", "public void setDelay(double clock);", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tanimDraw.stop();\n\t\t\t\t\tanimDraw2.stop();\n\t\t\t\t\thandler.sendMessage(handler.obtainMessage());\n\t\t\t\t}", "@Override\n public void run() {\n if (MyDebug.LOG) {\n Log.d(TAG, \"take next continuous burst\");\n Log.d(TAG, \"continuous_burst_in_progress: \" + continuous_burst_in_progress);\n Log.d(TAG, \"n_burst: \" + n_burst);\n }\n if (n_burst >= 10 || n_burst_raw >= 10) {\n // Nokia 8 in std mode without post-processing options doesn't hit this limit (we only hit this\n // if it's set to \"n_burst >= 5\")\n if (MyDebug.LOG) {\n Log.d(TAG, \"...but wait for continuous burst, as waiting for too many photos\");\n }\n //throw new RuntimeException(); // test\n handler.postDelayed(this, continuous_burst_rate_ms);\n } else if (picture_cb.imageQueueWouldBlock(n_burst_raw, n_burst + 1)) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"...but wait for continuous burst, as image queue would block\");\n }\n //throw new RuntimeException(); // test\n handler.postDelayed(this, continuous_burst_rate_ms);\n } else {\n takePictureBurst(true);\n }\n }", "void threadDelay() {\n saveState();\n if (pauseSimulator) {\n halt();\n }\n try {\n Thread.sleep(Algorithm_Simulator.timeGap);\n\n } catch (InterruptedException ex) {\n Logger.getLogger(RunBFS.class.getName()).log(Level.SEVERE, null, ex);\n }\n if (pauseSimulator) {\n halt();\n }\n }", "@Async\n public void startRecording(String imageUrl) {\n recording = true;\n URL url = null;\n try {\n url = new URL(imageUrl);\n String fileName = url.getFile();\n String destName = \"./\" + fileName.substring(fileName.lastIndexOf(\"/\"));\n System.out.println(destName);\n\n InputStream is = url.openStream();\n OutputStream os = new FileOutputStream(String\n .format(\"%s/%s-capture.mjpg\", videoOutputDirectory, getTimestamp()));\n\n byte[] b = new byte[2048];\n int length;\n\n while (recording && (length = is.read(b)) != -1) {\n os.write(b, 0, length);\n }\n\n is.close();\n os.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void flash(){\n //stop movement\n tState.stop();\n tMovement.stop();\n\n //store final image\n BufferedImage finalState = display; \n\n //update position for \"flash\" animation\n int xFin = x - 9;\n int yFin = y - 9; \n\n tEnd = new Timer(40,new ActionListener(){\n\n private int i = 0;\n\n @Override\n public void actionPerformed(ActionEvent e){\n x = xFin;\n y = yFin;\n \n BufferedImage b = new BufferedImage(50,50,BufferedImage.TYPE_INT_ARGB);\n Graphics g = b.getGraphics();\n if (i < 10){ \n BufferedImage img = flash[i];\n g.drawImage(img,25-img.getWidth()/2,25-img.getHeight()/2,null); \n g.drawImage(finalState,9,9,null);\n } else if (i == 20){\n tEnd.stop();\n caught = true;\n System.out.println(\"You caught \"+pok.getName().toUpperCase()+\"!\");\n } else {\n BufferedImage img = flash[19-i];\n g.drawImage(img,25-img.getWidth()/2,25-img.getHeight()/2,null); \n }\n g.dispose(); \n display = b;\n i++;\n } \n });\n tEnd.start();\n }", "private void takePhotosGoogleV3_2() throws Exception \n {\n UiObject tutorialText = new UiObject(new UiSelector().resourceId(\"com.android.camera2:id/photoVideoSwipeTutorialText\"));\n if (tutorialText.waitForExists(TimeUnit.SECONDS.toMillis(5))) {\n tutorialText.swipeLeft(5);\n sleep(sleepTime);\n tutorialText.swipeRight(5);\n }\n \n // ensure we are in photo mode\n UiObject viewFinder = new UiObject(new UiSelector().resourceId(\"com.android.camera2:id/viewfinder_frame\"));\n viewFinder.swipeRight(5);\n\n // click to capture photos\n UiObject clickCaptureButton = new UiObject(new UiSelector().resourceId(\"com.android.camera2:id/photo_video_button\"));\n\n for (int i = 0; i < iterations; i++) {\n clickCaptureButton.longClick();\n sleep(timeDurationBetweenEachCapture);\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tanimDraw.stop();\n\t\t\t\t\tanimDraw2.stop();\t\t\t\t\n\t\t\t\t\thandler3.sendMessage(handler3.obtainMessage());\n\t\t\t\t}", "public void warte( int ms )\n {\n try\n {\n Thread.sleep( ms );\n }\n catch ( InterruptedException e )\n {\n e.printStackTrace();\n }\n }", "public Animation(BufferedImage[] images, long millisPerFrame){\n\t\tthis.images=images;\n\t\tthis.millisPerFrame = millisPerFrame;\n\t\tlooping=true;\n\t\tstart();\n\t}" ]
[ "0.64140785", "0.6197837", "0.6193297", "0.61161023", "0.60844994", "0.6074579", "0.6073427", "0.60660625", "0.6041248", "0.599168", "0.5959763", "0.5944422", "0.5936576", "0.5910029", "0.5884695", "0.5879475", "0.58762765", "0.5871342", "0.5846931", "0.5839095", "0.5826431", "0.5820306", "0.5811738", "0.5787208", "0.57736313", "0.57699794", "0.5731335", "0.57142293", "0.5705777", "0.5695719", "0.5691147", "0.56734747", "0.56716204", "0.5665537", "0.5660737", "0.5654056", "0.56496614", "0.56258035", "0.5620485", "0.56015503", "0.5589317", "0.5572498", "0.55716765", "0.55708873", "0.556496", "0.5561322", "0.5547192", "0.5545114", "0.5543237", "0.55151945", "0.5510359", "0.5502586", "0.5498654", "0.54963064", "0.54952496", "0.5488475", "0.5467079", "0.5460165", "0.5457825", "0.5436674", "0.5433609", "0.54264325", "0.5419779", "0.54097456", "0.5408323", "0.5405068", "0.5402779", "0.5402569", "0.5390911", "0.5383774", "0.538313", "0.5380551", "0.53772515", "0.53746945", "0.5364838", "0.53620154", "0.53417826", "0.5339808", "0.5319707", "0.53125894", "0.5309452", "0.5301794", "0.5301366", "0.5296997", "0.5296964", "0.52958155", "0.52935416", "0.5292356", "0.5288756", "0.5288646", "0.5286638", "0.5285082", "0.5284118", "0.5282565", "0.5281615", "0.5281583", "0.52749753", "0.52735955", "0.5269727", "0.52687865" ]
0.61885333
3
Simulate the delay in calibration
public void calibrate() { buttonListener.displayMessage("Calibrating", 1); try { TimeUnit.SECONDS.sleep(2); } catch (Exception e){ System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDelay(double clock);", "public void delay(){\n try {\n Thread.sleep((long) ((samplingTime * simulationSpeed.factor)* 1000));\n } catch (InterruptedException e) {\n started = false;\n }\n }", "private void emulateDelay() {\n try {\n Thread.sleep(700);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private void changeDelay() {\n delay = ((int) (Math.random() * 10000) + 1000) / MAX_FRAMES;\n }", "public native void setDelay(int delay) throws MagickException;", "private void delay() {\n\t\tDelay.msDelay(1000);\n\t}", "public double getDelay();", "private void simulateDelay(long millis) {\n try {\n Thread.sleep(millis);\n } catch (InterruptedException ignored) {\n }\n }", "public void run() {\n SystemClock.sleep(10000);\n\n attenuation = 0f;\n }", "public void testPeriodic()\n\t{\n\t\tif (oi.getGunS() > 0.5)\t{\n\t\t\tdrive.TimerMove(0.3, 0.75);\n\t\t\tdrive.TimerMove(-0.3, 0.75);\n\t\t}\n\t\tlong milis = (long)(1.5 * 1000);\n \tlong time = System.currentTimeMillis();\n \twhile (System.currentTimeMillis() < time + milis)\n \t\tconveyor.setConveyor(1);\n\t\ttime = System.currentTimeMillis();\n\t\twhile (System.currentTimeMillis() < time + milis)\n\t\t\tconveyor.setConveyor(-1);\n\t\tconveyor.setConveyor(0);\n\t\ttime = System.currentTimeMillis();\n\t\twhile (System.currentTimeMillis() < time + milis)\n\t\t\tconveyor.setPlate(false);\n\t\ttime = System.currentTimeMillis();\n\t\twhile (System.currentTimeMillis() < time + milis)\n\t\t\tconveyor.setPlate(true);\n\t\telRaise.elCycle();\n\t\tLiveWindow.run();\n\t}", "@Override\n public void run() {\n hdt.gyroTurn180Fast(1500);\n hdt.gyroTurn180(1100);\n //sleep(1300);\n }", "public void setDelay(long d){delay = d;}", "void startCalibration();", "void delayForDesiredFPS(){\n delayMs=(int)Math.round(desiredPeriodMs-(float)getLastDtNs()/1000000);\n if(delayMs<0) delayMs=1;\n try {Thread.currentThread().sleep(delayMs);} catch (java.lang.InterruptedException e) {}\n }", "private void dormirSensor() {\n\ttry {\n\t Thread.sleep(sens.getFrec_lect()\n\t\t * IrrisoftConstantes.DELAY_FREC_LECT);\n\t} catch (InterruptedException e) {\n\t if (logger.isErrorEnabled()) {\n\t\tlogger.error(\"Hilo interrumpido: \" + e.getMessage());\n\t }\n\t}\n }", "public void autonomous() {\n robot.drive(0.5); //Drives in a square\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n }", "private void delay() {\n\ttry {\n\t\tThread.sleep(500);\n\t} catch (InterruptedException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\t\n\t}", "public void moveDelay ( )\r\n\t{\r\n\t\ttry {\r\n\t\t\tThread.sleep( 1000 );\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public native void setAutoDelay(int ms);", "void threadDelay() {\n saveState();\n if (pauseSimulator) {\n halt();\n }\n try {\n Thread.sleep(Algorithm_Simulator.timeGap);\n\n } catch (InterruptedException ex) {\n Logger.getLogger(RunBFS.class.getName()).log(Level.SEVERE, null, ex);\n }\n if (pauseSimulator) {\n halt();\n }\n }", "public static void main(String[] args) {\n double time=100000;\n lambda=0.012;\n m0=40;\n m1=43;\n m2=85;\n t1=32;\n p1=0.35;\n t2=40;\n p2=0.4;\n t3=65;\n p3=0.25;\n K=10;\n p01=0.8;\n p02=0.2;\n pout=0.5;\n p31=0.3;\n p32=0.2;\n \n simulate(time);\n }", "public void setDelay(BigDecimal delay) {\r\n this.delay = delay;\r\n }", "public void autoMode1Red(int delay){\n \taddParallel(new LightCommand(0.5));\n//\t\taddSequential(new OpenGearSocketCommand());\n//\t\taddSequential(new OpenBoilerSocketCommand());\n \taddParallel(new EnvelopeCommand(true));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(.7, 7));\n \taddSequential(new WaitCommand(2));\n// \tif(Robot.envelopeSubsystem.gearCheck()){\n// \t\taddParallel(new EnvelopeCommand(false));\n// \t\taddSequential(new AutoDriveUltraSonicBackwardCommand(-.7, 35));\n// \t\taddSequential(new VisionGearTargetCommand(\"targets\"));\n// \t\taddSequential(new TargetGearSortCommand());\n// \t\taddSequential(new AutoTurnCommand());\n// \t\taddParallel(new EnvelopeCommand(true));\n// \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n// \t\taddSequential(new WaitCommand(2));\n// \t}\n \taddParallel(new EnvelopeCommand(false));\n \taddSequential(new AutoDriveUltraSonicBackwardCommand(-.7, 50));\n \taddSequential(new TurnWithPIDCommand(-100));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(1, 45));\n \taddSequential(new VisionBoilerTargetCommand(\"targets\"));\n\t\taddSequential(new TargetBoilerSortCommand());\n\t\taddSequential(new AutoTurnCommand());\n \taddSequential(new ShootCommand(true,0.85));\n \t\n }", "public void loop(){\n\n test1.setPower(1);\n test1.setTargetPosition(150);\n\n\n }", "public static void simulate (\r\n double maxtime,\r\n double arrival_rate,\r\n double service_rate0,\r\n double service_rate1,\r\n double service_rate2, \r\n double service_rate3_1,\r\n double service_rate3_2,\r\n double service_rate3_3,\r\n double p1,double p2,double p3,int k, double p01, double p02, double p3out, double p31, double p32)\r\n {\n StateB sysB = new StateB();\r\n \r\n double time= 0;\r\n double value2= ExpB.getExp(arrival_rate);\r\n\r\n EventB e1 = new EventB(time+value2,\"Birth\",\"Null\");\r\n EventB e2= new EventB(time+value2,\"Moniter\",\"Null\");\r\n Schedule.add(e1);\r\n Schedule.add(e2);\r\n \r\n while(time < maxtime){\r\n EventB next = Schedule.remove();\r\n time= next.time;\r\n next.function(maxtime,arrival_rate,service_rate0,service_rate1,service_rate2, service_rate3_1,\r\n service_rate3_2,service_rate3_3,p1,p2,p3,k,p01,p02,p3out,p31,p32,sysB);\r\n \r\n \r\n \r\n\r\n }\r\n // System.out.println(Double.toString(sysB.t_busy_time0) );\r\n // System.out.println(Double.toString(sysB.t_busy_time1) );\r\n // System.out.println(Double.toString(sysB.Qlength0) );\r\n // System.out.println(Double.toString(sysB.Qlength1) );\r\n // System.out.println(Double.toString(sysB.monitering_event) );\r\n // System.out.println(Double.toString(sysB.num_drop) );\r\n // System.out.println(Double.toString(sysB.completed_request) );\r\n // System.out.println(Double.toString(sysB.t_response_time) );\r\n\r\n System.out.println();\r\n double util0 = sysB.t_busy_time0 / maxtime;\r\n System.out.println(\"S0 UTIL:\"+ \" \" + Double.toString(util0) );\r\n double qlen0 = sysB.Qlength0/ sysB.monitering_event;\r\n System.out.println(\"S0 QLEN:\"+\" \"+ Double.toString(qlen0) );\r\n double Tresp0 = sysB.t_response_time0/sysB.completed_request0;\r\n System.out.println(\"S0 TRESP:\" + \" \"+ Double.toString(Tresp0) );\r\n \r\n System.out.println();\r\n \r\n double util11 = sysB.t_busy_time11/ maxtime;\r\n System.out.println(\"S1,1 UTIL:\"+ \" \" + Double.toString(util11) );\r\n double util12 = sysB.t_busy_time12/ maxtime;\r\n System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n double qlen11 = sysB.Qlength1/ sysB.monitering_event;\r\n System.out.println(\"S1 QLEN:\"+\" \"+ Double.toString(qlen11) );\r\n double Tresp11 = sysB.t_response_time1/ sysB.completed_request1;\r\n System.out.println(\"S1 TRESP:\" + \" \"+ Double.toString(Tresp11) );\r\n \r\n \r\n // System.out.println();\r\n // double util12 = sysB.t_busy_time12/ maxtime;\r\n // System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n // double qlen12 = sysB.Qlength1/ sysB.monitering_event;\r\n // System.out.println(\"S1,2 QLEN:\"+\" \"+ Double.toString(qlen12) );\r\n // double Tresp12 = sysB.t_response_time12/sysB.completed_request12;\r\n // System.out.println(\"S1,2 TRESP:\" + \" \"+ Double.toString(Tresp12) );\r\n\r\n System.out.println();\r\n double util2 = sysB.t_busy_time2/ maxtime;\r\n System.out.println(\"S2 UTIL:\"+ \" \" + Double.toString(util2) );\r\n double qlen2 = sysB.Qlength2/ sysB.monitering_event;\r\n System.out.println(\"S2 QLEN:\"+\" \"+ Double.toString(qlen2) );\r\n double Tresp2 = sysB.t_response_time2/sysB.completed_request2;\r\n System.out.println(\"S2 TRESP:\" + \" \"+ Double.toString(Tresp2) );\r\n System.out.println(\"S2 DROPPED:\" + \" \"+ Integer.toString(sysB.num_drop));\r\n\r\n System.out.println();\r\n double util3 = sysB.t_busy_time3/ maxtime;\r\n System.out.println(\"S3 UTIL:\"+ \" \" + Double.toString(util3) );\r\n double qlen3 = sysB.Qlength3/ sysB.monitering_event;\r\n System.out.println(\"S3 QLEN:\"+\" \"+ Double.toString(qlen3) );\r\n double Tresp3 = sysB.t_response_time3/sysB.completed_request3;\r\n System.out.println(\"S3 TRESP:\" + \" \"+ Double.toString(Tresp3) );\r\n\r\n \r\n\r\n System.out.println();\r\n\r\n double qtotal = (sysB.Qlength0 + sysB.Qlength1 + sysB.Qlength2+sysB.Qlength3) / sysB.monitering_event;\r\n System.out.println(\"QTOT:\"+\" \"+ Double.toString(qtotal) );\r\n // double Totalresp= sysB.t_response_time0 + sysB.t_response_time2 +sysB.t_response_time11 +sysB.t_response_time12 + sysB.t_response_time3;\r\n \r\n double total = sysB.t_response_timefinal/sysB.completed_system;\r\n \r\n System.out.println(\"TRESP:\"+ \" \" + Double.toString(total));\r\n // System.out.println(sysB.Qlength1);\r\n // System.out.println(sysB.Qlength2);\r\n // System.out.println(sysB.Qlength3);\r\n // System.out.println(sysB.Qlength0);\r\n \r\n // System.out.println(\"TRESP:\"+ \" \" + Double.toString(TTRESP));\r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n public void testPeriodic()\n {\n // test is currently built to debug cargo arm placements\n // press 'A' on the second controller to output the encoder's position\n // and whatever angle it thinks we're at\n // press 'Select' on p2 to re-zero the cargo arm\n \n // cargoArm.armUp();\n \n if(driver2.pressed(driver2.A))\n {\n System.out.println(\"Cargo arm is at encoder value: \" + cargoArm.encCargoArm.position());\n System.out.println(\"Which is \" + (cargoArm.encCargoArm.angle() + cargoArm.ZERO_ANGLE) + \" degrees.\");\n \n System.out.println(\"Hatch finger is at encoder value: \" + hatchArm.fingerEncValue());\n }\n if(driver2.pressed(driver2.Select))\n {\n cargoArm.zeroEncoder();\n System.out.println(\"Cargo arm zeroed.\");\n\n hatchArm.zero();\n System.out.println(\"Hatch finger zeroed.\");\n\n hatchArm.finger_target = 0;\n hatchArm.finger_moving = false;\n hatchArm.dirMoving = 0;\n }\n \n // if(driver2.pressed(driver2.B))\n // {\n // cargoArm.armPositionTarget = testGoalAngle * 56.9;\n // //double forceToApply = cargoArm.getArmCalculation();\n // System.out.println(\"To reach the goal of \" + testGoalAngle + \", the following force would be applied: \" + forceToApply);\n // }\n \n // adjust test goal angle to combine with the above to see, without moving, a cargo arm motor speed to apply\n if(driver2.dpad(driver2.Up))\n {\n testGoalAngle += 5;\n cargoArm.armPositionTarget = testGoalAngle * 56.9;\n System.out.println(\"Test goal angle incremented to \" + testGoalAngle);\n }\n if(driver2.dpad(driver2.Down))\n {\n testGoalAngle -= 5;\n \n cargoArm.armPositionTarget = testGoalAngle * 56.9;\n System.out.println(\"Test goal angle decremented to \" + testGoalAngle);\n }\n \n // // adjust gravitational constant for on-the-go tweak testing\n // // if you don't know what you're doing, do not try to do this!\n // if(driver2.pressed(driver2.R1))\n // {\n // cargoArm.GRAV_CONSTANT += 0.02;\n // System.out.println(\"Gravitational constant incremented to \" + cargoArm.GRAV_CONSTANT);\n // }\n // if(driver2.pressed(driver2.L1))\n // {\n // cargoArm.GRAV_CONSTANT -= 0.02;\n // System.out.println(\"Gravitational constant decremented to \" + cargoArm.GRAV_CONSTANT);\n // }\n // button 7: L2\n // button 8: R2\n // L2 will reverse the finger\n // R2 will rotate it forward\n if(driver2.down(driver2.L1))\n {\n hatchArm.rotateFinger(1);\n }\n else\n {\n if(driver2.down(driver2.L2))\n {\n hatchArm.rotateFinger(-1);\n }\n else\n {\n hatchArm.rotateFinger(0);\n }\n }\n hatchArm.periodic();\n\n if(driver2.pressed(driver2.B))\n {\n hatchArm.toggleFinger();\n }\n\n // test brake power\n if(driver2.pressed(driver2.Start))\n {\n cargoArm.toggleBrake();\n System.out.println(\"Bike brake toggled to: \" + cargoArm.solArmBrake.get());\n }\n\n // press 'x' to toggle whether or not arm should attempt to ONLY counterract the force of gravity\n // use this to check if the grav constant is correct. if it is, the arm should not fall\n if(driver2.pressed(driver2.X))\n {\n cargoArm.toggleArmLock();\n System.out.println(\"Arm lock toggled.\");\n if(cargoArm.armLockEnabled)\n {\n System.out.println(\"Arm should stay constant at given location.\");\n }\n }\n\n // if(driver2.down(driver2.L2) && driver2.pressed(driver2.R2))\n // {\n // movementInTest = !movementInTest;\n // if(movementInTest)\n // {\n // System.out.println(\"Movement in test has been enabled!\");\n // }\n // else\n // {\n // System.out.println(\"Movement in test has been disabled.\");\n // }\n // }\n if(driver2.pressed(driver2.R1))\n {\n System.out.println(\"Moving hatch finger to UP\");\n hatchArm.fingerUp();\n }\n if(driver2.pressed(driver2.R2))\n {\n System.out.println(\"Moving hatch finger to GRAB\");\n hatchArm.fingerGrab();\n }\n\n // if(movementInTest)\n // {\n // cargoArm.rotateArm(cargoArm.getArmCalculation());\n // }\n \n // // this is an attempt to read values from the DriverStation so we can edit constants without redeploying\n // // this may need tweaking b/c the resource that said this was possible was from 2013\n // if(driver2.pressed(driver2.Start))\n // {\n // System.out.println(\"Grabbing constants from Smart Dashboard...\");\n // cargoArm.GRAV_CONSTANT = prefs.getDouble(\"Grav_Constant\", 0.5);\n // // cargoArm.ENCODER_RATIO = prefs.getDouble(\"Cargo_Gear_Ratio\", 1);\n // cargoArm.armPositions[1] = prefs.getDouble(\"Cargo_Full_Down_Pos\", -6000);\n // }\n\n }", "protected void initialize() {\n Timer.delay(7);\n ballIntake.turnOnHorizontalConveyor();\n ballIntake.verticalConveyor.set(-.3);\n }", "public void setDelay(long delay) {\n this.delay = delay;\n }", "public abstract int delay();", "public void setDelay(int delay)\n {\n this.delay = delay;\n }", "public void setDroneDelay(int delay)\r\n {\r\n droneDelay=delay;\r\n }", "@Override\n public void periodic()\n {\n if(AutoIntake)\n intake(-0.2f, -0.5f);\n }", "void setCalibrationPeriod(double calibrationPeriod);", "@Override\n public native void delay(int ms);", "@Test\n public void testDelay() {\n long future = System.currentTimeMillis() + (rc.getRetryDelay() * 1000L);\n\n rc.delay();\n\n assertTrue(System.currentTimeMillis() >= future);\n }", "@Override\n\tpublic void testPeriodic() {\n\t\tif (testJoystick.getRawButton(3)) {\n\t\t\tsparkMotor1.set(1.0);\n\t\t\tsparkMotor0.set(1.0);\n\t\t\ttestTalon.set(1.0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, 1.0);\n\t\t}\n\t\telse if (testJoystick.getRawButton(2)) {\n\t\t\tsparkMotor0.set(-1.0);\n\t\t\tsparkMotor1.set(-1.0);\n\t\t\ttestTalon.set(-1.0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, -1.0);\n\t\t}\n\t\telse {\n//\t\t\tsparkMotor0.set(0);\n\t\t\tsparkMotor1.set(0);\n\t\t\ttestTalon.set(0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, 0);\n\t\t\t\n\t\t\ttestSel.set(Value.kForward);\n\t\t}\n\t\t\n\t\tif (testJoystick.getRawButton(7)) {\n\t\t\ttestSel.set(Value.kForward);\n\t\t\tSystem.out.println(compressor.getCompressorCurrent());\n\t\t}\n\t}", "void captureHold(float[] point, float seconds, int sequenceNumber);", "public void setDelay(int delay) {\n this.delay = delay;\n }", "public void autoMode1Blue(int delay){\n \taddParallel(new LightCommand(0.5));\n// \taddSequential(new OpenGearSocketCommand());\n//\t\taddSequential(new OpenBoilerSocketCommand());\n\t\taddParallel(new EnvelopeCommand(true));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n \taddSequential(new WaitCommand(2));\n// \tif(Robot.envelopeSubsystem.gearCheck()){\n// \t\taddParallel(new EnvelopeCommand(false));\n// \t\taddSequential(new AutoDriveUltraSonicBackwardCommand(-.7, 35));\n// \t\taddSequential(new VisionGearTargetCommand(\"targets\"));\n// \t\taddSequential(new TargetGearSortCommand());\n// \t\taddSequential(new AutoTurnCommand());\n// \t\taddParallel(new EnvelopeCommand(true));\n// \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n// \t\taddSequential(new WaitCommand(2));\n// \t}\n \taddParallel(new EnvelopeCommand(false));\n \taddSequential(new AutoDriveCommand(-1));\n \taddSequential(new TurnWithPIDCommand(100));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(1, 45));\n \taddSequential(new VisionBoilerTargetCommand(\"targets\"));\n\t\taddSequential(new TargetBoilerSortCommand());\n\t\taddSequential(new AutoTurnCommand());\n \taddSequential(new ShootCommand(true,.85));\n \t\n }", "public void init() {\n delayingTimer = new ElapsedTime();\n\n // Define and Initialize Motors and Servos: //\n tailMover = hwMap.dcMotor.get(\"tail_lift\");\n grabberServo = hwMap.servo.get(\"grabber_servo\");\n openGrabber();\n\n // Set Motor and Servo Directions: //\n tailMover.setDirection(DcMotorSimple.Direction.FORWARD);\n\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n tailMover.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n int prevEncoder = tailMover.getCurrentPosition();\n tailMover.setPower(-0.15);\n mainHW.opMode.sleep (300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n runtime.reset();\n while((Math.abs(prevEncoder - tailMover.getCurrentPosition()) > 10)&& (runtime.seconds()<3.0)){\n prevEncoder = tailMover.getCurrentPosition();\n mainHW.opMode.sleep(300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n }\n tailMover.setPower(0.0);\n // Set Motor and Servo Modes: //\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n tailMover.setTargetPosition(0);\n tailMover.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n closeGrabber();\n }", "public static void randomDelay() {\n\n Random random = new Random();\n int delay = 500 + random.nextInt(2000);\n try {\n sleep(delay);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\npublic void run() {\n\n while(true){\n \n driveSimulation();\n\n waitSleep(5);\n }\n \n}", "public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }", "public void commonPeriodic()\n {\n double d1LeftJoystick = driver1.getAxis(driver1.LAxisUD);\n double d1RightJoystick = driver1.getAxis(driver1.RAxisUD);\n\n double d2LeftJoystick = driver2.getAxis(driver2.LAxisUD);\n double d2RightJoystick = driver2.getAxis(driver2.RAxisUD);\n\n // -------------------- DRIVER 1\n\n driveTrain.drive(d1LeftJoystick * speedModifier, d1RightJoystick * speedModifier);\n\n // driver1 controls ramp\n // press start and select together to deploy\n if(driver1.down(driver1.Start) && driver1.down(driver1.Select))\n {\n ramp.deploy();\n hatchArm.fingerGrab();\n }\n else\n {\n ramp.undeploy();\n }\n\n // driver 1 can double speed by holding L2\n //driveTrain.fastSpeed = driver1.down(driver1.L2);\n if(driver1.pressed(driver1.A))\n {\n driveTrain.slowSpeed = !driveTrain.slowSpeed;\n System.out.println(\"Fast speed toggled to: \" + driveTrain.slowSpeed);\n }\n\n //drive straight\n if(driver1.down(driver1.L1))\n {\n driveTrain.set_right_motors(speedModifier);\n }\n if(driver1.down(driver1.R1))\n {\n driveTrain.set_left_motors(speedModifier);\n }\n\n // flip drive orientation\n if(driver1.pressed(driver1.Select))\n {\n driveTrain.flip_orientation();\n \n if(driveTrain.isFacingForward())\n {\n camServForward.setSource(camFront);\n //camServReverse.setSource(camBack);\n // camBack.free();\n // camFront.close();\n // camFront = CameraServer.getInstance().startAutomaticCapture(0);\n // camBack = CameraServer.getInstance().startAutomaticCapture(1);\n }\n else\n {\n camServForward.setSource(camBack);\n //camServReverse.setSource(camFront);\n // camBack.close();\n // camFront.close();\n // camFront = CameraServer.getInstance().startAutomaticCapture(1);\n // camBack = CameraServer.getInstance().startAutomaticCapture(0);\n }\n }\n\n\n // -------------------- DRIVER 2\n\n\n // up is out\n // down is in\n // (when it's negated)\n cargoArm.spinBallMotor(-1 * d2LeftJoystick * 0.9);\n\n // control hatch placement pistons\n if(driver2.pressed(driver2.A))\n {\n hatchArm.pushPistons();\n }\n else if (driver2.released(driver2.A))\n {\n hatchArm.retractPistons();\n }\n\n // open/close hatch grabber arms\n if(driver2.pressed(driver2.B))\n {\n hatchArm.toggleGrabber();\n }\n\n if(driver2.pressed(driver2.Select))\n {\n //cargoArm.toggleArmLock();\n hatchArm.toggleFinger();\n }\n\n // extend/de-extend cargo hand\n if(driver2.pressed(driver2.Start))\n {\n cargoArm.toggleHand();\n }\n\n // button 7: L2\n // button 8: R2\n // L2 will reverse the finger\n // R2 will rotate it forward\n if(driver2.down(driver2.L1))\n {\n hatchArm.rotateFinger(1);\n }\n else\n {\n if(driver2.down(driver2.L2))\n {\n hatchArm.rotateFinger(-1);\n }\n else\n {\n hatchArm.rotateFinger(0);\n }\n }\n\n \n // button 5: L1\n // button 6: R1\n // L1 will move the hatch arm one way\n // R1 will move it the other way\n if(driver2.down(driver2.R1))\n {\n hatchArm.rotateArm(-1 * speedModifier);// * 0.75);\n }\n else\n {\n if(driver2.down(driver2.R2))\n {\n hatchArm.rotateArm(1 * speedModifier);// * 0.75);\n }\n else\n {\n hatchArm.rotateArm(0);\n }\n }\n\n \n // button 1: x\n // button 4: y\n // button 1 will move the ball arm one way\n // button 4 will move it the other way\n if(driver2.down(driver2.X))\n {\n //cargoArm.requestMove(-1 * speedModifier);\n cargoArm.rotateArm(-1);\n //cargoArm.solArmBrake.set(false);\n }\n else\n {\n if(driver2.down(driver2.Y))\n {\n //cargoArm.requestMove(2 * speedModifier);\n cargoArm.rotateArm(1);\n //cargoArm.solArmBrake.set(false);\n }\n else\n {\n //cargoArm.rotateArm(cargoArm.getArmCalculation());\n //cargoArm.solArmBrake.set(true);\n cargoArm.rotateArm(0);\n }\n }\n if(driver2.released(driver2.X) || driver2.released(driver2.Y))\n {\n //cargoArm.setArmTarget(cargoArm.currentPosition());\n //cargoArm.solArmBrake.set(true);\n cargoArm.rotateArm(0);\n }\n\n if(driver2.dpad(driver2.Up))\n {\n cargoArm.setArmUp();\n }\n if(driver2.dpad(driver2.Down))\n {\n cargoArm.setArmDown();\n }\n if(driver2.dpad(driver2.Left))\n {\n cargoArm.setArmMid();\n }\n if(driver2.dpad(driver2.Right))\n {\n cargoArm.setArmLow();\n }\n\n if(driver2.pressed(driver2.LThumb))\n {\n cargoArm.armLockEnabled = !cargoArm.armLockEnabled;\n \n }\n if(driver2.pressed(driver2.RThumb))\n {\n cargoArm.toggleBrake();\n }\n\n\n // allow move-to calculations to occur\n hatchArm.periodic();\n cargoArm.periodic();\n }", "public void setupSimulation() {\n final Timer timerStatus = new Timer();\n\n TimerTask taskUpdateFood = new TimerTask() {\n @Override\n public void run() {\n terrain.toggleFood();\n }\n };\n timerStatus.schedule(taskUpdateFood, 0, 1000);\n\n startTime = System.currentTimeMillis();\n }", "@Test\n\tpublic void testATMSwaptionCalibration() throws CalculationException, SolverException {\n\n\t\tfinal int numberOfPaths\t\t= 10000; // ideale è 10'000 paths!\n\t\tfinal int numberOfFactors\t= 1;\n\n\t\tfinal long millisCurvesStart = System.currentTimeMillis();\n\n\n\t\tSystem.out.println(\"Calibration to Swaptions.\\n\");\n\n\t\tSystem.out.println(\"Calibration of rate curves:\");\n\n\t\tfinal AnalyticModel curveModel = getCalibratedCurve();\n\n\t\t// Create the forward curve (initial value of the LIBOR market model)\n\t\tfinal ForwardCurve forwardCurve = curveModel.getForwardCurve(\"ForwardCurveFromDiscountCurve(discountCurve-EUR,1D)\");\n\t\tfinal DiscountCurve discountCurve = curveModel.getDiscountCurve(\"discountCurve-EUR\");\n\t\t//\t\tcurveModel.addCurve(discountCurve.getName(), discountCurve);\n\n\t\tfinal long millisCurvesEnd = System.currentTimeMillis();\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"Brute force Monte-Carlo calibration of model volatilities:\");\n\n\t\tfinal ArrayList<String>\t\t\t\tcalibrationItemNames\t= new ArrayList<>();\n\t\tfinal ArrayList<CalibrationProduct>\tcalibrationProducts\t\t= new ArrayList<>();\n\n\t\tfinal double\tswapPeriodLength\t= 0.5;\n\n\t\tfinal String[] atmExpiries = {\n\t\t\t\t\"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\", \"1M\",\n\t\t\t\t\"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \"2M\", \n\t\t\t\t\"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\", \"3M\",\n\t\t\t\t\"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\", \"6M\",\n\t\t\t\t\"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\", \"9M\",\n\t\t\t\t\"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \"1Y\", \n\t\t\t\t\"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\", \"18M\",\n\t\t\t\t\"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\", \"2Y\",\n\t\t\t\t\"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"3Y\", \"4Y\",\n\t\t\t\t\"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"4Y\", \"5Y\", \"5Y\", \"5Y\", \"5Y\",\n\t\t\t\t\"5Y\", \"5Y\", \"5Y\", \"5Y\", \"5Y\", \"5Y\", \"5Y\", \"5Y\", \"5Y\", \"5Y\", \"7Y\", \"7Y\", \"7Y\", \"7Y\", \"7Y\", \"7Y\", \"7Y\",\n\t\t\t\t\"7Y\", \"7Y\", \"7Y\", \"7Y\", \"7Y\", \"7Y\", \"7Y\", \"10Y\", \"10Y\", \"10Y\", \"10Y\", \"10Y\", \"10Y\", \"10Y\", \"10Y\", \"10Y\",\n\t\t\t\t\"10Y\", \"10Y\", \"10Y\", \"10Y\", \"10Y\", \"15Y\", \"15Y\", \"15Y\", \"15Y\", \"15Y\", \"15Y\", \"15Y\", \"15Y\", \"15Y\", \"15Y\",\n\t\t\t\t\"15Y\", \"15Y\", \"15Y\", \"15Y\", \"20Y\", \"20Y\", \"20Y\", \"20Y\", \"20Y\", \"20Y\", \"20Y\", \"20Y\", \"20Y\", \"20Y\", \"20Y\",\n\t\t\t\t\"20Y\", \"20Y\", \"20Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\", \"25Y\",\n\t\t\t\t\"25Y\", \"25Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\", \"30Y\" };\n\n\t\tfinal String[] atmTenors = {\n\t\t\t\t\"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \n\t\t\t\t\n\t\t\t\t\"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\",\n\t\t\t\t\"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\",\n\t\t\t\t\"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\",\n\n\t\t\t\t\"1Y\", \"2Y\",\"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\",\n\t\t\t\t\"1Y\", \"2Y\", \"3Y\", \"4Y\",\"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\",\n\t\t\t\t\"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\",\n\t\t\t\t\"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\",\n\t\t\t\t\"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\",\n\t\t\t\t\"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\",\n\t\t\t\t\"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\",\n\t\t\t\t\"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\",\n\t\t\t\t\"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\",\n\t\t\t\t\"7Y\", \"8Y\", \"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\",\n\t\t\t\t\"9Y\", \"10Y\", \"15Y\", \"20Y\", \"25Y\", \"30Y\", \"1Y\", \"2Y\", \"3Y\", \"4Y\", \"5Y\", \"6Y\", \"7Y\", \"8Y\", \"9Y\", \"10Y\",\n\t\t\t\t\"15Y\", \"20Y\", \"25Y\", \"30Y\" };\n\n\t\tfinal double[] atmNormalVolatilities = {\n\t\t\t\t0.0015335, 0.0015179, 0.0019499, 0.0024161, 0.0027817, 0.0031067, 0.0033722, 0.0035158, 0.0036656, 0.0037844, 0.00452, 0.0050913, 0.0054071, 0.0056496,\n\t\t\t\t//next is 2M\n\t\t\t\t0.0016709, 0.0016287, 0.0020182, 0.0024951, 0.002827, 0.0031023, 0.0034348, 0.0036183, 0.0038008, 0.0039155, 0.0046602, 0.0051981, 0.0055116, 0.0057249,\n\t\t\t\t\n\t\t\t\t0.0015543, 0.0016509, 0.0020863, 0.002587, 0.002949, 0.0032105, 0.0035338, 0.0037133, 0.0038475, 0.0040674, 0.0047458, 0.005276, 0.005476, 0.005793,\n\t\t\t\t0.0016777, 0.001937, 0.0023423, 0.0027823, 0.0031476, 0.0034569, 0.0037466, 0.0039852, 0.0041802, 0.0043221, 0.0049649, 0.0054206, 0.0057009, 0.0059071,\n\t\t\t\t//next is 9M\n\t\t\t\t0.0017809, 0.0020951, 0.0024978, 0.0029226, 0.0032379, 0.0035522, 0.0038397, 0.0040864, 0.0043122, 0.0044836, 0.0050939, 0.0054761, 0.0057374, 0.0059448,\n\t\t\t\t\n\t\t\t\t0.0020129, 0.0022865, 0.0027082, 0.0030921, 0.0033849, 0.0037107, 0.0039782, 0.0042058, 0.0044272, 0.0046082, 0.0051564, 0.0055307, 0.0057924, 0.0059811,\n\t\t\t\t//next is 18M\n\t\t\t\t0.0022824, 0.0025971, 0.0029895, 0.0033299, 0.0036346, 0.0039337, 0.0042153, 0.0044347, 0.0046686, 0.0048244, 0.0052739, 0.005604, 0.0058311, 0.0060011,\n\t\t\t\n\t\t\t\t0.0026477, 0.0029709, 0.0033639, 0.0036507, 0.0039096, 0.0041553, 0.0044241, 0.00462, 0.0048265, 0.004989, 0.005361, 0.0056565, 0.0058529, 0.0060102,\n\t\t\t\t0.003382, 0.0036593, 0.0039353, 0.0041484, 0.0043526, 0.0045677, 0.004775, 0.0049506, 0.0051159, 0.0052722, 0.0055185, 0.0057089, 0.0058555, 0.0059432,\n\t\t\t\t0.0040679, 0.0042363, 0.0044602, 0.0046206, 0.0047527, 0.0048998, 0.0050513, 0.0051928, 0.0053439, 0.0054657, 0.0056016, 0.0057244, 0.0058153, 0.0058793,\n\t\t\t\t0.0045508, 0.0046174, 0.0047712, 0.0048999, 0.0050364, 0.0051504, 0.0052623, 0.0053821, 0.0054941, 0.0055918, 0.0056569, 0.0057283, 0.0057752, 0.0058109,\n\t\t\t\t0.0051385, 0.0051373, 0.0052236, 0.005312, 0.0053793, 0.0054396, 0.0055037, 0.0055537, 0.0056213, 0.0056943, 0.005671, 0.0056707, 0.0056468, 0.0056423,\n\t\t\t\t0.0055069, 0.0054836, 0.0055329, 0.0055696, 0.005605, 0.0056229, 0.0056562, 0.005655, 0.0056679, 0.0057382, 0.0056494, 0.0055831, 0.0055096, 0.0054526,\n\t\t\t\t0.0054486, 0.0054057, 0.0054439, 0.005462, 0.0054915, 0.0054993, 0.0055134, 0.0054985, 0.0055318, 0.0055596, 0.005369, 0.0052513, 0.0051405, 0.0050416,\n\t\t\t\t0.005317, 0.005268, 0.005312, 0.0053112, 0.0053417, 0.0053556, 0.0053323, 0.0053251, 0.0053233, 0.0053126, 0.0050827, 0.004922, 0.0047924, 0.0046666,\n\t\t\t\t0.0051198, 0.0051013, 0.0051421, 0.0051418, 0.0051538, 0.005133, 0.0051081, 0.0050552, 0.005055, 0.0050473, 0.0048161, 0.0045965, 0.0044512, 0.0043099,\n\t\t\t\t0.0049482, 0.004947, 0.0049805, 0.0049951, 0.0050215, 0.0049849, 0.0049111, 0.0048498, 0.0047879, 0.0047688, 0.0044943, 0.0042786, 0.0041191, 0.0039756};\n\n\t\tfinal LocalDate referenceDate = LocalDate.of(2020, Month.JULY, 31);\n\t\tfinal BusinessdayCalendarExcludingTARGETHolidays cal = new BusinessdayCalendarExcludingTARGETHolidays();\n\t\tfinal DayCountConvention_ACT_365 modelDC = new DayCountConvention_ACT_365();\n\t\tfor(int i=0; i<atmNormalVolatilities.length; i++ ) {\n\n\t\t\tfinal LocalDate exerciseDate = cal.getDateFromDateAndOffsetCode(referenceDate, atmExpiries[i]);\n\t\t\tfinal LocalDate tenorEndDate = cal.getDateFromDateAndOffsetCode(exerciseDate, atmTenors[i]);\n\t\t\tdouble\texercise\t\t= modelDC.getDaycountFraction(referenceDate, exerciseDate);\n\t\t\tdouble\ttenor\t\t\t= modelDC.getDaycountFraction(exerciseDate, tenorEndDate);\n\n\t\t\t// We consider an idealized tenor grid (alternative: adapt the model grid)\n\t\t\texercise\t= Math.round(exercise/0.25)*0.25;\n\t\t\ttenor\t\t= Math.round(tenor/0.25)*0.25;\n\t\t\tif(exercise < 0.25) {continue;}\n\t\t\t//if(exercise < 1.0) {continue;}\n\n\t\t\tfinal int numberOfPeriods = (int)Math.round(tenor / swapPeriodLength);\n\n\t\t\tfinal double\tmoneyness\t\t\t= 0.0;\n\t\t\tfinal double\ttargetVolatility\t= atmNormalVolatilities[i];\n\n\t\t\tfinal String\ttargetVolatilityType = \"VOLATILITYNORMAL\";\n\n\t\t\tfinal double\tweight = 1.0;\n\n\t\t\tcalibrationProducts.add(createCalibrationItem(weight, exercise, swapPeriodLength, numberOfPeriods, moneyness, targetVolatility, targetVolatilityType, forwardCurve, discountCurve));\n\t\t\tcalibrationItemNames.add(atmExpiries[i]+\"\\t\"+atmTenors[i]);\n\t\t}\n\n\t\t/*\n\t\t * Create a simulation time discretization\n\t\t */\n\t\t// If simulation time is below libor time, exceptions will be hard to track.\n\t\tfinal double lastTime\t= 21.0;\n\t\tfinal double dtLibor\t= 0.5;\n\t\tfinal double dt\t= 0.125;\n\t\tfinal TimeDiscretization timeDiscretizationFromArray = new TimeDiscretizationFromArray(0.0, (int) (lastTime / dt), dt);\n\t\tfinal TimeDiscretization liborPeriodDiscretization = new TimeDiscretizationFromArray(0.0, (int) (lastTime / dtLibor), dtLibor);\n\t\tint seed =1111;\n\t\tSystem.out.println(\"seed: \" + seed);\n\t\tfinal BrownianMotion brownianMotion = new net.finmath.montecarlo.BrownianMotionLazyInit(timeDiscretizationFromArray, numberOfFactors, numberOfPaths, seed /* seed */); \n\t\tTimeDiscretization timeToMaturityDiscretization = new TimeDiscretizationFromArray(0.00,0.25, 0.5, 1.00, 2.00, 3.00, 5.00, 7.00, 10.0, 15.0, 21.0);\n\t\t//TimeDiscretization timeToMaturityDiscretization = new TimeDiscretizationFromArray(0.00, 1.00, 2.00, 3.00, 4.00, 5.00, 6.0, 7.00, 8.0,9.0, 10.0, 12.5, 15.0, 21.0);\t\t// needed if you use LIBORVolatilityModelPiecewiseConstantWithMercurioModification: TimeDiscretization = new TimeDiscretizationFromArray(0.0, 0.25, 0.50, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 25.0, 30.0, 40.0);\n\t //TimeDiscretization timeToMaturityDiscretization = new TimeDiscretizationFromArray(0.00, 0.5, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00, 8.00, 9,00, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 , 17.0, 18.0, 19.0 ,20.0,21.0);\n //TimeDiscretization timeToMaturityDiscretization = new TimeDiscretizationFromArray(0.00, 21, 1.0);\n\n\t\tdouble[] arrayValues = new double [timeToMaturityDiscretization.getNumberOfTimes()];\n\t\tfor (int i=0; i<timeToMaturityDiscretization.getNumberOfTimes(); i++) {arrayValues[i]= 0.1/100;}\n\n\t //final LIBORVolatilityModel volatilityModel = new LIBORVolatilityModelTimeHomogenousPiecewiseConstantWithMercurioModification(timeDiscretizationFromArray, liborPeriodDiscretization, timeToMaturityDiscretization, arrayValues);\n\t\tLIBORVolatilityModel volatilityModel = new LIBORVolatilityModelFourParameterExponentialFormWithMercurioModification(timeDiscretizationFromArray, liborPeriodDiscretization, 0.002, 0.0005, 0.2, 0.00005, true); //0.20/100.0, 0.05/100.0, 0.10, 0.05/100.0, \n\t\t//final LIBORVolatilityModel volatilityModel = new LIBORVolatilityModelPiecewiseConstantWithMercurioModification(timeDiscretizationFromArray, liborPeriodDiscretization,optionMaturityDiscretization,timeToMaturityDiscretization, 0.50 / 100);\n\t\t\n\t\tfinal LIBORCorrelationModel correlationModel = new LIBORCorrelationModelExponentialDecayWithMercurioModification(timeDiscretizationFromArray, liborPeriodDiscretization, numberOfFactors, 0.05, false);\n\t\t//AbstractLIBORCovarianceModelParametric covarianceModelParametric = new LIBORCovarianceModelExponentialForm5Param(timeDiscretizationFromArray, liborPeriodDiscretization, numberOfFactors, new double[] { 0.20/100.0, 0.05/100.0, 0.10, 0.05/100.0, 0.10} );\n\t\tfinal AbstractLIBORCovarianceModelParametric covarianceModelParametric = new LIBORCovarianceModelFromVolatilityAndCorrelation(timeDiscretizationFromArray, liborPeriodDiscretization, volatilityModel, correlationModel);\n\n\t\t// Create blended local volatility model with fixed parameter (0=lognormal, > 1 = almost a normal model).\n\t\tfinal AbstractLIBORCovarianceModelParametric covarianceModelDisplaced = new DisplacedLocalVolatilityModel(covarianceModelParametric, 1.0/0.25, false /* isCalibrateable */);\n\t\tfinal AbstractLIBORCovarianceModelParametric covarianceModelReducedVolatility = new VolatilityReductionMercurioModel(covarianceModelDisplaced);\n\t\t\n\t\t// Set model properties\n\t\tfinal Map<String, Object> properties = new HashMap<>();\n\t\tSystem.out.println(\"Number of volatility parameters: \" + volatilityModel.getParameter().length);\n\n\t\tproperties.put(\"measure\", LIBORMarketModelFromCovarianceModelWithMercurioModification.Measure.SPOT.name());\n\n\t\t// Choose normal state space for the Euler scheme (the covariance model above carries a linear local volatility model).\n\t\tproperties.put(\"stateSpace\", LIBORMarketModelFromCovarianceModelWithMercurioModification.StateSpace.NORMAL.name());\n\n\t\t// Set calibration properties (should use our brownianMotion for calibration - needed to have to right correlation).\n\t\tfinal Double accuracy = new Double(1E-8);\t// Lower accuracy to reduce runtime of the unit test\n\t\tfinal int maxIterations = 400;\n\t\tfinal int numberOfThreads = 6;\n\t\tfinal OptimizerFactory optimizerFactory = new OptimizerFactoryLevenbergMarquardt(maxIterations, accuracy, numberOfThreads);\n\n\t\t//penso che getParameterAsDouble().length mi ritorni il numero di tutti i paratemtri da calibrare cioè tutta la piecewise volatiliy e anche correlazion\n\t\tfinal double[] parameterStandardDeviation = new double[covarianceModelParametric.getParameterAsDouble().length];\n\t\tfinal double[] parameterLowerBound = new double[covarianceModelParametric.getParameterAsDouble().length];\n\t\tfinal double[] parameterUpperBound = new double[covarianceModelParametric.getParameterAsDouble().length];\n\t\tArrays.fill(parameterStandardDeviation, 0.20/100.0);\n\t\tArrays.fill(parameterLowerBound, 0.0);\n\t\tArrays.fill(parameterUpperBound, Double.POSITIVE_INFINITY);\n\n\t\t// Set calibration properties (should use our brownianMotion for calibration - needed to have to right correlation).\n\t\tfinal Map<String, Object> calibrationParameters = new HashMap<>();\n\t\tcalibrationParameters.put(\"accuracy\", accuracy);\n\t\tcalibrationParameters.put(\"brownianMotion\", brownianMotion);\n\t\tcalibrationParameters.put(\"optimizerFactory\", optimizerFactory);\n\t\tcalibrationParameters.put(\"parameterStep\", new Double(1E-4));\n\t\tproperties.put(\"calibrationParameters\", calibrationParameters);\n\n\t\tfinal long millisCalibrationStart = System.currentTimeMillis();\n\n\t\t/*\n\t\t * Create corresponding Forward Market Model\n\t\t */\n\t\tfinal CalibrationProduct[] calibrationItemsLMM = new CalibrationProduct[calibrationItemNames.size()];\n\t\tfor(int i=0; i<calibrationItemNames.size(); i++) {\n\t\t\tcalibrationItemsLMM[i] = new CalibrationProduct(calibrationProducts.get(i).getProduct(),calibrationProducts.get(i).getTargetValue(),calibrationProducts.get(i).getWeight());\n\t\t}\n\t\tfinal LIBORMarketModel mercurioModelCalibrated = LIBORMarketModelFromCovarianceModelWithMercurioModification.of(\n\t\t\t\tliborPeriodDiscretization,\n\t\t\t\tcurveModel,\n\t\t\t\tforwardCurve,\n\t\t\t\tnew DiscountCurveFromForwardCurve(forwardCurve),\n\t\t\t\trandomVariableFactory,\n\t\t\t\tcovarianceModelReducedVolatility,\n\t\t\t\tcalibrationItemsLMM, properties);\n\n\t\tfinal long millisCalibrationEnd = System.currentTimeMillis();\n\t\t\n//-------------------------------------------------------------------------------- fine calibrazione volatility------------------------------\n\t\tSystem.out.println(\"\\nCalibrated parameters are:\");\n\t\tfinal double[] param = ((AbstractLIBORCovarianceModelParametric)((LIBORMarketModelFromCovarianceModelWithMercurioModification) mercurioModelCalibrated).getCovarianceModel()).getParameterAsDouble();\n\t\tfor (final double p : param) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\n\t\tfinal EulerSchemeFromProcessModel process = new EulerSchemeFromProcessModel(mercurioModelCalibrated, brownianMotion);\n\t\tfinal LIBORModelMonteCarloSimulationModel simulationMercurioCalibrated = new LIBORMonteCarloSimulationFromLIBORModel(process);\n\n\t\tSystem.out.println(\"\\nValuation on calibrated model:\");\n\t\tdouble deviationSum\t\t\t= 0.0;\n\t\tdouble deviationSquaredSum\t= 0.0;\n\t\tfor (int i = 0; i < calibrationProducts.size(); i++) {\n\t\t\tfinal AbstractLIBORMonteCarloProduct calibrationProduct = calibrationProducts.get(i).getProduct();\n\t\t\ttry {\n\t\t\t\tfinal double valueModel = calibrationProduct.getValue(simulationMercurioCalibrated);\n\t\t\t\tfinal double valueTarget = calibrationProducts.get(i).getTargetValue().getAverage();\n\t\t\t\tfinal double error = valueModel-valueTarget;\n\t\t\t\tdeviationSum += error;\n\t\t\t\tdeviationSquaredSum += error*error;\n\t\t\t\tSystem.out.println(calibrationItemNames.get(i) + \"\\t\" + \"Model: \" + formatterValue.format(valueModel) + \"\\t Target: \" + formatterValue.format(valueTarget) + \"\\t Deviation: \" + formatterDeviation.format(valueModel-valueTarget));// + \"\\t\" + calibrationProduct.toString());\n\t\t\t}\n\t\t\tcatch(final Exception e) {\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Time required for calibration of curves.........: \" + (millisCurvesEnd-millisCurvesStart)/1000.0 + \" s.\");\n\t\tSystem.out.println(\"Time required for calibration of volatilities...: \" + (millisCalibrationEnd-millisCalibrationStart)/1000.0 + \" s.\");\n\n\t\tfinal double averageDeviation = deviationSum/calibrationProducts.size();\n\t\tSystem.out.println(\"Mean Deviation:\" + formatterValue.format(averageDeviation));\n\t\tSystem.out.println(\"RMS Error.....:\" + formatterValue.format(Math.sqrt(deviationSquaredSum/calibrationProducts.size())));\n\t\tSystem.out.println(\"__________________________________________________________________________________________\\n\");\n\n\t\tAssert.assertTrue(Math.abs(averageDeviation) < 2E-4);\n\n//\n//\t\t/*\n//\t\t * Checking serilization\n//\t\t */\n//\t\tbyte[] lmmSerialized = null;\n//\t\ttry {\n//\t\t\tfinal ByteArrayOutputStream baos = new ByteArrayOutputStream();\n//\t\t\tfinal ObjectOutputStream oos = new ObjectOutputStream( baos );\n//\t\t\toos.writeObject(mercurioModelCalibrated.getCloneWithModifiedData(null));\n//\t\t\tlmmSerialized = baos.toByteArray();\n//\t\t} catch (final IOException e) {\n//\t\t\tfail(\"Serialization failed with exception \" + e.getMessage());\n//\t\t}\n//\n//\t\tLIBORMarketModelFromCovarianceModelWithMercurioModification liborMarketModelFromSerialization = null;\n//\t\ttry {\n//\t\t\tfinal ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(lmmSerialized) );\n//\t\t\tliborMarketModelFromSerialization = (LIBORMarketModelFromCovarianceModelWithMercurioModification)ois.readObject();\n//\t\t} catch (IOException | ClassNotFoundException e) {\n//\t\t\tfail(\"Deserialization failed with exception \" + e.getMessage());\n//\t\t}\n//\n//\t\t/*\n//\t\t * Check if the deserialized model and the original calibrated model give the same valuations\n//\t\t */\n//\t\tif(liborMarketModelFromSerialization != null) {\n//\t\t\tfinal LIBORModelMonteCarloSimulationModel simulationFromSerialization = new LIBORMonteCarloSimulationFromLIBORModel(new EulerSchemeFromProcessModel(liborMarketModelFromSerialization, brownianMotion));\n//\n//\t\t\tSystem.out.println(\"\\nValuation on calibrated model:\");\n//\t\t\tfor (int i = 0; i < calibrationProducts.size(); i++) {\n//\t\t\t\tfinal AbstractLIBORMonteCarloProduct calibrationProduct = calibrationProducts.get(i).getProduct();\n//\t\t\t\ttry {\n//\t\t\t\t\tfinal double valueFromCalibratedModel = calibrationProduct.getValue(simulationMercurioCalibrated);\n//\t\t\t\t\tfinal double valueFromSerializedModel = calibrationProduct.getValue(simulationFromSerialization);\n//\t\t\t\t\tfinal double error = valueFromSerializedModel-valueFromCalibratedModel;\n//\t\t\t\t\tAssert.assertEquals(\"Valuation using deserilized model.\", valueFromCalibratedModel, valueFromSerializedModel, 1E-12);\n//\t\t\t\t\tSystem.out.println(calibrationItemNames.get(i) + \"\\t\" + formatterDeviation.format(error));\n//\t\t\t\t}\n//\t\t\t\tcatch(final Exception e) {\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\t\n\t\t// CAPLET ON BACKWARD LOOKING RATE SEMESTRALI\n\t\tDecimalFormat formatterTimeValue = new DecimalFormat(\"##0.00;\");\n\t\tDecimalFormat formatterVolValue = new DecimalFormat(\"##0.00000;\");\n\t\tDecimalFormat formatterAnalytic = new DecimalFormat(\"##0.000;\");\n\t\tDecimalFormat formatterPercentage = new DecimalFormat(\" ##0.000%;-##0.000%\", new DecimalFormatSymbols(Locale.ENGLISH));\n\t\tdouble[] mktData = new double[] {/* 6M 0.00167, */ /* 12M*/ 0.00201, /* 18M*/ 0.00228, /* 2Y */ 0.00264, 0.0, /* 3Y */ 0.0033, /* 4Y */0.00406, /* 5Y */ 0.00455, /* 6Y - NA */ 0.0, /* 7Y */0.00513, /* 8Y- NA */0.0, /* 9Y */0.0, /* 10Y */0.00550,0.0,0.0,0.0,0.0, /* 15Y */0.00544,0.0,0.0,0.0,0.0, /* 20Y */0.0053,0.0,0.0,0.0,0.0,/* 25Y */ 0.0053,0.0,0.0,0.0,0.0,/* 30Y */0.00495,0.0,0.0,0.0 };\n\t\t\n\t\tdouble strike = 0.004783;\n\t\n\t\tint liborIndex=1;\n\t\tint mktDataIndex = 0;\n\n\t\t//Results with CALIBRATED model\n\t\tSystem.out.println(\"\\n results on CALIBRATED model \\n\");\n\t\twhile(liborIndex < liborPeriodDiscretization.getNumberOfTimes()) {\n\t\t\tdouble maturityMinusLengthLibor =liborPeriodDiscretization.getTime(liborIndex);\n\t\t\tdouble fixBackwardTime=liborPeriodDiscretization.getTime(liborIndex+1);\n\t\t\tCaplet capletCassical = new Caplet(maturityMinusLengthLibor, dtLibor, strike, dtLibor, false, ValueUnit.NORMALVOLATILITY);\n\t\t\t//set to default ValueUnit.NORMALVOLATILITY for CapletOnBackwardLookingRate\n\t\t\tCapletOnBackwardLookingRate capletBackward = new CapletOnBackwardLookingRate(maturityMinusLengthLibor, dtLibor, strike, dtLibor, false);\t\t\t\n\t\t\tdouble impliedVolClassical = capletCassical.getValue(simulationMercurioCalibrated);\n\t\t\tdouble impliedVolBackward = capletBackward.getValue(simulationMercurioCalibrated);\n\t\t\tdouble analyticFormulaPaper = Math.sqrt(1+0.5/(maturityMinusLengthLibor*3));\n\t\t\tdouble ratioImpliedVol = impliedVolBackward/impliedVolClassical;\n\t\t\tdouble error = (analyticFormulaPaper-ratioImpliedVol)/analyticFormulaPaper;\n\n\t\t\tif (liborIndex<5) {\t\t//da i valori del caplet per maturity 1.5Y, 2Y, 2.5Y,.\n\t\t\t\tif (mktData[mktDataIndex] == 0.0) {\n\t\t\t\t\tSystem.out.println(\"Caplet on B(\" + formatterTimeValue.format(maturityMinusLengthLibor) + \", \"\n\t\t\t\t\t\t\t+ formatterTimeValue.format(fixBackwardTime) + \"; \"\n\t\t\t\t\t\t\t+ \"\" + formatterTimeValue.format(fixBackwardTime) + \") \" + \"\\t\" + \"Backward Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolBackward) + \"\\t\" + \"Classical Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolClassical)+ \"\\t\" +\"Analytic ratio: \" \n\t\t\t\t\t\t\t+ formatterAnalytic.format(analyticFormulaPaper)+ \"\\t\" + \"MC ratio: \"\n\t\t\t\t\t\t\t+ formatterAnalytic.format(ratioImpliedVol) + \"\\t\" +\"Error: \"\n\t\t\t\t\t\t+ formatterPercentage.format(error) );\n\t\t\t\tliborIndex+=1;\n\t\t\t\tmktDataIndex+=1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdouble ratioMktVol =impliedVolBackward/mktData[mktDataIndex];\n\t\t\t\t\tdouble errorMkt = (analyticFormulaPaper-ratioMktVol)/analyticFormulaPaper;\n\t\t\t\t\tSystem.out.println(\"Caplet on B(\" + formatterTimeValue.format(maturityMinusLengthLibor) + \", \"\n\t\t\t\t\t\t\t+ formatterTimeValue.format(fixBackwardTime) + \"; \"\n\t\t\t\t\t\t\t+ \"\" + formatterTimeValue.format(fixBackwardTime) + \") \" + \"\\t\" + \"Backward Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolBackward) + \"\\t\" + \"Classical Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolClassical)+ \"\\t\" +\"Analytic ratio: \" \n\t\t\t\t\t\t\t+ formatterAnalytic.format(analyticFormulaPaper)+ \"\\t\" + \"MC ratio: \"\n\t\t\t\t\t\t\t+ formatterAnalytic.format(ratioImpliedVol) + \"\\t\" +\"Error: \"\n\t\t\t\t\t\t\t+ formatterPercentage.format(error) \n\t\t\t\t\t\t\t+ \"\\t\" +\"Market Caplet Vol. \" + formatterPercentage.format(mktData[mktDataIndex])\n\t\t\t\t\t\t\t+ \"\\t\" +\"Market Ratio: \"\t+ formatterAnalytic.format(ratioMktVol)\t\n\t\t\t\t\t\t\t+ \"\\t\" +\"Market Error: \"\t+ formatterPercentage.format(errorMkt)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\tliborIndex+=1;\n\t\t\t\t\tmktDataIndex+=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\t//secondo loop da i valori del caplet per maturity 4Y,5Y,...,21\n\t\t\t\tif (mktData[mktDataIndex] == 0.0) {\n\t\t\t\t\tSystem.out.println(\"Caplet on B(\" + formatterTimeValue.format(maturityMinusLengthLibor) + \", \"\n\t\t\t\t\t\t\t+ formatterTimeValue.format(fixBackwardTime) + \"; \"\n\t\t\t\t\t\t\t+ \"\" + formatterTimeValue.format(fixBackwardTime) + \") \" + \"\\t\" + \"Backward Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolBackward) + \"\\t\" + \"Classical Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolClassical)+ \"\\t\" +\"Analytic ratio: \" \n\t\t\t\t\t\t\t+ formatterAnalytic.format(analyticFormulaPaper)+ \"\\t\" + \"MC ratio: \"\n\t\t\t\t\t\t\t+ formatterAnalytic.format(ratioImpliedVol) + \"\\t\" +\"Error: \"\n\t\t\t\t\t\t+ formatterPercentage.format(error) );\n\t\t\t\t\tliborIndex+=2;\n\t\t\t\t\tmktDataIndex+=1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdouble ratioMktVol =impliedVolBackward/mktData[mktDataIndex];\n\t\t\t\t\t\tdouble errorMkt = (analyticFormulaPaper-ratioMktVol)/analyticFormulaPaper;\n\t\t\t\t\t\tSystem.out.println(\"Caplet on B(\" + formatterTimeValue.format(maturityMinusLengthLibor) + \", \"\n\t\t\t\t\t\t\t\t+ formatterTimeValue.format(fixBackwardTime) + \"; \"\n\t\t\t\t\t\t\t\t+ \"\" + formatterTimeValue.format(fixBackwardTime) + \") \" + \"\\t\" + \"Backward Caplet: \" \n\t\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolBackward) + \"\\t\" + \"Classical Caplet: \" \n\t\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolClassical)+ \"\\t\" +\"Analytic ratio: \" \n\t\t\t\t\t\t\t\t+ formatterAnalytic.format(analyticFormulaPaper)+ \"\\t\" + \"MC ratio: \"\n\t\t\t\t\t\t\t\t+ formatterAnalytic.format(ratioImpliedVol) + \"\\t\" +\"Error: \"\n\t\t\t\t\t\t\t\t+ formatterPercentage.format(error) \n\t\t\t\t\t\t\t\t+ \"\\t\" +\"Market Caplet Vol. \" + formatterPercentage.format(mktData[mktDataIndex])\n\t\t\t\t\t\t\t\t+ \"\\t\" +\"Market Ratio: \"\t+ formatterAnalytic.format(ratioMktVol)\t\n\t\t\t\t\t\t\t\t+ \"\\t\" +\"Market Error: \"\t+ formatterPercentage.format(errorMkt)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\tliborIndex+=2;\n\t\t\t\t\t\tmktDataIndex+=1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\n\t\t// Set model properties\n\t\tMap<String, String> properties2 = new HashMap<String, String >();\n\t\tproperties2.put(\"measure\", LIBORMarketModelFromCovarianceModelWithMercurioModification.Measure.SPOT.name());\n\t\tproperties2.put(\"stateSpace\", LIBORMarketModelFromCovarianceModelWithMercurioModification.StateSpace.NORMAL.name());\n\n\t\tfinal LIBORMarketModel MercurioModelNONcalibrated= new LIBORMarketModelFromCovarianceModelWithMercurioModification(\n\t\t\t\tliborPeriodDiscretization,\n\t\t\t\tcurveModel,\n\t\t\t\tforwardCurve,\n\t\t\t\tnew DiscountCurveFromForwardCurve(forwardCurve),\n\t\t\t\trandomVariableFactory,\n\t\t\t\tcovarianceModelReducedVolatility,\n\t\t\t\tproperties2\n\t\t\t\t);\n\n\t\tfinal EulerSchemeFromProcessModel process2 = new EulerSchemeFromProcessModel(MercurioModelNONcalibrated,brownianMotion);\n\t\tfinal LIBORModelMonteCarloSimulationModel simulationMercurioModelNONcalibrated = new LIBORMonteCarloSimulationFromLIBORModel(process2);\n\t\n\t\t\n\t\t//Results with NON calibrated model\n\t\tliborIndex=1;\n\t\tmktDataIndex = 0;\n\t\tSystem.out.println(\"\\n results on NON-CALIBRATED model \\n\");\n\t\twhile(liborIndex < liborPeriodDiscretization.getNumberOfTimes()) {\n\t\t\tdouble maturityMinusLengthLibor =liborPeriodDiscretization.getTime(liborIndex);\n\t\t\tdouble fixBackwardTime=liborPeriodDiscretization.getTime(liborIndex+1);\n\t\t\tCaplet capletCassical = new Caplet(maturityMinusLengthLibor, dtLibor, strike, dtLibor, false, ValueUnit.NORMALVOLATILITY);\n\t\t\t//set to default ValueUnit.NORMALVOLATILITY for CapletOnBackwardLookingRate\n\t\t\tCapletOnBackwardLookingRate capletBackward = new CapletOnBackwardLookingRate(maturityMinusLengthLibor, dtLibor, strike, dtLibor, false);\t\t\t\n\t\t\tdouble impliedVolClassical = capletCassical.getValue(simulationMercurioModelNONcalibrated);\n\t\t\tdouble impliedVolBackward = capletBackward.getValue(simulationMercurioModelNONcalibrated);\n\t\t\tdouble analyticFormulaPaper = Math.sqrt(1+0.5/(maturityMinusLengthLibor*3));\n\t\t\tdouble ratioImpliedVol = impliedVolBackward/impliedVolClassical;\n\t\t\tdouble error = (analyticFormulaPaper-ratioImpliedVol)/analyticFormulaPaper;\n\n\t\t\tif (liborIndex<5) {\t\t//da i valori del caplet per maturity 1.0Y, 1.5Y, 2Y, 2.5Y, 3Y\n\t\t\t\tif (mktData[mktDataIndex] == 0.0) {\n\t\t\t\t\tSystem.out.println(\"Caplet on B(\" + formatterTimeValue.format(maturityMinusLengthLibor) + \", \"\n\t\t\t\t\t\t\t+ formatterTimeValue.format(fixBackwardTime) + \"; \"\n\t\t\t\t\t\t\t+ \"\" + formatterTimeValue.format(fixBackwardTime) + \") \" + \"\\t\" + \"Backward Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolBackward) + \"\\t\" + \"Classical Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolClassical)+ \"\\t\" +\"Analytic ratio: \" \n\t\t\t\t\t\t\t+ formatterAnalytic.format(analyticFormulaPaper)+ \"\\t\" + \"MC ratio: \"\n\t\t\t\t\t\t\t+ formatterAnalytic.format(ratioImpliedVol) + \"\\t\" +\"Error: \"\n\t\t\t\t\t\t+ formatterPercentage.format(error) );\n\t\t\t\tliborIndex+=1;\n\t\t\t\tmktDataIndex+=1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdouble ratioMktVol =impliedVolBackward/mktData[mktDataIndex];\n\t\t\t\t\tdouble errorMkt = (analyticFormulaPaper-ratioMktVol)/analyticFormulaPaper;\n\n\t\t\t\t\tSystem.out.println(\"Caplet on B(\" + formatterTimeValue.format(maturityMinusLengthLibor) + \", \"\n\t\t\t\t\t\t\t+ formatterTimeValue.format(fixBackwardTime) + \"; \"\n\t\t\t\t\t\t\t+ \"\" + formatterTimeValue.format(fixBackwardTime) + \") \" + \"\\t\" + \"Backward Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolBackward) + \"\\t\" + \"Classical Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolClassical)+ \"\\t\" +\"Analytic ratio: \" \n\t\t\t\t\t\t\t+ formatterAnalytic.format(analyticFormulaPaper)+ \"\\t\" + \"MC ratio: \"\n\t\t\t\t\t\t\t+ formatterAnalytic.format(ratioImpliedVol) + \"\\t\" +\"Error: \"\n\t\t\t\t\t\t\t+ formatterPercentage.format(error) \n\t\t\t\t\t\t\t+ \"\\t\" +\"Market Caplet Vol. \" + formatterPercentage.format(mktData[mktDataIndex])\n\t\t\t\t\t\t\t+ \"\\t\" +\"Market Ratio: \"\t+ formatterAnalytic.format(ratioMktVol)\t\n\t\t\t\t\t\t\t+ \"\\t\" +\"Market Error: \"\t+ formatterPercentage.format(errorMkt)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\tliborIndex+=1;\n\t\t\t\t\tmktDataIndex+=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\t//secondo loop da i valori del caplet per maturity 4Y,5Y,...,21\n\t\t\t\tif (mktData[mktDataIndex] == 0.0) {\n\t\t\t\t\tSystem.out.println(\"Caplet on B(\" + formatterTimeValue.format(maturityMinusLengthLibor) + \", \"\n\t\t\t\t\t\t\t+ formatterTimeValue.format(fixBackwardTime) + \"; \"\n\t\t\t\t\t\t\t+ \"\" + formatterTimeValue.format(fixBackwardTime) + \") \" + \"\\t\" + \"Backward Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolBackward) + \"\\t\" + \"Classical Caplet: \" \n\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolClassical)+ \"\\t\" +\"Analytic ratio: \" \n\t\t\t\t\t\t\t+ formatterAnalytic.format(analyticFormulaPaper)+ \"\\t\" + \"MC ratio: \"\n\t\t\t\t\t\t\t+ formatterAnalytic.format(ratioImpliedVol) + \"\\t\" +\"Error: \"\n\t\t\t\t\t\t+ formatterPercentage.format(error) );\n\t\t\t\t\tliborIndex+=2;\n\t\t\t\t\tmktDataIndex+=1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdouble ratioMktVol =impliedVolBackward/mktData[mktDataIndex];\n\t\t\t\t\t\tdouble errorMkt = (analyticFormulaPaper-ratioMktVol)/analyticFormulaPaper;\n\n\t\t\t\t\t\tSystem.out.println(\"Caplet on B(\" + formatterTimeValue.format(maturityMinusLengthLibor) + \", \"\n\t\t\t\t\t\t\t\t+ formatterTimeValue.format(fixBackwardTime) + \"; \"\n\t\t\t\t\t\t\t\t+ \"\" + formatterTimeValue.format(fixBackwardTime) + \") \" + \"\\t\" + \"Backward Caplet: \" \n\t\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolBackward) + \"\\t\" + \"Classical Caplet: \" \n\t\t\t\t\t\t\t\t+ formatterPercentage.format(impliedVolClassical)+ \"\\t\" +\"Analytic ratio: \" \n\t\t\t\t\t\t\t\t+ formatterAnalytic.format(analyticFormulaPaper)+ \"\\t\" + \"MC ratio: \"\n\t\t\t\t\t\t\t\t+ formatterAnalytic.format(ratioImpliedVol) + \"\\t\" +\"Error: \"\n\t\t\t\t\t\t\t\t+ formatterPercentage.format(error) \n\t\t\t\t\t\t\t\t+ \"\\t\" +\"Market Caplet Vol. \" + formatterPercentage.format(mktData[mktDataIndex])\n\t\t\t\t\t\t\t\t+ \"\\t\" +\"Market Ratio: \"\t+ formatterAnalytic.format(ratioMktVol)\t\n\t\t\t\t\t\t\t\t+ \"\\t\" +\"Market Error: \"\t+ formatterPercentage.format(errorMkt)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\tliborIndex+=2;\n\t\t\t\t\t\tmktDataIndex+=1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t\tint timeIndex = 4;\n\t\tSystem.out.println(\" \\n Backward looking rate evaluated at the END of the accrual period:\");\n\t\tfor( liborIndex=0; liborIndex<liborPeriodDiscretization.getNumberOfTimes()-1; liborIndex++) {\n\t\t\tdouble evaluationTime=timeDiscretizationFromArray.getTime(timeIndex);\n\t\t\tdouble liborStartingTime=liborPeriodDiscretization.getTime(liborIndex);\n\t\t\tdouble liborEndingTime=liborPeriodDiscretization.getTime(liborIndex+1);\n\t\t\tRandomVariable backwardLookingRate = simulationMercurioModelNONcalibrated.getLIBOR(timeIndex, liborIndex);\n\t\t\tdouble avgBackwardLookingRate =backwardLookingRate.getAverage();\n\t\t\tSystem.out.println(\"Backward B(\" + formatterTimeValue.format(liborStartingTime) + \", \" + formatterTimeValue.format(liborEndingTime) + \") evaluated in t= \" + formatterTimeValue.format(evaluationTime) + \".\"+ \"\\t\" + \"Average: \" + avgBackwardLookingRate);\n\t\t\ttimeIndex += 4;\n\t\t}\t\n\t\t\n\t\tint timeIndex2 = 0;\n\t\tSystem.out.println(\"\\n Backward looking rate evaluated at the BEGIN of the accrual period:\");\n\t\tfor( liborIndex=0; liborIndex<liborPeriodDiscretization.getNumberOfTimes()-1; liborIndex++) {\n\t\t\tdouble evaluationTime=timeDiscretizationFromArray.getTime(timeIndex2);\n\t\t\tdouble liborStartingTime=liborPeriodDiscretization.getTime(liborIndex);\n\t\t\tdouble liborEndingTime=liborPeriodDiscretization.getTime(liborIndex+1);\n\t\t\tRandomVariable backwardLookingRate = simulationMercurioModelNONcalibrated.getLIBOR(timeIndex2, liborIndex);\n\t\t\tdouble avgBackwardLookingRate =backwardLookingRate.getAverage();\n\t\t\tSystem.out.println(\"Backward B(\" + formatterTimeValue.format(liborStartingTime) + \", \" + formatterTimeValue.format(liborEndingTime) + \") evaluated in t= \" + formatterTimeValue.format(evaluationTime) + \".\"+ \"\\t\" + \"Average: \" + avgBackwardLookingRate);\n\t\t\ttimeIndex2 += 4;\n\t\t}\n\n\t}", "public static void periodic() {\n a2 = limelightTable.getEntry(\"ty\").getDouble(0); //Sets a2, the y position of the target\n d = Math.round((h2-h1) / Math.tan(Math.toRadians(a1+a2))); //Calculates distance using a tangent\n\n if(m_gamepad.getStartButtonReleased()) { //Reset errorSum to 0 when start is released\n errorSum = 0;\n }\n\n shooting(); //Determine when we should be shooting\n reportStatistics(); //Report telemetry to the Driver Station\n }", "public native int getDelay() throws MagickException;", "public long getDelay();", "public void autoMode4Red(int delay){\n \taddParallel(new LightCommand(0.25));\n// \taddSequential(new OpenGearSocketCommand());\n//\t\taddSequential(new OpenBoilerSocketCommand());\n \taddSequential(new AutoDriveCommand(6));\n \taddSequential(new TurnWithPIDCommand(-45)); \n \taddSequential(new WaitWithoutCheckCommand(.5));\n \taddSequential(new VisionGearTargetCommand(\"targets\"));\n \taddSequential(new TargetGearSortCommand());\n \taddSequential(new AutoTurnCommand());\n \taddParallel(new EnvelopeCommand(true));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n \taddSequential(new WaitCommand(2));\n// \tif(Robot.envelopeSubsystem.gearCheck()){\n// \t\taddParallel(new EnvelopeCommand(false));\n// \t\taddSequential(new AutoDriveUltraSonicBackwardCommand(-.7, 35));\n// \t\taddSequential(new VisionGearTargetCommand(\"targets\"),0.5);\n// \t\taddSequential(new TargetGearSortCommand(),0.5);\n// \t\taddSequential(new AutoTurnCommand());\n// \t\taddParallel(new EnvelopeCommand(true));\n// \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n// \t\taddSequential(new WaitCommand(2));\n// \t}else{\n// \t\n// \t}\n }", "@Override\r\n\tpublic void simulate() {\n\t\t\r\n\t}", "@Override\n public void simulationPeriodic() {\n }", "long getInitialDelayInSeconds();", "public void setDelay(int delay) {\n\t\ttimer.setInitialDelay(delay);\n\t}", "@Override\n public void loop() {\n switch (auto) {\n\n //Time Function Socks\n case 0:\n if (runtime.milliseconds() <= 6250) {\n robot.hook.setPower(1.0);\n } else if (runtime.milliseconds() > 6250) {\n robot.hook.setPower(0);\n auto++;\n } else {\n robot.hook.setPower(0);\n auto++;\n }\n\n break;\n\n case 1 :\n runtime.reset();\n auto++;\n break;\n\n\n case 2:\n if (runtime.milliseconds() <= 1000) {\n robot.drive(MovementEnum.RIGHTSTRAFE, 0.5);\n }\n else if(runtime.milliseconds() > 1000) {\n robot.drive(MovementEnum.STOP, 0.0);\n auto++;\n }\n else {robot.drive(MovementEnum.STOP, 0.0);\n auto++;\n }\n break;\n\n case 3:\n runtime.reset();\n auto++;\n break;\n\n case 4:\n // if (runtime.milliseconds() >= 12000) {\n //enable for color sensor here using DogeCV or OpenCV (Preferably DogeCV)\n /*\n if (runtime.milliseconds() > 7000) {\n robot.drive(MovementEnum.RIGHTTURN, 0.65);\n }\n auto++;\n */\n if (runtime.milliseconds() <= 3000) {\n robot.drive(MovementEnum.BACKWARD, 1);\n }\n else if(runtime.milliseconds() > 3000){ robot.drive(MovementEnum.STOP,0);}\n else {robot.drive(MovementEnum.STOP,0);}\n // auto++;\n\n\n break;\n\n case 34:\n if (runtime.milliseconds() <= 10000) {\n robot.drive(MovementEnum.BACKWARD, 1);\n }\n else if(runtime.milliseconds() > 10000)\n // auto++;\n break;\n\n case 45:\n if (runtime.milliseconds() > 11000) {\n robot.claw.setPosition(1);\n }\n auto++;\n break;\n\n case 5:\n if (runtime.milliseconds() > 13000) {\n robot.drive(MovementEnum.BACKWARD, 1);\n }\n break;\n\n default: {\n robot.drive(MovementEnum.STOP, 0);\n\n }\n break;\n //if gold color (RGB value) is detected return value. G\n // Go forward, go backwards, and turn left.\n // Go forward until distance to wall is 6 inches.\n // Turn 45 degrees, and go forward.\n // Drop the team marker, then back up into the crater.\n }\n\n }", "public void straight(float rotations, int timeout){\n\t\tcalculateAngles();\n\n\t\t// Get the current program time and starting encoder position before we start our drive loop\n\t\tfloat startTime = data.time.currentTime();\n\t\tfloat startPosition = data.drive.leftDrive.getCurrentPosition();\n\n\t\t// Reset our Integral and Derivative data.\n\t\tdata.PID.integralData.clear();\n\t\tdata.PID.derivativeData.clear();\n\n\n\n\t\t// Manually calculate our first target\n\t\tdata.PID.target = calculateAngles() + (data.PID.IMURotations * 360);\n\n\t\t// We need to keep track of how much time passes between a loop.\n\t\tfloat loopTime = data.time.currentTime();\n\n\t\t// This is the main loop of our straight drive.\n\t\t// We use encoders to form a loop that corrects rotation until we reach our target.\n\t\twhile(Math.abs(startPosition - data.drive.leftDrive.getCurrentPosition()) < Math.abs(rotations) * data.drive.encoderCount){\n\t\t\t// First we check if we have exceeded our timeout and...\n\t\t\tif(startTime + timeout < data.time.currentTime()){\n\t\t\t\t// ... stop our loop if we have.\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Record the time since the previous loop.\n\t\t\tloopTime = data.time.timeFrom(loopTime);\n\t\t\t// Calculate our angles. This method may modify the input Rotations.\n\t\t\t//IMURotations =\n\t\t\tcalculateAngles();\n\t\t\t// Calculate our PID\n\t\t\tcalculatePID(loopTime);\n\n\t\t\t// Calculate the Direction to travel to correct any rotational errors.\n\t\t\tfloat Direction = ((data.PID.I * data.PID.ITuning) / 2000) + ((data.PID.P * data.PID.PTuning) / 2000) + ((data.PID.D * data.PID.DTuning) / 2000);\n\t\t\t// Constrain our direction from being too intense.\n\n\t\t\t// Define our motor power multiplier\n\n\t\t\t// Before we set the power of our motors, we need to adjust for forwards or backwards\n\t\t\t// movement. We can use the sign of Rotations to determine this\n\t\t\t// We are moving forwards\n\t\t\tdata.drive.rightDrive.setPower(data.drive.POWER_CONSTANT - (Direction));\n\t\t\tdata.drive.leftDrive.setPower(data.drive.POWER_CONSTANT + (Direction));\n\t\t}\n\t\t// Our drive loop has completed! Stop the motors.\n\t\tdata.drive.rightDrive.setPower(0);\n\t\tdata.drive.leftDrive.setPower(0);\n\t}", "public static void delay() {\n\n long ONE_SECOND = 1_000;\n\n try {\n Thread.sleep(ONE_SECOND);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "void robotPeriodic();", "@Override\n\t\t\t\tpublic void ecCalibrationStatus(LinphoneCore lc, EcCalibratorStatus status,\n\t\t\t\t\t\tint delay_ms, Object data) {\n\t\t\t\t\t\n\t\t\t\t}", "@OnClick(R.id.calibrate)\n public void onCalibrate() {\n popupCalibratingDialog();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n presenter.calibrate();\n }\n }, 600);\n }", "@Override\n public void periodic() {\n\t\t// myDrive.\n\n\t\t// System.out.println(Robot.m_oi.getSpeed());\n\t\t// SmartDashboard.putNumber(\"Dial Output: \", Robot.m_oi.getSpeed());\n\n\t\t// //Wheel Speed Limits\n\n\t\t// SmartDashboard.putNumber(\"Front Left Percent\", myDrive.getFLSpeed());\n\t\t// SmartDashboard.putNumber(\"Front Right Percent\", myDrive.getFRSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Left Percent\", myDrive.getRLSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Right Percent\", myDrive.getRRSpeed());\n\n\t\t//Test Code for Selecting Calibration Motor \n\t\t//***COMMENT OUT BEFORE REAL GAME USE***\n\t\t// if (Robot.m_oi.getArmDown()) {\n\t\t// \t// System.out.println(\"Front Left Wheel Selected\");\n\t\t// \tWheel = 1;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getArmUp()) {\n\t\t// \t// System.out.println(\"Back Left Wheel Selected\");\n\t\t// \tWheel = 2;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallIn()) {\n\t\t// \t// System.out.println(\"Front Right Wheel Selected\");\n\t\t// \tWheel = 3;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallOut()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 4;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBlueButton()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 0;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t// } \n\n\t\t// if (Wheel == 1) {\n\n\t\t// \tmyDrive.setFLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 2) {\n\n\t\t// \tmyDrive.setRLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 3) {\n\n\t\t// \tmyDrive.setFRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 4) {\n\n\t\t// \tmyDrive.setRRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// }\n\n\t\t// if (Robot.m_oi.getSafety()) {\n\n\t\t// \tspeedLimit = 1.0;\n\t\t// \tstrafeLimit = 1.0;\n\n\t\t// } else {\n\n\t\t// \tspeedLimit = 0.5; \n\t\t// \tstrafeLimit = 0.8;\n\t\t\t\t\n\t\t// }\n\n\n\n\t\t//System.out.print (\"strafeLimit: \" + strafeLimit);\n\t\t//System.out.println(Robot.m_oi.getX() * strafeLimit);\n\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY() * speedLimit), // set Y speed\n\t\t// \t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t// \t(Robot.m_oi.getRotate() * rotateLimit), // set rotation rate\n\t\t// \t0); // gyro angle \n\t\t\n\t\t//TODO: Rotate robot with vision tracking, set up curve to slow down as target approaches center.\n\t\t// if (Robot.m_oi.getStartButton()) {\n\t\t// \tmyDrive.driveCartesian(\n\t\t// \t\t (0.4), // set Rotation\n\t\t// \t\t (0.0), // set Strafe\n\t\t// \t\t (0.0), // set Forward/Back\n\t\t// \t\t 0);\n\t\t// } else {\n\t\tmyDrive.driveCartesian(\n\t\t\t(Robot.m_oi.getY() * rotateLimit), // set Y speed\n\t\t\t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t\t(Robot.m_oi.getRotate() * speedLimit), // set rotation rate\n\t\t\t0);\n\t\t// }\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY()), // set Y speed\n\t\t// \t(Robot.m_oi.getX()), // set X speed\n\t\t// \t(Robot.m_oi.getRotate()), // set rotation rate\n\t\t// \t0); \n\n }", "protected void initialize() {\n \t starttime = Timer.getFPGATimestamp();\n \tthis.startAngle = RobotMap.navx.getAngle();\n \tangleorientation.setSetPoint(RobotMap.navx.getAngle());\n \t\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \n //settting talon control mode\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.MotionMagic);\t\t\n\t\tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.Follower);\t\n\t\tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.MotionMagic);\t\n\t\tRobotMap.motorRightOne.changeControlMode(TalonControlMode.Follower);\n\t\t//setting peak and nominal output voltage for the motors\n\t\tRobotMap.motorLeftTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorLeftTwo.configNominalOutputVoltage(0.00f, 0.0f);\n\t\tRobotMap.motorRightTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorRightTwo.configNominalOutputVoltage(0.0f, 0.0f);\n\t\t//setting who is following whom\n\t\tRobotMap.motorLeftOne.set(4);\n\t\tRobotMap.motorRightOne.set(3);\n\t\t//setting pid value for both sides\n\t//\tRobotMap.motorLeftTwo.setCloseLoopRampRate(1);\n\t\tRobotMap.motorLeftTwo.setProfile(0);\n\t RobotMap.motorLeftTwo.setP(0.000014f);\n \tRobotMap.motorLeftTwo.setI(0.00000001);\n\t\tRobotMap.motorLeftTwo.setIZone(0);//325);\n\t\tRobotMap.motorLeftTwo.setD(1.0f);\n\t\tRobotMap.motorLeftTwo.setF(this.fGainLeft+0.014);//0.3625884);\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t RobotMap.motorRightTwo.setCloseLoopRampRate(1);\n\t RobotMap.motorRightTwo.setProfile(0);\n\t\tRobotMap.motorRightTwo.setP(0.000014f);\n\t\tRobotMap.motorRightTwo.setI(0.00000001);\n\t\tRobotMap.motorRightTwo.setIZone(0);//325);\n\t\tRobotMap.motorRightTwo.setD(1.0f);\n\t\tRobotMap.motorRightTwo.setF(this.fGainRight);// 0.3373206);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t\t//setting Acceleration and velocity for the left\n\t\tRobotMap.motorLeftTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorLeftTwo.setMotionMagicCruiseVelocity(250);\n\t\t//setting Acceleration and velocity for the right\n\t\tRobotMap.motorRightTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorRightTwo.setMotionMagicCruiseVelocity(250);\n\t\t//resets encoder position to 0\t\t\n\t\tRobotMap.motorLeftTwo.setEncPosition(0);\n\t\tRobotMap.motorRightTwo.setEncPosition(0);\n\t //Set Allowable error for the loop\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(300);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(300);\n\t\t\n\t\t//sets desired endpoint for the motors\n RobotMap.motorLeftTwo.set(motionMagicEndPoint);\n RobotMap.motorRightTwo.set(-motionMagicEndPoint );\n \t\n }", "public void testGyroAngleCalibratedParameters() {\n // Get calibrated parameters to make new Gyro with parameters\n final double calibratedOffset = m_tpcam.getGyro().getOffset();\n final int calibratedCenter = m_tpcam.getGyro().getCenter();\n m_tpcam.freeGyro();\n m_tpcam.setupGyroParam(calibratedCenter, calibratedOffset);\n Timer.delay(TiltPanCameraFixture.RESET_TIME);\n // Repeat tests\n testInitial(m_tpcam.getGyroParam());\n testDeviationOverTime(m_tpcam.getGyroParam());\n testGyroAngle(m_tpcam.getGyroParam());\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n\tpublic void testPeriodic(){\n\t\t//Testing xbox buttons, joysticks and triggers\n\t\tOI.refreshAll();\n//\t\t//System.out.println(\"Left Y = \" + xbox.LeftStick.Y);\n//\t\t//System.out.println(\"Right Y = \" + xbox.RightStick.Y);\n//\t\t\n//\t\t\n//\t\tfinal double cpr = 360.0;\n//\t\tfinal double encoder_angular_distance_per_pulse = 2.0*Math.PI / cpr;\n//\t\tfinal double wheel_radius = 2.5; // .564 in (18T 5mm pitch)\n//\t\tfinal double encLinearDistancePerPulse = wheel_radius * encoder_angular_distance_per_pulse; //2.0 * Math.PI / cpr;\n//\t\t\n//\t\tSystem.out.println(enc.getRaw()*encLinearDistancePerPulse);\n//\t\t\n\t\t\n\t\t//System.out.println(gyro.getAngle(MPU6050.Axis.X));\n\n\t //PNEUMATICS\n\t //c.setClosedLoopControl(true);\n\t //c.setClosedLoopControl(false);\n\t}", "public AutonDelay(double timeout) {\n super(\"autonDelay\");\n setTimeout(timeout);\n }", "@Override\n public void simulationPeriodic() {\n }", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "public static double ParaTimer(){\n return (System.nanoTime() - timer)/(1000000000.);\n }", "private void pulse()\n {\n }", "private void waitConstant() {\r\n \t\tlong\tlwait = CL_FRMPRDAC;\r\n \t\t// drawing is active?\r\n \t\tif(m_fHorzShift == 0 && m_lTimeZoomStart == 0\r\n \t\t\t\t&& GloneApp.getDoc().isOnAnimation() == false)\r\n \t\t\tlwait = CL_FRMPRDST;\t\t// stalled\r\n \r\n \t\t// make constant fps\r\n \t\t// http://stackoverflow.com/questions/4772693/\r\n \t\tlong\tldt = System.currentTimeMillis() - m_lLastRendered;\r\n \t\ttry {\r\n \t\t\tif(ldt < lwait)\r\n \t\t\t\tThread.sleep(lwait - ldt);\r\n \t\t} catch (InterruptedException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t}", "@Override\r\n\tpublic void run() {\r\n\t\ttimer = new Timer();\r\n\t\ttimer.schedule(new TimerTask() {\r\n\t\t\t@Override\r\n public void run() {\r\n Main.myIntegratedSensorSuite.reinitializeRainData();\r\n }\r\n\t\t}, 0, 20000); //runs once initially then again every 20 seconds\r\n\t}", "@Test\r\n\tpublic void macroTest(){\r\n\t\t\r\n\t\trunner = new AutoRunner();\r\n\t\t//runnerSpy = spy(runner);\r\n\t\t//macro = new AutoTranslateRightMacro();\r\n\t\t\r\n\t\tReferenceData.getInstance().getDriveTrainData().setLeftEncoderTicks(0);\r\n\t\tReferenceData.getInstance().getDriveTrainData().setRightEncoderTicks(0);\r\n\t\t\r\n\t\tReferenceData.getInstance().getUserInputData().setAutoTranslateLeft(true);\r\n\t\t//runner.setTask(macro);\r\n\t\tReferenceData.getInstance().getUserInputData().setAutoTranslateRight(true);\r\n\t\trunner.teleopPeriodic();\r\n\t\t\r\n\t\tassertTrue(runner.getTask().hasInitalized());\r\n\t\t\r\n\t\tReferenceData.getInstance().getDriveTrainData().setLeftEncoderTicks(100);\r\n\t\tReferenceData.getInstance().getDriveTrainData().setRightEncoderTicks(100);\r\n\t\t\r\n\t\trunner.teleopPeriodic();\r\n\t\t//goFoward1\r\n\t\tassertEquals(1, ReferenceData.getInstance().getUserInputData().getJoystickLeft(), .0001);\r\n\t\tassertEquals(1, ReferenceData.getInstance().getUserInputData().getJoystickRight(), .0001);\r\n\t\tassertEquals(0, ReferenceData.getInstance().getUserInputData().getJoystickX(), .0001);\r\n\t\tassertEquals(1, ReferenceData.getInstance().getUserInputData().getJoystickY(), .0001);\r\n\r\n\t\tReferenceData.getInstance().getDriveTrainData().setLeftEncoderTicks(1190);\r\n\t\tReferenceData.getInstance().getDriveTrainData().setRightEncoderTicks(1190);\r\n\t\t\r\n\t\trunner.teleopPeriodic();\r\n\t\trunner.teleopPeriodic();\r\n\t\t//turnRight\r\n\t\tassertEquals(.5, ReferenceData.getInstance().getUserInputData().getJoystickLeft(), .0001);\r\n\t\tassertEquals(-.5, ReferenceData.getInstance().getUserInputData().getJoystickRight(), .0001);\r\n\t\tassertEquals(.5, ReferenceData.getInstance().getUserInputData().getJoystickX(), .0001);\r\n\t\tassertEquals(0, ReferenceData.getInstance().getUserInputData().getJoystickY(), .0001);\r\n\t\t\r\n\t\tReferenceData.getInstance().getDriveTrainData().setLeftEncoderTicks(1300);\r\n\t\tReferenceData.getInstance().getDriveTrainData().setRightEncoderTicks(1060);\r\n\t\t\r\n\t\trunner.teleopPeriodic();\r\n\t\trunner.teleopPeriodic();\r\n\t\t//goFoward2\r\n\t\tassertEquals(1, ReferenceData.getInstance().getUserInputData().getJoystickLeft(), .0001);\r\n\t\tassertEquals(1, ReferenceData.getInstance().getUserInputData().getJoystickRight(), .0001);\r\n\t\tassertEquals(0, ReferenceData.getInstance().getUserInputData().getJoystickX(), .0001);\r\n\t\tassertEquals(1, ReferenceData.getInstance().getUserInputData().getJoystickY(), .0001);\r\n\t\t\r\n\t\tReferenceData.getInstance().getDriveTrainData().setLeftEncoderTicks(1510);\r\n\t\tReferenceData.getInstance().getDriveTrainData().setRightEncoderTicks(1270);\r\n\t\t\r\n\t\trunner.teleopPeriodic();\r\n\t\trunner.teleopPeriodic();\r\n\t\t//turnLeft\r\n\t\tassertEquals(-.5, ReferenceData.getInstance().getUserInputData().getJoystickLeft(), .0001);\r\n\t\tassertEquals(.5, ReferenceData.getInstance().getUserInputData().getJoystickRight(), .0001);\r\n\t\tassertEquals(-.5, ReferenceData.getInstance().getUserInputData().getJoystickX(), .0001);\r\n\t\tassertEquals(0, ReferenceData.getInstance().getUserInputData().getJoystickY(), .0001);\r\n\t\t\r\n\t\tReferenceData.getInstance().getDriveTrainData().setLeftEncoderTicks(1400);\r\n\t\tReferenceData.getInstance().getDriveTrainData().setRightEncoderTicks(1400);\r\n\t\t\r\n\t\trunner.teleopPeriodic();\r\n\t\trunner.teleopPeriodic();\r\n\t\t//goBackwards\r\n\t\tassertEquals(-1, ReferenceData.getInstance().getUserInputData().getJoystickLeft(), .0001);\r\n\t\tassertEquals(-1, ReferenceData.getInstance().getUserInputData().getJoystickRight(), .0001);\r\n\t\tassertEquals(0, ReferenceData.getInstance().getUserInputData().getJoystickX(), .0001);\r\n\t\tassertEquals(-1, ReferenceData.getInstance().getUserInputData().getJoystickY(), .0001);\r\n\t\t\r\n\t\tReferenceData.getInstance().getDriveTrainData().setLeftEncoderTicks(130);\r\n\t\tReferenceData.getInstance().getDriveTrainData().setRightEncoderTicks(130);\r\n\t\t\r\n\t\trunner.teleopPeriodic();\r\n\t\trunner.teleopPeriodic();\r\n\t\t//hasFinished\r\n\t\tassertTrue(runner.getTask().hasFinished());\r\n\t\t\r\n\t\t\r\n\t\t//doReturn(mockLeftTalon).when(runnerSpy).getLeftTalon();\r\n\t\t//when(gamePad.getXRight()).thenReturn(val);\r\n\t}", "public void process()\n {\n // Get current time\n\t\tdouble t = readClock() * clockSpeed;\n\t\tdouble dTime = t - computeClock;\n\t\tdouble dtMax = 1/50.0f;\n\t\n\t\t// Set current time on display\n\t\tcomputeClock = t;\n\t\t\n\n // Only process if time has elapsed\n if (dTime <= 0)\n return;\n\n\n\t\t// ---------------\n\t\n\t\t// Compute accelerations, then integrate (using Critter methods)\n\t\n\t // This part advances the simulation forward by dTime seconds, but\n\t // using steps that are no larger than dtMax (this means it takes\n\t // more than one step when dTime > dtMax -- the number of steps\n\t // you need is stored in numSteps).\n\t\n\t // *** placeholder value\n\t int numSteps = (int) Math.floor(dTime / dtMax);\n\t \n\t // compute a new 'goal' point for the mainbug to attract toward - every 7 seconds\n\t if ((computeClock) - (goalPickClock) > 7)\n\t {\n\t \t// pick a new random goal point\n\t \tgoal = new Point3d(rgen.nextDouble()*16-8, rgen.nextDouble()*16-8, 0);\n\t \tgoalPickClock = computeClock;\n \t\n\t \ttarget = (int)rgen.nextDouble()*(critters.size()-2);\n\t \twhile (critters.get(target) == predator || critters.get(target) == mainBug)\n\t \t\ttarget = (int)(rgen.nextDouble()*(critters.size()-1));\n\t }\n\t \n\t // Here is the rough structure of what you'll need\n\t //\n\t\t// numSteps = how many steps to take for stable integration\n\t // do numSteps times\n\t // - reset acceleration\n\t // - compute acceleration (adding up accelerations from attractions,\n\t // repulsions, drag, ...)\n\t // - integrate (by dTime/numSteps)\n\t // end\n\t //\n\t // ...\n\t for (int i = 0; i < numSteps; i++)\n\t {\n\t \tfor (int k = 0; k < critters.size(); k++)\n\t \t{\n\t \t\tCritter tmp = critters.get(k);\n\t \t\ttmp.accelReset();\n\t \t\ttmp.accelDrag(0.6); // dampening\n\t \t\t\n\n\t \t\t\n\t \t\tif (tmp == mainBug)// big bug follows randomized 'goal' point (food? water? shelter? )\n\t \t\t{\n\t \t\t\ttmp.accelAttract(goal, 0.1, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.3, -2);\n\t \t\t\ttmp.accelAttract(origin, 0.25, 1);\t \t\t\t // attraction toward center of scene\n\t \t\t}\n\t \t\telse if (tmp == predator )\n\t \t\t{\n \t\t\t\t\ttmp.accelAttract(critters.get(target).getLocation(), rgen.nextDouble()*0.4, 2);\t \t\t\t\t\t\n\t \t\t}\n\t \t\telse \n\t \t\t{\n\t \t\t\t// baby bugs follow big bug and are repelled from other baby bugs and predator!\n\t \t\t\ttmp.accelAttract(mainBug.getLocation(), rgen.nextDouble()*0.3, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.45, -3);\n\t \t\t\tfor (int m = 0; m < critters.size(); m++)\n\t \t\t\t{\n\t \t\t\t\tif (critters.get(m) != mainBug && critters.get(m) != tmp)\n\t \t\t\t\t\ttmp.accelAttract(critters.get(m).getLocation(), -rgen.nextDouble()*0.5, -1);\t \t\t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t\n\t\t \t// repulsion away from obstacles\n\t\t \tfor (int j = 0; j < obstacles.size(); j++)\n\t\t \t{\n\t\t \t\ttmp.accelAttract(obstacles.get(j).getLocation(), -0.5, -2);\n\t\t \t}\n\t\t \t\n\t\t \ttmp.integrate(dTime/numSteps);\n\t \t}\n\t }\n\t\n\t // Keyframe motion for each critter\n\t for (int i = 0; i < critters.size(); i++)\n\t {\n\t \tcritters.get(i).keyframe(critters.get(i).dist);\n\t }\n }", "public void setWait(int time)\n\t{\n\t\tthis.dx = 1;\n\t\tthis.dy = 1;\n\t\tthis.time = time;\n\t\t//run();\n\t}", "public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }", "public void autonomousPeriodic() {\n //Scheduler.getInstance().run();\n /** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet\n myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1\n autoLoopCounter++;\n } else {\n myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop\n }*/\n }", "public void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\t\n shooterArm.updateSmartDashboard();\n\t\tdriveTrain.getDegrees();\n\n\t\tvision.findGoal();\n\t\tvision.getGoalXAngleError();\n\t\tvision.getGoalArmAngle();\n\n\t\t// Stop auto mode if the robot is tilted too much\n\t\tif (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60)\n\t\t\ttimerTilt.reset();\n\t\t\n\t\t// For some reason, robot did not move in last match in auto, so this code is suspect\n\t\t// Do the Pitch/Roll values need to be zeroed?\n//\t\tif ( autonomousCommand != null && timerTilt.get()>0.5)\n//\t\t\tautonomousCommand.cancel();\n\n\t}", "public void setDelay(float time)\n\t{\n\t\tdelayMax=time;\n\t}", "public void autoStopForwardDelayTime(int delay) throws JposException;", "int getNominalDelay();", "public void setDelayMove(float delay_)\n\t{\n\t\tdelayMove=delayMove+delay_;\n\t}", "@WithName(\"schedule.delay\")\n @WithDefault(\"5s\")\n Duration scheduleDelay();", "private static void processGroundCal()\n\t{\n\t\tif (testMotor != null) {\n\t\t\tSystem.out.println(\"Calibrating arm to floor position\");\n\t\t\ttestMotor.setPosition(SOFT_ENCODER_LIMIT_FLOOR);\n\t\t}\n\t}", "@Override\n\tpublic void ecCalibrationStatus(LinphoneCore lc, EcCalibratorStatus status,\n\t\t\tint delay_ms, Object data) {\n\t\t\n\t}", "@Override\n public void runOpMode() throws InterruptedException {\n robot = new OptimizedRobot(gamepad1, gamepad2, telemetry, hardwareMap);\n\n // Grab our controller 1 using robot.getController1()\n\n controller1 = robot.getController1();\n\n // Grab our our encoders using robot.getEncoder() there are TWO of them\n // Use xEncoder and yEncoder for the names!\n\n xEncoder = robot.getEncoder(\"XEncoder\");\n yEncoder = robot.getEncoder(\"YEncoder\");\n\n // Reverse the direction of our left encoder using encoder.setDirection()\n\n xEncoder.setDirection(Encoder.Direction.REVERSE);\n\n\n // Waiting for the play button to be pressed\n waitForStart();\n\n robot.log(\"Instructions\", \"Your job is the move the robot \"+DISTANCE_TO_TRAVEL+\" forward and right for each trial!\");\n\n for(int i = 0; i < NUM_SAMPLES; i++) {\n robot.addLog(\"Prompt\", \"Trial #\"+(i+1)+\" of \"+NUM_SAMPLES);\n robot.addLog(\"Prompt\", \"Set up your robot on its start position and press A to start the tuning!\");\n robot.pushLog();\n\n while(!controller1.getBool(OptimizedController.Key.A)) {\n }\n\n prevX = xEncoder.getCurrentPosition();\n prevY = yEncoder.getCurrentPosition();\n\n robot.addLog(\"Running\", \"Drag your robot forward \"+DISTANCE_TO_TRAVEL+\" inches and \"+DISTANCE_TO_TRAVEL+\" inches to the right!\");\n robot.addLog(\"Running\", \"Try to keep the robot straight the entire time--try using a line on the floor for reference.\");\n robot.addLog(\"Instructions\", \"Press B when you have finished moving the robot!\");\n robot.pushLog();\n\n while(!controller1.getBool(OptimizedController.Key.B)) {\n estimatedX = xEncoder.getCurrentPosition() - prevX;\n estimatedY = yEncoder.getCurrentPosition() - prevY;\n }\n\n xTraveled[i] = estimatedX;\n yTraveled[i] = estimatedY;\n }\n\n\n double xCoefficient = 0;\n double yCoefficient = 0;\n\n for(int num : xTraveled) {\n xCoefficient += (TICKS_PER_REV * (DISTANCE_TO_TRAVEL / (2 * Math.PI * ODOMETRY_WHEEL_RADIUS))) / num;\n }\n\n for(int num : yTraveled) {\n yCoefficient += (TICKS_PER_REV * (DISTANCE_TO_TRAVEL / (2 * Math.PI * ODOMETRY_WHEEL_RADIUS))) / num;\n }\n\n xCoefficient /= NUM_SAMPLES;\n yCoefficient /= NUM_SAMPLES;\n\n robot.addLog(\"xEncoder Coefficient = \", Math.abs(xCoefficient));\n robot.addLog(\"yEncoder Coefficient = \", Math.abs(yCoefficient));\n robot.pushLog();\n\n while(opModeIsActive()) {\n }\n }", "double getDefaultTimerTrig();", "@Test\n\tpublic void testRepeatibleDynamics() throws IOException, PropertiesException {\n\n\t\t\n\t\t// INSTANTIATE benchmark \n\t\tProperties props = PropertiesUtil.setpointProperties(new File (\"src/main/resources/sim.properties\"));\n\t\tSetPointGenerator lg = new SetPointGenerator (props);\n\t\tList<ExternalDriver> externalDrivers = new ArrayList<ExternalDriver>();\n\t\texternalDrivers.add(lg);\n\t\tIndustrialBenchmarkDynamics d = new IndustrialBenchmarkDynamics (props, externalDrivers);\n\t\tRandom actionRand = new Random(System.currentTimeMillis());\n \n // 1) do 100000 random steps, in order to initialize dynamics\n\t\tfinal ActionDelta action = new ActionDelta(0.001f, 0.001f, 0.001f); \n\t\tfor (int i=0; i<INIT_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t}\n\t\t\n\t\t// 2) memorize current observable state and current markov state\n\t\tfinal ObservableState os = d.getState();\n\t\tfinal DataVector ms = d.getInternalMarkovState();\n\t\tSystem.out.println (\"init o-state: \" + os.toString());\n\t\tSystem.out.println (\"init m-state: \" + ms.toString());\n\t\t\n\t\t\n\t\t// 3) perform test trajectory and memorize states\n\t\tactionRand.setSeed(ACTION_SEED);\n\t\tDataVector oStates[] = new DataVector[MEM_STEPS];\n\t\tDataVector mStates[] = new DataVector[MEM_STEPS];\n\t\t\t\t\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t\toStates[i] = d.getState();\n\t\t\tmStates[i] = d.getInternalMarkovState();\n\t\t}\n\t\t\n\t\t// 4) reset dynamics & parameters and internal markov state\n\t\td.reset();\n\t\td.setInternalMarkovState(ms);\n\t\t\n\t\t// 5) reperform test and check if values are consistent\n\t\tactionRand.setSeed(ACTION_SEED); // reproduce action sequence\n\t\tDataVector oState = null;\n\t\tDataVector mState = null;\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\t\n\t\t\td.step(action);\n\t\t\toState = d.getState();\n\t\t\tmState = d.getInternalMarkovState();\n\t\t\t\n\t\t\t// check observable state\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.SetPoint), oState.getValue(ObservableStateDescription.SetPoint), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Fatigue), oState.getValue(ObservableStateDescription.Fatigue), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Consumption), oState.getValue(ObservableStateDescription.Consumption), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.RewardTotal), oState.getValue(ObservableStateDescription.RewardTotal), 0.0001);\n\n\t\t\t// \n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.CurrentOperationalCost), mState.getValue(MarkovianStateDescription.CurrentOperationalCost), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent2), mState.getValue(MarkovianStateDescription.FatigueLatent2), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent1), mState.getValue(MarkovianStateDescription.FatigueLatent1), 0.0001);\n\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionGainBeta), mState.getValue(MarkovianStateDescription.EffectiveActionGainBeta), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), mState.getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveShift), mState.getValue(MarkovianStateDescription.EffectiveShift), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.MisCalibration), mState.getValue(MarkovianStateDescription.MisCalibration), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), mState.getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardFatigue), mState.getValue(MarkovianStateDescription.RewardFatigue), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardConsumption), mState.getValue(MarkovianStateDescription.RewardConsumption), 0.0001);\n\t\t}\n\t\t\n\t\tSystem.out.println (\"last o-state 1st trajectory: \" + oStates[oStates.length-1]);\n\t\tSystem.out.println (\"last o-state 2nd trajectory: \" + oState);\n\t\t\n\t\tSystem.out.println (\"last m-state 1st trajectory: \" + mStates[oStates.length-1]);\n\t\tSystem.out.println (\"last m-state 2nd trajectory: \" + mState);\n\t}", "public static void startTimeout() {\n t = new Timer();\n tt = new TimerTask() {\n\n public void run() {\n while (true) {\n if (diff[0] > 0 || diff[1] > 0) {\n try {\n runFocusPoint();\n Thread.sleep(50);\n } catch (InterruptedException ex) {\n //ex.printStackTrace();\n }\n } else {\n break;\n }\n }\n cancelTask();\n diff[0] = 0;\n diff[1] = 0;\n }\n };\n t.scheduleAtFixedRate(tt, 0, 50);\n }", "public void setRowDelay(float rowDelay) {\n/* 136 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void testPeriodic() {\n go_speed=-xbox_controller.getRawAxis(1);\n turn_speed=xbox_controller.getRawAxis(4);\n right_motor_2.set(-go_speed+turn_speed);\n left_motor_1.set(go_speed+turn_speed);\n\n while(xbox_controller.getRawButton(2)){\n double x = tx.getDouble(0.0);\n double a = ta.getDouble(0.0);\n if(a >= 1 && a <= 1.7){\n servo.set(0.26);\n if (x > -6 && x < 6){\n right_motor_2.set(0);\n left_motor_1.set(0);\n if_correted=true;\n break;\n } \n else if ( x >= 6 ){\n right_motor_2.set(0.15);\n left_motor_1.set(0.15);\n }\n else if ( x <= -6 ){\n right_motor_2.set(-0.15);\n left_motor_1.set(-0.15);\n }\n }\n else if(a>=0.8 && a<1){\n servo.set(0.35);\n if (x > -2.3 && x < 2.3){\n right_motor_2.set(0);\n left_motor_1.set(0);\n if_correted=true;\n break;\n } \n else if ( x >= 2.3 ){\n right_motor_2.set(0.11);\n left_motor_1.set(0.11);\n }\n else if ( x <= -2.3 ){\n right_motor_2.set(-0.11);\n left_motor_1.set(-0.11);\n }\n }\n else if(a>=0.5 && a<0.8){\n servo.set(0.5);\n if (x > -1.7 && x < 1.7){\n right_motor_2.set(0);\n left_motor_1.set(0);\n if_correted=true;\n break;\n } \n else if ( x >= 1.7 ){\n right_motor_2.set(0.08);\n left_motor_1.set(0.08);\n }\n else if ( x <= -1.7 ){\n right_motor_2.set(-0.08);\n left_motor_1.set(-0.08);\n }\n }\n else if(a>=0.3 && a<0.5){\n servo.set(0.32);\n if (x > -1.2 && x < 1.2){\n right_motor_2.set(0);\n left_motor_1.set(0);\n if_correted=true;\n break;\n } \n else if ( x >= 1.2 ){\n right_motor_2.set(0.05);\n left_motor_1.set(0.05);\n }\n else if ( x <= -1.2 ){\n right_motor_2.set(-0.05);\n left_motor_1.set(-0.05);\n }\n }\n else{}\n }\n\n if(xbox_controller.getRawAxis(2)!=0){\n ball_collection_motor.set(1);\n }\n else{\n ball_collection_motor.set(0);\n }\n\n while(joystick.getRawButton(5)){\n double a=ta.getDouble(0.0);\n if(a>=1&&a<=1.7){\n servo.set(0.26);\n }\n else if(a>=0.8 && a<1){\n servo.set(0.35);\n }\n else if(a>=0.5 && a<0.8){\n servo.set(0.5);\n }\n else if(a>=0.3 && a<0.5){\n servo.set(0.32);\n }\n else{}\n }\n\n while (joystick.getRawButton(6)) {\n double x = tx.getDouble(0.0);\n if ( x>-1 && x<1 ){\n right_motor_2.set(0);\n left_motor_1.set(0);\n if_correted=true;\n break;\n } \n else if ( x >= 1 ){\n right_motor_2.set(0.05);\n left_motor_1.set(0.05);\n }\n else if ( x <= -1 ){\n right_motor_2.set(-0.05);\n left_motor_1.set(-0.05);\n }\n else{}\n }\n\n if(xbox_controller.getRawButton(3)){\n System.out.println(currentServoAngle);\n servo.set(currentServoAngle + factor);\n currentServoAngle += factor;\n pushed = true;\n if(currentServoAngle >= 1 || (currentServoAngle <= 0 && pushed == true)){\n factor *= -1;\n } \n }\n \n \n //ball_collection_motor.set(xbox_controller.getRawAxis(2));//xbox rt\n if(xbox_controller.getRawAxis(3)!=0){\n while(xbox_controller.getRawAxis(3)){\n left_low_eject.set(ControlMode.PercentOutput, 1);\n right_low_eject.set(ControlMode.PercentOutput,-1);\n TimeUnit.SECONDS.sleep(0.5);\n left_belt.set(ControlMode.PercentOutput,-0.5);\n right_belt.set(ControlMode.PercentOutput,0.5);\n }\n }\n else{\n left_low_eject.set(ControlMode.PercentOutput,0);\n right_low_eject.set(ControlMode.PercentOutput,0);\n left_belt.set(ControlMode.PercentOutput,0);\n right_belt.set(ControlMode.PercentOutput,0);\n }\n if(xbox_controller.getRawButton(1)){\n double_solenoid_1.set(DoubleSolenoid.Value.kForward);\n }\n else if(xbox_controller.getRawButton(4)){\n double_solenoid_1.set(DoubleSolenoid.Value.kReverse);\n }\n if(xbox_controller.getRawButton(5)){\n right_motor_2.set(-0.1);\n left_motor_1.set(-0.1);\n }\n else if(xbox_controller.getRawButton(6)){\n right_motor_2.set(0.1);\n left_motor_1.set(0.1);\n }\n if(xbox_controller.getRawButton(8)){\n /*\n for(double speed=0;speed<=0.85;speed+=0.000002){\n left_high_eject.set(speed+0.2*(joystick.getRawAxis(3)-control_speed_init));\n } \n */\n if(high_eject_run==false){\n high_eject_run=true;\n eject_speed=0;\n }\n\n }\n\n if(xbox_controller.getRawButton(7)){\n left_high_eject.set(0);\n high_eject_run=false;\n eject_speed=0;\n }\n if(high_eject_run){\n if(eject_speed<=0.85){\n //System.out.println(123);\n eject_speed+=0.001;\n //System.out.println(eject_speed);\n left_high_eject.set(-eject_speed);\n }\n }\n\n \n }", "private static void delay() throws InterruptedException {\n\t\tTimeUnit.MILLISECONDS.sleep((long) (minDelay + (long)(Math.random() * ((maxDelay - minDelay) + 1))));\n\t}", "public void faster() {\n myTimer.setDelay((int) (myTimer.getDelay() * SPEED_FACTOR));\n }", "public void autoStopBackwardDelayTime(int delay) throws JposException;", "private void driveForwardTimer()\r\n\t{\r\n\t\tif(timer.get() < Config.Auto.timeDriveForward){\r\n\t\t\tdrive.setSpeed(0, 0, Config.Auto.driveForwardSpeed, Config.Auto.driveForwardSpeed);\r\n\t\t\tSystem.out.println(timer.get());}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tdrive.setSpeed(0, 0, 0, 0);\r\n\t\t\tautoStep++;\r\n\t\t}\r\n\t}" ]
[ "0.6849989", "0.63543534", "0.6152966", "0.6139868", "0.60854536", "0.6071452", "0.60481364", "0.60448134", "0.60304767", "0.60186523", "0.5995659", "0.5954337", "0.5907445", "0.5894149", "0.588571", "0.58830005", "0.5858243", "0.584246", "0.58309054", "0.58207965", "0.58126986", "0.5808753", "0.5780331", "0.5779653", "0.5769547", "0.5747073", "0.5744665", "0.57290393", "0.5720854", "0.5703311", "0.5672203", "0.5648594", "0.56476593", "0.56400126", "0.56378424", "0.562705", "0.56096536", "0.5608271", "0.5597919", "0.55932546", "0.5591316", "0.5568109", "0.5567269", "0.55629927", "0.5550739", "0.5550023", "0.5546077", "0.5534154", "0.5531702", "0.5528189", "0.55281574", "0.54975426", "0.54935944", "0.5493537", "0.5489625", "0.54891455", "0.5488959", "0.5481847", "0.54710233", "0.5465297", "0.54620785", "0.54589355", "0.5455619", "0.54488665", "0.54488665", "0.54488665", "0.54488665", "0.54488665", "0.54488665", "0.5447343", "0.5443648", "0.5439579", "0.5436206", "0.54349446", "0.5429114", "0.54248905", "0.54233503", "0.54092276", "0.54050416", "0.54036695", "0.53990006", "0.53958607", "0.5395207", "0.53911656", "0.5390096", "0.538617", "0.5381356", "0.5377557", "0.53759986", "0.53690344", "0.5367688", "0.536666", "0.53585654", "0.53578156", "0.53479046", "0.53301316", "0.5323408", "0.5318975", "0.5317877", "0.53171796" ]
0.5992276
11
Simulate the delay in right_align
public void right_align() { buttonListener.displayMessage("Calibrating", 1); try { TimeUnit.SECONDS.sleep(1); } catch (Exception e){ System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void animateMovementRight()\n {\n if(animationCount%frameRate == 0)\n {\n imageNumber = (imageNumber + 1)% (rightMvt.length);\n setImage(rightMvt[imageNumber]);\n }\n }", "public void RotateRight(double speed, int distance) {\n // Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n sleep(500);\n\n robot2.DriveRightFront.setTargetPosition(0);\n robot2.DriveRightRear.setTargetPosition(0);\n robot2.DriveLeftFront.setTargetPosition(0);\n robot2.DriveLeftRear.setTargetPosition(0);\n\n // Set RUN_TO_POSITION\n\n robot2.DriveRightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // Set Motor Power to 0\n robot2.DriveRightFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n\n\n double InchesMoving = (distance * COUNTS_PER_INCH);\n\n // Set Target to RotateRight\n robot2.DriveRightFront.setTargetPosition((int) -InchesMoving);\n robot2.DriveRightRear.setTargetPosition((int) -InchesMoving);\n robot2.DriveLeftRear.setTargetPosition((int) InchesMoving);\n robot2.DriveLeftFront.setTargetPosition((int) InchesMoving);\n\n while (robot2.DriveRightFront.isBusy() && robot2.DriveRightRear.isBusy() && robot2.DriveLeftRear.isBusy() && robot2.DriveLeftFront.isBusy()) {\n\n // wait for robot to move to RUN_TO_POSITION setting\n\n double MoveSpeed = speed;\n\n // Set Motor Power\n robot2.DriveRightFront.setPower(MoveSpeed);\n robot2.DriveRightRear.setPower(MoveSpeed);\n robot2.DriveLeftFront.setPower(MoveSpeed);\n robot2.DriveLeftRear.setPower(MoveSpeed);\n\n } // THis brace close out the while Loop\n\n //Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n\n robot2.DriveRightFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n }", "private void leftToRightAnimation(View v, int t) {\n ObjectAnimator canonMoveLeft = ObjectAnimator.ofFloat(v, \"translationX\", 0f);\n canonMoveLeft.setDuration(t);\n ObjectAnimator canonMoveRight = ObjectAnimator.ofFloat(v, \"translationX\", 870f);\n canonMoveRight.setDuration(t);\n AnimatorSet moveCanon = new AnimatorSet();\n moveCanon.play(canonMoveRight).before(canonMoveLeft);\n moveCanon.start();\n }", "public void justifyRight() {\n\t\tleft.right();\n\t}", "public void moveDelay ( )\r\n\t{\r\n\t\ttry {\r\n\t\t\tThread.sleep( 1000 );\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void animationSpeedRight()\n {\n if(animationCounter % 4 == 0){\n animateRight();\n changeThrowing(false);\n }\n }", "private void stateMovingRight(float dt) {\n setPosition(b2body.getPosition().x - getWidth() / 2, b2body.getPosition().y - getHeight() / 2);\n setRegion(bridgeStand);\n\n // Kinematic bodies do not collide with static ones (we can't use WorldContactListener)\n float velX;\n if (getX() + getWidth() >= screen.getGameViewPort().getWorldWidth()) {\n velX = b2body.getLinearVelocity().x * -1;\n b2body.setLinearVelocity(velX, VELOCITY_Y);\n currentState = State.MOVING_LEFT;\n }\n }", "private void emulateDelay() {\n try {\n Thread.sleep(700);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private void delay() {\n\t\tDelay.msDelay(1000);\n\t}", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "public void moveRight() {\n for(int i=0;i<this.body.size();i++){\n// TranslateTransition translate = new TranslateTransition();\n// translate.setNode(this.body.get(i));\n// smoothSnake obj=new smoothSnake();\n// obj.swiftSnake(translate,i,this,1);\n this.body.get(i).setCenterX(this.body.get(i).getCenterX()+10);\n }\n\n \tsetScoreText();\n }", "public static void delay(){\n System.out.print(\"\");\r\n System.out.print(\"\");\r\n }", "void moveRight() {\n\t\ttry {\n\t\t\twhile(x + 60 < getWidth()) {\n\t\t\t\tx += 10;\n\t\t\t\twin.repaint();\n\t\t\t\tThread.sleep(100);\n\t\t\t}\n\t\t} catch(InterruptedException e) {\n\t\t}\n\t}", "private void moveTimer(long period) {\n\t\tmoveTimer.schedule(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tif (Math.abs(relativeX + MOVE_DISTANCE * (getMoveRight() ? 1 : -1)) > onLog.getImageWidth() / 2) {\n\t\t\t\t\tsetMoveRight(!getMoveRight());\n\t\t\t\t\trelativeX += MOVE_DISTANCE * (getMoveRight() ? 1 : -1);\n\t\t\t\t} else {\n\t\t\t\t\trelativeX += MOVE_DISTANCE * (getMoveRight() ? 1 : -1);\n\t\t\t\t}\n\t\t\t}\n\t\t}, period, period);\n\t}", "public void setDelay(long d){delay = d;}", "public abstract int delay();", "@Override\n\tpublic void run() {\n\t\tmoveRight();\n\t}", "public void moveRight() {\n\t\t\n\t}", "private void simulateDelay(long millis) {\n try {\n Thread.sleep(millis);\n } catch (InterruptedException ignored) {\n }\n }", "private void RightLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n \t\t}}\n \t\t\n\t\t\n\t}", "public void moveRight() {\r\n\t\r\n\t\tint rightSteps=10;\r\n\t\t\ttopX+= rightSteps;\r\n\t}", "public void slideRight() {\n turnRight();\n move();\n turnLeft();\n }", "public void moveRight() {\n this.position.addColumn(1);\n }", "private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}", "protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }", "private static void turnRight(Robot r) \n {\n for(int i=0; i<3;i++)\n {\n r.turnLeft();\n }\n }", "@Override\n public native void delay(int ms);", "public void setDelay(double clock);", "private void delay() {\n\ttry {\n\t\tThread.sleep(500);\n\t} catch (InterruptedException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\t\n\t}", "public void driveCaution(Joystick leftStick, Joystick rightStick)\n\t{\n\t\tsetLeftRightMotorOutputs(leftStick.getY() - rightStick.getX(), leftStick.getY() + rightStick.getX());\n\t}", "private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}", "public void moveRight()\n\t{\n\t\tmoveRight = true;\n\t}", "public void moveRight() {\n this.accelerateXR();\n this.moveX(this.getxSpeed());\n this.setPicX(0);\n this.setPicY(74);\n this.setLoopCells(true);\n }", "public void turnRight(boolean endWithBrake){\r\n Motor.B.rotate(DEGREES_PER_TURN, true);//Accesses Motor thread\r\n Motor.C.rotate(-1*DEGREES_PER_TURN, true);\r\n while(Motor.B.isMoving() || Motor.C.isMoving())\r\n ;//wait for motors to be done\r\n return;\r\n }", "public void moveRight(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.RIGHT;\n\t\tif(animation!=ANIMATION.MOVERIGHT) {\n\t\t\tanimation=ANIMATION.MOVERIGHT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.RIGHT;\n\t\tdirection=\"right\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=spd/2;\n\t\tvelY=0;\n\t}", "public void moveRight() {\n this.velocity = this.velocity.add(rightVelocity());\n }", "@Test\n public void testDelay() {\n long future = System.currentTimeMillis() + (rc.getRetryDelay() * 1000L);\n\n rc.delay();\n\n assertTrue(System.currentTimeMillis() >= future);\n }", "public void moveRight() {\n\t\tsetPosX(getPosX() + steps);\n\t}", "@Test\n\tpublic void testMoveRightHandled() {\n\t\t\n\t\t// trigger the right movement a random n times, this should move the entity to ((EntityController.MOVECONSTANT * n), 0) position\n\t\tint n = getRandomNumber();\n\t\tint i = n;\n\t\twhile(i-- > 0) {\n\t\t\tmoveHandler.triggerRight();\n\t\t}\n\t\t\n\t\t// the controller should have heard those movements, and translated it to the entity.\n\t\tassertTrue(testEntity.getPositionX() == (n * EntityController.MOVE_CONSTANT));\n\t}", "void animateClipRight(int right, int duration) {\n if (mClipRightAnimator != null) {\n mClipRightAnimator.removeAllListeners();\n mClipRightAnimator.cancel();\n }\n mClipRightAnimator = ObjectAnimator.ofInt(this, \"clipRight\", right);\n mClipRightAnimator.setDuration(duration);\n mClipRightAnimator.setInterpolator(mConfig.fastOutSlowInInterpolator);\n mClipRightAnimator.start();\n }", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public void moveRight(double dt) {\r\n double adjustedSpeed = this.mySpeed * dt;\r\n if (this.myPaddle.getUpperRight().getX() + adjustedSpeed < 800) {\r\n myPaddle.getUpperLeft().setPosition(\r\n myPaddle.getUpperLeft().getX() + adjustedSpeed,\r\n myPaddle.getUpperLeft().getY());\r\n myPaddle.getLowerLeft().setPosition(\r\n myPaddle.getLowerLeft().getX() + adjustedSpeed,\r\n myPaddle.getLowerLeft().getY());\r\n myPaddle.getUpperRight().setPosition(\r\n myPaddle.getUpperRight().getX() + adjustedSpeed,\r\n myPaddle.getUpperRight().getY());\r\n myPaddle.getLowerRight().setPosition(\r\n myPaddle.getLowerRight().getX() + adjustedSpeed,\r\n myPaddle.getLowerRight().getY());\r\n this.thisOne.setRect(myPaddle);\r\n } else {\r\n myPaddle.getUpperLeft().setPosition(800 - this.width, getUpperLeftY);\r\n myPaddle.getLowerLeft().setPosition(800 - this.width, getUpperLeftY + 10);\r\n myPaddle.getUpperRight().setPosition(800, getUpperLeftY);\r\n myPaddle.getLowerRight().setPosition(800, getUpperLeftY + 10);\r\n this.thisOne.setRect(myPaddle);\r\n }\r\n\r\n }", "public void travel(double distance, boolean waitLeft, boolean waitRight) {\n\t\tint converted = LengthConverter.convertDistance(distance);\n\t\tleftMotor.rotate(converted, waitLeft);\n\t\trightMotor.rotate(converted, waitRight);\n\t}", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "public void setDelay(long delay) {\n this.delay = delay;\n }", "@Override\n protected void end() {\n Robot.myLifter.setLeftSpeed(0);\n Robot.myLifter.setRightSpeed(0);\n }", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "private void spin() {\n\t\t\tArrayList<Integer> sequence = getDna().getSequence();\n\t\t\tint randomDirection = sequence.get(new Random().nextInt(sequence.size()));\n\t\t\tsetDirection((this.direction + randomDirection) % 8);\t\n\t\t}", "public long getDelay();", "@Override\n public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection) {\n// mTextView.setText(myo.getArm() == Arm.LEFT ? R.string.arm_left : R.string.arm_right);\n }", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "public void run() {\n mTextView.setTranslationY(-mTextView.getHeight());\n mTextView.animate().setDuration(duration / 2).translationY(0).alpha(1)\n .setInterpolator(sDecelerator);\n }", "private void changeDelay() {\n delay = ((int) (Math.random() * 10000) + 1000) / MAX_FRAMES;\n }", "public void moveRight() {\n\t\tposX += speed;\n\t}", "public void movebypixelsleftright(View view)\n {\n ImageView iv1=findViewById(R.id.iv1);\n iv1.animate().translationXBy(1000f).setDuration(2000);//right\n //to move right give negative value\n }", "public void rightPressed() {\n System.out.println(\"rightPressed()\");\n current.translate(0, 1);\n display.showBlocks();\n }", "public void moveRight() {\n locX = locX + 1;\n }", "public void strafeRightTimer()\r\n\t{\r\n\t\tif(timer.get() < Config.Auto.timeStrafe)\r\n\t\t{\r\n\t\t\tdrive.setSpeed(0, 0, Config.Auto.strafeSpeed, Config.Auto.strafeSpeed);\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeDriveTowardTote)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in second else if\");\r\n\t\t\tdrive.setSpeed(Config.Auto.driveTowardToteSpeed, Config.Auto.driveTowardToteSpeed, 0, 0);\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeStrafeBackwards)\r\n\t\t\tdrive.setSpeed(0, 0, -Config.Auto.strafeSpeed, -Config.Auto.strafeSpeed);\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}", "private void moveRight(){\n if(getXFromCamera() > -10 && getXFromCamera() < 10){\n getWorld().moveCamera(speed);\n }\n setGlobalLocation(getGlobalX() + speed, getGlobalY());\n animationSpeedRight();\n }", "public void spinRight(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tleftTopMotor.set(speed);\r\n \tleftBottomMotor.set(speed);\r\n \trightTopMotor.set(speed);\r\n \trightBottomMotor.set(speed);\r\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "private void cursorMoveRightest() {\n\t\td(\"Warn cursorMoveRightest() NOT implemented\");\r\n\t}", "public static void syncLater(long delay, Run runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\trunnable.run();\n\t\t\t}\n\t\t}.runTaskLater(AreaShop.getInstance(), delay);\n\t}", "public void alignSelectedFurnitureOnRightSide() {\n alignSelectedFurniture(new AlignmentAction() {\n public void alignFurniture(AlignedPieceOfFurniture [] alignedFurniture, \n HomePieceOfFurniture leadPiece) {\n float [][] points = leadPiece.getPoints();\n Line2D rightLine = new Line2D.Float(points [1][0], points [1][1], points [2][0], points [2][1]); \n for (AlignedPieceOfFurniture alignedPiece : alignedFurniture) {\n alignPieceOfFurnitureAlongLeftOrRightSides(alignedPiece.getPieceOfFurniture(), leadPiece, rightLine, true);\n }\n }\n });\n }", "public void moveRight() {\n if (rec.getUpperLeft().getX() + rec.getWidth() + 5 > rightBorder) {\n rec.getUpperLeft().setX(rightBorder - rec.getWidth());\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() + 5);\n }\n }", "private void animateRight(){\n if(frame == 1){\n setImage(run1);\n }\n else if(frame == 2){\n setImage(run2);\n }\n else if(frame == 3){\n setImage(run3);\n }\n else if(frame == 4){\n setImage(run4);\n }\n else if(frame == 5){\n setImage(run5);\n }\n else if(frame == 6){\n setImage(run6);\n }\n else if(frame == 7){\n setImage(run7);\n }\n else if(frame == 8){\n setImage(run8);\n frame =1;\n return;\n }\n frame ++;\n }", "public void moveRight() {\r\n speedX = 6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/rightWalk1.png\");\r\n img = new Sprite (r1);\r\n if (centerX > startScrolling)\r\n bg.setBackX (bg.getBackX () + 6);\r\n bg.update ();\r\n }", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "public void setDelayMove(float delay_)\n\t{\n\t\tdelayMove=delayMove+delay_;\n\t}", "@Override\n protected void execute() {\n //Activate both lifters, throttled by height\n if (Robot.myLifter.getLeftEncoder() > 75) {\n Robot.myLifter.setLeftSpeed(-0.3);\n Robot.myLifter.setRightSpeed(-0.3);\n } else {\n Robot.myLifter.setLeftSpeed(-0.5);\n Robot.myLifter.setRightSpeed(-0.5);\n }\n \n }", "private void right(int pos) {\n while (pos > gapLeft) {\n gapLeft++;\n gapRight++;\n buffer[gapLeft-1] = buffer[gapRight];\n buffer[gapRight] = '\\0';\n }\n }", "public void moveRight() {\n\t\tif (x1 < 24 && x2 < 24 && x3 < 24 && x4 < 24) {\n\t\t\tclearPiece();\n\t\t\tx1 += 1;\n\t\t\tx2 += 1;\n\t\t\tx3 += 1;\n\t\t\tx4 += 1;\n\t\t\tsetPiece();\n\t\t\trepaint();\n\t\t}\n\t}", "public void autoStopBackwardDelayTime(int delay) throws JposException;", "public void moveRight()\n\t{\n\t\tx = x + STEP_SIZE;\n\t}", "public void defenceAlign() {\n\t\tdouble angle = angleToX();\n\t\tdouble angleSign = Math.signum(angle);\n\t\tdouble unsignedAngle = Math.abs(angle);\n\t\t\n\t\tdouble toRotate = angleSign * (90 - unsignedAngle);\n//\t\tSystem.out.printf(\"Rotate by: %f.2\\n\", toRotate);\n\t\tSystem.out.println(CommandQueue.commandQueue2D.size());\n\t\trotate(toRotate);\n\t}", "public void moveRight()\n {\n if (!this.search_zone.isRightBorder(this.x_position))\n {\n this.x_position = (this.x_position + 1);\n }\n }", "public native void setDelay(int delay) throws MagickException;", "public void schedule(Runnable job, long delay, TimeUnit unit);", "void moveRight() {\n\t\tsetX(x+1);\r\n\t\tdx=1;\r\n\t\tdy=0;\r\n\t}", "private void driveRight() {\n setSpeed(MAX_SPEED, MIN_SPEED);\n }", "public void moveRight(){\n myRectangle.setX(myRectangle.getX() + PADDLE_SPEED);\n }", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "static void translateToRightArm(MatrixStack matrices, PlayerEntityModel<AbstractClientPlayerEntity> model,\n\t\t\tAbstractClientPlayerEntity player) {\n\n\t\tif (player.isInSneakingPose() && !model.riding && !player.isSwimming()) {\n\t\t\tmatrices.translate(0.0F, 0.2F, 0.0F);\n\t\t}\n\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotation(model.body.yaw));\n\t\tmatrices.translate(-0.3125F, 0.15625F, 0.0F);\n\t\tmatrices.multiply(RotationAxis.POSITIVE_Z.rotation(model.rightArm.roll));\n\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotation(model.rightArm.yaw));\n\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotation(model.rightArm.pitch));\n\t\tmatrices.translate(-0.0625F, 0.625F, 0.0F);\n\t}", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "public void rotateRight(int time) {\n\t\tdouble step = 3;\r\n\t\t\r\n\t\tif( rotation + step > 360 )\r\n\t\t\trotation = rotation + step - 360;\r\n\t\telse\r\n\t\t\trotation += step;\r\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\n\t\tif (!x_aligning && !y_aligning) {\n\t\t\tm_drive.arcadeDrive(Joy.getY(), Joy.getZ() * -1);\n\t\t}\n\n\t\t// Show status of align modes\n\n\t\t// read values periodically\n\t\tarea = ta.getDouble(0.0);\n\n\t\t// post to smart dashboard periodically\n\t\tSmartDashboard.putNumber(\"LimelightX\", tx.getDouble(0.0));\n\t\tSmartDashboard.putNumber(\"LimelightY\", ty.getDouble(0.0));\n\t\tSmartDashboard.putNumber(\"LimelightArea\", area);\n\n\t\tif (Joy.getRawButtonPressed(2)) {\n\t\t\tdistanceToTarget = getDistance();\n\t\t\tSmartDashboard.putNumber(\"Estimated Distance\", distanceToTarget);\n\n\t\t}\n\t\tif (Joy.getRawButtonPressed(5)) {\n\t\t\talignX();\n\t\t}\n\n\t\tif (Joy.getRawButtonPressed(6)) {\n\t\t\talignY();\n\t\t}\n\n\t\tif (Joy.getTriggerPressed()) {\n\t\t\t/*\n\t\t\t * alignDepth = 0; while ( ((Math.abs(tx.getDouble(0.0)) > 1) ||\n\t\t\t * (Math.abs(ty.getDouble(0.0)) > 1)) || (tx.getDouble(0.0) == 0 &\n\t\t\t * ty.getDouble(0.0) == 0) || (alignDepth < 3)) { alignX(); alignY(); alignDepth\n\t\t\t * ++; } System.out.println(\"FULL ALIGN\");\n\t\t\t */\n\n\t\t\tSystem.out.println(lidarTest());\n\t\t}\n\n\t}", "void moveRight();", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "private void turnRight() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.SOUTH;\n break;\n case WEST:\n direction = Position.Direction.NORTH;\n break;\n case NORTH:\n direction = Position.Direction.EAST;\n break;\n case SOUTH:\n direction = Position.Direction.WEST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public void rotateRight() {\n// tileLogic = getRotateRight();\n tileLogic = getRotateLeft();\n// rotateRightTex();\n rotateLeftTex();\n }", "public void rotateRight (View view){\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(90f).setDuration(50); //turn toy robot LEFT\n\n rotateRight++; //counter to determine orientation\n System.out.println(\"rotateRight \" + rotateRight);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight));\n\n } else errorMessage(\"Please place toy robot\");\n }", "public static void randomDelay() {\n\n Random random = new Random();\n int delay = 500 + random.nextInt(2000);\n try {\n sleep(delay);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void moveRight() {\r\n\t\tif (x < space.getSize() - 1) x++; \r\n\t}", "public void moveRight() {\n Coordinate rightCoord = new Coordinate(getX() + 1, getY());\n handleMove(rightCoord, InteractionHandler.RIGHT);\n }", "private void delayElevator() {\n try {\n Thread.sleep(MOVEMENT_DELAY);\n } catch (InterruptedException ex) {\n Logger.getLogger(Elevator.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void alignSelectedFurnitureOnRight() {\n alignSelectedFurniture(new AlignmentAction() {\n public void alignFurniture(AlignedPieceOfFurniture [] alignedFurniture, \n HomePieceOfFurniture leadPiece) {\n float maxXLeadPiece = getMaxX(leadPiece);\n for (AlignedPieceOfFurniture alignedPiece : alignedFurniture) {\n HomePieceOfFurniture piece = alignedPiece.getPieceOfFurniture();\n float maxX = getMaxX(piece);\n piece.setX(piece.getX() + maxXLeadPiece - maxX);\n }\n }\n });\n }", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "public void setLeftRightTimer(float leftRightTimer) {\n this.leftRightTimer = leftRightTimer;\n }", "public void moveRight() {\n if (!this.state.equals(\"onRightWall\")) {\n this.dir = 1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }" ]
[ "0.587222", "0.58228666", "0.5782505", "0.57536435", "0.5649982", "0.55691075", "0.5515227", "0.54834574", "0.5474305", "0.5426283", "0.54221016", "0.5384407", "0.535049", "0.5350262", "0.5332556", "0.53166497", "0.5293126", "0.52921444", "0.5290491", "0.5289074", "0.52844244", "0.5280468", "0.5275779", "0.5270189", "0.5259467", "0.5249941", "0.5235655", "0.52308136", "0.5226487", "0.5222606", "0.5208296", "0.52068675", "0.51956284", "0.51933527", "0.51899517", "0.51720905", "0.51658994", "0.5162718", "0.51610845", "0.5146741", "0.513407", "0.512772", "0.5080851", "0.5072702", "0.50581354", "0.5044655", "0.5044106", "0.50362015", "0.5036156", "0.50317013", "0.5019095", "0.500479", "0.50015175", "0.5000919", "0.49895477", "0.49838412", "0.49818546", "0.49787918", "0.4974824", "0.49714994", "0.4967809", "0.4962231", "0.49572533", "0.49517402", "0.49490997", "0.49469388", "0.4945343", "0.49405354", "0.4940525", "0.49397498", "0.492427", "0.49235752", "0.49218795", "0.4920777", "0.49131045", "0.49121085", "0.49030772", "0.4896773", "0.48938277", "0.4890744", "0.48852783", "0.48826784", "0.4882203", "0.48821604", "0.4880744", "0.48788387", "0.48727402", "0.4872199", "0.48701465", "0.48622936", "0.48579535", "0.4851832", "0.4850008", "0.484848", "0.48474586", "0.48471174", "0.48428577", "0.4838304", "0.48368025", "0.48300454" ]
0.7279202
0
TODO Autogenerated method stub
@Override public void run() { total = 0; for (Node n : inputs) { total += n.output * weights.get(n).getWeight(); } total += bias * biasWeight.getWeight(); output = activationFunction.run(total); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void backProp() { double dOut = 0; for (Node n : outputs) { dOut += n.dInputs.get(this); } double dTotal = activationFunction.derivative(total)*dOut; for (Node n : inputs) { dInputs.put(n, dTotal * weights.get(n).getWeight()); weights.get(n).adjustWeight(dTotal * n.output); } biasWeight.adjustWeight(bias * dTotal); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Reconciles quotas for given user
@Override public CompletionStage<ReconcileResult<KafkaUserQuotas>> reconcile(Reconciliation reconciliation, String username, KafkaUserQuotas desired) { KafkaUserQuotas current = cache.get(username); if (desired == null) { if (current == null) { LOGGER.debugCr(reconciliation, "No expected quotas and no existing quotas -> NoOp"); return CompletableFuture.completedFuture(ReconcileResult.noop(null)); } else { LOGGER.debugCr(reconciliation, "No expected quotas, but {} existing quotas -> Deleting quotas", current); return internalDelete(reconciliation, username); } } else { if (current == null) { LOGGER.debugCr(reconciliation, "{} expected quotas, but no existing quotas -> Adding quotas", desired); return internalUpsert(reconciliation, username, desired); } else if (!QuotaUtils.quotasEquals(current, desired)) { LOGGER.debugCr(reconciliation, "{} expected quotas and {} existing quotas differ -> Reconciling quotas", desired, current); return internalUpsert(reconciliation, username, desired); } else { LOGGER.debugCr(reconciliation, "{} expected quotas are the same as existing quotas -> NoOp", desired); return CompletableFuture.completedFuture(ReconcileResult.noop(desired)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HashSet<String> getUserQuotes() {\n\t\treturn userQuotes;\n\t}", "private CompletionStage<ReconcileResult<ClientQuotaAlteration>> patchQuotas(Reconciliation reconciliation, String username, KafkaUserQuotas desired) {\n ClientQuotaEntity cqe = new ClientQuotaEntity(Map.of(ClientQuotaEntity.USER, username));\n ClientQuotaAlteration cqa = new ClientQuotaAlteration(cqe, QuotaUtils.toClientQuotaAlterationOps(desired));\n CompletableFuture<ReconcileResult<ClientQuotaAlteration>> future = new CompletableFuture<>();\n\n try {\n patchReconciler.enqueue(new ReconcileRequest<>(reconciliation, username, cqa, future));\n } catch (InterruptedException e) {\n LOGGER.warnCr(reconciliation, \"Failed to enqueue ClientQuotaAlteration\", e);\n future.completeExceptionally(e);\n }\n\n return future;\n }", "@Test\n public void testMultipleRemoveQuotasIdempotent() throws Exception {\n List<Dag<JobExecutionPlan>> dags = DagManagerTest.buildDagList(2, \"user3\", ConfigFactory.empty());\n\n // Ensure that the current attempt is 1, normally done by DagManager\n dags.get(0).getNodes().get(0).getValue().setCurrentAttempts(1);\n dags.get(1).getNodes().get(0).getValue().setCurrentAttempts(1);\n\n this._quotaManager.checkQuota(Collections.singleton(dags.get(0).getNodes().get(0)));\n Assert.assertTrue(this._quotaManager.releaseQuota(dags.get(0).getNodes().get(0)));\n Assert.assertFalse(this._quotaManager.releaseQuota(dags.get(0).getNodes().get(0)));\n }", "@Override\n\tpublic List<Account> getAllAcountsForUser(User user) {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from Account where user.id=:user\");\n\t\tquery.setParameter(\"user\", user.getId()); // maybe put the id here ? \n\t\tList<Account> accountList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn accountList;\n\t}", "@Override\r\n\tpublic String createUserAccountQuery(AuthenticatedUser user) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String createUserAccountQuery(AuthenticatedUser user) {\n\t\treturn null;\r\n\t}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "private static KafkaUserQuotas emptyQuotas() {\n KafkaUserQuotas emptyQuotas = new KafkaUserQuotas();\n emptyQuotas.setProducerByteRate(null);\n emptyQuotas.setConsumerByteRate(null);\n emptyQuotas.setRequestPercentage(null);\n emptyQuotas.setControllerMutationRate(null);\n\n return emptyQuotas;\n }", "public void orderStock(User user, OrderCan can) {\n\n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"insert into order_info(user_order_id,cane_order) values(?,?)\";\n\t\t\tpst = con.prepareStatement(sql);\n\t\t\tpst.setInt(1, user.getUserId());\n\t\t\tpst.setInt(2, can.getCane_order());\n\t\t\tint rows = pst.executeUpdate();\n\t\t\tSystem.out.println(rows);\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t}", "public List<ReturnType<UserBalanceTrigger>> collectAllowance(User user, Term term);", "private static String getUpsertBulkByUser(Context ctx, User user) {\n StringBuilder bulk = new StringBuilder();\n List<Date> dates = new UserManager().getQuestionnaireDateListByUserName(user.getName());\n if (dates != null) {\n for (Date date : dates) {\n JSONObject params = new JSONObject();\n try {\n MetaQuestionnaire meta = new MetaQuestionnaireManager().getMetaDataByCreationDate(date);\n if (meta != null) {\n params.put(\"operation-type\", meta.getOperationType());\n PsychoSocialSupportState psychoSocialSupportState = meta.getPsychoSocialSupportState();\n params.put(\"need-psychosocial-support\", psychoSocialSupportState == PsychoSocialSupportState.ACCEPTED);\n params.put(\"had-psychosocial-support\", meta.getPastPsychoSocialSupportState());\n }\n params.put(\"creation-date\", EntityDbManager.dateFormat.format(date));\n String userName = Security.getUserNameByEncryption(user);\n params.put(\"user-name\", userName);\n\n } catch (Exception e) {\n Log.e(CLASS_NAME, e.getLocalizedMessage());\n }\n\n\n DistressThermometerQuestionnaire distressThermometerQuestionnaire = new DistressThermometerQuestionnaireManager().getDistressThermometerQuestionnaireByDate(user.getName(), date);\n if (distressThermometerQuestionnaire != null) {\n if (Questionnairy.canStatisticsBeDisplayed(distressThermometerQuestionnaire.getProgressInPercent()))\n params = addAllKeyValuePairs(distressThermometerQuestionnaire.getAsJSON(), params);\n }\n\n\n QolQuestionnaire qol = new QualityOfLifeManager().getQolQuestionnaireByDate(user.getName(), date);\n if (qol != null) {\n if (Questionnairy.canStatisticsBeDisplayed(qol.getProgressInPercent())) {\n if (qol.getGlobalHealthScore() > 0) {\n params = addAllKeyValuePairs(qol.getQLQC30AsJSON(), params);\n params = addAllKeyValuePairs(qol.getBN20AsJSON(), params);\n }\n }\n }\n\n\n HADSDQuestionnaire hads = new HADSDQuestionnaireManager().getHADSDQuestionnaireByDate_PK(user.getName(), date);\n if (hads != null) {\n if (Questionnairy.canStatisticsBeDisplayed(hads.getProgressInPercent()))\n if(hads.getAnxietyScore() > 0 ){\n params = addAllKeyValuePairs(hads.getAsJSON(), params);\n }\n }\n\n\n FearOfProgressionQuestionnaire fearQuestionnaire = new FearOfProgressionManager().getQuestionnaireByDate(user.getName(), date);\n if (fearQuestionnaire != null) {\n if (Questionnairy.canStatisticsBeDisplayed(fearQuestionnaire.getProgressInPercent()))\n if (fearQuestionnaire.getScore() >= 12 && fearQuestionnaire.getScore() <=60) {\n params = addAllKeyValuePairs(fearQuestionnaire.getAsJSON(), params);\n }\n\n }\n\n\n bulk.append(ElasticQuestionnaire.getGenericBulk(date, getType(), params.toString()));\n }\n\n }\n return bulk.toString();\n }", "public void consume (User user) {\n \n for (StoredPower theirStoredPower : user.superPowers) {\n StoredPower myStoredPower = getOrCreateStoredPower(theirStoredPower.power);\n myStoredPower.used += theirStoredPower.used;\n \n // dont regift the icebreakers you get for free\n if (theirStoredPower.power == Power.ICE_BREAKER) {\n int add = Math.max(0, theirStoredPower.available - INITIAL_ICE_BREAKERS);\n myStoredPower.available += add;\n } else if (theirStoredPower.power == Power.KARMA) {\n int add = Math.max(0, theirStoredPower.available - INITIAL_KARMA);\n myStoredPower.available += add; \n } else {\n myStoredPower.available += theirStoredPower.available;\n }\n myStoredPower.level = Math.max(myStoredPower.level, theirStoredPower.level);\n myStoredPower.save();\n }\n \n for (Integer i : user.getSeenIceBreakers()) {\n this.addSeenIceBreaker(i);\n }\n \n for (KarmaKube k : user.getKubes()) {\n k.recipient_id = this.id;\n k.save(); \n }\n \n for (Long group_id : UserExclusion.userGroups(user.id)) {\n new UserExclusion(this.id, group_id);\n }\n \n this.coinCount += user.coinCount;\n this.coinsEarned += user.coinsEarned;\n this.chatTime += user.chatTime; \t\n this.messageCount += user.messageCount;\n this.gotMessageCount += user.gotMessageCount;\n this.joinCount += user.joinCount;\n this.offersMadeCount += user.offersMadeCount; \t\t\n this.offersReceivedCount += user.offersReceivedCount; \t\n this.revealCount += user.revealCount;\n this.save();\n \n user.delete();\n\t}", "private CompletionStage<ReconcileResult<KafkaUserQuotas>> internalDelete(Reconciliation reconciliation, String username) {\n LOGGER.debugCr(reconciliation, \"Deleting quotas for user {}\", username);\n\n return patchQuotas(reconciliation, username, emptyQuotas())\n .handleAsync((r, e) -> {\n if (e != null) {\n LOGGER.warnCr(reconciliation, \"Failed to delete quotas for user {}\", username, e);\n throw new CompletionException(e);\n } else {\n LOGGER.debugCr(reconciliation, \"Quotas for user {} deleted\", username);\n cache.remove(username); // Update the cache\n return ReconcileResult.deleted();\n }\n }, executor);\n }", "protected void getDailyQuestQuota(Key userKey) throws ApiException {\n\t\tUser user = dao.get(userKey, User.class);\n\t\tint dailyUsed = user.getQuota().getUsedDailyQuestNum();\n\t\tcheck(user.getQuota().getDailyQuestNum() > dailyUsed,\n\t\t\t\tErrorCode.quota_daily_quest_usedup);\n\t\tuser.getQuota().setUsedDailyQuestNum(dailyUsed + 1);\n\t\tdao.save(user);\n\t}", "void maintainUpdatedProductsList(MarketDataCacheClient cacheUser);", "List<Order> getByUser(User user);", "private static List<Quest> getQuests(Key userKey) {\n\t\treturn dao.query(Quest.class).setAncestor(userKey).prepare().asList();\n\t}", "public synchronized void cancelQuote(String userName) throws InvalidDataException {\n\t\tif (userName == null || userName.isEmpty()) throw new InvalidDataException(\"The username cannot be null or empty.\");\n\t\tgetBuySide().submitQuoteCancel(userName);\n\t\tgetSellSide().submitQuoteCancel(userName);\n\t\tupdateCurrentMarket();\n\t}", "private void createUserListQual() {\n\t\tuserListAvailQual.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tuserListAvailQual.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t}\n\t}", "private void viewPurchases(User user, Scanner sc) {\n\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"The Following are your Purchases\\n\");\n\t\t\tList<Item> purchased = cService.seeOwnedItems(user);\n\t\t\tpurchased.stream().forEach(item -> log.info(item.toString()));\n\n\t\t\tlog.info(\"Choose an option:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the Customer Dashboard\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "public void placeSingleTaskOrder(User user, SingleTaskOrder order);", "public void checkQuotas() {\n checkQuotas(time.milliseconds());\n }", "public void getQuestQuota(Key userKey) throws ApiException {\n\t\tUser user = dao.get(userKey, User.class);\n\t\tint dailyUsed = user.getQuota().getUsedDailyQuestNum();\n\t\tint totalUsed = user.getQuota().getUsedQuestNum();\n\t\tcheck(user.getQuota().getDailyQuestNum() > dailyUsed,\n\t\t\t\tErrorCode.quota_daily_quest_usedup);\n\t\tcheck(user.getQuota().getQuestNum() > totalUsed,\n\t\t\t\tErrorCode.quota_total_quest_usedup);\n\t\tuser.getQuota().setUsedDailyQuestNum(dailyUsed + 1);\n\t\tuser.getQuota().setUsedQuestNum(totalUsed + 1);\n\t\tdao.save(user);\n\t}", "public String getCurrentUserQuote() {\n\t\tString quote = currentUser.getQuote();\n\t\tif (quote == null)\n\t\t\treturn \"Hello! I'm using AppChat\";\n\t\treturn quote;\n\t}", "@Override\r\n\tpublic List<User> timUser(String user) {\n\t\tList<User> a =userReposotory.getByName(user);\r\n\t\treturn a;\r\n\t}", "@Override\n\t\n\tpublic QuotaReturn getUserQuota(String key, String userName) {\n\t\tcustom_types.wservices.ObjectFactory of = new custom_types.wservices.ObjectFactory();\n\t\tQuotaReturn qr = of.createQuotaReturn();\n\t\t// setQuota(JAXBElement<QuotaType> value)\n\t\tQuotaType qt = of.createQuotaType();\n\t\tqt.setBasicQuota(of.createQuotaTypeBasicQuota(new Double(10)));\n\t\tqt.setConsumedTopupQuota(of.createQuotaTypeConsumedTopupQuota(new Double(5)));\n\t\tqt.setEndDate(of.createQuotaTypeEndDate(\"1/8/2019\"));\n\t\tqt.setRemainingTopupQuota(of.createQuotaTypeRemainingTopupQuota(new Double(7)));\n\t\tqt.setService(of.createQuotaTypeService(userName));\n\t\tqt.setStartDate(of.createQuotaTypeStartDate(\"1/1/2019\"));\n\t\tqt.setTotalAllowedQuota(of.createQuotaTypeTotalAllowedQuota(new Double(30)));\n\t\tqt.setTotalConsumedQuota(of.createQuotaTypeTotalConsumedQuota(new Double(12)));\n\t\tqt.setTotalTopupQuota(of.createQuotaTypeTotalTopupQuota(new Double(5)));\n\t\t\n\t\tProducerTemplate producer = camelContext.createProducerTemplate();\n\t\tproducer.requestBodyAndHeader(\"direct:start\", userName, \"userName\", userName, String.class);\n\t\t \n\t\t//String result = producer.requestBodyAndHeader(\"direct:start\", userName, \"userName\", userName, String.class);\n\t\t//System.out.println(\"---s----\");\n\t\t//System.out.println(result); \n\t\t\n //String result = producer.requestBody(\"direct:start\", userName, String.class);\n //qt.setService(of.createQuotaTypeService(result));\n \n\t\tqr.setQuota(of.createQuotaType(qt));\n\t\tqr.setSuccess(of.createBasicReturnSuccess(true));\n\t\t\n\t\t\n\t\treturn qr;\n\t}", "private void performTradingOnStock(UserStockRequest userStockRequest) throws StockProcessingException {\n\t\t//System.out.println(\"Processing stock: \" + userStockRequest);\n\t}", "private void populate(Quote quote) {\n PublicUser user = new UserDBManager(QuoteListAdapter.this.context).loadSQLite(quote.getUserId());\n\n if (user != null) {\n this.txtUserPseudo.setText(user.getPseudo());\n } else {\n this.txtUserPseudo.setText(R.string.not_communicated);\n }\n\n this.txtQuote.setText(quote.getQuote());\n }", "public synchronized void addToBook(Quote q) throws InvalidDataException, DataValidationException {\n\t\tvalidateData(q);\n\t\tif (getUserQuotes().contains(q.getUserName())) {\n\t\t\tgetBuySide().removeQuote(q.getUserName());\n\t\t\tgetSellSide().removeQuote(q.getUserName());\n\t\t\tupdateCurrentMarket();\n\t\t}\n\t\taddToBook(BookSide.BUY, q.getQuoteSide(BookSide.BUY));\n\t\taddToBook(BookSide.SELL, q.getQuoteSide(BookSide.SELL));\n\t\tgetUserQuotes().add(q.getUserName());\n\t\tupdateCurrentMarket();\n\t}", "public static List<PoolRealTimeOrderBean> getUserOrders(long userId, boolean refreshOrderRelatedInfo) {\n\t\tList<PoolRealTimeOrderBean> orders = new ArrayList<PoolRealTimeOrderBean>();\n\t\tfor (PoolRealTimeOrderBean order : pool.values()) {\n\t\t\tfor (PoolJoinerBean joiner : order.getPoolJoiners()) {\n\t\t\t\tif (joiner.getUserBean().getId() == userId) {\n\t\t\t\t\tif (refreshOrderRelatedInfo) {\n\t\t\t\t\t\trefreshOrderRelatedInformation(order);\n\t\t\t\t\t}\n\t\t\t\t\torders.add(order);\n\t\t\t\t\treturn orders;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn orders;\n\t}", "@Override\n public List<Order> findOrdersByUser(User user) {\n return orderRepository.findByCustomerUsernameOrderByCreatedDesc(user.getUsername()).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "public void removeallorderitem(String username) {\n\t\torderDao.removeallorderitem(username);\n\n\t}", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic List<PendingTransaction> getUserPendingTransaction(String userName) {\n\t\treturn null;\n\t}", "@Scheduled(fixedDelay = 3000)\n public void sendAdhocMessages() {\n log.info(loadQuotations.loadLastQuotations());\n simpMessagingTemplate.convertAndSend(\"/topic/user\", loadQuotations.loadLastQuotations());\n }", "private CompletionStage<ReconcileResult<KafkaUserQuotas>> internalUpsert(Reconciliation reconciliation, String username, KafkaUserQuotas desired) {\n LOGGER.debugCr(reconciliation, \"Upserting quotas for user {}\", username);\n\n return patchQuotas(reconciliation, username, desired)\n .handleAsync((r, e) -> {\n if (e != null) {\n LOGGER.warnCr(reconciliation, \"Failed to upsert quotas of user {}\", username, e);\n throw new CompletionException(e);\n } else {\n LOGGER.debugCr(reconciliation, \"Quotas for user {} upserted\", username);\n cache.put(username, desired); // Update the cache\n\n return ReconcileResult.patched(desired);\n }\n }, executor);\n }", "protected void returnTotalQuestQuota(Key ownerKey) throws ApiException {\n\t\tUser user = dao.get(ownerKey, User.class);\n\t\tint totalUsed = user.getQuota().getUsedQuestNum();\n\t\tuser.getQuota().setUsedQuestNum(totalUsed - 1);\n\t\tdao.save(user);\n\t}", "protected void refreshDailyQuestQuota(Key ownerKey) throws ApiException {\n\t\tUser user = dao.get(ownerKey, User.class);\n\t\tint dailyUsed = user.getQuota().getUsedDailyQuestNum();\n\t\tuser.getQuota().setUsedDailyQuestNum(dailyUsed + 1);\n\t\tdao.save(user);\n\t}", "private void createQualLists(int userID) {\n\t\tassignedQualList.clear();\n\t\tavailableQualList.clear();\n\t\t\t\t\n\t\tassignedQuals = jdbc.getUserAssignedQuals(userID);\n\t\tfor (Qualification q : assignedQuals) { \n\t\t\tassignedQualList.addElement(q.getQualName());\n\t\t}\n\t\t\t\t\n\t\tavailQuals = jdbc.getUserAvailQuals(userID);\n\t\tfor (Qualification q : availQuals) { \n\t\t\tavailableQualList.addElement(q.getQualName());\n\t\t}\n\t\t\n\t}", "public static List<modelPurchasesI> reportPurchases(){\r\n\t\tif(modelUsersI.isLogged()){\r\n\t\t\tComparator<modelPurchasesI> sort = (primo, secondo) -> Double.compare(primo.getTotalSpent(), secondo.getTotalSpent());\r\n\t\t\t\r\n\t\t\treturn modelPurchasesI.purchasesList().stream()\r\n\t\t\t\t\t.sorted(sort)\r\n\t\t\t\t\t.collect(Collectors.toList());\r\n\t\t}else\r\n\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t}", "public synchronized ArrayList<TradableDTO> getOrdersWithRemainingQty(String userName) throws InvalidDataException {\n\t\tif (userName == null || userName.isEmpty()) throw new InvalidDataException(\"The username cannot be null or empty.\");\n\t\tArrayList<TradableDTO> remaining = new ArrayList<TradableDTO>();\n\t\tremaining.addAll(getBuySide().getOrdersWithRemainingQty(userName));\n\t\tremaining.addAll(getSellSide().getOrdersWithRemainingQty(userName));\n\t\treturn remaining;\n\t}", "public void updateQuote(){\n\t\tDate date = new Date();\n\t\tlong maxTimeNoUpdate = Long.parseLong(config.getQOTD_expiration_time());\n\n\t\tlong timeNow = date.getTime()/1000L;\n\t\tlong timeLastQuote = 0;\n\n\t\ttry {\n\t\t\tcrs = qb.selectFrom(\"qotd\").all().executeQuery();\n\t\t\tif(crs.next()){\n\t\t\t\ttimeLastQuote = crs.getDate(\"date\").getTime()/1000L;\n\t\t\t}\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tcrs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif(timeNow-timeLastQuote > maxTimeNoUpdate){\n\t\t\tSystem.out.println(\"UPDATING QUOTE\");\n\t\t\tsaveQuote();\n\t\t} else {\n\t\t\tSystem.out.println(\"QUOTE IS UP TO DATE\");\n\t\t}\n\t}", "public ArrayList<String[]> queryApprove(String currentUser) {\n return model.queryApprove(currentUser);\n }", "void confirmRealWorldTrade(IUserAccount user, ITransaction trans);", "public static ArrayList<String> showTrash(String user, Database data) {\n Gson gson = new Gson();\n ArrayList<String> mailList = data.showMail(user, \"Recipient\");\n ArrayList<String> mailList2 = data.showMail(user, \"Sender\");\n ArrayList<Mail> List1 = new ArrayList<>();\n for (int i = 0; i < mailList.size(); i++) {\n if ((gson.fromJson(mailList.get(i), Mail.class).isTrash()) && !(gson.fromJson(mailList.get(i), Mail.class).didRecepientDelete())) {\n List1.add(gson.fromJson(mailList.get(i), Mail.class));\n }\n }\n for (int i = 0; i < mailList2.size(); i++) {\n if ((gson.fromJson(mailList2.get(i), Mail.class).isTrashSend()) && !(gson.fromJson(mailList2.get(i), Mail.class).didSenderDelete())) {\n List1.add(gson.fromJson(mailList2.get(i), Mail.class));\n }\n }\n mailList.clear();\n for (int i = List1.size() - 1; i >= 0; i--) {\n mailList.add(gson.toJson(List1.get(i)));\n }\n return mailList;\n }", "Order setAsInCharge(Order order, User user);", "List<Order> getUserOrderList(int userId) throws ServiceException;", "private void chargesBundles(){\n Bundle bundle = getIntent().getExtras();\n usuario = (Usuario) bundle.getSerializable(\"usuario\");\n tvNombreUsuario.setText(tvNombreUsuario.getText() + \"\" + usuario.getNombre());\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<Items> getAllItemsPerUser(String userName) throws ToDoListDAOException{\r\n\tSession session = factory.openSession();\r\n\t\t\r\n\t\tList<Items> allDoList = new ArrayList<Items>();\r\n\t\tList<Items> userItemList = new ArrayList<Items>();\r\n\t\t\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tsession.beginTransaction();\r\n\t\t\tallDoList = session.createQuery(\"from Items\").list();\r\n\t\t\tfor (Items item : allDoList) {\r\n\t\t\t\tif(item.getUserName().equals(userName))\r\n\t\t\t\t\tuserItemList.add(item);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t}\r\n\t\tcatch (HibernateException e)\r\n\t\t{\r\n\t\t\tsession.getTransaction().rollback();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif(session != null) \r\n\t\t\t{ \r\n\t\t\t\tsession.close(); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn userItemList;\r\n\t}", "public void queryAllBuyableItems(){\r\n awsAppSyncClient.query(ListBuyableItemsQuery.builder().build())\r\n .responseFetcher(AppSyncResponseFetchers.CACHE_AND_NETWORK)\r\n .enqueue(getAllBuyableItemsCallback);\r\n }", "public void displayUSerList(List<User> userList) {\n for (User currentUser : userList) {\n String userInfo = \"\"; \n \n userInfo = currentUser.getUserId()+\" \"+currentUser.getName();\n for(String s : currentUser.getBorrowedItem()){\n userInfo = userInfo + s; \n }\n \n\n\n\n io.print(userInfo);\n }\n io.readString(\"Please hit enter to continue.\");\n }", "List<Receipt> getUserReceipts(long userId) throws DbException;", "@Override\r\n\tpublic String approveUserAccountQuery(String username, String value) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String approveUserAccountQuery(String username, String value) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic String approveUserAccountQuery(String username, String value) {\n\t\treturn null;\n\t}", "List<Subscription> findActiveSubscriptions(User user);", "public void setCurrentUserQuote(String quote) {\n\t\tcurrentUser.setQuote(quote);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}", "public double getCredits(User user) throws Exception;", "public List<budgets> _queryUser_UserBudgets(long idUser) {\n synchronized (this) {\n if (user_UserBudgetsQuery == null) {\n QueryBuilder<budgets> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.IdUser.eq(null));\n queryBuilder.orderRaw(\"T.'BUDGET_DATE' DESC\");\n user_UserBudgetsQuery = queryBuilder.build();\n }\n }\n Query<budgets> query = user_UserBudgetsQuery.forCurrentThread();\n query.setParameter(0, idUser);\n return query.list();\n }", "@Override\n\tpublic Quotation generateQuotation(ClientInfo info) {\n\t\t// Create an initial quotation between 800 and 1000\n\t\tdouble price = generatePrice(800, 200);\n\t\t\n\t\t// 5% discount per penalty point (3 points required for qualification)\n\t\tint discount = (info.points > 3) ? 5*info.points:-50;\n\t\t\n\t\t// Add a no claims discount\n\t\tdiscount += getNoClaimsDiscount(info);\n\t\t\n\t\t// Generate the quotation and send it back\n\t\treturn new Quotation(COMPANY, generateReference(PREFIX), (price * (100-discount)) / 100);\n\t}", "public List<QuestionEntity> getAllQuestionsByUser(UserEntity userEntity) {\n try {\n return entityManager.createNamedQuery(\"QuestionByUserId\", QuestionEntity.class).setParameter(\"user\", userEntity).getResultList();\n } catch (NoResultException nre) {\n return null;\n }\n }", "Quote createQuote();", "public void saveQuote() {\n\t\ttry {\n\t\t\tString json = urlRead.readUrl(\"http://dist-sso.it-kartellet.dk/quote/\");\n\n\t\t\tJSONParser jsonParser = new JSONParser();\n\t\t\tJSONObject jsonObject = (JSONObject) jsonParser.parse(json);\n\n\t\t\tString quote = (String) jsonObject.get(\"quote\");\n\t\t\tquote = quote.replace(\"'\", \"''\");\n\n\t\t\tString[] fields = {\"qotd\"};\n\t\t\tString[] values = {quote};\n\n\t\t\tif(qb.selectFrom(\"qotd\").all().executeQuery().next()){\n\t\t\t\tqb.update(\"qotd\", fields, values).where(\"msg_type\", \"=\", \"qotd\").execute();\n\t\t\t} else {\n\t\t\t\tqb.insertInto(\"qotd\", fields).values(values).execute();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public JSONObject viewPurchaseOrderByExecutive(String username) {\n\n return in_purchaseorderdao.viewPurchaseOrderByExecutive(username);\n }", "private void makeAnOffer(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"Make an Offer on an Item\\n\");\n\n\t\t\tMap<String, Object> makeOfferArgs = new HashMap<>();\n\n\t\t\tlog.info(\"\\nType in the Item ID:\\n\");\n\t\t\tInteger item_id = Integer.parseInt(sc.nextLine());\n\t\t\tItem item = cService.getItemById(item_id);\n\t\t\tmakeOfferArgs.put(\"item\", item);\n\n\t\t\t// this will further complicate the mathematics of the services\n\t\t\t// ignore this for now\n\t\t\tmakeOfferArgs.put(\"quantity\", 1);\n\n\t\t\tlog.info(\"\\nHow much will you offer for this item?:\\n\");\n\t\t\tDouble offer_price = Double.parseDouble(sc.nextLine());\n\t\t\tmakeOfferArgs.put(\"offer_price\", offer_price);\n\n\t\t\tlog.info(\"\\nType in the number of payments you will make:\\n\");\n\t\t\tInteger installments = Integer.parseInt(sc.nextLine());\n\t\t\tmakeOfferArgs.put(\"installments\", installments);\n\t\t\tmakeOfferArgs.put(\"user\", user);\n\n\t\t\tOffer offer = cService.makeOffer(makeOfferArgs);\n\t\t\tlog.info(\"\\nThe following is the result:\\n\");\n\t\t\tlog.info(\"\t\t\" + offer + \"\\n\");\n\n\t\t\tlog.info(\"Thanks for your offer!:\");\n\t\t\tlog.info(\"\t\tPress 1 to make another offer\");\n\t\t\tlog.info(\"\t\tPress anything else to go BACK TO THE STORE\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing BACK TO THE STORE\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "@Override\n\tpublic List getAlls(TbUser user) {\n\t\treturn new userDaoImpl().getAlls(user);\n\t}", "public List<Order> getAllUsersOrdersById(long userId);", "private void prepareAchievements(User user,\n HttpServletRequest req,\n Language lang) {\n List<Achievement> achievements = achService.findAllAchForUser(\n user.getUserId(), lang);\n req.getSession().setAttribute(\"currentUserAch\", achievements);\n }", "Order removeInCharge(Order order, User user);", "public List<Question> getQuestions(String user) {\n List<Question> messages = new ArrayList<Question>();\n \n Query query =\n new Query(\"Question\")\n //The setFilter line was here originally but not in the Step 3 provided code\n .setFilter(new Query.FilterPredicate(\"user\", FilterOperator.EQUAL, user))\n .addSort(\"timestamp\", SortDirection.DESCENDING);\n PreparedQuery results = datastore.prepare(query);\n \n return questionHelper(user, messages, query, results);\n }", "@Nullable\n public ArrayList<Order> doRetrieveByUsername(@NotNull String username) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n User u = ud.doRetrieveByUsername(username);\n Order o = null;\n Operator op = null;\n ArrayList<Order> orders = new ArrayList<>();\n if (u != null) {\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.user=?;\");\n st.setString(1, username);\n ResultSet rs = st.executeQuery();\n while (rs.next()) {\n o = new Order();\n o.setUser(u);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n orders.add(o);\n }\n st.close();\n cn.close();\n }\n return orders;\n } catch (SQLException e) {\n return null;\n }\n }", "private List<ToDoItem> refreshItemsFromMobileServiceTable() throws ExecutionException, InterruptedException {\n //List list = mToDoTable.where ( ).field (\"complete\").eq(val(false)).execute().get();\n return mToDoTable.where ().field (\"userId\").eq (val (userId)).and(mToDoTable.where ( ).field (\"complete\").eq(val(false))).execute().get();\n }", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "public List<ReportBaseImpl> getOpenOrders(SimpleUser user)\r\n throws PersistenceException;", "public void useItem(Human user){\n user.addEnergy(10);\n user.removefromInv(this); \n }", "private void sendBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to send TE Bucks to:\");\n\t\t\tUser toUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\ttoUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( toUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not send money to yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tisValidAmount = amount.doubleValue() < userService\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getBalance(currentUserId)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue();\n\t\t\t\tif(!isValidAmount) {\n\t\t\t\t\tSystem.out.println(\"You can not send more money than you have available!\");\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You must send at least $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\ttransfer = createTransferObj(\"Send\", \"Approved\", currentUserId, toUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = transferService.sendBucks(currentUserId, toUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Send canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \n\t\t\t}\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "@Override\r\n\tpublic List<Book> getWishList(User user) {\n\t\tTypedQuery<Book> query = sessionFactory.getCurrentSession().createNativeQuery(\"select USER_ID, BOOK_ID from WISH_USER_BOOK where USER_ID = \" + user.getId());\r\n\t\treturn query.getResultList();\r\n\t}", "@Override\n public Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken) throws RemoteException {\n Bundle result = new Bundle();\n\n if (apiVersion < 3 || !(type.equals(ITEM_TYPE_INAPP) || type.equals(ITEM_TYPE_SUBS))) {\n result.putInt(RESPONSE_CODE, RESULT_DEVELOPER_ERROR);\n return result;\n }\n\n result.putInt(RESPONSE_CODE, RESULT_OK);\n\n // TODO: consider to restore purchases from persistent storage\n ArrayList<Purchase> purchaseHistory = getPurchasesFormConfig(packageName, type);\n int size = purchaseHistory.size();\n\n ArrayList<String> purchaseItemList = new ArrayList<String>(size);\n ArrayList<String> purchaseDataList = new ArrayList<String>(size);\n ArrayList<String> purchaseSignatureList = new ArrayList<String>(Collections.nCopies(size, \"no_signature\"));\n\n for (Purchase aPurchaseHistory : purchaseHistory) {\n purchaseItemList.add(aPurchaseHistory.getSku());\n purchaseDataList.add(aPurchaseHistory.toJson());\n }\n\n result.putStringArrayList(INAPP_PURCHASE_ITEM_LIST, purchaseItemList);\n result.putStringArrayList(INAPP_PURCHASE_DATA_LIST, purchaseDataList);\n result.putStringArrayList(INAPP_DATA_SIGNATURE_LIST, purchaseSignatureList);\n\n return result;\n }", "public ResultSet Share(Long userid)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.compname,t.SHAREAMOUNT,t.amount,t.dateoftrans,t.type,t.bywhom from company c,transaction t,login l,customer cu where c.comp_id=t.comp_id and l.login_id=cu.login_id and cu.user_id=t.user_id and l.login_id=\"+userid+\" order by t.dateoftrans\");\r\n\treturn rs;\r\n}", "public void cancel(User user) {\r\n //throw exception if trying to cancell without Admin right \r\n if ((!user.isAdmin()) && (!this.getOrderByUser().equals(user)))\r\n throw new IllegalAccessError(\"Cancelling order not owned by user requires Admin role \");\r\n\r\n if (this.currentStatusChange== null)\r\n throw new IllegalStateException(\"PO never been initialized, cannot cancel it\"); \r\n \r\n //throw exception if trying to cancel already cancelled po\r\n if ( this.currentStatusChange.equals(PoStatusCode.CANCELLED))\r\n throw new IllegalStateException(\"Cannot cancel an already Cancelled Order\");\r\n\r\n //update the current attribute\r\n\t this.currentStatusChange = PoStatusCode.CANCELLED;\r\n\t this.currentStatusChangeDate = new Date();\r\n \r\n }", "@Scheduled(cron = \"0 0 1 * * *\")\n\tpublic void removeExpiredPremiumUsers(){\n\t\tIterable <User> users = userDao.findAll();\n\t\tDate now = new Date();\n\t\t\n\t\tfor (User user : users){\n\t\t\tif (user.isPremium()){\n\t\t\t\ttry{\n\t\t\t\t\tif(user.getPremiumExpiryDate().before(now)){\n\t\t\t\t\t\tuser.removePremium();\n\t\t\t\t\t\tuserDao.save(user);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch(Exception e){\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected abstract String copyQuestionHistoricalTx(String userId, String qid, Pool destination);", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public Builder clearUserQuestJobs() {\n if (userQuestJobsBuilder_ == null) {\n userQuestJobs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000008);\n onChanged();\n } else {\n userQuestJobsBuilder_.clear();\n }\n return this;\n }", "@Override\n public ArrayList<Purchase> retrievePurchases(Connection connection, Long userID) throws SQLException {\n PreparedStatement ps = null;\n try{\n // Prepare the statement\n String retrieveSQL = \"SELECT * FROM Purchase WHERE userID = ?;\";\n ps = connection.prepareStatement(retrieveSQL);\n ps.setLong(1, userID);\n ResultSet rs = ps.executeQuery();\n \n // Check if the result is empty\n if(!rs.isBeforeFirst()){\n return null;\n }\n \n // Increment through results and build list of purchases\n ArrayList<Purchase> purchaseList = new ArrayList<>();\n while(rs.next()) {\n Purchase purchase = new Purchase();\n purchase.setUserID(rs.getLong(\"userID\"));\n purchase.setPurchaseID(rs.getLong(\"purchaseID\"));\n purchase.setTimeOfPurchase(rs.getDate(\"timeOfPurchase\"));\n purchase.setItems(null);\n purchaseList.add(purchase);\n }\n return purchaseList;\n }\n \n catch(Exception ex){\n ex.printStackTrace();\n //System.out.println(\"Exception in ContainerDaoImpl.retrieveContainer()\");\n if (ps != null && !ps.isClosed()){\n ps.close();\n }\n if (connection != null && !connection.isClosed()){\n connection.close();\n }\n \n return null;\n }\n }", "private void chekAchivements(String userName){\n\n\t\tAppUser appUser = appUserRepository.findOneByUsername(userName);\n\n if (appUser.getInstruction().size() > 0 ){\n \tString achievementName = \"Bronze instruction creator\";\n \tif(appUser.findAchievementByname(achievementName)){\n\n\t\t\t} else {\n\t\t\t\tAchievement achievement = new Achievement();\n\t\t\t\tachievement.setUsername(userName);\n\t\t\t\tachievement.setName(achievementName);\n\t\t\t\tachievement.setDescription(\"For make 0 instruction !!!\");\n\t\t\t\tachievement.setImageLink(\"http://res.cloudinary.com/demo/image/upload/pg_3/strawberries.png\");\n\t\t\t\tappUser.getAchievements().add(achievement);\n\t\t\t}\n }\n\n\t\tif (appUser.getInstruction().size() > 0 ){\n\t\t\tString achievementName = \"Silver instruction creator\";\n\t\t\tif(appUser.findAchievementByname(achievementName)){\n\n\t\t\t} else {\n\t\t\t\tAchievement achievement = new Achievement();\n\t\t\t\tachievement.setUsername(userName);\n\t\t\t\tachievement.setName(achievementName);\n\t\t\t\tachievement.setDescription(\"For make 0 instruction !!\");\n\t\t\t\tachievement.setImageLink(\"http://res.cloudinary.com/demo/image/upload/pg_3/strawberries.png\");\n\t\t\t\tappUser.getAchievements().add(achievement);\n\t\t\t}\n\t\t}\n\n\t\tfor (Instruction instruction:instructionRepository.findAllByCreatorName(userName)) {\n\t\t\tif (instruction.getSteps().size() > 0 ){\n\t\t\t\tString achievementName = \"Bronze step creator\";\n\t\t\t\tif(appUser.findAchievementByname(achievementName)){\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tAchievement achievement = new Achievement();\n\t\t\t\t\tachievement.setUsername(userName);\n\t\t\t\t\tachievement.setName(achievementName);\n\t\t\t\t\tachievement.setDescription(\"For make 0 steps !!!\");\n\t\t\t\t\tachievement.setImageLink(\"http://res.cloudinary.com/demo/image/upload/w_200,\" +\n\t\t\t\t\t\t\t\"h_200,c_crop,g_auto/fat_cat.jpg\");\n\t\t\t\t\tappUser.getAchievements().add(achievement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tappUserRepository.save(appUser);\n\t}", "String queue(SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "void climb(String climbReason, User supervisor) throws IncorrectQuoteStateError;", "public static void importPreviousQueries(StandaloneSupport support, RequiredData content, User user) throws JSONException, IOException {\n\t\tint id = 1;\n\t\tfor (ResourceFile queryResults : content.getPreviousQueryResults()) {\n\t\t\tUUID queryId = new UUID(0L, id++);\n\n\t\t\tfinal CsvParser parser = new CsvParser(support.getConfig().getCsv().withParseHeaders(false).withSkipHeader(false).createCsvParserSettings());\n\t\t\tString[][] data = parser.parseAll(queryResults.stream()).toArray(new String[0][]);\n\n\t\t\tConceptQuery q = new ConceptQuery(new CQExternal(Arrays.asList(FormatColumn.ID, FormatColumn.DATE_SET), data));\n\n\t\t\tManagedExecution<?> managed = ExecutionManager.createQuery(support.getNamespace().getNamespaces(),q, queryId, user.getId(), support.getNamespace().getDataset().getId());\n\t\t\tuser.addPermission(support.getStandaloneCommand().getMaster().getStorage(), QueryPermission.onInstance(AbilitySets.QUERY_CREATOR, managed.getId()));\n\t\t\tmanaged.awaitDone(1, TimeUnit.DAYS);\n\n\t\t\tif (managed.getState() == ExecutionState.FAILED) {\n\t\t\t\tfail(\"Query failed\");\n\t\t\t}\n\t\t}\n\n\t\t// wait only if we actually did anything\n\t\tif (!content.getPreviousQueryResults().isEmpty()) {\n\t\t\tsupport.waitUntilWorkDone();\n\t\t}\n\t}", "private void clearUser() {\n user_ = emptyProtobufList();\n }", "private void chargeUser(double fee, String user, String returnDate, int ISBN) {\r\n\t\tdb.executeAddFee(fee, user);\r\n\t\tdb.validateReturn(user, ISBN, returnDate);\r\n\t}", "private void queryStoriesFromUser() {\n ParseQuery<Story> query = ParseQuery.getQuery(Story.class);\n // include objects related to a story\n query.include(Story.KEY_AUTHOR);\n query.include(Story.KEY_ITEM);\n query.include(Story.KEY_LIST);\n query.include(Story.KEY_CATEGORY);\n // where author is current user and order by time created\n query.whereEqualTo(Story.KEY_AUTHOR, user);\n query.orderByDescending(Story.KEY_CREATED_AT);\n query.findInBackground((stories, e) -> {\n mUserStories.clear();\n for (int i = 0; i < stories.size(); i++) {\n Story story = stories.get(i);\n Item item = (Item) story.getItem();\n mUserStories.add(story);\n queryPhotosInStory(story, item);\n }\n\n if (stories.size() == 0) {\n emptyLayout.setVisibility(View.VISIBLE);\n } else {\n emptyLayout.setVisibility(View.GONE);\n }\n });\n }", "QuoteItem createQuoteItem();", "public static String scrubItemIds(String items, boolean insertQuotes) {\n String[] itemsArray = items.split(\",\");\n String argStr = \"\";\n for (int i = 0; i < itemsArray.length; i++) {\n String itemStr = itemsArray[i];\n itemStr = itemStr.trim().toUpperCase();\n if (itemStr.length() > 0 && itemStr.substring(0, 1).equals(\"Q\")) {\n if (insertQuotes) {\n argStr += \"'\" + itemStr + \"'\";\n }\n else {\n argStr += itemStr;\n }\n if (i < itemsArray.length - 1) {\n argStr += \",\";\n }\n }\n }\n return argStr;\n }", "public void performQuack(){\n qb.quack();\n }", "private void goShopping(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"Store Inventory\\n\");\n\t\t\tList<Item> items = cService.seeItemsOnSale();\n\t\t\titems.stream().forEach(item -> log.info(item));\n\n\t\t\tlog.info(\"Welcome to the NYC Grocery Store\\n\");\n\n\t\t\tlog.info(\"Choose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to Make an Offer on an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to go to the MAIN CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tmakeAnOffer(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "private void sendBucks() {\n\t\tint userid = userID;\n\n\t\tfor (int i = 0; i < userServices.getAllUsers().length; i++) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"User: \" + userList.get(i).getId() + \"\\t\" + \"username: \" + userList.get(i).getUsername() + \"\\n\");\n\t\t}\n\n\t\tSystem.out.println(\"Select and ID you want to send TE Bucks to: \\n\");\n\n\t\tint sendTo = Integer.parseInt(scan.nextLine());\n\n\t\tSystem.out.println(\"How much money?\");\n\t\tBigDecimal money = (new BigDecimal(scan.nextLine()));\n\n\t\ttry {\n\t\t\tif (accountServices.getBalanceByAccountID(userid).compareTo(money) < 0) {\n\t\t\t\tSystem.out.println(\"You do not have enough funds to make transfer\");\n\t\t\t\tsendBucks();\n\n\t\t\t}\n\t\t} catch (AccountsServicesException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\tTransfers holder = sendTransfer(userid, sendTo, money);\n\t\taccountServices.sendMoney(userid, holder);\n\n\t\ttry {\n\t\t\tSystem.out.println(\"$\" + money + \" sent to \" + sendTo);\n\t\t\tSystem.out.println(\"New balance: $\" + accountServices.getBalanceByAccountID(userid));\n\t\t} catch (AccountsServicesException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public synchronized static void borrarProduccion(String usuario){\n if(!produccion.isEmpty())\n for(Construcciones construccion : produccion){\n if(construccion.usuario.equalsIgnoreCase(usuario))\n produccion.remove(construccion);\n }\n}" ]
[ "0.5628276", "0.5289235", "0.5173896", "0.5148633", "0.50986373", "0.50986373", "0.5016595", "0.50134605", "0.49706826", "0.49523088", "0.4915735", "0.48819274", "0.4855702", "0.4832989", "0.47748926", "0.47595626", "0.47530073", "0.47456503", "0.47446296", "0.47191766", "0.4710079", "0.47028515", "0.47025472", "0.46838653", "0.46046966", "0.45798388", "0.45725268", "0.4564461", "0.4563404", "0.4562885", "0.45566773", "0.45444116", "0.45442003", "0.45432582", "0.45208392", "0.45092827", "0.4496486", "0.44917274", "0.44794166", "0.44708702", "0.44666573", "0.44660202", "0.4463364", "0.4457335", "0.4448748", "0.44472733", "0.44301024", "0.44232732", "0.44140238", "0.44131884", "0.44129884", "0.43980008", "0.43913326", "0.43913326", "0.43886244", "0.43876928", "0.4378968", "0.43778867", "0.43711272", "0.4369917", "0.43689507", "0.43574724", "0.43509895", "0.43493006", "0.4344967", "0.43434888", "0.4342919", "0.43344402", "0.43336698", "0.43261635", "0.43261594", "0.4325929", "0.43208057", "0.4311271", "0.4311108", "0.42918345", "0.42752615", "0.42705715", "0.426953", "0.42670926", "0.42620164", "0.42551735", "0.42550614", "0.4243761", "0.4233288", "0.4231879", "0.42278272", "0.42269123", "0.42151952", "0.42104638", "0.42098805", "0.41943264", "0.41937488", "0.41864207", "0.41863605", "0.41837755", "0.41804966", "0.41784823", "0.41772532", "0.41718528" ]
0.5274732
2
Starts the Cache and the patch reconciler
@Override public void start() { cache.start(); patchReconciler.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void startCacheCleaner() {\n TimerTask faultyServiceRectifier = new CacheCleaner();\n timer = new Timer();\n // Retry in 1 minute\n long retryIn = 1000 * 60;\n timer.schedule(faultyServiceRectifier, 0, retryIn);\n }", "public static void startCaching() {\n\t\t/*\n\t\t * component caching happens if the collection exists\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.preLoaded == false) {\n\t\t\t\taType.cachedOnes = new HashMap<String, Object>();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void start() {\n // HINT: comment setPeriodic and uncomment setTimer to test more easily if exponential backoff works as expected\n // vertx.setTimer(5000, this::updateCache);\n vertx.setPeriodic(120000, this::updateCache);\n }", "@Override\n public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) {\n BasicComponentRegistry gcr = cr.getGlobalComponentRegistry().getComponent(BasicComponentRegistry.class);\n\n if (PROTOBUF_METADATA_CACHE_NAME.equals(cacheName)) {\n BasicComponentRegistry bcr = cr.getComponent(BasicComponentRegistry.class);\n ProtobufMetadataManagerInterceptor protobufInterceptor = new ProtobufMetadataManagerInterceptor();\n bcr.registerComponent(ProtobufMetadataManagerInterceptor.class, protobufInterceptor, true);\n bcr.addDynamicDependency(AsyncInterceptorChain.class.getName(), ProtobufMetadataManagerInterceptor.class.getName());\n bcr.getComponent(AsyncInterceptorChain.class).wired()\n .addInterceptorAfter(protobufInterceptor, EntryWrappingInterceptor.class);\n }\n\n InternalCacheRegistry icr = gcr.getComponent(InternalCacheRegistry.class).running();\n if (!icr.isInternalCache(cacheName)) {\n ProtobufMetadataManagerImpl protobufMetadataManager =\n (ProtobufMetadataManagerImpl) gcr.getComponent(ProtobufMetadataManager.class).running();\n protobufMetadataManager.addCacheDependency(cacheName);\n\n SerializationContext serCtx = protobufMetadataManager.getSerializationContext();\n RemoteQueryManager remoteQueryManager = buildQueryManager(cfg, serCtx, cr);\n cr.registerComponent(remoteQueryManager, RemoteQueryManager.class);\n }\n }", "@Override\n protected void doStart() {\n threadPool.schedule(this.cacheCleaner, this.cleanInterval, ThreadPool.Names.SAME);\n }", "public void start() {\n \t\tLog.info(\"Starting service of repository requests\");\n \t\ttry {\n \t\t\tresetNameSpace();\n \t\t} catch (Exception e) {\n \t\t\tLog.logStackTrace(Level.WARNING, e);\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\tbyte[][]markerOmissions = new byte[2][];\n \t\tmarkerOmissions[0] = CommandMarkers.COMMAND_MARKER_REPO_START_WRITE;\n \t\tmarkerOmissions[1] = CommandMarkers.COMMAND_MARKER_BASIC_ENUMERATION;\n \t\t_markerFilter = new Exclude(markerOmissions);\n \t\t\n \t\t_periodicTimer = new Timer(true);\n \t\t_periodicTimer.scheduleAtFixedRate(new InterestTimer(), PERIOD, PERIOD);\n \n \t}", "private void init() {\n clearCaches();\n }", "public static void start(){\n int size = 1024;\n int max = 32;\n GenericObjectPoolConfig genericObjectPoolConfig = new GenericObjectPoolConfig();\n genericObjectPoolConfig.setMaxTotal(size * max);\n genericObjectPoolConfig.setMaxIdle(size * max);\n genericObjectPoolConfig.setMinIdle(size);\n long time = 1000 * 30;\n genericObjectPoolConfig.setMaxWaitMillis(time);\n genericObjectPoolConfig.setSoftMinEvictableIdleTimeMillis(time);\n\n updateEventCacheFactory = new UpdateEventCacheFactory(new UpdateEventPoolFactory(), genericObjectPoolConfig);\n }", "private void run() {\n m_store = new SimpleCache<Integer, Car>(CacheTemplateDemo.class.getName(), 4000, this);\n m_store.setExpireCacheCheck(1000);\n TestThread thread = new TestThread();\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException excep) {\n excep.printStackTrace();\n }\n System.out.println(\"Finished\");\n }", "public void start() throws LifecycleException {\n\n if (!enabled)\n return;\n\n // create the default cache\n try {\n defaultCache = createCache(maxEntries, cacheClassName);\n } catch (Exception e) {\n _logger.log(Level.WARNING, \"cache.manager.excep_createCache\", e);\n\n String msg = _rb.getString(\"cache.manager.excep_createCache\");\n throw new LifecycleException(msg, e);\n }\n\n // initialize the \"default\" helper\n defaultHelper = new DefaultCacheHelper();\n defaultHelper.setCacheManager(this);\n defaultHelper.init(context, defaultHelperProps);\n\n // initialize the custom cache-helpers\n Iterator helperNames = helperDefs.keySet().iterator();\n while(helperNames.hasNext()) {\n String name = (String) helperNames.next();\n HashMap map = (HashMap)helperDefs.get(name);\n\n try {\n String className = (String)map.get(\"class-name\");\n CacheHelper helper = loadCacheHelper(className);\n helper.init(context, map);\n cacheHelpers.put(name, helper);\n\n } catch (Exception e) {\n String msg = _rb.getString(\"cache.manager.excep_initCacheHelper\");\n Object[] params = { name };\n msg = MessageFormat.format(msg, params);\n\n throw new LifecycleException(msg, e);\n }\n }\n\n // cache-mappings are ordered by the associated filter name\n Iterator filterNames = cacheMappings.keySet().iterator();\n while(filterNames.hasNext()) {\n String name = (String) filterNames.next();\n CacheMapping mapping = (CacheMapping)cacheMappings.get(name);\n\n String helperNameRef = mapping.getHelperNameRef();\n CacheHelper helper;\n if (helperNameRef == null || helperNameRef.equals(\"default\")) {\n helper = defaultHelper;\n } else {\n helper = (CacheHelper) cacheHelpers.get(helperNameRef);\n }\n cacheHelpersByFilterName.put(name, helper);\n }\n }", "public void init() {\n\t\tif (cache != null) {\n\t\t\tcache.dispose();\n\t\t\tcache = null;\n\t\t}\n\t\tcache = cacheFactory.create(CacheFactoryDirective.NoDCE, \"test\");\n\t}", "public final void start(){\n cpt = 0;\n inProgress = true;\n init();\n UpdateableManager.addToUpdate(this);\n }", "public synchronized void startUpdates(){\n mStatusChecker.run();\n }", "@PostConstruct\n public void initCache() {\n cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));\n }", "public void setCached() {\n }", "@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }", "@Override\n public void start() throws Exception {\n createNode();\n // Initial data load (avoid race conditions w/\"NodeCache.start(true)\")\n updateFromZkBytes(_curator.getData().forPath(_zkPath), _defaultValue);\n\n // Re-load the data and watch for changes.\n _nodeCache.getListenable().addListener(new NodeCacheListener() {\n @Override\n public void nodeChanged() throws Exception {\n ChildData childData = _nodeCache.getCurrentData();\n if (childData != null) {\n updateFromZkBytes(childData.getData(), _defaultValue);\n }\n }\n });\n _nodeCache.start();\n }", "private static void initializeCache() {\n\t\t// prepare cache folder for this application instance\n\t\tFile cacheRoot = getApplicationCache();\n\n\t\ttry {\n\t\t\tfor (int i = 0; true; i++) {\n\t\t\t\tFile cache = new File(cacheRoot, String.format(\"%d\", i));\n\t\t\t\tif (!cache.isDirectory() && !cache.mkdirs()) {\n\t\t\t\t\tthrow new IOException(\"Failed to create cache dir: \" + cache);\n\t\t\t\t}\n\n\t\t\t\tfinal File lockFile = new File(cache, \".lock\");\n\t\t\t\tboolean isNewCache = !lockFile.exists();\n\n\t\t\t\tfinal RandomAccessFile handle = new RandomAccessFile(lockFile, \"rw\");\n\t\t\t\tfinal FileChannel channel = handle.getChannel();\n\t\t\t\tfinal FileLock lock = channel.tryLock();\n\n\t\t\t\tif (lock != null) {\n\t\t\t\t\t// setup cache dir for ehcache\n\t\t\t\t\tSystem.setProperty(\"ehcache.disk.store.dir\", cache.getAbsolutePath());\n\n\t\t\t\t\tint applicationRevision = getApplicationRevisionNumber();\n\t\t\t\t\tint cacheRevision = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcacheRevision = new Scanner(channel, \"UTF-8\").nextInt();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cacheRevision != applicationRevision && applicationRevision > 0 && !isNewCache) {\n\t\t\t\t\t\tLogger.getLogger(Main.class.getName()).log(Level.WARNING, String.format(\"App version (r%d) does not match cache version (r%d): reset cache\", applicationRevision, cacheRevision));\n\n\t\t\t\t\t\t// tag cache with new revision number\n\t\t\t\t\t\tisNewCache = true;\n\n\t\t\t\t\t\t// delete all files related to previous cache instances\n\t\t\t\t\t\tfor (File it : getChildren(cache)) {\n\t\t\t\t\t\t\tif (!it.equals(lockFile)) {\n\t\t\t\t\t\t\t\tdelete(cache);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isNewCache) {\n\t\t\t\t\t\t// set new cache revision\n\t\t\t\t\t\tchannel.position(0);\n\t\t\t\t\t\tchannel.write(Charset.forName(\"UTF-8\").encode(String.valueOf(applicationRevision)));\n\t\t\t\t\t\tchannel.truncate(channel.position());\n\t\t\t\t\t}\n\n\t\t\t\t\t// make sure to orderly shutdown cache\n\t\t\t\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tCacheManager.getInstance().shutdown();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tlock.release();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\thandle.close();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// cache for this application instance is successfully set up and locked\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// try next lock file\n\t\t\t\thandle.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogger.getLogger(Main.class.getName()).log(Level.WARNING, e.toString(), e);\n\t\t}\n\n\t\t// use cache root itself as fail-safe fallback\n\t\tSystem.setProperty(\"ehcache.disk.store.dir\", new File(cacheRoot, \"default\").getAbsolutePath());\n\t}", "@Override\n public void stop() {\n cache.stop();\n\n try {\n patchReconciler.stop();\n } catch (InterruptedException e) {\n LOGGER.warnOp(\"Interrupted while stopping Quotas PatchReconciler\");\n }\n }", "public void resetCache() {\n logger.info(\"resetCache(): refilling clinical attribute cache\");\n\n Date dateOfCurrentCacheRefresh = new Date();\n ArrayList<ClinicalAttributeMetadata> latestClinicalAttributeMetadata = null;\n // latestOverrides is a map of study-id to list of overridden ClinicalAttributeMetadata objects\n Map<String, ArrayList<ClinicalAttributeMetadata>> latestOverrides = null;\n\n // attempt to refresh ehcache stores seperately and store success status\n boolean failedClinicalAttributeMetadataCacheRefresh = false;\n boolean failedOverridesCacheRefresh = false;\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull clinical attributes from repository. Error message returned: \" + e.getMessage());\n failedClinicalAttributeMetadataCacheRefresh = true;\n }\n\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataOverridesInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull overrides from repository. Error message returned: \" + e.getMessage());\n failedOverridesCacheRefresh = true;\n }\n\n // regardless of whether ehcache was updated with new data - use that data to populate modeled object caches\n // ensures app starts up (between tomcat restarts) if TopBraid is down\n logger.info(\"Loading modeled object cache from EHCache\");\n try {\n // this will throw an exception if we cannot connect to TopBraid AND cache is corrupt\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCache();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCache();\n } catch (Exception e) {\n try {\n // this will throw an exception if backup is unavailable\n logger.error(\"Unable to load modeled object cache from default EHCache... attempting to read from backup\");\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCacheBackup();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCacheBackup();\n if (latestClinicalAttributeMetadata == null || latestOverrides == null) {\n throw new FailedCacheRefreshException(\"No data found in specified backup cache location...\", new Exception());\n }\n } catch (Exception e2) {\n logger.error(\"Unable to load modeled object cache from backup EHCache...\");\n throw new FailedCacheRefreshException(\"Unable to load data from all backup caches...\", new Exception());\n }\n }\n\n // backup cache at this point (maybe backup after each successful update above?)\n if (!failedClinicalAttributeMetadataCacheRefresh && !failedOverridesCacheRefresh) {\n logger.info(\"resetCache(): cache update succeeded, backing up cache...\");\n try {\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataPersistentCache(latestClinicalAttributeMetadata);\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataOverridesPersistentCache(latestOverrides);\n logger.info(\"resetCache(): succesfully backed up cache\");\n } catch (Exception e) {\n logger.error(\"resetCache(): failed to backup cache: \" + e.getMessage());\n }\n }\n\n HashMap<String, ClinicalAttributeMetadata> latestClinicalAttributeMetadataCache = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : latestClinicalAttributeMetadata) {\n latestClinicalAttributeMetadataCache.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n\n // latestOverridesCache is a map of study-id to map of clinical attribute name to overridden ClinicalAttributeMetadata object\n HashMap<String, Map<String,ClinicalAttributeMetadata>> latestOverridesCache = new HashMap<String, Map<String, ClinicalAttributeMetadata>>();\n for (Map.Entry<String, ArrayList<ClinicalAttributeMetadata>> entry : latestOverrides.entrySet()) {\n HashMap<String, ClinicalAttributeMetadata> clinicalAttributesMetadataMapping = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : entry.getValue()) {\n fillOverrideAttributeWithDefaultValues(clinicalAttributeMetadata, latestClinicalAttributeMetadataCache.get(clinicalAttributeMetadata.getColumnHeader()));\n clinicalAttributesMetadataMapping.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n latestOverridesCache.put(entry.getKey(), clinicalAttributesMetadataMapping);\n }\n\n clinicalAttributeCache = latestClinicalAttributeMetadataCache;\n logger.info(\"resetCache(): refilled cache with \" + latestClinicalAttributeMetadata.size() + \" clinical attributes\");\n overridesCache = latestOverridesCache;\n logger.info(\"resetCache(): refilled overrides cache with \" + latestOverrides.size() + \" overrides\");\n\n if (failedClinicalAttributeMetadataCacheRefresh || failedOverridesCacheRefresh) {\n logger.info(\"Unable to update cache with latest data from TopBraid... falling back on EHCache store.\");\n throw new FailedCacheRefreshException(\"Failed to refresh cache\", new Exception());\n } else {\n dateOfLastCacheRefresh = dateOfCurrentCacheRefresh;\n logger.info(\"resetCache(): cache last refreshed on: \" + dateOfLastCacheRefresh.toString());\n }\n }", "public void updateCache() {\n\n log.info(\"Updating solar flare cache\");\n Date fallbackStartDate = DateHelper.getFallbackDate();\n solarFlareRepository.count()\n .map(total -> {\n if (total > 0) {\n solarFlareRepository.findTopByBeginTimeIsNotNullOrderByBeginTimeDesc()\n .map(solarFlare -> {\n log.info(\"Entries exist, performing incremental update\");\n log.info(\n \"Last entry found at {}\",\n DateHelper.getPrintableString(solarFlare.getBeginTime())\n );\n collectForRange(solarFlare.getBeginTime(), null);\n return solarFlare;\n })\n .subscribe();\n } else {\n log.info(\"No entries found, performing a full import\");\n collectForRange(fallbackStartDate, null);\n }\n return total;\n })\n .subscribe();\n }", "@BeforeAll\n static void cacheManager() {\n }", "@Override\n public synchronized void start() {\n init();\n }", "public void refreshObjectCache();", "public static void main(String[] args) {\n\t\ttestCache2();\r\n\t\t\r\n\t}", "@Override\n public synchronized void start()\n {\n if (run)\n return;\n run = true;\n super.start();\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tRunRecMaintenance maintain = new RunRecMaintenance();\n\t\t\t\t\t\tmaintain.startAutomaticMaintain();\n\t\t\t\t\t}", "@Activate\n\tprotected synchronized void activate(final ComponentContext componentContext) {\n\t\tLOGGER.info(\"Activating Caching Component...\");\n\n\t\tthis.m_cache = CacheBuilder.newBuilder().concurrencyLevel(5).weakValues().maximumSize(50000)\n\t\t\t\t.expireAfterWrite(3, TimeUnit.HOURS).removalListener(new RemoveRealtimeDataListener()).build();\n\n\t\tLOGGER.info(\"Activating Caching Component...Done\");\n\t}", "@ManagedOperation(description = \"Starts rebuilding the index\", displayName = \"Rebuild index\")\n void start();", "protected void initializeCache() {\n\t\tif (cache == null){\n\t\t\tcache = Collections.synchronizedMap(new HashMap());\n\t\t}\n\t\telse{\n\t\t\tcache.clear();\n\t\t}\n\t}", "public void start() {\r\n vcr().start();\t\r\n }", "@Override\n public void start() {\n if (heartBeatService != null) {\n return;\n }\n super.start();\n heartBeatService.submit(new DataHeartbeatThread(this));\n pullSnapshotService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());\n pullSnapshotHintService = new PullSnapshotHintService(this);\n pullSnapshotHintService.start();\n resumePullSnapshotTasks();\n }", "@PostConstruct\n\tprotected void startScheduling() {\n\t\texecutorService.scheduleWithFixedDelay(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tlog.info(\"Start refresh Cache\");\n\t\t\t\t\trefreshCache(false);\n\t\t\t\t\tlog.info(\"Start refresh thumbnails\");\n\t\t\t\t\tfinal Collection<Album> albums = new ArrayList<Album>(loadAlbums(true).values());\n\t\t\t\t\tfinal Semaphore thumbnailSemaphore = new Semaphore(10);\n\t\t\t\t\tfor (final Album album : albums) {\n\t\t\t\t\t\tfor (final AlbumImage image : album.listImages().values()) {\n\t\t\t\t\t\t\tthumbnailSemaphore.acquire();\n\t\t\t\t\t\t\texecutorService.submit(new Runnable() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\timage.getThumbnail(ThumbnailSize.BIG);\n\t\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\t\tthumbnailSemaphore.release();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// wait for all threads\n\t\t\t\t\tthumbnailSemaphore.acquire(10);\n\t\t\t\t\tlog.info(\"Finidhed refreshing thumbnails\");\n\t\t\t\t} catch (final Throwable t) {\n\t\t\t\t\tlog.warn(\"Exception while refreshing thumbnails\", t);\n\t\t\t\t}\n\t\t\t}\n\t\t}, 1, 15, TimeUnit.MINUTES);\n\t}", "public void run() {\n\n \tif(versionGauge == null) {\n \t final String fullVersion;\n \t final String jarName;\n if(this.getClass().getPackage().getImplementationVersion() != null) {\n fullVersion = this.getClass().getPackage().getImplementationVersion();\n } else {\n fullVersion = \"unknown\";\n }\n\n if(this.getClass().getPackage().getImplementationVersion() != null) {\n jarName = this.getClass().getPackage().getImplementationTitle();\n } else {\n jarName = \"unknown\";\n }\n\n if(log.isErrorEnabled()) log.error(\"fullVersion : \" + fullVersion + \"; jarName : \" + jarName);\n\t versionGauge = EVCacheMetricsFactory.getLongGauge(\"evcache-client\", BasicTagList.of(\"version\", fullVersion, \"jarName\", jarName));\n \t}\n\t versionGauge.set(Long.valueOf(1));\n \tpoolManager.getEVCacheScheduledExecutor().schedule(this, 30, TimeUnit.SECONDS);\n }", "public void start() {\n\t\tinstanceConfigUpdated();\n\n\t\tnew Thread(getUsageData, \"ResourceConsumptionManager : GetUsageData\").start();\n\n\t\tLoggingService.logInfo(MODULE_NAME, \"started\");\n\t}", "@Override\n public void start() {\n System.out.println(\"smart life cycle start\");\n flag = true;\n }", "protected abstract void initCache(List<RECIPE> recipes);", "public void preCache(Class<?> type) {\n notNull(type, \"type cannot be null\");\n\n try {\n Reflector reflector = getReflector(type);\n reflector.preCache();\n }\n catch (ReflectException e) {\n throw e;\n }\n catch (Exception e) {\n throw new ReflectException(\"failed to pre-cache accessor/mutator maps for type: \" + type.getName(), e);\n }\n }", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "@Override\r\n\tpublic synchronized void start() {\n\t\tsuper.start();\r\n\t}", "@Asynchronous\n @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public void start(Path folder, ConfigurationCache cache) {\n if (started.getAndSet(true)) {\n return;\n }\n this.folder = folder;\n this.cache = cache;\n watch();\n\n }", "private void start() {\n \t\tisFinished = false;\n \t\trunning = true;\n \t\tpluginHandler.startAll();\n \t\tThread engine = new Thread(this, \"engine\");\n \t\tengine.start();\n \t\tissueHandler.checkAllIssues();\n \t}", "public void startCaching(Player player) {\n\t\tif (!this.caching.contains(player)) {\n\t\t\tthis.cached.remove(player);\n\t\t\tthis.caching.add(player);\n\n\t\t\tPlayerContinuousSnap snap = new PlayerContinuousSnap(player);\n\t\t\tthis.cached.put(player, snap);\n\t\t}\n\t}", "void resetCacheCounters();", "@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic void run() {\n\t\tList<LineageCacheEntry> lockedOrLiveEntries = new ArrayList<>();\n\t\tint count = 0;\n\n\t\t// Stop if 1) Evicted the request number of entries, 2) The parallel\n\t\t// CPU instruction is ended, and 3) No non-live entries left in the cache.\n\t\tlong t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;\n\t\t/*while (!LineageGPUCacheEviction.isGPUCacheEmpty())\n\t\t{\n\t\t\tif (LineageCacheConfig.STOPBACKGROUNDEVICTION)\n\t\t\t\t// This logic reduces #evictions if the cpu instructions is so small\n\t\t\t\t// that it ends before the background thread reaches this condition.\n\t\t\t\t// However, this check decreases race conditions.\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tif (numEvicts > 0 && count > numEvicts)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tLineageCacheEntry le = LineageGPUCacheEviction.pollFirstEntry();\n\t\t\tGPUObject cachedGpuObj = le.getGPUObject();\n\t\t\tGPUObject headGpuObj = cachedGpuObj.lineageCachedChainHead != null\n\t\t\t\t\t? cachedGpuObj.lineageCachedChainHead : cachedGpuObj;\n\t\t\t// Check and continue if any object in the linked list is locked\n\t\t\tboolean lockedOrLive = false;\n\t\t\tGPUObject nextgpuObj = headGpuObj;\n\t\t\twhile (nextgpuObj!= null) {\n\t\t\t\tif (!nextgpuObj.isrmVarPending() || nextgpuObj.isLocked()) // live or locked\n\t\t\t\t\tlockedOrLive = true;\n\t\t\t\tnextgpuObj = nextgpuObj.nextLineageCachedEntry;\n\t\t\t}\n\t\t\tif (lockedOrLive) {\n\t\t\t\tlockedOrLiveEntries.add(le);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// TODO: First remove the gobj chains that don't contain any live and dirty objects.\n\t\t\t//currentAvailableMemory += headGpuObj.getSizeOnDevice();\n\n\t\t\t// Copy from device to host for all live and dirty objects\n\t\t\tboolean copied = false;\n\t\t\tnextgpuObj = headGpuObj;\n\t\t\twhile (nextgpuObj!= null) {\n\t\t\t\t// Keeping isLinCached as True here will save data deletion by copyFromDeviceToHost\n\t\t\t\tif (!nextgpuObj.isrmVarPending() && nextgpuObj.isDirty()) { //live and dirty\n\t\t\t\t\tnextgpuObj.copyFromDeviceToHost(null, true, true);\n\t\t\t\t\tcopied = true;\n\t\t\t\t}\n\t\t\t\tnextgpuObj.setIsLinCached(false);\n\t\t\t\tnextgpuObj = nextgpuObj.nextLineageCachedEntry;\n\t\t\t}\n\n\t\t\t// Copy from device cache to CPU lineage cache if not already copied\n\t\t\tLineageGPUCacheEviction.copyToHostCache(le, null, copied);\n\n\t\t\t// For all the other objects, remove and clear data (only once)\n\t\t\tnextgpuObj = headGpuObj;\n\t\t\tboolean freed = false;\n\t\t\tsynchronized (nextgpuObj.getGPUContext().getMemoryManager().getGPUMatrixMemoryManager().gpuObjects) {\n\t\t\t\twhile (nextgpuObj!= null) {\n\t\t\t\t\t// If not live or live but not dirty\n\t\t\t\t\tif (nextgpuObj.isrmVarPending() || !nextgpuObj.isDirty()) {\n\t\t\t\t\t\tif (!freed) {\n\t\t\t\t\t\t\tnextgpuObj.clearData(null, true);\n\t\t\t\t\t\t\t//FIXME: adding to rmVar cache causes multiple failures due to concurrent\n\t\t\t\t\t\t\t//access to the rmVar cache and other data structures. VariableCP instruction\n\t\t\t\t\t\t\t//and other instruction free memory and add to rmVar cache in parallel to\n\t\t\t\t\t\t\t//the background eviction task, which needs to be synchronized.\n\t\t\t\t\t\t\tfreed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnextgpuObj.clearGPUObject();\n\t\t\t\t\t}\n\t\t\t\t\tnextgpuObj = nextgpuObj.nextLineageCachedEntry;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Clear the GPUOjects chain\n\t\t\tGPUObject currgpuObj = headGpuObj;\n\t\t\twhile (currgpuObj.nextLineageCachedEntry != null) {\n\t\t\t\tnextgpuObj = currgpuObj.nextLineageCachedEntry;\n\t\t\t\tcurrgpuObj.lineageCachedChainHead = null;\n\t\t\t\tcurrgpuObj.nextLineageCachedEntry = null;\n\t\t\t\tnextgpuObj.lineageCachedChainHead = null;\n\t\t\t\tcurrgpuObj = nextgpuObj;\n\t\t\t}\n\n\t\t\t//if(currentAvailableMemory >= size)\n\t\t\t\t// This doesn't guarantee allocation due to fragmented freed memory\n\t\t\t//\tA = cudaMallocNoWarn(tmpA, size, null); \n\t\t\tif (DMLScript.STATISTICS) {\n\t\t\t\tLineageCacheStatistics.incrementGpuAsyncEvicts();\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\n\t\t// Add the locked entries back to the eviction queue\n\t\tif (!lockedOrLiveEntries.isEmpty())\n\t\t\tLineageGPUCacheEviction.addEntryList(lockedOrLiveEntries);\n\t\t\n\t\tif (DMLScript.STATISTICS) //TODO: dedicated statistics for lineage\n\t\t\tGPUStatistics.cudaEvictTime.add(System.nanoTime() - t0); */\n\t}", "public void start(){\n CoffeeMakerHelper coffeeMakerHelper = new CoffeeMakerHelper(inputArgs[0]);\n coffeeMakerService = coffeeMakerHelper.parseJsonFile();\n computeCoffeeMaker();\n }", "public static synchronized void refresh() {\n homes = new HashMap();\n prvHomes = new HashMap();\n ejb30Cache = new HashMap();\n iniCtx = null;\n }", "public void run() {\n long creationInterval = MILLISEC_PER_SEC / this.generationRate;\n\n int curIndex = 0;\n long startTime, endTime, diff, sleepTime, dur = this.test_duration;\n\n do {\n // startTime = System.nanoTime();\n startTime = System.currentTimeMillis();\n\n Request r = new DataKeeperRequest((HttpClient) this.clients[curIndex], this.appserverID, this.url);\n curIndex = (curIndex + 1) % clientsPerNode;\n this.requests.add(r);\n\n try {\n r.setEnterQueueTime();\n this.requestQueue.put(r);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n // endTime = System.nanoTime();\n endTime = System.currentTimeMillis();\n diff = endTime - startTime;\n dur -= diff;\n sleepTime = creationInterval - diff;\n if (sleepTime < 0) {\n continue;\n }\n\n try {\n // Thread.sleep(NANO_PER_MILLISEC / sleepTime, (int) (NANO_PER_MILLISEC % sleepTime));\n Thread.sleep(sleepTime);\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n\n dur -= sleepTime;\n } while (dur > 0);\n\n try {\n this.requestQueue.put(new ExitRequest());\n this.requestQueueHandler.join();\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n }", "void resetCache();", "private void startInternally() {\n log.debug(\"Start internally called.\");\n\n try {\n LumenFacade lumenFacade = new LumenFacadeImpl(LumenConnection\n .getInstance());\n spine = new JmsSpine(JmsClient.REMOTE, SpineConstants.LUMEN_MEDIATOR);\n lumenClient = new LumenClient(lumenFacade, spine);\n lumenClient.start();\n }\n catch (SpineException e) {\n log.error(\"Problem starting the Lumen process: {}\", e.getMessage());\n e.printStackTrace();\n }\n }", "@Before\n public void init() {\n Cache cache = cacheManager.getCache(\"default-test\");\n cache.clear();\n\n }", "public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}", "protected void doStressTest_(String sTest, String sCacheMain, String sCacheAux,\n ValueExtractor extractor, final CompositeKeyCreator keyCreator,\n int nServers, int cRollingRestart)\n {\n boolean fRollingRestart = cRollingRestart > 0;\n MemberHandler memberHandler = new MemberHandler(\n CacheFactory.ensureCluster(), sTest,\n /*fExternalKill*/true, /*fGraceful*/true);\n for (int i = 0; i < nServers; i++)\n {\n memberHandler.addServer();\n }\n\n final EntryProcessor processor = new BackdoorMutatingProcessor(sCacheAux);\n final NamedCache cache0 = getNamedCache(sCacheMain);\n final NamedCache cache1 = getNamedCache(sCacheAux);\n final boolean[] afExiting = fRollingRestart ? new boolean[1] : null;\n\n DistributedCacheService service = (DistributedCacheService) cache0.getCacheService();\n Eventually.assertThat(invoking(service).getOwnershipEnabledMembers().size(), is(nServers));\n\n cache0.addIndex(extractor, false, null);\n if (cache0 != cache1)\n {\n cache1.addIndex(extractor, false, null);\n }\n\n class LoadThread\n extends Thread\n {\n public void run()\n {\n Random rand = new Random();\n for (int i = 0; afExiting != null ? !afExiting[0] : i < 5000; i++)\n {\n Object oKey = Integer.valueOf(rand.nextInt(25));\n cache0.invoke(keyCreator.getCompositeKey(oKey, cache0), processor);\n }\n }\n }\n\n Thread thd0 = new LoadThread();\n Thread thd1 = new LoadThread();\n Thread thd2 = new LoadThread();\n Thread thd3 = new LoadThread();\n Thread thd4 = new LoadThread();\n\n thd0.start();\n thd1.start();\n thd2.start();\n thd3.start();\n thd4.start();\n\n if (fRollingRestart)\n {\n doRollingRestart(memberHandler, cRollingRestart, new WaitForNodeSafeRunnable(service));\n Eventually.assertThat(invoking(service).getOwnershipEnabledMembers().size(), is(nServers));\n\n afExiting[0] = true;\n }\n\n try\n {\n thd0.join();\n thd1.join();\n thd2.join();\n thd3.join();\n thd4.join();\n }\n catch (InterruptedException e)\n {\n fail(\"test was interrupted: \" + e);\n }\n\n assertFalse(\"Expected changes to \" + cache1.getCacheName()\n + \" are not present\", cache1.isEmpty());\n\n validateIndex(cache0);\n if (cache0 != cache1)\n {\n validateIndex(cache1);\n }\n\n memberHandler.dispose();\n }", "public void start()\n {\n try\n {\n if ( running == false )\n {\n running = true;\n sample = RrdManager.getRrdDB().createSample();\n Timer timer = new Timer( \"rrd\" );\n\n timer.scheduleAtFixedRate( updateTask, 0, 3000 );\n }\n }\n catch ( IOException e )\n {\n throw new RuntimeException(\n \"IO Error trying to access round robin database path. See nested exception.\",\n e );\n }\n }", "public void start() {\n startTime = System.currentTimeMillis();\n }", "public void start() {\n System.out.println(\"OBRMAN started\");\n ApamManagers.addManager(this, 3);\n OBRMan.obr = new OBRManager(null, repoAdmin);\n obr.startWatchingRepository();\n }", "public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}", "public synchronized void start() throws Exception\n {\n\n if ( lastFlushed == NOTHING )\n {\n lastFlushed = coreState.getLastFlushed();\n }\n applierState.lastApplied = lastFlushed;\n\n log.info( format( \"Restoring last applied index to %d\", lastFlushed ) );\n sessionTracker.start();\n\n /* Considering the order in which state is flushed, the state machines will\n * always be furthest ahead and indicate the furthest possible state to\n * which we must replay to reach a consistent state. */\n long lastPossiblyApplying = max( coreState.getLastAppliedIndex(), applierState.getLastSeenCommitIndex() );\n\n if ( lastPossiblyApplying > applierState.lastApplied )\n {\n log.info( \"Applying up to: \" + lastPossiblyApplying );\n applyUpTo( lastPossiblyApplying );\n }\n\n resumeApplier( \"startup\" );\n }", "public void start() {\n startTime = System.currentTimeMillis();\n }", "public void start() {\n \t\tzCalc.start();\n \t}", "@Override\n public void start() {\n KeyValueLib.dataCenters.put(dataCenter1, 1);\n KeyValueLib.dataCenters.put(dataCenter2, 2);\n KeyValueLib.dataCenters.put(dataCenter3, 3);\n final RouteMatcher routeMatcher = new RouteMatcher();\n final HttpServer server = vertx.createHttpServer();\n server.setAcceptBacklog(32767);\n server.setUsePooledBuffers(true);\n server.setReceiveBufferSize(4 * 1024);\n\n mapPutLock = new ReentrantLock();\n getMap = new HashMap<String, PriorityQueue<String>>();\n queuePutLocks = new HashMap<String, ReentrantLock>();\n\n mapGetLock = new ReentrantLock();\n getMap = new HashMap<String, PriorityQueue<String>>();\n queueGetLocks = new ReentrantLock();\n\n dcLock = new HashMap<String, ReentrantLock>();\n keyLockMap = new HashMap<String, KeyLock>();\n\n routeMatcher.get(\"/put\", new Handler<HttpServerRequest>() {\n @Override\n public void handle(final HttpServerRequest req) {\n MultiMap map = req.params();\n final String key = map.get(\"key\");\n final String value = map.get(\"value\");\n // You may use the following timestamp for ordering requests\n final String timestamp = new Timestamp(\n System.currentTimeMillis() + TimeZone.getTimeZone(\"EST\").getRawOffset()).toString();\n\n // lock the map\n mapGetLock.lock();\n mapPutLock.lock();\n\n if (!putMap.containsKey(key)) {\n getMap.put(key, new PriorityQueue<String>());\n putMap.put(key, new PriorityQueue<String>());\n queueGetLocks.put(key, new ReentrantLock());\n queuePutLocks.put(key, new ReentrantLock());\n keyLockMap.put(key, new KeyLock());\n }\n\n putMap.get(key).add(timestamp);\n\n // unlock the map\n mapGetLock.unlock();\n mapPutLock.unlock();\n \n Thread t = new Thread(new Runnable() {\n public void run() {\n // TODO: Write code for PUT operation here.\n // Each PUT operation is handled in a different thread.\n // Highly recommended that you make use of helper\n // functions.\n }\n \n private void replicatePut(String key, String value, String timestamp) {\n queueGetLocks.get(key).lock();\n queuePutLocks.get(key).lock();\n \n while ((putMap.get(key).peek()!=null && !putMap.get(key).peek().equals(timestamp)) \n || (getMap.get(key).peek()!=null && Long.parseLong(getMap.get(key).peek()) > Long.parseLong(timestamp))) {\n \n queueGetLocks.get(key).unlock();\n queuePutLocks.get(key).unlock();\n try {\n synchronized (keyLockMap.get(key)) {\n keyLockMap.get(key).wait();\n }\n } catch(Exception e){\n \n }\n \n queueGetLocks.get(key).lock();\n queuePutLocks.get(key).lock();\n }\n \n queueGetLocks.get(key).unlock();\n queuePutLocks.get(key).unlock();\n\n try{\n KeyValueLib.PUT(dataCenter1, key, value);\n KeyValueLib.PUT(dataCenter2, key, value);\n KeyValueLib.PUT(dataCenter3, key, value);\n } catch (Exception e){\n System.out.println(\"Exception happens in Put\");\n }\n\n queuePutLocks.get(key).lock();\n putMap.get(key).remove(timestamp);\n queuePutLocks.get(key).unlock();\n \n keyLockMap.get(key).notifyAll();\n return;\n\n }\n\n \n });//runnable\n t.start();\n req.response().end(); // Do not remove this\n }\n });\n\n routeMatcher.get(\"/get\", new Handler<HttpServerRequest>() {\n @Override\n public void handle(final HttpServerRequest req) {\n MultiMap map = req.params();\n final String key = map.get(\"key\");\n final String loc = map.get(\"loc\");\n // You may use the following timestamp for ordering requests\n final String timestamp = new Timestamp(\n System.currentTimeMillis() + TimeZone.getTimeZone(\"EST\").getRawOffset()).toString();\n Thread t = new Thread(new Runnable() {\n public void run() {\n // TODO: Write code for GET operation here.\n // Each GET operation is handled in a different thread.\n // Highly recommended that you make use of helper\n // functions.\n req.response().end(\"0\"); // Default response = 0\n }\n });\n t.start();\n }\n });\n\n routeMatcher.get(\"/storage\", new Handler<HttpServerRequest>() {\n @Override\n public void handle(final HttpServerRequest req) {\n MultiMap map = req.params();\n storageType = map.get(\"storage\");\n // This endpoint will be used by the auto-grader to set the\n // consistency type that your key-value store has to support.\n // You can initialize/re-initialize the required data structures\n // here\n req.response().end();\n }\n });\n\n routeMatcher.noMatch(new Handler<HttpServerRequest>() {\n @Override\n public void handle(final HttpServerRequest req) {\n req.response().putHeader(\"Content-Type\", \"text/html\");\n String response = \"Not found.\";\n req.response().putHeader(\"Content-Length\", String.valueOf(response.length()));\n req.response().end(response);\n req.response().close();\n }\n });\n server.requestHandler(routeMatcher);\n server.listen(8080);\n }", "protected void startup() {\n\t\tsynchronized (this) {\n\t\t\tstartTime = Utilities.getTime();\n\n\t\t\t// Start sets (and their containers' maintenance threads).\n\t\t\tfor (int i = 0; i < sets.length; i++) {\n\t\t\t\tsets[i].startup();\n\t\t\t}\n\n\t\t\tproducerThreadPool.start(this, builders);\n\n\t\t\tpayerThread.start();\n\n\t\t\t// Allow shutdown\n\t\t\tshutdownMutex.release();\n\t\t}\n\t}", "void update(String pathString, CacheEntry cacheEntry);", "private void start() {\n\n\t}", "public void startReloading() {\n reload.setTimeOffset(1);\n reload.play();\n }", "public synchronized static void resetCache() {\n prefixes = null;\n jsonldContext = null;\n }", "public static void loadCache() {\n\t\t // it is the temporary replacement to database. We should use DB instead\n\t Circle circle = new Circle();\n\t circle.setId(\"1\");\n\t shapeMap.put(circle.getId(),circle);\n\n\t Square square = new Square();\n\t square.setId(\"2\");\n\t shapeMap.put(square.getId(),square);\n\n\t Rectangle rectangle = new Rectangle();\n\t rectangle.setId(\"3\");\n\t \n\t Circle circle2 = new Circle();\n\t circle2.setId(\"4\");\n\t circle2.setType(\"Big Circle\");\n\t shapeMap.put(circle2.getId(),circle2);\n\t shapeMap.put(rectangle.getId(), rectangle);\n\t }", "protected void createLookupCache() {\n }", "public void start() {\n\t\tthis.startTime = System.nanoTime();\n\t\tthis.running = true;\n\t}", "@Override\n public void startClock() {\n state = ClockState.RUNNING;\n /*\n * Used as scaling factor for workload and virtual machine power --> Need to\n * scale output as well\n */\n double scalingFactor = this.clockTicksTillWorkloadChange*this.intervalDurationInMilliSeconds;\n clockEventPublisher.fireStartSimulationEvent(0, intervalDurationInMilliSeconds, scalingFactor);\n\n while (clockTickCount <= experimentDurationInClockTicks) {\n fireEvents();\n clockTickCount++;\n\n }\n clockEventPublisher.fireFinishSimulationEvent(clockTickCount, intervalDurationInMilliSeconds);\n\n }", "public void install(Context context) {\n appContext = context.getApplicationContext();\n // init cache\n GlobalManager.getInstance().init();\n\n DiskCacheManager.getInstance().init(context);\n DiskLruCacheUtils.setDiskLruCache(DiskCacheManager.getInstance().getDiskLruCache(context));\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (DefaultResourceAllocator.this) {\n\t\t\t\t\tAgent agent = agentManager.load(agentId);\n\t\t\t\t\tagentResourceQuotas.put(agentId, agent.getResources());\n\t\t\t\t\tagentResourceUsages.put(agentId, new HashMap<>());\n\t\t\t\t\n\t\t\t\t\tfor (QueryCache cache: queryCaches.values()) {\n\t\t\t\t\t\tif (cache.query.matches(agent))\n\t\t\t\t\t\t\tcache.result.add(agentId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "private void registerCaches(){\n // Initialize region arraylist\n prisoners = new HashMap<>();\n regions = QueryManager.getRegions();\n prisonBlocks = QueryManager.getPrisonBlocks();\n portals = QueryManager.getPortals();\n }", "@Override public void run() {\n\t\t\t\tsaveLogCache();\n\t\t\t\tserverToken = null;\n\t\t\t\toffline = true;\n\t\t\t}", "protected void initializeCache() {\n if (cacheResults && initialized) {\n dataCache = new HashMap<String, Map<String, Map<String, BaseAttribute>>>();\n }\n }", "public void start(){\n\n stopWatchStartTimeNanoSecs = magicBean.getCurrentThreadCpuTime();\n\n }", "public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }", "private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }", "public synchronized void start() {\n // For max accuracy, reset oldTime to really reflect how much\n // time will have passed since we wanted to start the updating\n oldTime = System.nanoTime();\n updateGameDataAtSlowRate();\n }", "public void initApp() {\r\n\t\tUtilities.program=this;\r\n\t\ttouchList = new Hashtable<Integer, Touch>();\r\n\r\n\t\t// DB\r\n\t\tqueryManager = new QueryManager(this);\r\n\r\n\t\tlong timer = System.currentTimeMillis();\r\n\t\tresults = queryManager.getCrashesALL();\r\n\t\tSystem.out.println(System.currentTimeMillis() - timer);\r\n\t\ttimer = System.currentTimeMillis();\r\n\r\n\t\t// MARKERS\r\n\t\tUtilities.markerShape = loadShape(\"marker.svg\");\r\n\t\tmarkerList = updateMarkerList();\r\n\t\t\r\n\t\t\r\n\t\t// GRID\r\n\t\tgm = new GridManager(this, map, results);\r\n\t\tSystem.out.println(\"InitApp1\");\r\n\t\tgm.computeGridValues();\r\n\t\tSystem.out.println(System.currentTimeMillis() - timer);\r\n\t\t\r\n\t\t// OTHER\r\n\t\tUtilities.font = this.loadFont(\"Helvetica-Bold-100.vlw\");\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n\tpublic void testQueryCaching(){\n\t\tqueryCache();\n\t\tqueryCache2();\n\t}", "@Override\n public void stageForCache() throws Exception {\n assumeTrue( !isWindows() );\n super.stageForCache();\n }", "public void init(){\n\t\t//this.lock = new ReentrantLock();\n\t\t//jobscheduler.setLock(this.lock);\n\t\tthis.poller.inspect();\n\t\tschedule(this.poller.refresh());\t\t\t\t\n\t}", "@Test\n public void checkThatTheCacheIsUsed() {\n \tif (!useResourceCaching) {\n \t\treturn;\n \t}\n \t\n \t// The basic test setup is copied from testSearchPath2ElementsWithSuper\n String root0 = \"/apps/\";\n String root1 = \"/libs/\";\n searchPathOptions.setSearchPaths(new String[] {\n root0,\n root1\n });\n\n // set resource super type\n resourceSuperType = \"foo:superBar\";\n resourceSuperTypePath = ResourceUtil.resourceTypeToPath(resourceSuperType);\n replaceResource(null, resourceSuperType);\n\n final Resource r = request.getResource();\n \n \t// Execute the same call twice and expect that on 2nd time the ResourceResolver\n \t// is never used, because all is taken from the cache\n getLocations(r.getResourceType(),\n r.getResourceSuperType());\n Mockito.clearInvocations(resolver);\n getLocations(r.getResourceType(),\n r.getResourceSuperType());\n Mockito.verify(resolver, Mockito.never()).getResource(Mockito.anyString());\n \n // validate the cache cleanup\n int cacheEntries = ((Map<String,Resource>) resolver.getPropertyMap().get(LocationCollector.CACHE_KEY)).size();\n assertTrue(cacheEntries > 0);\n LocationCollector.clearCache(resolver);\n assertEquals(0,((Map<String,Resource>) resolver.getPropertyMap().get(LocationCollector.CACHE_KEY)).size());\n \n }", "protected void resetCache() {\n if (cacheResults && initialized) {\n dataCache.clear();\n }\n }", "public HotrodCacheFactory() {\n }", "public void start() {\n\t\ttrackerThread.start();\n\t}", "private void refreshDataCache(){\n this.stageplaatsen = dbFacade.getAllStageplaatsen();\n this.bedrijven = dbFacade.getAllBedrijven();\n }", "private void invalidateCache() {\n\t}", "private void flushCache()\n {\n cachedDecomposition = null;\n cachedCentroid = null;\n cachedBounds = null;\n }", "@Override\n public void preRun() {\n super.preRun();\n }", "@Override\n\tpublic void startClient() {\n\t\tPerformanceMetricGraphObserver performanceMetricObserver = new PerformanceMetricGraphObserver();\n\t\tPerformanceMetricDataObservable.getInstance().addObserver(performanceMetricObserver);\n\n\t\tFaceViewObserver faceObserver = new FaceViewObserver();\n\t\tExpressionsDataObservable.getInstance().addObserver(faceObserver);\n\n\t\tExpressionsGraphObserver expGraphObserver = new ExpressionsGraphObserver();\n\t\tExpressionsDataObservable.getInstance().addObserver(expGraphObserver);\n\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tplaces.start();\n\t\t\t\t// rooms.start();\n\t\t\t} catch (UnknownSubarchitectureException e1) {\n\t\t\t\tcomponent.logException(e1);\n\t\t\t}\n\t\t\tWMEventQueue agentChangeEventQueue = new WMEventQueue();\n\t\t\tcomponent.addChangeFilter(ChangeFilterFactory.createTypeFilter(\n\t\t\t\t\tPlaceContainmentAgentProperty.class,\n\t\t\t\t\tWorkingMemoryOperation.ADD), agentChangeEventQueue);\n\t\t\tcomponent.addChangeFilter(ChangeFilterFactory.createTypeFilter(\n\t\t\t\t\tPlaceContainmentAgentProperty.class,\n\t\t\t\t\tWorkingMemoryOperation.OVERWRITE), agentChangeEventQueue);\n\n\t\t\t// initialize current place\n\t\t\twhile (currentPlace == null && !interrupted())\n\t\t\t\tcurrentPlace = getPlaceInterface().getCurrentPlace();\n\t\t\tsetPlace(currentPlace);\n\n\t\t\twhile (!interrupted()) {\n\t\t\t\ttry {\n\t\t\t\t\t// wait for the next change (wait 500ms to allow this to be\n\t\t\t\t\t// properly shutdown on interrupts)\n\t\t\t\t\tWorkingMemoryChange event = agentChangeEventQueue.poll(500,\n\t\t\t\t\t\t\tTimeUnit.MILLISECONDS);\n\t\t\t\t\t// if it was just a time out continue waiting\n\t\t\t\t\tif (event == null)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tPlace place = getPlaceInterface().getCurrentPlace();\n\n\t\t\t\t\tif (place == null || place.id != currentPlace.id) {\n\t\t\t\t\t\tsetPlace(place);\n\t\t\t\t\t\tfor (PlaceChangedHandler c : placeCheckerCallables) {\n\t\t\t\t\t\t\tc.update(place);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}", "public void restart() {\r\n\t\tstart();\r\n\t}", "@Override\n public void runCracker() {\n }", "@Override\n public void start() {\n //start eye tracking if it is not running already\n startEyeTracking();\n\n super.start();\n\n //start light sensor\n mLightIntensityManager.startLightMonitoring();\n }", "private void createImageCache(){\n ImageCacheManager.getInstance().init(this,\n this.getPackageCodePath()\n , DISK_IMAGECACHE_SIZE\n , DISK_IMAGECACHE_COMPRESS_FORMAT\n , DISK_IMAGECACHE_QUALITY\n , ImageCacheManager.CacheType.MEMORY);\n }", "public synchronized void reload() {\n if (this.reloader == null || !this.reloader.isAlive()) {\n this.reloader = new Reloader();\n this.reloader.start();\n }\n }", "public void gotCachedData() {\n\t\tneedsRecaching = false;\n\t}" ]
[ "0.61495155", "0.61422986", "0.60649467", "0.6003871", "0.5958285", "0.5890602", "0.584871", "0.58392406", "0.5837654", "0.5789975", "0.57304496", "0.5722585", "0.5719668", "0.56430405", "0.5603875", "0.5590141", "0.558604", "0.5540421", "0.55099845", "0.55082524", "0.5503592", "0.54340726", "0.54156643", "0.53780204", "0.5351368", "0.53227705", "0.5306287", "0.53034556", "0.5296845", "0.52689546", "0.52562493", "0.5237409", "0.51889896", "0.51806766", "0.5167155", "0.5162765", "0.5153321", "0.51522946", "0.51468146", "0.51444983", "0.5125052", "0.51235664", "0.51101476", "0.5107794", "0.5102599", "0.5100224", "0.50956863", "0.508967", "0.5089415", "0.5061834", "0.5055809", "0.5048655", "0.5045287", "0.5044499", "0.50356776", "0.5035659", "0.5023896", "0.5019787", "0.50099105", "0.5009818", "0.5006441", "0.5000852", "0.49952656", "0.4980158", "0.49756008", "0.497497", "0.49739859", "0.4970735", "0.49693635", "0.49679586", "0.49664068", "0.49611288", "0.49578822", "0.49475834", "0.494116", "0.49350703", "0.49227703", "0.4916475", "0.49136", "0.49120283", "0.49093616", "0.49072218", "0.4897137", "0.48948148", "0.48889", "0.48808706", "0.4878514", "0.4877541", "0.4875252", "0.48695907", "0.4867658", "0.48643214", "0.4860238", "0.48576877", "0.48569953", "0.485529", "0.48458713", "0.48420963", "0.48309502", "0.48289463" ]
0.8744207
0
Stops the Cache and the patch reconciler
@Override public void stop() { cache.stop(); try { patchReconciler.stop(); } catch (InterruptedException e) { LOGGER.warnOp("Interrupted while stopping Quotas PatchReconciler"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doStop() throws Exception {\n trunkStore();\n cache.clear();\n init.set(false);\n }", "public void stopSweeper()\r\n\t{\r\n\t\tsynchronized (lock) {\r\n\t\t\tcache = null;\r\n\t\t\tlock.notify();\r\n\t\t}\r\n\t}", "public static void shutdown() {\n resetCache();\n listeningForChanges = false;\n }", "public void stopUpdates();", "public static void stopCaching() {\n\t\t/*\n\t\t * remove existing cache. Also, null implies that they are not be cached\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.preLoaded == false) {\n\t\t\t\taType.cachedOnes = null;\n\t\t\t}\n\t\t}\n\t}", "void destroy() {\n destroyCache();\n }", "@Programmatic\n public void shutdown() {\n LOG.info(\"shutting down {}\", this);\n\n cache.clear();\n }", "public void stop() {\n clockThread = null;\n }", "public void stop() throws LifecycleException {\n disable();\n\n try {\n defaultHelper.destroy();\n } catch (Exception e) {\n // XXX: ignore\n }\n\n // destroy the cache-helpers\n Enumeration helpers = Collections.enumeration(cacheHelpers.values());\n while(helpers.hasMoreElements()) {\n CacheHelper cacheHelper = (CacheHelper)helpers.nextElement();\n try {\n cacheHelper.destroy();\n } catch (Exception e) {\n // XXX: ignore\n }\n } \n cacheHelpers.clear();\n cacheMappings.clear();\n cacheHelpersByFilterName.clear();\n listeners.clear();\n }", "public static void stopCacheCleaner() {\n timer.cancel();\n timer = null;\n }", "private void invalidateCache() {\n\t}", "@Override\n\tpublic void stop() {\n\t\tstopTask();\n\t\tmPlaybillPath = null;\n\t\tmResPlaybill = null;\n\t}", "public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}", "public void stop() {\n\n\t\tcoreMatcher.stop();\n\t}", "public void stop() {\n\t\tResources.getmScene().unregisterUpdateHandler(time);\n\t\trunning = false;\n\t}", "public void stop() {\n\t\tthis.stopper = true;\n\t}", "public void dereferenceCache() {\n this.cache = null;\n }", "@Override\n public void stop() {\n animatorThread = null;\n\n //Get rid of the objects necessary for double buffering.\n offGraphics = null;\n offImage = null;\n }", "@Override\n\t\tpublic void stop() {\n\t\t\t// Nothing to do for now\n\t\t}", "@Override\n public void stop() {\n lumenClient.shutdown();\n lumenClient = null;\n }", "public void stop() {\n\t\trunning = false;\n\t\tfor (ArionumHasher hasher : hashers) {\n\t\t\thasher.setForceStop(true);\n\t\t}\n\n\t\tthreadCollection.clear();\n\t\thashers.clear();\n\t}", "public void stop() {\r\n _keepGoing = false;\r\n }", "public void stop() {\n\t\tif (this.isRunning() && !this.isManagedExternally) {\n\t\t\ttry {\n\t\t\t\tHTTP.release(this.http.get(this.shutdown));\n\t\t\t} catch (IOException exception) {\n\t\t\t\tthis.processRunner.abort();\n\t\t\t}\n\n\t\t\tthis.isManagedExternally = null;\n\t\t}\n\t}", "public void stop() {\n\tanimator = null;\n\toffImage = null;\n\toffGraphics = null;\n }", "public void stop(){\n return;\n }", "public void stop()\n {\n storage.stop();\n command.stop();\n }", "public void stop() {\r\n running = false;\r\n }", "public void stop() {}", "public void stop() {\n intake(0.0);\n }", "public void stop() {\n\t}", "public void destroy() throws Exception {\n\t\tICache cache = getCache ();\n\t\tif(cache!=null) cache.shutdown ();\n\t}", "public void stop() {\n }", "public void stop() {\n }", "public void stopping() {\n super.stopping();\n }", "public void stop() {\n running = false;\n }", "public void stop()\n\t{\n\t\tindex = 0;\n\t\tlastUpdate = -1;\n\t\tpause();\n\t}", "public void stop() {\n System.setErr(saveErr);\n System.setOut(saveOut);\n running = false;\n try {\n flushThread.join();\n } catch (InterruptedException e) {\n }\n }", "public void stop()\r\n {\r\n breakoutAnimator = null;\r\n }", "public final void stop() {\n running = false;\n \n \n\n }", "@Override\n public void stopClock() {\n state = ClockState.STOPPED;\n // TODO\n\n }", "public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}", "@Override\n public void stop() {\n }", "public void stop() {\n\t\t\n\t}", "public synchronized void stop() {\n this.running = false;\n }", "private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}", "public void shutdown()\n {\n valid = false;\n quitSafely();\n\n synchronized (loading) {\n loading.clear();\n }\n synchronized (toLoad) {\n toLoad.clear();\n }\n synchronized (tilesByFetchRequest) {\n tilesByFetchRequest.clear();\n }\n }", "public void stop()\n {\n running = false;\n }", "public void stop() {\n\t\tthis.stopTime = System.nanoTime();\n\t\tthis.running = false;\n\t}", "public void stop() {\n stop = true;\n }", "void invalidateCache();", "@Override\r\n\tpublic void stop() {\n\t\t\r\n\t}", "public void stop() {\n _running = false;\n }", "public void invalidate() {\n boolean hasLock = false;\n while (!hasLock) {\n synchronized (this) {\n if (!lock) {\n lock = true;\n hasLock = true;\n }\n }\n if (!hasLock) try {\n Thread.sleep(1000);\n } catch (Exception e) {\n }\n }\n try {\n if (cacheFile.exists()) cacheFile.delete();\n } finally {\n lock = false;\n }\n }", "@Override\r\n public void stop() {\r\n }", "@Override\r\n public void stop() {\r\n }", "@Override\n\tpublic void stop() {\n\t\tsuper.stop();\n\t}", "@Override\n\tpublic void stop() {\n\t\tsuper.stop();\n\t}", "@Override\n\tpublic void stop()\n\t\t{\n\t\t}", "public void stop(BundleContext context) throws Exception {\n super.stop(context);\n ivyCpcSerializer = null;\n ivyAttachmentManager = null;\n resourceBundle = null;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n workspace.removeSaveParticipant(ID);\n colorManager = null;\n ivyMarkerManager = null;\n ivyResolveJob = null;\n retrieveSetupManager = null;\n workspace.removeResourceChangeListener(workspaceListener);\n workspaceListener = null;\n workspace.removeResourceChangeListener(ivyFileListener);\n ivyFileListener = null;\n\n getPreferenceStore().removePropertyChangeListener(propertyListener);\n propertyListener = null;\n\n if (console != null) {\n console.destroy();\n }\n plugin = null;\n }", "@Override public void stop() {\n }", "@Override\r\n public void stop() {\r\n\r\n }", "void stop() {\n\t\texitTesting = true;\n\t}", "@Override\n public void stop() throws Exception {\n mapView.dispose();\n map.dispose();\n System.exit(0);\n\n }", "public void stop()\n {\n }", "void resetCache();", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "public void stop() {\n\t\tconnection.stop();\n\t\tdata.disconnectAll();\n\t\tsaveData();\n\t}", "public synchronized static void resetCache() {\n prefixes = null;\n jsonldContext = null;\n }", "public void stop(){\n running = false;\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "public synchronized void stop() {\n stopping = true;\n }", "@Override\n public void stopPoisonPill() {\n Thread.currentThread().stop();\n }", "@Override protected void onStop() {\n\tsuper.onStop();\n\tm_locManager.removeUpdates(this);\n }", "public void stop() {\n executor.shutdownNow();\n rescanThread.interrupt();\n }", "public void stop() {\n endTime = System.currentTimeMillis();\n }", "@Override\n public void stop() {}", "public void Stop() {\r\n\t\t\r\n\t\tthread = null;\r\n\t}", "public void stop(){\n\t\t\n\t\tif (extObj != null){\n\t\t\textObj.stopComponent();\n\t\t\textObj = null;\n\t\t}\n\t\t\n\t\textClassLoader = null;\n\t}", "public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}", "public void stopWork() {\n stopWork = true;\n }", "public synchronized void stop()\r\n/* 78: */ {\r\n/* 79:203 */ if (!this.monitorActive) {\r\n/* 80:204 */ return;\r\n/* 81: */ }\r\n/* 82:206 */ this.monitorActive = false;\r\n/* 83:207 */ resetAccounting(milliSecondFromNano());\r\n/* 84:208 */ if (this.trafficShapingHandler != null) {\r\n/* 85:209 */ this.trafficShapingHandler.doAccounting(this);\r\n/* 86: */ }\r\n/* 87:211 */ if (this.scheduledFuture != null) {\r\n/* 88:212 */ this.scheduledFuture.cancel(true);\r\n/* 89: */ }\r\n/* 90: */ }", "private void invalidateCache() {\n\t\tLog.d(TAG, \"invalidateCache() is removing in-memory cache\");\n\t\tpackageMapping.clear();\n\t\tvalidCache = false;\n\t}", "public static void cancelCache()\n {\n try\n {\n HttpConnection httpConn = new HttpConnection(AppContext.getInstance().getCancelCacheUrl());\n httpConn.doPost(\"\");\n if (httpConn.getResponseCode() != HttpConnection.HTTP_RESPONSECODE_200_OK)\n {\n logger.error(\"error deleting cache\");\n }\n }\n catch (IOException ex)\n {\n logger.error(\"error deleting cache\", ex);\n }\n }", "@Override\n\tpublic void stop() {\n\t}", "@Override\n\tpublic void stop() {\n\t}", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();" ]
[ "0.6794199", "0.67865896", "0.66649896", "0.66144454", "0.651696", "0.6489709", "0.64807695", "0.6468334", "0.63880277", "0.6365999", "0.62917155", "0.6239591", "0.62073904", "0.6178813", "0.61735517", "0.61485183", "0.6140468", "0.60940963", "0.6085269", "0.6084897", "0.60746914", "0.6062709", "0.60620916", "0.60588", "0.60559726", "0.6053767", "0.6016495", "0.6014417", "0.6003541", "0.5997478", "0.597116", "0.59697706", "0.59697706", "0.5967427", "0.5955563", "0.5948287", "0.5939224", "0.593219", "0.5918501", "0.5912789", "0.5910073", "0.59079933", "0.59069276", "0.5901642", "0.5901597", "0.5895797", "0.5894648", "0.58914304", "0.58879054", "0.5883871", "0.58774906", "0.587243", "0.58661044", "0.5861014", "0.5861014", "0.5859928", "0.5859928", "0.5857411", "0.5857009", "0.58511144", "0.58337754", "0.583338", "0.58285946", "0.5828587", "0.582846", "0.5827814", "0.5827668", "0.58203", "0.58157694", "0.58059376", "0.58059376", "0.58059376", "0.58059376", "0.58059376", "0.58059376", "0.58059376", "0.58059376", "0.58059376", "0.58059376", "0.58059376", "0.58018816", "0.5801855", "0.5797634", "0.5790271", "0.5782703", "0.577825", "0.577222", "0.5772099", "0.57716703", "0.5769793", "0.5764525", "0.57585347", "0.57531935", "0.57529825", "0.57529825", "0.5748432", "0.5748432", "0.5748432", "0.5748432", "0.5748432" ]
0.8554042
0
Delete the quotas for the given user.
private CompletionStage<ReconcileResult<KafkaUserQuotas>> internalDelete(Reconciliation reconciliation, String username) { LOGGER.debugCr(reconciliation, "Deleting quotas for user {}", username); return patchQuotas(reconciliation, username, emptyQuotas()) .handleAsync((r, e) -> { if (e != null) { LOGGER.warnCr(reconciliation, "Failed to delete quotas for user {}", username, e); throw new CompletionException(e); } else { LOGGER.debugCr(reconciliation, "Quotas for user {} deleted", username); cache.remove(username); // Update the cache return ReconcileResult.deleted(); } }, executor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void deleteByUser(User user) {\n\t\tuserReposotory.delete(user);\r\n\t}", "@Override\n public void delete(User user) {\n dao.delete(user);\n }", "public void deleteUser(User user) {\n\t\tdelete(user);\r\n\t}", "public void delete(User user) {\n repository.delete(user);\n }", "@Override\r\n\tpublic void delete(UserMain user) {\n\t\tusermaindao.delete(user);\r\n\t}", "void deleteSecrets(Long userId);", "@Override\r\n\tpublic void delete(User user) {\n\t\tint iRet = dao.delete(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"删除失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"删除成功\");\r\n\t}", "@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}", "public void deleteUtente(String user)\n\t{\n\t\tUtente daCanc=retriveByUsername(user);\n\t\tem.remove(em.merge(daCanc));\n\t}", "public void delete(User user) {\n\t\tuserDao.delete(user);\n\t}", "@Override\r\n\tpublic void delete(User user) {\n\t\tuserDao.delete(user);\r\n\t}", "@Override\r\n\tpublic int delete(User user) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void delete(User user)\n\t{\n\t\tuserDAO.delete(user);\n\t}", "public void deleteUserPrivilegesByUserID(User user) {\r\n try {\r\n List<UserPrivileges> userPrivileges = this.findUserPrivilegesByUser(user);\r\n\r\n for (int i = 0; i < userPrivileges.size(); i++) {\r\n\r\n delete(userPrivileges.get(i));\r\n }\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}", "public void deleteUser(user user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_NAME, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }", "public void removeDoente(String user) {\n try {\n lock.lock();\n this.doentes.remove(user);\n } finally {\n lock.unlock();\n }\n }", "public void delete(User user){\n userRepository.delete(user);\n }", "@Override\n\tpublic void deleteUser(User user) {\n\t\topenSession().createQuery(\"DELETE FROM User where userId =\" + user.getUserId()).executeUpdate();\n\t\t\n\t}", "public void deleteUser(User user) {\n update(\"DELETE FROM user WHERE id = ?\",\n new Object[] {user.getId()});\n }", "public void deleteUser(User userToDelete) throws Exception;", "@Override\n\tpublic String delete(User user) {\n\t\treturn null;\n\t}", "public void deleteUser(Userlist user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USERLIST, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getID())});\n db.close();\n }", "public void destroy(User user);", "public void deleteUser(SPUser user, String tableName) { \n try {\n \t\t\tmyCon.execute(\"DELETE FROM \"+tableName+\" WHERE Username= '\"+ user.getUsername()+\"';\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void deleteUser(Long userID) {\n\t\t delete(userID);\r\n\t}", "@Override\n\tpublic void deleteUser(User user) {\n\t\tiUserDao.deleteUser(user);\n\t}", "public void deleteUser(User user) {\n\t\t\r\n\t\tsessionFactory.getCurrentSession().delete(user);\t\r\n\t\t\r\n\t}", "public boolean delete(User user);", "public void deleteUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USER, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }", "@Override\n\tpublic void delete(User user) throws DAOException {\n\t\t\n\t}", "@Test\n public void testMultipleRemoveQuotasIdempotent() throws Exception {\n List<Dag<JobExecutionPlan>> dags = DagManagerTest.buildDagList(2, \"user3\", ConfigFactory.empty());\n\n // Ensure that the current attempt is 1, normally done by DagManager\n dags.get(0).getNodes().get(0).getValue().setCurrentAttempts(1);\n dags.get(1).getNodes().get(0).getValue().setCurrentAttempts(1);\n\n this._quotaManager.checkQuota(Collections.singleton(dags.get(0).getNodes().get(0)));\n Assert.assertTrue(this._quotaManager.releaseQuota(dags.get(0).getNodes().get(0)));\n Assert.assertFalse(this._quotaManager.releaseQuota(dags.get(0).getNodes().get(0)));\n }", "@Override\r\n\tpublic int deleteUser(Users user) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void delete(UserAccount userAccount) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(Delete);\r\n\t\t\tps.setInt(1, userAccount.getUser().getId());\r\n\t\t\tps.executeUpdate();\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void delete(User user);", "void delete(User user);", "void deleteUser(String userId);", "public void deleteUser(User user) {\r\n\t\tusersPersistence.deleteUser(user);\r\n\t}", "public void deleteUser(Integer uid);", "public void deleteUser(long userId);", "public void deleteExercise(User user) {\n\n\t}", "public void deleteUser(ExternalUser userMakingRequest, String userId);", "public User delete(String user);", "@Override\n\tpublic void delete_User(String user_id) {\n\t\tuserInfoDao.delete_User(user_id);\n\t}", "public void deleteUser(IndividualUser user) {\n try{\n PreparedStatement s = sql.prepareStatement(\"DELETE FROM Users WHERE userName=? AND id=? AND firstName=? AND lastName=?;\");\n s.setString(1, user.getId());\n s.setInt(2,user.getIdNum());\n s.setString(3, user.getFirstName());\n s.setString(4, user.getLastName());\n s.execute();\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public void deleteUserById(Long userId);", "void deleteUser(User user, String token) throws AuthenticationException;", "public void deleteAccount(String userName) {\n\n }", "@Override\n\tpublic Boolean deleteUser(User user) {\n\t\treturn null;\n\t}", "public void delete(User user)throws Exception;", "public void deleteGuest(User user) throws SQLException {\n PreparedStatement pr = connection.prepareStatement(Queries.deleteGuest);\n pr.setString(1, user.getUserFullName());\n pr.executeUpdate();\n pr.close();\n }", "@Override\n\tpublic void delete(String userId) throws Exception {\n\t\tdao.delete(userId);\n\t}", "@Override\n\tpublic void deleteUser(String userId) {\n\t\t\n\t}", "boolean delete(User user);", "@Override\n\tpublic int delete(Users user) {\n\t\t\n\t\treturn userDAO.delete(user);\n\t}", "@Override\r\n\tpublic void deleteUser(String userid) {\n\t\ttry{\r\n\t\t\tString sql = \"delete from vipuser where id=?\";\r\n\t\t\tObject[] args = new Object[]{userid};\r\n\t\t\tdaoTemplate.update(sql, args, false);\r\n\t\t}catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void deleteUser(int userid) {\n\t\t\n\t}", "@Override\n public boolean deleteUser(User user) {\n return false;\n }", "@Delete({\r\n \"delete from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n int deleteByPrimaryKey(Integer user_id);", "public void removeUser(User user) throws UserManagementException;", "private void deleteTodoMenu(User u) {\n\t\t\n\t}", "public void deleteUser(String username);", "public Boolean DeleteUser(User user){\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic void deleteUser() {\n\t\tLog.d(\"HFModuleManager\", \"deleteUser\");\n\t}", "public void deleteUserRequest(UserRequest request){\n userRequests.remove(request);\n }", "public void deleteUser(String name);", "private static void deleteUser(String user)\r\n\t{\r\n\t String query = \"CALL deleteUser(?,?)\";\r\n\t \r\n\t try\r\n\t {\r\n\t Connection conn = Session.openDatabase();\r\n\t PreparedStatement ps = conn.prepareStatement(query);\r\n\t \r\n\t //set parameters\r\n\t ps.setString(1, user);\r\n\t ps.setString(2, Configs.getProperty(\"StoreCode\"));\r\n\t \r\n\t //execute\r\n\t ps.execute();\r\n\t \r\n\t //close\r\n\t ps.close();\r\n\t conn.close();\r\n\t \r\n\t //log\r\n\t logger.info(\"Could not delete user\");\r\n\t }\r\n\t catch(Exception e)\r\n\t {\r\n\t\t logger.error(\"Coudl not delete user\", e); \r\n\t }\r\n\t}", "@Override\n public boolean deleteUser(User user) {\n return controller.deleteUser(user);\n }", "public static int delete(User user) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"DELETE FROM users \"\n + \"WHERE Email = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, user.getEmail());\n\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}", "public boolean deleteUser(String user){\n\t\treturn false;\n\t}", "@Override\n\tpublic List<Resident> deleteResident(int user_id) {\n\t\tQuery query = getSession().createQuery(\"delete from RESIDENT_HMS resident where user_id=:user_id\");\n\t\tquery.setParameter(\"user_id\",user_id);\n\t\tint noofrows=query.executeUpdate();\n\t\tif(noofrows>0)\n\t\t{\n\t\t\tSystem.out.println(\"Deleted successfully\");\n\t\t}\n\t\t\n\t\treturn getResidentList();\n\t}", "void deleteUser(String deleteUserId);", "public void deleteAccount() {\n final FirebaseUser currUser = FirebaseAuth.getInstance().getCurrentUser();\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference ref = database.getReference();\n ref.addListenerForSingleValueEvent( new ValueEventListener() {\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (DataSnapshot userSnapshot : dataSnapshot.child(\"User\").getChildren()) {\n if (userSnapshot.child(\"userId\").getValue().toString().equals(currUser.getUid())) {\n //if the userId is that of the current user, check mod status\n System.out.println(\"Attempting delete calls\");\n //dataSnapshot.getRef().child(\"User\").orderByChild(\"userId\").equalTo(currUser.getUid());\n userSnapshot.getRef().removeValue();\n currUser.delete();\n //take user back to starting page\n Intent intent = new Intent(SettingsActivity.this, MainActivity.class);\n startActivity(intent);\n }\n }\n }\n public void onCancelled(DatabaseError databaseError) {\n System.out.println(\"The read failed: \" + databaseError.getCode());\n }\n });\n signOut();\n }", "public void delete(User obj) {\n\t\t\n\t}", "public void delete(String username);", "public void deleteAppUser(AppUserTO appUser) {\n\t\ttry {\n\t\t\tthis.jdbcTemplate.update(\"delete from carbon_app_user where id=?\",\n\t\t\t\t\tappUser.getId());\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error in AppUserDAO: deleteAppUser\", e);\n\t\t}\n\t}", "public void deleteUser(int userID) {\n\n\t\tString sql = \"DELETE FROM Portfolio_of_Project WHERE Pop_id = \" + userID;\n\n\t\tjdbcTemplate.update(sql);\n\n\t}", "public void clearCart(String username) {\n SQLiteDatabase db = dButils.getWritableDatabase();\n db.execSQL(\"delete from \" + Cart.TABLE + \" where \" + Cart.KEY_username + \" =\" + username);\n }", "void remove(User user) throws SQLException;", "void deleteObject(ProjectUser projectUser, String bucketName, String objectName);", "public static void deleteUser() {\n REGISTRATIONS.clear();\n ALL_EVENTS.clear();\n MainActivity.getPreferences().edit()\n .putString(FACEBOOK_ID.get(), null)\n .putString(USERNAME.get(), null)\n .putString(LAST_NAME.get(), null)\n .putString(FIRST_NAME.get(), null)\n .putString(GENDER.get(), null)\n .putString(BIRTHDAY.get(), null)\n .putString(EMAIL.get(), null)\n .putStringSet(LOCATIONS_INTEREST.get(), null)\n .apply();\n }", "void deleteUserById(Long id);", "public boolean deleteUser(User user){\n DeleteUserTask deleteUserTask = new DeleteUserTask();\n deleteUserTask.execute(user);\n return true;\n }", "@Override\r\n\tpublic void deleteByIdUser(int id) {\n\t\tuserReposotory.deleteById(id);\r\n\t}", "public User delete(User user);", "int deleteByPrimaryKey(Integer user);", "@Override\n\tpublic void deleteUser(String id) throws Exception {\n\t\t\n\t}", "public void deleteUser(User selectedUser) throws SQLException, IOException {\n userManager.deleteUser(selectedUser);\n userManager.emptyLists();\n userManager.fillLists();\n AdminMainViewController.emptyStaticLists();\n AdminMainViewController.adminsObservableList.addAll(userManager.getAdminsList());\n AdminMainViewController.usersObservableList.addAll(userManager.getUsersList());\n }", "void deleteUser( String username );", "public void deleteUserRecord() {\n\t\tSystem.out.println(\"Calling deleteUserRecord() Method To Delete User Record\");\n\t\tuserDAO.deleteUser(user);\n\t}", "public void deleteUser(String username){\n \t\tif(!DbManager.users.contains(this.getUserByName(username)))\n \t\t\tthrow new NoSuchElementException();\n \t\t\n \t\tUser deleteUser= getUserByName(username);\n \t\t\n \t\tArrayList<Question> updatedQuestions= new ArrayList<Question>();\n \t\tArrayList<Answer> updatedAnswers= new ArrayList<Answer>();\n \t\tArrayList<Comment> updatedComments = new ArrayList<Comment>();\n \t\tusers.remove(deleteUser);\n \t\t\n \t\t// Delete all questions a user added\n \t\tfor (Question q : DbManager.questions) {\n \t\t\tif (!q.getOwner().equals(deleteUser))\n \t\t\t\tupdatedQuestions.add(q);\n \t\t}\n \t\tDbManager.questions.clear();\n \t\tDbManager.questions.addAll(updatedQuestions);\n \n \t\t// Delete all answers a user added\n \t\tfor (Answer a : DbManager.answers) {\n \t\t\tif (!a.getOwner().equals(deleteUser))\n \t\t\t\tupdatedAnswers.add(a);\n \t\t}\n \t\tDbManager.answers.clear();\n \t\tDbManager.answers.addAll(updatedAnswers);\n \n \t\t// Delete all comments a user added\n \t\tfor (Comment c : DbManager.comments) {\n \t\t\tif (!c.getOwner().equals(deleteUser))\n \t\t\t\tupdatedComments.add(c);\n \t\t}\n \t\tDbManager.comments.clear();\n \t\tDbManager.comments.addAll(updatedComments);\n \t}", "public void delete(String jobId, String userId) throws DatabaseException, IllegalArgumentException;", "public void deleteUser(String userRoomInfo, User user){\n\t\tspace.getAllNicksnames().remove(user.getNickname());\n\t\tspace.getAllParticipants().remove(user.getUsername());\n\t\tspace.getAllOccupants().remove(userRoomInfo);\n\t\tfor(UserView uv : space.getAllIcons()){\n\t\t\tif(uv.getPerson()==user)\n\t\t\t\tspace.getAllIcons().remove(uv);\n\t\t}\n\t\t\n\t\tif(space!=Space.getMainSpace())\n\t\t\tview.getActivity().invalidatePSIconView(psiv);\n\t\t//this.psiv.invalidate();\n\t\t\n\t\t/* If you are currently in this space then refresh the \n\t\t * the spaceview ui\n\t\t */\n\t\tif(space == MainApplication.screen.getSpace())\n\t\t\tview.getActivity().invalidateSpaceView();\n\t\t\n\n\n\t\tview.getActivity().launchNotificationView(user, \"deleteuser\");\t\n\t}", "public boolean delete(UserBean user) {\n\tthis.createConnection();\n\n try (Connection con = this.getCon();\n \tPreparedStatement pstmt = con.prepareStatement(\"DELETE FROM ? where id = ? ;\")) {\n pstmt.setString(1, this.getTableName());\n pstmt.setInt(2, user.getUserId());\n pstmt.executeUpdate();\n return true;\n } catch (SQLException e) {\n System.out.println(\"SQL Exception\" + e.getErrorCode() + e.getMessage());\n return false;\n }\n }", "@Override\n\tpublic int deleteByPrimaryKey(Integer userId) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void deleteOne(User u) {\n\t\tdao.deleteOne(u);\n\t}", "@Override\n\tpublic void delete(String username) throws Exception {\n\t\t\n\t}", "public static void delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId,\n Integer cashRegisterId, String tabUsageSingleUuid, Map<String, String> customHeaders) {\n ApiClient apiClient = new ApiClient(apiContext);\n apiClient.delete(String\n .format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid),\n customHeaders);\n }", "Order removeInCharge(Order order, User user);" ]
[ "0.66278636", "0.64576954", "0.6421128", "0.6406976", "0.63541764", "0.6331233", "0.6322019", "0.62826496", "0.62674713", "0.6259752", "0.62264943", "0.6217021", "0.62082654", "0.61935705", "0.6145549", "0.61357844", "0.61226505", "0.61215043", "0.610523", "0.6104156", "0.61031437", "0.6090265", "0.60557836", "0.60216385", "0.5974191", "0.59532094", "0.5947968", "0.5940958", "0.59361297", "0.59255767", "0.591889", "0.5898278", "0.58944076", "0.5893796", "0.5892347", "0.5892347", "0.58506453", "0.58416456", "0.5838431", "0.58293146", "0.58287984", "0.58263874", "0.58176094", "0.5806481", "0.57989067", "0.57940197", "0.5784588", "0.57639134", "0.57595265", "0.5758234", "0.5756437", "0.57557434", "0.5752586", "0.5730715", "0.5723688", "0.5669411", "0.56669205", "0.5661435", "0.56514746", "0.56365114", "0.5633242", "0.5630099", "0.5626686", "0.5626503", "0.5625789", "0.5623388", "0.56205475", "0.56134844", "0.5612894", "0.5601685", "0.5600821", "0.55793816", "0.5574645", "0.5554658", "0.55499864", "0.55434734", "0.5537583", "0.5537231", "0.55371374", "0.55229455", "0.5521327", "0.5503704", "0.5501224", "0.5498917", "0.5490337", "0.5490146", "0.54885435", "0.5479802", "0.5478518", "0.54646903", "0.5463125", "0.5462782", "0.5452958", "0.5421312", "0.5413974", "0.5406446", "0.5401611", "0.53932834", "0.539231", "0.5390277" ]
0.588321
36
Set the quotas for the given user.
private CompletionStage<ReconcileResult<KafkaUserQuotas>> internalUpsert(Reconciliation reconciliation, String username, KafkaUserQuotas desired) { LOGGER.debugCr(reconciliation, "Upserting quotas for user {}", username); return patchQuotas(reconciliation, username, desired) .handleAsync((r, e) -> { if (e != null) { LOGGER.warnCr(reconciliation, "Failed to upsert quotas of user {}", username, e); throw new CompletionException(e); } else { LOGGER.debugCr(reconciliation, "Quotas for user {} upserted", username); cache.put(username, desired); // Update the cache return ReconcileResult.patched(desired); } }, executor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCurrentUserQuote(String quote) {\n\t\tcurrentUser.setQuote(quote);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}", "public static void setUser(String user) {\n Account.user = user;\n }", "Order setAsInCharge(Order order, User user);", "public void setUser(User user) {\n this.savedBy = user;\n }", "public static void setUser(String user) {\n\t\tif (adHocAccount == null)\n\t\t\tadHocAccount = new Account();\n\t\tadHocAccount.userName = user;\n\t}", "public void setUser(Long user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "@Override\n public Completable setAccessToken(DomainUserModel user) {\n return userService.setAccessToken(user);\n }", "public void setUser(String user) {\r\n this.user = user;\r\n }", "public void setUser(final String user)\n {\n checkImmutable();\n this.user = user;\n }", "public void setUserItem(UserItem userItem) {\n attributes.put(KEY_USER_ITEM, userItem);\n this.getHttpRequest().setAttribute(KEY_USER_ITEM, userItem);\n }", "public void getQuestQuota(Key userKey) throws ApiException {\n\t\tUser user = dao.get(userKey, User.class);\n\t\tint dailyUsed = user.getQuota().getUsedDailyQuestNum();\n\t\tint totalUsed = user.getQuota().getUsedQuestNum();\n\t\tcheck(user.getQuota().getDailyQuestNum() > dailyUsed,\n\t\t\t\tErrorCode.quota_daily_quest_usedup);\n\t\tcheck(user.getQuota().getQuestNum() > totalUsed,\n\t\t\t\tErrorCode.quota_total_quest_usedup);\n\t\tuser.getQuota().setUsedDailyQuestNum(dailyUsed + 1);\n\t\tuser.getQuota().setUsedQuestNum(totalUsed + 1);\n\t\tdao.save(user);\n\t}", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "public void setUser(String user) {\n\t\t\tthis.user = user;\n\t\t}", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(java.lang.String user) {\n this.user = user;\n }", "public void setUserOrder(User userOrder) {\n this.userOrder = userOrder;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\r\n this.user = user;\r\n }", "@Override\n public void setUserUuid(java.lang.String userUuid) {\n _usersCatastropheOrgs.setUserUuid(userUuid);\n }", "public void setUser(User user) {\n\tthis.user = user;\n }", "public void setUser(final User user) {\n this.user = user;\n }", "private HashSet<String> getUserQuotes() {\n\t\treturn userQuotes;\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(UserEntity user) {\n this.user = user;\n }", "public void setUser(String user)\n {\n _user = user;\n }", "public void setConvertedValues(User user, Search search) {\r\n\t\tif (user.getUserPreferences().getCurrency() != null) {\r\n\t\t\tDouble rate = currencyService.getCurrencyRate(user.getUserPreferences().getCurrency(), search.getEbayCountry().getCurrency());\r\n\t\t\tsearch.setMinPrice((int)(search.getMinPrice() * rate) );\r\n\t\t\tsearch.setMaxPrice((int)(search.getMaxPrice() * rate) );\r\n\t\t}\r\n\t}", "@Override\n public void setUserId(long userId) {\n _usersCatastropheOrgs.setUserId(userId);\n }", "protected void getDailyQuestQuota(Key userKey) throws ApiException {\n\t\tUser user = dao.get(userKey, User.class);\n\t\tint dailyUsed = user.getQuota().getUsedDailyQuestNum();\n\t\tcheck(user.getQuota().getDailyQuestNum() > dailyUsed,\n\t\t\t\tErrorCode.quota_daily_quest_usedup);\n\t\tuser.getQuota().setUsedDailyQuestNum(dailyUsed + 1);\n\t\tdao.save(user);\n\t}", "public void set(User user) {\n\n if(user.getIsRestr() == 0 ) { // user comment\n HungryClient.userImage(mContext, this.image, user.getImgPath());\n this.textName.setText(user.getName());\n } else if (user.getIsRestr() == 1 ) { // restr comment\n Restr restr = user.getRestr();\n HungryClient.userImage(mContext, this.image, restr.getImg());\n this.textName.setText(restr.getName());\n }\n\n }", "public void useItem(Human user){\n user.addEnergy(10);\n user.removefromInv(this); \n }", "@Override\n public void setUserUuid(java.lang.String userUuid) {\n _partido.setUserUuid(userUuid);\n }", "public void setUser(ShopUser user) {\n this.user = user;\n }", "public void setUser(ScrumzuUser user) {\n\t\tthis.user = user;\n\t}", "Order setInvoicePaidStatus(Order order, User user);", "void setAsInCharge(User user, Project project, Date date);", "@Override\n\tpublic void setUser(User user) {\n\t\tusersHashtable.put(user.getAccount(), user);\n\t}", "public void setUser(User user) { this.user = user; }", "public void setQuantidade(int quantos);", "public void setUserAccount(String userAccount) {\n sessionData.setUserAccount(userAccount);\n }", "public void setUserAccount(final UserAccount.Immutable userAccount) {\n this.userAccount = userAccount;\n }", "@Override\n\tpublic void setUser(IUser user) {\n\t\tgetInnerObject().setUser(user);\n\t}", "public void setUser(Motile user) {\n\n this.user = user;\n }", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "public void setUser (User user) {\n userId = user.id != null ? user.id : User.getUserId(user.username);\n }", "public void orderStock(User user, OrderCan can) {\n\n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"insert into order_info(user_order_id,cane_order) values(?,?)\";\n\t\t\tpst = con.prepareStatement(sql);\n\t\t\tpst.setInt(1, user.getUserId());\n\t\t\tpst.setInt(2, can.getCane_order());\n\t\t\tint rows = pst.executeUpdate();\n\t\t\tSystem.out.println(rows);\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t}", "@Override\r\n\t\t public void setPreference(long userID, long itemID, float value) throws TasteException {\r\n\t\t delegate.setPreference(userID, itemID, value);\r\n\t\t }", "void setUser(final ApplicationUser user);", "public void setCurrentUser(AVUser aVUser) {\n this.currentUser = aVUser;\n }", "public void setQuedas (int quedas) {\n this.quedas = quedas;\n }", "public void setUser(User user) {\r\n\r\n // it must be possible to set null when deleting objects\r\n if ((user != null) && (this.user != null) && !this.user.equals(user)) {\r\n throw new IllegalArgumentException(\r\n \"Not allowed to change the user reference.\");\r\n }\r\n this.user = user;\r\n }", "void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }", "@Override\n\tpublic void setUserUuid(String userUuid) {\n\t\t_changesetEntry.setUserUuid(userUuid);\n\t}", "public void setAll(String userIdIn,\n String preferenceNameIn,\n int locationIdIn,\n double distanceToleranceIn,\n long startTimeIn,\n long endTimeIn,\n String keyWordIn,\n String activityNameIn,\n int numberLimitFrom,\n int numberLimitTo) {\n this.userId = userIdIn;\n this.locationId = locationIdIn;\n this.preferenceName = preferenceNameIn;\n this.distanceTolerance = distanceToleranceIn;\n this.startTime = startTimeIn;\n this.endTime = endTimeIn;\n this.keyWord = keyWordIn;\n this.activityName = activityNameIn;\n this.numberLimitFrom=numberLimitFrom;\n this.numberLimitTo=numberLimitTo;\n }", "public void setCurrentUserPremium() {\n\t\tcurrentUser.setPremium(true);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}", "public void setUserAccountId(Long userAccountId) {\r\n this.userAccountId = userAccountId;\r\n }", "@Override\n public void setUserId(long userId) {\n _partido.setUserId(userId);\n }", "private void setPrivilagesToModifyUser(User user){\n\t\tsetFields(false);\n\t\tif (!LoginWindowController.loggedUser.getPermissions().equals(\"administrator\"))\n\t\t{\n\t\t\tif (LoginWindowController.loggedUser.getId() != user.getId()){\n\t\t\t\tif ((user.getPermissions().equals(\"manager\")) \n\t\t\t\t\t\t|| (user.getPermissions().equals(\"administrator\"))){\n\t\t\t\t\tsetFields(true);\n\t\t\t\t}\n\t\t\t\tif (user.getPermissions().equals(\"pracownik\")){\n\t\t\t\t\tsetFields(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tsetFields(false);\n\t\t\t\tdeleteMenuItem.setDisable(true);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (LoginWindowController.loggedUser.getId() == user.getId()){\n\t\t\t\tdeleteMenuItem.setDisable(true);\n\t\t\t\tuserPermissionsBox.setDisable(true);\n\t\t\t}\n\t\t}\n\t}", "public static void setUserForCurrentThread(String user) {\r\n userPerThread.set(user);\r\n }", "protected static void initUser(User user) throws ApiException, IOException {\n\n\t\tif (questAdmin.getAdminKey() == null\n\t\t\t\t|| questAdmin.getQuestKeys().length == 0) {\n\t\t\tquestAdmin.init(dao);\n\t\t}\n\t\tfor (Quest quest : getQuests(questAdmin.getAdminKey())) {\n\n\t\t\tif (quest != null) {\n\n\t\t\t\tassignQuest(quest, user, false);\n\t\t\t}\n\t\t}\n\n\t}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "public void setQuarters(int q)\n {\n\tthis.quarters = q;\n\tchangeChecker();\n }", "public void setUser(User user) {\n\t\tif (user == currentUser)\n\t\t\treturn;\n\t\tcurrentUser = user;\n\t}", "Order setInvoiceApprovedStatus(Order order, User user);", "@Override\n\tpublic void setUserUuid(String userUuid);", "@Override\n\tpublic void setUserUuid(String userUuid);", "private void setUser(UserService.User user) {\n this.userName = user.getName();\n\n DateFormat dateTimeInstance =\n SimpleDateFormat.getDateTimeInstance(DateFormat.LONG,\n DateFormat.LONG);\n this.lastUpdateString = dateTimeInstance.format(user.getLastUpdate());\n\n this.notifyPropertyChanged(BR.userName);\n this.notifyPropertyChanged(BR.lastUpdateString);\n }", "@Accessor(qualifier = \"redemptionQuantityLimitPerUser\", type = Accessor.Type.SETTER)\n\tpublic void setRedemptionQuantityLimitPerUser(final Integer value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(REDEMPTIONQUANTITYLIMITPERUSER, value);\n\t}", "public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}", "public void setCurrentUserAccount(String currentUserAccount);", "public static void guardarUsuario(final Context context, String user){\n inicializaPreferencias(context);\n sharedPreferencesEdit.putString(Constantes.USER, user);\n sharedPreferencesEdit.commit();\n }", "@Test\n public void testMultipleRemoveQuotasIdempotent() throws Exception {\n List<Dag<JobExecutionPlan>> dags = DagManagerTest.buildDagList(2, \"user3\", ConfigFactory.empty());\n\n // Ensure that the current attempt is 1, normally done by DagManager\n dags.get(0).getNodes().get(0).getValue().setCurrentAttempts(1);\n dags.get(1).getNodes().get(0).getValue().setCurrentAttempts(1);\n\n this._quotaManager.checkQuota(Collections.singleton(dags.get(0).getNodes().get(0)));\n Assert.assertTrue(this._quotaManager.releaseQuota(dags.get(0).getNodes().get(0)));\n Assert.assertFalse(this._quotaManager.releaseQuota(dags.get(0).getNodes().get(0)));\n }", "@Override\n\tpublic void setDates(User user, Book book) {\n\t\t\n\t\treservationDate = new Date();\n\t\trestituteDate = new Date();\n\t\tcal = Calendar.getInstance();\n\t\tcal.setTime(restituteDate);\n\t\tcal.add(Calendar.DATE, 14);\n\t\trestituteDate = cal.getTime();\n\t\t\n\t\tformat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treservDate = format.format(reservationDate);\n\t\trestDate = format.format(restituteDate);\n\t\t\n\t\trdDAO.setDates(user.getId(), book.getId(), reservDate, restDate);\n\t\t\n\t\t\n\t}", "private void storeUser(User user){\n // instantiate SharedPreferences\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n // stores each attribute in a variable, if attribute is null the editor will clear the corresponding value.\n editor.putString(KEY_USER, user.toJSONString());\n // commit changes\n editor.apply();\n }", "protected void setUsername(final String user) {\n this.user = user;\n }", "private static KafkaUserQuotas emptyQuotas() {\n KafkaUserQuotas emptyQuotas = new KafkaUserQuotas();\n emptyQuotas.setProducerByteRate(null);\n emptyQuotas.setConsumerByteRate(null);\n emptyQuotas.setRequestPercentage(null);\n emptyQuotas.setControllerMutationRate(null);\n\n return emptyQuotas;\n }", "public void checkQuotas() {\n checkQuotas(time.milliseconds());\n }", "public BookingQuotaExceededExcpetion(Quota quota, double limit, String userid) {\n\t\tthis.quota = quota;\n\t\tthis.quotaLimit = limit;\n\t\tthis.userId = userid;\n\t}", "public void setUserItem(UserItem userItem) {\n this.userItem = userItem;\n // Check the account id\n if (((String)userItem.getId()).length() <= 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Invalid username, zero length.\");\n }\n invalidAccountId = true;\n }\n // Check the first name\n if (userItem.getFirstName() != null\n && ((String)userItem.getFirstName()).length() <= 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Invalid first name, zero length.\");\n }\n invalidFirstName = true;\n }\n // Check the last name\n if (userItem.getLastName() != null\n && ((String)userItem.getLastName()).length() <= 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Invalid last name, zero length.\");\n }\n invalidLastName = true;\n }\n // Check the email address\n if (userItem.getEmail() != null\n && ((String)userItem.getEmail()).length() <= 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Invalid email address, zero length.\");\n }\n invalidEmail = true;\n }\n }", "public void grantModerate(User user) throws ServiceException{\n }", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_changesetEntry.setUserId(userId);\n\t}", "public void setUser( String user )\n {\n if ( users == null )\n {\n users = new TreeSet<>( String.CASE_INSENSITIVE_ORDER );\n }\n\n this.users.add( user );\n }", "@Override\n\tpublic void setUserUuid(java.lang.String userUuid) {\n\t\t_employee.setUserUuid(userUuid);\n\t}", "public void setUser(UserData data) {\n user = data;\n }", "public void muteUser(User user, int seconds) {\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Name\", user.getName());\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Mute\", seconds);\n data.saveFile(bot.getCreditsFile(), \"credits\");\n GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(user), Collections.singleton(Roles.MUTED), Collections.emptySet()).queue();\n }", "public void setUser(String user) {\n\t\tthis.user = user;\n\t\t// BUG Fix submitted by Lamine Brahimi \n\t\t// add this (taken form sip_messageParser)\n\t\t// otherwise comparison of two SipUrl will fail because this\n\t\t// parameter is not set (whereas it is set in sip_messageParser).\n\t\tif (user != null\n\t\t\t&& (user.indexOf(POUND) >= 0 || user.indexOf(SEMICOLON) >= 0)) {\n\t\t\tsetUserType(TELEPHONE_SUBSCRIBER);\n\t\t} else {\n\t\t\tsetUserType(USER);\n\t\t}\n\t}", "public void setUser(String paramUser) {\n\tstrUser = paramUser;\n }", "@Override\n\tpublic void sudo(User user)\n\t{\n\t\tthis.user = user;\n\t}" ]
[ "0.6156432", "0.58730996", "0.56750715", "0.55938965", "0.5554277", "0.55435675", "0.5525217", "0.5525217", "0.5525217", "0.5525217", "0.5524503", "0.5495192", "0.5487943", "0.54681456", "0.544156", "0.54073346", "0.5405718", "0.53933907", "0.53933907", "0.5392859", "0.5312203", "0.5311598", "0.5311598", "0.5311598", "0.53096217", "0.5290099", "0.5246871", "0.5221766", "0.5193801", "0.51854706", "0.51854706", "0.51613843", "0.51613843", "0.51613843", "0.51613843", "0.51613843", "0.51613843", "0.515108", "0.5138647", "0.5121101", "0.5117592", "0.510884", "0.50853574", "0.50610816", "0.50609875", "0.5056651", "0.5048018", "0.50458425", "0.5042769", "0.5032325", "0.49983093", "0.4981516", "0.49759752", "0.49728948", "0.4967729", "0.49632248", "0.49482867", "0.49402848", "0.49170017", "0.49165234", "0.49142072", "0.4913957", "0.4892334", "0.48447582", "0.483218", "0.4831456", "0.48270062", "0.48188078", "0.48083714", "0.4775126", "0.47667146", "0.47620687", "0.47515857", "0.47482923", "0.47426507", "0.47411352", "0.47366783", "0.47206205", "0.47206205", "0.47202417", "0.471572", "0.47150207", "0.4713685", "0.47011092", "0.46842158", "0.46829122", "0.4672367", "0.466668", "0.465707", "0.4656432", "0.46537715", "0.46437597", "0.4641756", "0.46370998", "0.46357375", "0.4631895", "0.46318182", "0.4627914", "0.46180835", "0.46137804", "0.46135455" ]
0.0
-1
Set the quotas for the given user.
private CompletionStage<ReconcileResult<ClientQuotaAlteration>> patchQuotas(Reconciliation reconciliation, String username, KafkaUserQuotas desired) { ClientQuotaEntity cqe = new ClientQuotaEntity(Map.of(ClientQuotaEntity.USER, username)); ClientQuotaAlteration cqa = new ClientQuotaAlteration(cqe, QuotaUtils.toClientQuotaAlterationOps(desired)); CompletableFuture<ReconcileResult<ClientQuotaAlteration>> future = new CompletableFuture<>(); try { patchReconciler.enqueue(new ReconcileRequest<>(reconciliation, username, cqa, future)); } catch (InterruptedException e) { LOGGER.warnCr(reconciliation, "Failed to enqueue ClientQuotaAlteration", e); future.completeExceptionally(e); } return future; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCurrentUserQuote(String quote) {\n\t\tcurrentUser.setQuote(quote);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}", "public static void setUser(String user) {\n Account.user = user;\n }", "Order setAsInCharge(Order order, User user);", "public void setUser(User user) {\n this.savedBy = user;\n }", "public static void setUser(String user) {\n\t\tif (adHocAccount == null)\n\t\t\tadHocAccount = new Account();\n\t\tadHocAccount.userName = user;\n\t}", "public void setUser(Long user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "@Override\n public Completable setAccessToken(DomainUserModel user) {\n return userService.setAccessToken(user);\n }", "public void setUser(String user) {\r\n this.user = user;\r\n }", "public void setUser(final String user)\n {\n checkImmutable();\n this.user = user;\n }", "public void setUserItem(UserItem userItem) {\n attributes.put(KEY_USER_ITEM, userItem);\n this.getHttpRequest().setAttribute(KEY_USER_ITEM, userItem);\n }", "public void getQuestQuota(Key userKey) throws ApiException {\n\t\tUser user = dao.get(userKey, User.class);\n\t\tint dailyUsed = user.getQuota().getUsedDailyQuestNum();\n\t\tint totalUsed = user.getQuota().getUsedQuestNum();\n\t\tcheck(user.getQuota().getDailyQuestNum() > dailyUsed,\n\t\t\t\tErrorCode.quota_daily_quest_usedup);\n\t\tcheck(user.getQuota().getQuestNum() > totalUsed,\n\t\t\t\tErrorCode.quota_total_quest_usedup);\n\t\tuser.getQuota().setUsedDailyQuestNum(dailyUsed + 1);\n\t\tuser.getQuota().setUsedQuestNum(totalUsed + 1);\n\t\tdao.save(user);\n\t}", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "public void setUser(String user) {\n\t\t\tthis.user = user;\n\t\t}", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(java.lang.String user) {\n this.user = user;\n }", "public void setUserOrder(User userOrder) {\n this.userOrder = userOrder;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\r\n this.user = user;\r\n }", "@Override\n public void setUserUuid(java.lang.String userUuid) {\n _usersCatastropheOrgs.setUserUuid(userUuid);\n }", "public void setUser(User user) {\n\tthis.user = user;\n }", "public void setUser(final User user) {\n this.user = user;\n }", "private HashSet<String> getUserQuotes() {\n\t\treturn userQuotes;\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(UserEntity user) {\n this.user = user;\n }", "public void setUser(String user)\n {\n _user = user;\n }", "public void setConvertedValues(User user, Search search) {\r\n\t\tif (user.getUserPreferences().getCurrency() != null) {\r\n\t\t\tDouble rate = currencyService.getCurrencyRate(user.getUserPreferences().getCurrency(), search.getEbayCountry().getCurrency());\r\n\t\t\tsearch.setMinPrice((int)(search.getMinPrice() * rate) );\r\n\t\t\tsearch.setMaxPrice((int)(search.getMaxPrice() * rate) );\r\n\t\t}\r\n\t}", "@Override\n public void setUserId(long userId) {\n _usersCatastropheOrgs.setUserId(userId);\n }", "protected void getDailyQuestQuota(Key userKey) throws ApiException {\n\t\tUser user = dao.get(userKey, User.class);\n\t\tint dailyUsed = user.getQuota().getUsedDailyQuestNum();\n\t\tcheck(user.getQuota().getDailyQuestNum() > dailyUsed,\n\t\t\t\tErrorCode.quota_daily_quest_usedup);\n\t\tuser.getQuota().setUsedDailyQuestNum(dailyUsed + 1);\n\t\tdao.save(user);\n\t}", "public void set(User user) {\n\n if(user.getIsRestr() == 0 ) { // user comment\n HungryClient.userImage(mContext, this.image, user.getImgPath());\n this.textName.setText(user.getName());\n } else if (user.getIsRestr() == 1 ) { // restr comment\n Restr restr = user.getRestr();\n HungryClient.userImage(mContext, this.image, restr.getImg());\n this.textName.setText(restr.getName());\n }\n\n }", "public void useItem(Human user){\n user.addEnergy(10);\n user.removefromInv(this); \n }", "@Override\n public void setUserUuid(java.lang.String userUuid) {\n _partido.setUserUuid(userUuid);\n }", "public void setUser(ShopUser user) {\n this.user = user;\n }", "public void setUser(ScrumzuUser user) {\n\t\tthis.user = user;\n\t}", "Order setInvoicePaidStatus(Order order, User user);", "void setAsInCharge(User user, Project project, Date date);", "@Override\n\tpublic void setUser(User user) {\n\t\tusersHashtable.put(user.getAccount(), user);\n\t}", "public void setUser(User user) { this.user = user; }", "public void setQuantidade(int quantos);", "public void setUserAccount(String userAccount) {\n sessionData.setUserAccount(userAccount);\n }", "public void setUserAccount(final UserAccount.Immutable userAccount) {\n this.userAccount = userAccount;\n }", "@Override\n\tpublic void setUser(IUser user) {\n\t\tgetInnerObject().setUser(user);\n\t}", "public void setUser(Motile user) {\n\n this.user = user;\n }", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "public void setUser (User user) {\n userId = user.id != null ? user.id : User.getUserId(user.username);\n }", "public void orderStock(User user, OrderCan can) {\n\n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"insert into order_info(user_order_id,cane_order) values(?,?)\";\n\t\t\tpst = con.prepareStatement(sql);\n\t\t\tpst.setInt(1, user.getUserId());\n\t\t\tpst.setInt(2, can.getCane_order());\n\t\t\tint rows = pst.executeUpdate();\n\t\t\tSystem.out.println(rows);\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t}", "@Override\r\n\t\t public void setPreference(long userID, long itemID, float value) throws TasteException {\r\n\t\t delegate.setPreference(userID, itemID, value);\r\n\t\t }", "void setUser(final ApplicationUser user);", "public void setCurrentUser(AVUser aVUser) {\n this.currentUser = aVUser;\n }", "public void setQuedas (int quedas) {\n this.quedas = quedas;\n }", "public void setUser(User user) {\r\n\r\n // it must be possible to set null when deleting objects\r\n if ((user != null) && (this.user != null) && !this.user.equals(user)) {\r\n throw new IllegalArgumentException(\r\n \"Not allowed to change the user reference.\");\r\n }\r\n this.user = user;\r\n }", "void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }", "@Override\n\tpublic void setUserUuid(String userUuid) {\n\t\t_changesetEntry.setUserUuid(userUuid);\n\t}", "public void setAll(String userIdIn,\n String preferenceNameIn,\n int locationIdIn,\n double distanceToleranceIn,\n long startTimeIn,\n long endTimeIn,\n String keyWordIn,\n String activityNameIn,\n int numberLimitFrom,\n int numberLimitTo) {\n this.userId = userIdIn;\n this.locationId = locationIdIn;\n this.preferenceName = preferenceNameIn;\n this.distanceTolerance = distanceToleranceIn;\n this.startTime = startTimeIn;\n this.endTime = endTimeIn;\n this.keyWord = keyWordIn;\n this.activityName = activityNameIn;\n this.numberLimitFrom=numberLimitFrom;\n this.numberLimitTo=numberLimitTo;\n }", "public void setCurrentUserPremium() {\n\t\tcurrentUser.setPremium(true);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}", "public void setUserAccountId(Long userAccountId) {\r\n this.userAccountId = userAccountId;\r\n }", "@Override\n public void setUserId(long userId) {\n _partido.setUserId(userId);\n }", "private void setPrivilagesToModifyUser(User user){\n\t\tsetFields(false);\n\t\tif (!LoginWindowController.loggedUser.getPermissions().equals(\"administrator\"))\n\t\t{\n\t\t\tif (LoginWindowController.loggedUser.getId() != user.getId()){\n\t\t\t\tif ((user.getPermissions().equals(\"manager\")) \n\t\t\t\t\t\t|| (user.getPermissions().equals(\"administrator\"))){\n\t\t\t\t\tsetFields(true);\n\t\t\t\t}\n\t\t\t\tif (user.getPermissions().equals(\"pracownik\")){\n\t\t\t\t\tsetFields(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tsetFields(false);\n\t\t\t\tdeleteMenuItem.setDisable(true);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (LoginWindowController.loggedUser.getId() == user.getId()){\n\t\t\t\tdeleteMenuItem.setDisable(true);\n\t\t\t\tuserPermissionsBox.setDisable(true);\n\t\t\t}\n\t\t}\n\t}", "public static void setUserForCurrentThread(String user) {\r\n userPerThread.set(user);\r\n }", "protected static void initUser(User user) throws ApiException, IOException {\n\n\t\tif (questAdmin.getAdminKey() == null\n\t\t\t\t|| questAdmin.getQuestKeys().length == 0) {\n\t\t\tquestAdmin.init(dao);\n\t\t}\n\t\tfor (Quest quest : getQuests(questAdmin.getAdminKey())) {\n\n\t\t\tif (quest != null) {\n\n\t\t\t\tassignQuest(quest, user, false);\n\t\t\t}\n\t\t}\n\n\t}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "public void setQuarters(int q)\n {\n\tthis.quarters = q;\n\tchangeChecker();\n }", "public void setUser(User user) {\n\t\tif (user == currentUser)\n\t\t\treturn;\n\t\tcurrentUser = user;\n\t}", "Order setInvoiceApprovedStatus(Order order, User user);", "@Override\n\tpublic void setUserUuid(String userUuid);", "@Override\n\tpublic void setUserUuid(String userUuid);", "private void setUser(UserService.User user) {\n this.userName = user.getName();\n\n DateFormat dateTimeInstance =\n SimpleDateFormat.getDateTimeInstance(DateFormat.LONG,\n DateFormat.LONG);\n this.lastUpdateString = dateTimeInstance.format(user.getLastUpdate());\n\n this.notifyPropertyChanged(BR.userName);\n this.notifyPropertyChanged(BR.lastUpdateString);\n }", "@Accessor(qualifier = \"redemptionQuantityLimitPerUser\", type = Accessor.Type.SETTER)\n\tpublic void setRedemptionQuantityLimitPerUser(final Integer value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(REDEMPTIONQUANTITYLIMITPERUSER, value);\n\t}", "public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}", "public void setCurrentUserAccount(String currentUserAccount);", "public static void guardarUsuario(final Context context, String user){\n inicializaPreferencias(context);\n sharedPreferencesEdit.putString(Constantes.USER, user);\n sharedPreferencesEdit.commit();\n }", "@Test\n public void testMultipleRemoveQuotasIdempotent() throws Exception {\n List<Dag<JobExecutionPlan>> dags = DagManagerTest.buildDagList(2, \"user3\", ConfigFactory.empty());\n\n // Ensure that the current attempt is 1, normally done by DagManager\n dags.get(0).getNodes().get(0).getValue().setCurrentAttempts(1);\n dags.get(1).getNodes().get(0).getValue().setCurrentAttempts(1);\n\n this._quotaManager.checkQuota(Collections.singleton(dags.get(0).getNodes().get(0)));\n Assert.assertTrue(this._quotaManager.releaseQuota(dags.get(0).getNodes().get(0)));\n Assert.assertFalse(this._quotaManager.releaseQuota(dags.get(0).getNodes().get(0)));\n }", "@Override\n\tpublic void setDates(User user, Book book) {\n\t\t\n\t\treservationDate = new Date();\n\t\trestituteDate = new Date();\n\t\tcal = Calendar.getInstance();\n\t\tcal.setTime(restituteDate);\n\t\tcal.add(Calendar.DATE, 14);\n\t\trestituteDate = cal.getTime();\n\t\t\n\t\tformat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treservDate = format.format(reservationDate);\n\t\trestDate = format.format(restituteDate);\n\t\t\n\t\trdDAO.setDates(user.getId(), book.getId(), reservDate, restDate);\n\t\t\n\t\t\n\t}", "private void storeUser(User user){\n // instantiate SharedPreferences\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n // stores each attribute in a variable, if attribute is null the editor will clear the corresponding value.\n editor.putString(KEY_USER, user.toJSONString());\n // commit changes\n editor.apply();\n }", "protected void setUsername(final String user) {\n this.user = user;\n }", "private static KafkaUserQuotas emptyQuotas() {\n KafkaUserQuotas emptyQuotas = new KafkaUserQuotas();\n emptyQuotas.setProducerByteRate(null);\n emptyQuotas.setConsumerByteRate(null);\n emptyQuotas.setRequestPercentage(null);\n emptyQuotas.setControllerMutationRate(null);\n\n return emptyQuotas;\n }", "public void checkQuotas() {\n checkQuotas(time.milliseconds());\n }", "public BookingQuotaExceededExcpetion(Quota quota, double limit, String userid) {\n\t\tthis.quota = quota;\n\t\tthis.quotaLimit = limit;\n\t\tthis.userId = userid;\n\t}", "public void setUserItem(UserItem userItem) {\n this.userItem = userItem;\n // Check the account id\n if (((String)userItem.getId()).length() <= 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Invalid username, zero length.\");\n }\n invalidAccountId = true;\n }\n // Check the first name\n if (userItem.getFirstName() != null\n && ((String)userItem.getFirstName()).length() <= 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Invalid first name, zero length.\");\n }\n invalidFirstName = true;\n }\n // Check the last name\n if (userItem.getLastName() != null\n && ((String)userItem.getLastName()).length() <= 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Invalid last name, zero length.\");\n }\n invalidLastName = true;\n }\n // Check the email address\n if (userItem.getEmail() != null\n && ((String)userItem.getEmail()).length() <= 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Invalid email address, zero length.\");\n }\n invalidEmail = true;\n }\n }", "public void grantModerate(User user) throws ServiceException{\n }", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_changesetEntry.setUserId(userId);\n\t}", "public void setUser( String user )\n {\n if ( users == null )\n {\n users = new TreeSet<>( String.CASE_INSENSITIVE_ORDER );\n }\n\n this.users.add( user );\n }", "@Override\n\tpublic void setUserUuid(java.lang.String userUuid) {\n\t\t_employee.setUserUuid(userUuid);\n\t}", "public void setUser(UserData data) {\n user = data;\n }", "public void muteUser(User user, int seconds) {\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Name\", user.getName());\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Mute\", seconds);\n data.saveFile(bot.getCreditsFile(), \"credits\");\n GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(user), Collections.singleton(Roles.MUTED), Collections.emptySet()).queue();\n }", "public void setUser(String user) {\n\t\tthis.user = user;\n\t\t// BUG Fix submitted by Lamine Brahimi \n\t\t// add this (taken form sip_messageParser)\n\t\t// otherwise comparison of two SipUrl will fail because this\n\t\t// parameter is not set (whereas it is set in sip_messageParser).\n\t\tif (user != null\n\t\t\t&& (user.indexOf(POUND) >= 0 || user.indexOf(SEMICOLON) >= 0)) {\n\t\t\tsetUserType(TELEPHONE_SUBSCRIBER);\n\t\t} else {\n\t\t\tsetUserType(USER);\n\t\t}\n\t}", "public void setUser(String paramUser) {\n\tstrUser = paramUser;\n }", "@Override\n\tpublic void sudo(User user)\n\t{\n\t\tthis.user = user;\n\t}" ]
[ "0.6156432", "0.58730996", "0.56750715", "0.55938965", "0.5554277", "0.55435675", "0.5525217", "0.5525217", "0.5525217", "0.5525217", "0.5524503", "0.5495192", "0.5487943", "0.54681456", "0.544156", "0.54073346", "0.5405718", "0.53933907", "0.53933907", "0.5392859", "0.5312203", "0.5311598", "0.5311598", "0.5311598", "0.53096217", "0.5290099", "0.5246871", "0.5221766", "0.5193801", "0.51854706", "0.51854706", "0.51613843", "0.51613843", "0.51613843", "0.51613843", "0.51613843", "0.51613843", "0.515108", "0.5138647", "0.5121101", "0.5117592", "0.510884", "0.50853574", "0.50610816", "0.50609875", "0.5056651", "0.5048018", "0.50458425", "0.5042769", "0.5032325", "0.49983093", "0.4981516", "0.49759752", "0.49728948", "0.4967729", "0.49632248", "0.49482867", "0.49402848", "0.49170017", "0.49165234", "0.49142072", "0.4913957", "0.4892334", "0.48447582", "0.483218", "0.4831456", "0.48270062", "0.48188078", "0.48083714", "0.4775126", "0.47667146", "0.47620687", "0.47515857", "0.47482923", "0.47426507", "0.47411352", "0.47366783", "0.47206205", "0.47206205", "0.47202417", "0.471572", "0.47150207", "0.4713685", "0.47011092", "0.46842158", "0.46829122", "0.4672367", "0.466668", "0.465707", "0.4656432", "0.46537715", "0.46437597", "0.4641756", "0.46370998", "0.46357375", "0.4631895", "0.46318182", "0.4627914", "0.46180835", "0.46137804", "0.46135455" ]
0.0
-1
Utility method to generate object with null quotas
private static KafkaUserQuotas emptyQuotas() { KafkaUserQuotas emptyQuotas = new KafkaUserQuotas(); emptyQuotas.setProducerByteRate(null); emptyQuotas.setConsumerByteRate(null); emptyQuotas.setRequestPercentage(null); emptyQuotas.setControllerMutationRate(null); return emptyQuotas; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ExprNull createExprNull();", "Quote createQuote();", "NullValue createNullValue();", "NullValue createNullValue();", "public Quotes() {\n\t\tthis(\"quotes\", null);\n\t}", "void writeNullObject() throws SAXException {\n workAttrs.clear();\n addIdAttribute(workAttrs, \"0\");\n XmlElementName elemName = uimaTypeName2XmiElementName(\"uima.cas.NULL\");\n startElement(elemName, workAttrs, 0);\n endElement(elemName);\n }", "private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }", "@Override\n public String visit(ObjectCreationExpr n, Object arg) {\n return null;\n }", "public static String formatNull() {\n\t\treturn \"null\";\n\t}", "public Quotes() { }", "@Override\n\tpublic String monHoc() {\n\t\treturn null;\n\t}", "@Override\n public String createString() {\n return null;\n }", "QuoteType createQuoteType();", "public Builder setGenerateNull(boolean generateNull){\n mGenerateNull = generateNull;\n return this;\n }", "QuoteAttribute createQuoteAttribute();", "String getDefaultNull();", "public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}", "QuoteItem createQuoteItem();", "private void createNullSet()\n\t{\n\t\tm_values = null;\n\t}", "public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}", "NULL createNULL();", "@Override\n\tpublic String objectToSQLString(Object arg0) {\n\t\treturn null;\n\t}", "@Test(expected = SymbolNotFoundException.class)\n public void getNullQuote() throws Exception {\n quoteService.getQuote(TestConfiguration.NULL_QUOTE_SYMBOL);\n }", "private static Object Stringbuilder() {\n\t\treturn null;\n\t}", "public M csrtMoneyTypeNull(){if(this.get(\"csrtMoneyTypeNot\")==null)this.put(\"csrtMoneyTypeNot\", \"\");this.put(\"csrtMoneyType\", null);return this;}", "private static native JsJsonNull createProd() /*-{\n return null;\n }-*/;", "private static final String quote(String s) {\n return s == null ? \"(null)\" : \"\\\"\" + s + '\"';\n }", "protected void writeNullValue() throws IOException {\n _generator.writeNull();\n }", "public M csolOrderNull(){if(this.get(\"csolOrderNot\")==null)this.put(\"csolOrderNot\", \"\");this.put(\"csolOrder\", null);return this;}", "public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}", "default Empty getEmptyObject() {\n return null;\n }", "NullStatement createNullStatement();", "@Nonnull\n public static UBL23WriterBuilder <QuotationType> quotation ()\n {\n return UBL23WriterBuilder.create (QuotationType.class);\n }", "public String NullSave()\n {\n return \"null\";\n }", "public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}", "public static Value makeNull() {\n return theNull;\n }", "QuoteTypeAttr createQuoteTypeAttr();", "protected Object writeNullBindings() {\n Object json = JsonCompat.objectNode();\n\n JsonCompat.setPropertyNull(json, Constants.PROP_HTTP);\n JsonCompat.setPropertyNull(json, Constants.PROP_WS);\n JsonCompat.setPropertyNull(json, Constants.PROP_KAFKA);\n JsonCompat.setPropertyNull(json, Constants.PROP_AMQP);\n JsonCompat.setPropertyNull(json, Constants.PROP_AMQP1);\n JsonCompat.setPropertyNull(json, Constants.PROP_MQTT);\n JsonCompat.setPropertyNull(json, Constants.PROP_MQTT5);\n JsonCompat.setPropertyNull(json, Constants.PROP_NATS);\n JsonCompat.setPropertyNull(json, Constants.PROP_JMS);\n JsonCompat.setPropertyNull(json, Constants.PROP_SNS);\n JsonCompat.setPropertyNull(json, Constants.PROP_SQS);\n JsonCompat.setPropertyNull(json, Constants.PROP_STOMP);\n JsonCompat.setPropertyNull(json, Constants.PROP_REDIS);\n\n return json;\n }", "public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}", "@Override\n public Object build() {\n return null;\n }", "@Override\n public Object build() {\n return null;\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.putOpt((String) null, (Object) null);\n Object object0 = JSONObject.NULL;\n assertNotNull(object0);\n }", "public M csrtTypeNameNull(){if(this.get(\"csrtTypeNameNot\")==null)this.put(\"csrtTypeNameNot\", \"\");this.put(\"csrtTypeName\", null);return this;}", "QuoteTerm createQuoteTerm();", "@Test\n public void constructorSetsEmptyExtra()\n {\n //act\n ProductInfo actual = new ProductInfo();\n\n //assert\n assertEquals(\"\", Deencapsulation.getField(actual, \"extra\"));\n }", "@Override\n\tpublic Quotation generateQuotation(ClientInfo info) {\n\t\t// Create an initial quotation between 800 and 1000\n\t\tdouble price = generatePrice(800, 200);\n\t\t\n\t\t// 5% discount per penalty point (3 points required for qualification)\n\t\tint discount = (info.points > 3) ? 5*info.points:-50;\n\t\t\n\t\t// Add a no claims discount\n\t\tdiscount += getNoClaimsDiscount(info);\n\t\t\n\t\t// Generate the quotation and send it back\n\t\treturn new Quotation(COMPANY, generateReference(PREFIX), (price * (100-discount)) / 100);\n\t}", "public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}", "public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}", "public M csmiPlaceNull(){if(this.get(\"csmiPlaceNot\")==null)this.put(\"csmiPlaceNot\", \"\");this.put(\"csmiPlace\", null);return this;}", "protected abstract T _createEmpty(DeserializationContext ctxt);", "public String toS(Object o, String empty_val);", "public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "@Test\r\n public void testCreateTheirDidNull() throws CryptoException {\r\n CryptoService instance = new CryptoService();\r\n\r\n TheirDid result = instance.createTheirDid(new TheirDidInfo(\"CnEDk9HrMnmiHXEV1WFgbVCRteYnPqsJwrTdcZaNhFVW\", null));\r\n assertEquals(result.did, \"CnEDk9HrMnmiHXEV1WFgbVCRteYnPqsJwrTdcZaNhFVW\");\r\n assertEquals(result.verkey, \"CnEDk9HrMnmiHXEV1WFgbVCRteYnPqsJwrTdcZaNhFVW\");\r\n }", "public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}", "@Test(timeout = 4000)\n public void test039() throws Throwable {\n String string0 = JSONObject.valueToString((Object) null);\n assertEquals(\"null\", string0);\n }", "private String literal(Object obj) {\n if (obj == null) {\n return \"NULL\";\n } else if (obj instanceof String) {\n return literal((String) obj);\n } else if (obj instanceof Number) {\n return literal((Number) obj);\n } else {\n return literal(obj.toString());\n }\n }", "@Override\n\tpublic String toStringNoWeight() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String toXMLString(Object arg0) {\n\t\treturn null;\n\t}", "public Builder clearPredefinedValuesNull() {\n \n predefinedValuesNull_ = false;\n onChanged();\n return this;\n }", "@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n }", "public M csseDescNull(){if(this.get(\"csseDescNot\")==null)this.put(\"csseDescNot\", \"\");this.put(\"csseDesc\", null);return this;}", "T getNullValue();", "@Override\n\tpublic Value apprise() {\n\t\treturn null;\n\t}", "<C> NullLiteralExp<C> createNullLiteralExp();", "public static Object builder() {\n\t\treturn null;\r\n\t}", "public static ObservableMarketDataFunction none() {\n return requirements -> ImmutableMap.of();\n }", "public static void createOptionals() {\n String nullString = null;\n String emptyString = \"\";\n\n Optional.ofNullable(nullString);\n Optional.of(emptyString);\n try {\n Optional.of(nullString);\n } catch (NullPointerException e) {\n }\n Optional.empty();\n }", "public static String convertNULLtoString(Object object) {\n return object == null ? EMPTY : object.toString();\n }", "@Test\n public void getNullCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.NULL_QUOTE_SYMBOL);\n assertTrue(comps.isEmpty());\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.addRequiredCondition((String) null, stringBuilder0);\n assertEquals(\"null\", stringBuilder0.toString());\n }", "public PersonBuilderName noID()\n {\n edma_value[0] = null;\n return this;\n }", "private static String unquote(String raw) {\r\n String result;\r\n if (null == raw) {\r\n result = null;\r\n } else {\r\n if (raw.length() >= 2 && raw.startsWith(\"\\\"\") && raw.endsWith(\"\\\"\")) {\r\n result = raw.substring(1, raw.length() - 1);\r\n } else {\r\n if (raw.equals(\"null\")) {\r\n result = null;\r\n } else {\r\n result = raw;\r\n }\r\n }\r\n }\r\n return result;\r\n }", "public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}", "private void writeNullCommitMetaData() {\n writer.println(\"commit_NULL:\");\n writeSpacesCorrespondingToNestedLevel(COMMIT_METADATA_NEST_LEVEL);\n writer.println(\"author:\");\n writeSpacesCorrespondingToNestedLevel(COMMIT_METADATA_NEST_LEVEL);\n writer.println(\"modified:\");\n writeSpacesCorrespondingToNestedLevel(COMMIT_METADATA_NEST_LEVEL);\n writer.println(\"removed:\");\n }", "public static Object builder() {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean getIncludesNull() {\n\t\treturn false;\n\t}", "@Override\n public void setNull() {\n\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n String string0 = JSONObject.quote(\"e(h'R;/n&72HYkju\");\n assertEquals(\"\\\"e(h'R;/n&72HYkju\\\"\", string0);\n \n Object object0 = JSONObject.NULL;\n String string1 = JSONObject.valueToString(object0);\n assertEquals(\"null\", string1);\n }", "private static String toSql(Object obj) {\n\t\tif(obj==null) {\n\t\t\treturn \"NULL\";\n\t\t}\n\t\tif(obj instanceof String) {\n\t\t\treturn \"'\"+obj+\"'\";\n\t\t}\n\t\treturn obj.toString();\n\t}", "public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}", "public Builder clearActiveNull() {\n \n activeNull_ = false;\n onChanged();\n return this;\n }", "public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}", "public static String toString(Object obj, String nullStr) {\n return obj == null ? nullStr : obj.toString();\n }", "@Test\r\n\tpublic void toStringEmptyArrays() {\r\n\t\ttestObj.toString();\r\n\t\tassertEquals(\"Output string should have no data\", \"Table: 1\\r\\n{\\r\\nTableName: test\\r\\nNativeFields: \\r\\nRelatedTables: \\r\\nRelatedFields: \\r\\n}\\r\\n\", testObj.toString());\r\n\t}", "public void setGenerateNull(boolean generateNull){\n mGenerateNull = generateNull;\n }", "protected <T> T emptyToNull(T obj) {\r\n if (isEmpty(obj)) {\r\n return null;\r\n } else {\r\n return obj;\r\n }\r\n }", "public QuotenResource() {\n // TODO Auto-generated constructor stub\n }", "@Override\n public String getObjectCopy() {\n return null;\n }", "public Qs() {\n this(\"qs\", null);\n }", "public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}", "public QuoteResource() {\n }", "O() { super(null); }", "public java.lang.CharSequence getDefaultStringEmpty() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }", "@org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }", "public String ToIONEX() {\n\t\treturn null;\r\n\r\n\t}", "public None()\n {\n \n }", "AstroArg empty();", "@Override\n public void writeNull(FieldDefinition di) {\n if (inArray) {\n arr.addNull();\n } else if (writeNulls) {\n obj.putNull(di.getName());\n }\n }", "public static DefaultExpression empty() { throw Extensions.todo(); }" ]
[ "0.5977238", "0.5907928", "0.58998644", "0.58998644", "0.56788737", "0.56607085", "0.56557727", "0.5635265", "0.5608536", "0.5596493", "0.55589926", "0.555383", "0.54982424", "0.54777265", "0.54591846", "0.5453774", "0.5453505", "0.5437298", "0.54140043", "0.5399121", "0.5390299", "0.5388379", "0.5366465", "0.5365492", "0.53592616", "0.53508836", "0.5348646", "0.5344092", "0.5319956", "0.5296588", "0.52924347", "0.52433646", "0.5229781", "0.52220577", "0.52169806", "0.52110094", "0.51759917", "0.5171519", "0.51296586", "0.51210576", "0.51210576", "0.51185864", "0.51133496", "0.5112186", "0.50987756", "0.5079826", "0.50550663", "0.5055066", "0.50541157", "0.5042921", "0.5040706", "0.50291556", "0.5023869", "0.50182676", "0.501696", "0.5007067", "0.5005375", "0.5004757", "0.50006014", "0.49993306", "0.49992654", "0.49960765", "0.49894622", "0.49833855", "0.49813142", "0.49796906", "0.49711245", "0.4966002", "0.49609268", "0.49585834", "0.49551076", "0.4953456", "0.4952399", "0.49493048", "0.49463248", "0.4944634", "0.4941665", "0.49354586", "0.4929388", "0.49271193", "0.49220094", "0.4920714", "0.4914115", "0.49076676", "0.49069655", "0.49060488", "0.49055025", "0.49012598", "0.48978457", "0.4897427", "0.4890241", "0.48899528", "0.48891798", "0.48876706", "0.48870775", "0.488454", "0.48777986", "0.48721477", "0.48643377", "0.48635665" ]
0.68421763
0
Note: it may be the case that some objects are not supposed to be constructed this may have to be handtuned later
public Video( int arg1, int arg2 ) { super( ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void construct();", "Reproducible newInstance();", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "private ObjectFactory() { }", "abstract Object build();", "private SingleObject()\r\n {\r\n }", "private SingleObject(){}", "public void setupConvenienceObjects();", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "private ObjectRepository() {\n\t}", "public Pleasure() {\r\n\t\t}", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "private ObjectMacroFront() {\n\n throw new InternalException(\"this class may not have instances\");\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {\r\n\t}", "@Override\n protected void init() {\n }", "public abstract Object build();", "public ObjectFactory() {\n\t}", "ObjectRealization createObjectRealization();", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "@Override\r\n\tpublic void init() {}", "public void testConstructorWithCycledReferences1() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob1\"));\r\n object1.addChild(params1);\r\n\r\n root.addChild(object1);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "Object build();", "private void __sep__Constructors__() {}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void constructObjectsExpectFailure(String missingData) throws Exception {\n\t\ttry {\n\t\t\tConfig.getConfig();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (CustomValidationException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\n\t\ttry {\n\t\t\tStudents.forceLoad();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tnew Supervisors();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t}", "public void testConstructorWithCycledReferences2() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n object1.addChild(params1);\r\n\r\n ConfigurationObject object2 = createObject(\"object:ob2\", TYPE_OBJECT);\r\n ConfigurationObject params2 = new DefaultConfigurationObject(\"params\");\r\n params2.addChild(createParamReference(1, \"object:ob1\"));\r\n object2.addChild(params2);\r\n\r\n root.addChild(object1);\r\n root.addChild(object2);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void testConstructorWithNotFoundReference() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n object1.addChild(params1);\r\n\r\n root.addChild(object1);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "BoundObject(){}", "private SingleObject(){\n }", "public ObjectUtils() {\n super();\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "private DiscretePotentialOperations() {\r\n\t}", "@Override\n public void init() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "O() { super(null); }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "private IndexBitmapObject() {\n\t}", "public void createObject() throws NullPointerException{\n Object object1 = new Object();\r\n Object object2 = new Object();\r\n object2=null;\r\n if(object2!=null){\r\n object2.equals(object1);\r\n }\r\n else{\r\n //throw new NullPointerException(\"Exception handled by throws statement\");//throws an exception, is always followed by an object new.\r\n }\r\n }", "public void testConstructor() throws Exception {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject object2 = createObject(\"object:ob2\", TYPE_NUMBER);\r\n ConfigurationObject object3 = createObject(\"something\", TYPE_OBJECT);\r\n\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n ConfigurationObject params2 = new DefaultConfigurationObject(\"params\");\r\n\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n params1.addChild(createParamReference(2, \"something\"));\r\n\r\n params2.addChild(createParamReference(1, \"something\"));\r\n\r\n object1.addChild(params1);\r\n object2.addChild(params2);\r\n\r\n root.addChild(object3);\r\n root.addChild(object1);\r\n root.addChild(object2);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification objectSpecification1 = specificationFactory.getObjectSpecification(\r\n \"object\", \"ob1\");\r\n\r\n assertEquals(\"SpecType should be complex.\", ObjectSpecification.COMPLEX_SPECIFICATION,\r\n objectSpecification1.getSpecType());\r\n\r\n Object[] params = objectSpecification1.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n ObjectSpecification param2 = (ObjectSpecification) params[1];\r\n\r\n assertEquals(\"Object 'ob1' should have 2 params.\", 2, params.length);\r\n assertTrue(\"SpecType of params should be complex.\", param1.getSpecType().equals(\r\n ObjectSpecification.COMPLEX_SPECIFICATION)\r\n && param2.getSpecType().equals(ObjectSpecification.COMPLEX_SPECIFICATION));\r\n assertEquals(\"Element should be object:ob2.\", specificationFactory.getObjectSpecification(\r\n \"object\", \"ob2\"), param1);\r\n assertEquals(\"Element should be something.\", specificationFactory.getObjectSpecification(\r\n \"something\", null), param2);\r\n\r\n params = param1.getParameters();\r\n param1 = (ObjectSpecification) params[0];\r\n assertEquals(\"Object 'ob2' should have 1 param.\", 1, params.length);\r\n assertEquals(\"SpecType of param should be complex.\",\r\n ObjectSpecification.COMPLEX_SPECIFICATION, param1.getSpecType());\r\n assertEquals(\"Element should be something.\", specificationFactory.getObjectSpecification(\r\n \"something\", null), param1);\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.6422472", "0.6416182", "0.63372076", "0.6326282", "0.6298039", "0.62295854", "0.61434793", "0.61171204", "0.6112176", "0.59402525", "0.58908916", "0.58743227", "0.5859127", "0.58588684", "0.58588684", "0.58588684", "0.5856921", "0.5855777", "0.5823318", "0.5822934", "0.58101255", "0.5803261", "0.58026594", "0.57864714", "0.5777723", "0.5771594", "0.5768809", "0.5762011", "0.57598114", "0.5744115", "0.5701799", "0.569938", "0.5682969", "0.56784683", "0.5673145", "0.56726223", "0.56599736", "0.5658335", "0.5656909", "0.56527007", "0.5650708", "0.56460255", "0.5645498", "0.5645498", "0.5645498", "0.5638166", "0.56248796", "0.5619194", "0.5618509", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.56110996", "0.5599677", "0.5599677", "0.5599677", "0.5599677" ]
0.0
-1
Note: it may be the case that some objects are not supposed to be constructed this may have to be handtuned later
public Video( int arg1 ) { super( ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void construct();", "Reproducible newInstance();", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "private ObjectFactory() { }", "abstract Object build();", "private SingleObject()\r\n {\r\n }", "private SingleObject(){}", "public void setupConvenienceObjects();", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "private ObjectRepository() {\n\t}", "public Pleasure() {\r\n\t\t}", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "private ObjectMacroFront() {\n\n throw new InternalException(\"this class may not have instances\");\n }", "public ObjectFactory() {\r\n\t}", "@Override\n protected void init() {\n }", "public ObjectFactory() {\n\t}", "public abstract Object build();", "ObjectRealization createObjectRealization();", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "@Override\r\n\tpublic void init() {}", "public void testConstructorWithCycledReferences1() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob1\"));\r\n object1.addChild(params1);\r\n\r\n root.addChild(object1);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "Object build();", "private void __sep__Constructors__() {}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void constructObjectsExpectFailure(String missingData) throws Exception {\n\t\ttry {\n\t\t\tConfig.getConfig();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (CustomValidationException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\n\t\ttry {\n\t\t\tStudents.forceLoad();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tnew Supervisors();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t}", "public void testConstructorWithCycledReferences2() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n object1.addChild(params1);\r\n\r\n ConfigurationObject object2 = createObject(\"object:ob2\", TYPE_OBJECT);\r\n ConfigurationObject params2 = new DefaultConfigurationObject(\"params\");\r\n params2.addChild(createParamReference(1, \"object:ob1\"));\r\n object2.addChild(params2);\r\n\r\n root.addChild(object1);\r\n root.addChild(object2);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void testConstructorWithNotFoundReference() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n object1.addChild(params1);\r\n\r\n root.addChild(object1);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "BoundObject(){}", "private SingleObject(){\n }", "public ObjectUtils() {\n super();\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "private DiscretePotentialOperations() {\r\n\t}", "@Override\n public void init() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "O() { super(null); }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "private IndexBitmapObject() {\n\t}", "public void createObject() throws NullPointerException{\n Object object1 = new Object();\r\n Object object2 = new Object();\r\n object2=null;\r\n if(object2!=null){\r\n object2.equals(object1);\r\n }\r\n else{\r\n //throw new NullPointerException(\"Exception handled by throws statement\");//throws an exception, is always followed by an object new.\r\n }\r\n }", "public void testConstructor() throws Exception {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject object2 = createObject(\"object:ob2\", TYPE_NUMBER);\r\n ConfigurationObject object3 = createObject(\"something\", TYPE_OBJECT);\r\n\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n ConfigurationObject params2 = new DefaultConfigurationObject(\"params\");\r\n\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n params1.addChild(createParamReference(2, \"something\"));\r\n\r\n params2.addChild(createParamReference(1, \"something\"));\r\n\r\n object1.addChild(params1);\r\n object2.addChild(params2);\r\n\r\n root.addChild(object3);\r\n root.addChild(object1);\r\n root.addChild(object2);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification objectSpecification1 = specificationFactory.getObjectSpecification(\r\n \"object\", \"ob1\");\r\n\r\n assertEquals(\"SpecType should be complex.\", ObjectSpecification.COMPLEX_SPECIFICATION,\r\n objectSpecification1.getSpecType());\r\n\r\n Object[] params = objectSpecification1.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n ObjectSpecification param2 = (ObjectSpecification) params[1];\r\n\r\n assertEquals(\"Object 'ob1' should have 2 params.\", 2, params.length);\r\n assertTrue(\"SpecType of params should be complex.\", param1.getSpecType().equals(\r\n ObjectSpecification.COMPLEX_SPECIFICATION)\r\n && param2.getSpecType().equals(ObjectSpecification.COMPLEX_SPECIFICATION));\r\n assertEquals(\"Element should be object:ob2.\", specificationFactory.getObjectSpecification(\r\n \"object\", \"ob2\"), param1);\r\n assertEquals(\"Element should be something.\", specificationFactory.getObjectSpecification(\r\n \"something\", null), param2);\r\n\r\n params = param1.getParameters();\r\n param1 = (ObjectSpecification) params[0];\r\n assertEquals(\"Object 'ob2' should have 1 param.\", 1, params.length);\r\n assertEquals(\"SpecType of param should be complex.\",\r\n ObjectSpecification.COMPLEX_SPECIFICATION, param1.getSpecType());\r\n assertEquals(\"Element should be something.\", specificationFactory.getObjectSpecification(\r\n \"something\", null), param1);\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.6421063", "0.6414886", "0.6337844", "0.63256854", "0.62974477", "0.62290627", "0.61426663", "0.61170936", "0.6111077", "0.5939771", "0.5889267", "0.5874524", "0.5858799", "0.5858799", "0.5858799", "0.58579487", "0.58567977", "0.58543026", "0.582276", "0.5822666", "0.58100927", "0.58027875", "0.5801147", "0.5786279", "0.5777365", "0.5770954", "0.5767459", "0.5762268", "0.57599914", "0.57429063", "0.57006294", "0.56987303", "0.5682484", "0.5678008", "0.56715894", "0.56713456", "0.5659523", "0.5656609", "0.56560105", "0.565154", "0.5649976", "0.56445026", "0.56444377", "0.56444377", "0.56444377", "0.5636497", "0.5624248", "0.5620494", "0.561899", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.5610936", "0.559947", "0.559947", "0.559947", "0.559947" ]
0.0
-1
Note: it may be the case that some objects are not supposed to be constructed this may have to be handtuned later
public Video( ) { super( ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void construct();", "Reproducible newInstance();", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "private ObjectFactory() { }", "abstract Object build();", "private SingleObject()\r\n {\r\n }", "private SingleObject(){}", "public void setupConvenienceObjects();", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "private ObjectRepository() {\n\t}", "public Pleasure() {\r\n\t\t}", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "private ObjectMacroFront() {\n\n throw new InternalException(\"this class may not have instances\");\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "@Override\n protected void init() {\n }", "public ObjectFactory() {\r\n\t}", "public abstract Object build();", "public ObjectFactory() {\n\t}", "ObjectRealization createObjectRealization();", "@Override\r\n\tpublic void init() {}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "public void testConstructorWithCycledReferences1() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob1\"));\r\n object1.addChild(params1);\r\n\r\n root.addChild(object1);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "Object build();", "private void __sep__Constructors__() {}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void constructObjectsExpectFailure(String missingData) throws Exception {\n\t\ttry {\n\t\t\tConfig.getConfig();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (CustomValidationException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\n\t\ttry {\n\t\t\tStudents.forceLoad();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tnew Supervisors();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t}", "public void testConstructorWithCycledReferences2() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n object1.addChild(params1);\r\n\r\n ConfigurationObject object2 = createObject(\"object:ob2\", TYPE_OBJECT);\r\n ConfigurationObject params2 = new DefaultConfigurationObject(\"params\");\r\n params2.addChild(createParamReference(1, \"object:ob1\"));\r\n object2.addChild(params2);\r\n\r\n root.addChild(object1);\r\n root.addChild(object2);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void testConstructorWithNotFoundReference() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n object1.addChild(params1);\r\n\r\n root.addChild(object1);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "BoundObject(){}", "private SingleObject(){\n }", "public ObjectUtils() {\n super();\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "private DiscretePotentialOperations() {\r\n\t}", "@Override\n public void init() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "O() { super(null); }", "@Override\n public void init() {\n }", "private IndexBitmapObject() {\n\t}", "public void testConstructor() throws Exception {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject object2 = createObject(\"object:ob2\", TYPE_NUMBER);\r\n ConfigurationObject object3 = createObject(\"something\", TYPE_OBJECT);\r\n\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n ConfigurationObject params2 = new DefaultConfigurationObject(\"params\");\r\n\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n params1.addChild(createParamReference(2, \"something\"));\r\n\r\n params2.addChild(createParamReference(1, \"something\"));\r\n\r\n object1.addChild(params1);\r\n object2.addChild(params2);\r\n\r\n root.addChild(object3);\r\n root.addChild(object1);\r\n root.addChild(object2);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification objectSpecification1 = specificationFactory.getObjectSpecification(\r\n \"object\", \"ob1\");\r\n\r\n assertEquals(\"SpecType should be complex.\", ObjectSpecification.COMPLEX_SPECIFICATION,\r\n objectSpecification1.getSpecType());\r\n\r\n Object[] params = objectSpecification1.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n ObjectSpecification param2 = (ObjectSpecification) params[1];\r\n\r\n assertEquals(\"Object 'ob1' should have 2 params.\", 2, params.length);\r\n assertTrue(\"SpecType of params should be complex.\", param1.getSpecType().equals(\r\n ObjectSpecification.COMPLEX_SPECIFICATION)\r\n && param2.getSpecType().equals(ObjectSpecification.COMPLEX_SPECIFICATION));\r\n assertEquals(\"Element should be object:ob2.\", specificationFactory.getObjectSpecification(\r\n \"object\", \"ob2\"), param1);\r\n assertEquals(\"Element should be something.\", specificationFactory.getObjectSpecification(\r\n \"something\", null), param2);\r\n\r\n params = param1.getParameters();\r\n param1 = (ObjectSpecification) params[0];\r\n assertEquals(\"Object 'ob2' should have 1 param.\", 1, params.length);\r\n assertEquals(\"SpecType of param should be complex.\",\r\n ObjectSpecification.COMPLEX_SPECIFICATION, param1.getSpecType());\r\n assertEquals(\"Element should be something.\", specificationFactory.getObjectSpecification(\r\n \"something\", null), param1);\r\n }", "public void createObject() throws NullPointerException{\n Object object1 = new Object();\r\n Object object2 = new Object();\r\n object2=null;\r\n if(object2!=null){\r\n object2.equals(object1);\r\n }\r\n else{\r\n //throw new NullPointerException(\"Exception handled by throws statement\");//throws an exception, is always followed by an object new.\r\n }\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.642375", "0.64173925", "0.6338047", "0.63250095", "0.629927", "0.6227001", "0.61404294", "0.6117367", "0.6111244", "0.59386337", "0.5890186", "0.5873928", "0.5857501", "0.58573204", "0.58573204", "0.58573204", "0.5856723", "0.5855385", "0.58247733", "0.5821501", "0.5811097", "0.580331", "0.5802721", "0.5785507", "0.57791686", "0.5772057", "0.57699496", "0.5761157", "0.5759154", "0.5745176", "0.5699689", "0.5697553", "0.5680415", "0.5676458", "0.56740546", "0.5673382", "0.5661534", "0.5658881", "0.5656332", "0.5652358", "0.56492156", "0.5646524", "0.5646524", "0.5646524", "0.56438756", "0.56388795", "0.56244695", "0.5619007", "0.56171703", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.56093806", "0.5598098", "0.5598098", "0.5598098", "0.5598098" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { cd.show(jp, "3"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { den = textDenumire.getText().trim(); cat = textCategorie.getText().trim(); tara = textTara.getText().trim(); pret = textPret.getText().trim(); if(den.isEmpty()) { JOptionPane.showMessageDialog(null, "Seteaza numele produsului", "Eroare!", JOptionPane.ERROR_MESSAGE); return; } if(cat.isEmpty()) { JOptionPane.showMessageDialog(null, "Seteaza categoria produsului!", "Eroare!", JOptionPane.ERROR_MESSAGE); return; } if(tara.isEmpty()) { JOptionPane.showMessageDialog(null, "Selecteaza tara de origine!", "Eroare!", JOptionPane.ERROR_MESSAGE); return; } if(pret.isEmpty()) { JOptionPane.showMessageDialog(null, "Seteaza pretul produsului!", "Eroare!", JOptionPane.ERROR_MESSAGE); return; } pretDouble = Double.parseDouble(pret); int ok = 0; for(int i = 0; i< Gestiune.getInstance().getProduse().size(); i++) { if(Gestiune.getInstance().getProduse().get(i).getDenumire().compareTo(den) == 0 && Gestiune.getInstance().getProduse().get(i).getCategorie().compareTo(cat)==0 && Gestiune.getInstance().getProduse().get(i).getTaraOrigine().compareTo(tara) == 0) { ok = 1; } } if(ok == 1) { try { File tempFile = new File(fProduse.getAbsoluteFile()+ ".tmp"); RandomAccessFile raf = new RandomAccessFile(fProduse, "r"); PrintWriter pw = new PrintWriter(new FileWriter(tempFile)); String line = null; String []words; line = raf.readLine(); pw.write(line+"\n"); words = line.split(" "); Vector<String> tari = new Vector<String>(); for(int i = 2; i < words.length; i++) tari.add(words[i]); while((line = raf.readLine())!=null) { String templine = line; words = line.split(" "); if(!words[0].equals(den)) { pw.write(templine + "\n"); }else { pw.write(den + " " + cat); for(int i = 0; i < tari.size(); i++) if(tara.equals(tari.get(i))) { //System.out.println("aici"+i); pw.write(" "+pretDouble); }else { pw.write(" "+ words[i+2]); } pw.write("\n"); } } pw.close(); fProduse.delete(); tempFile.renameTo(fProduse); JOptionPane.showMessageDialog(null,"S-a gasit produsul!", "Produsul adaugat!", JOptionPane.INFORMATION_MESSAGE); }catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }else { JOptionPane.showMessageDialog(null,"Nu s-a gasit produsul!", "Produsul nu exista!", JOptionPane.WARNING_MESSAGE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
A ParticleVisitor iterates over a groups particles.
public interface ParticleVisitor { /** Invoked for an empty type. * @throws SAXException The visitor failed. */ void emptyType(ComplexTypeSG type) throws SAXException; /** Invoked for a complex type with simple content. * @throws SAXException The visitor failed. */ void simpleContent(ComplexTypeSG type) throws SAXException; /** Invoked to begin a sequence. * @throws SAXException The visitor failed. */ void startSequence(GroupSG group) throws SAXException; /** Invoked to end a sequence. * @throws SAXException The visitor failed. */ void endSequence(GroupSG group) throws SAXException; /** Invoked to start a choice group. * @throws SAXException The visitor failed. */ void startChoice(GroupSG group) throws SAXException; /** Invoked to end a choice group. * @throws SAXException The visitor failed. */ void endChoice(GroupSG group) throws SAXException; /** Invoked to start an all group. * @throws SAXException The visitor failed. */ void startAll(GroupSG group) throws SAXException; /** Invoked to end an all group. * @throws SAXException The visitor failed. */ void endAll(GroupSG group) throws SAXException; /** Invoked to start a complex content types * content. * @throws SAXException The visitor failed. */ void startComplexContent(ComplexTypeSG type) throws SAXException; /** Invoked to end a complex content types content. * @throws SAXException The visitor failed. */ void endComplexContent(ComplexTypeSG type) throws SAXException; /** Invoked to process an element with simple type. * @throws SAXException The visitor failed. */ void simpleElementParticle(GroupSG pGroup,ParticleSG particle) throws SAXException; /** Invoked to process an element with complex type. * @throws SAXException The visitor failed. */ void complexElementParticle(GroupSG pGroup, ParticleSG particle) throws SAXException; /** Invoked to process a wildcard particle. * @throws SAXException The visitor failed. */ void wildcardParticle(ParticleSG particle) throws SAXException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void complexElementParticle(GroupSG pGroup, ParticleSG particle) throws SAXException;", "void simpleElementParticle(GroupSG pGroup,ParticleSG particle) throws SAXException;", "public void update() {\n\t\tupdateParticles();\n\t\tupdateSprings();\n\n\t\tif (groups != null) {\n\t\t\tfor (VParticleGroup g : groups) {\n\t\t\t\tg.update();\n\t\t\t}\n\t\t}\n\t}", "Particles particles();", "protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}", "void onDestroy(ParticleGroup group);", "public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}", "public void update() {\n Iterator<Particle> iter = particles.iterator();\n\n while (iter.hasNext()) {\n Particle p = iter.next();\n if (p.isDead()) {\n iter.remove();\n } else {\n p.update();\n }\n }\n }", "public void visitGroup(Group group) {\n\t}", "public ArrayList<Particle> getParticles()\n\t{\n\t\treturn particles;\n\t}", "void wildcardParticle(ParticleSG particle) throws SAXException;", "public void drawParticles() {}", "private static void gatherChildren(int parentType, XSParticleDecl p, Vector<XSParticleDecl> children) {\n/* 1033 */ int min = p.fMinOccurs;\n/* 1034 */ int max = p.fMaxOccurs;\n/* 1035 */ int type = p.fType;\n/* 1036 */ if (type == 3) {\n/* 1037 */ type = ((XSModelGroupImpl)p.fValue).fCompositor;\n/* */ }\n/* 1039 */ if (type == 1 || type == 2) {\n/* */ \n/* 1041 */ children.addElement(p);\n/* */ \n/* */ return;\n/* */ } \n/* 1045 */ if (min != 1 || max != 1) {\n/* 1046 */ children.addElement(p);\n/* */ }\n/* 1048 */ else if (parentType == type) {\n/* 1049 */ XSModelGroupImpl group = (XSModelGroupImpl)p.fValue;\n/* 1050 */ for (int i = 0; i < group.fParticleCount; i++) {\n/* 1051 */ gatherChildren(type, group.fParticles[i], children);\n/* */ }\n/* 1053 */ } else if (!p.isEmpty()) {\n/* 1054 */ children.addElement(p);\n/* */ } \n/* */ }", "void startVisit(Group group);", "List<? extends Particle> update(double timeDelta);", "public Array<Particle> getParticlesListIteration() {\n return new Array(masterList);\n }", "public void update(){\n\t\tfor(ParticleEffect effect : effects){\n\t\t\teffect.update();\n\t\t}\n\t}", "public void generatePositionGroups(){\n for (int i = 0; i < Input.length()+1; i++){\n PositionGroup pg = generatePositionGroupAt(i);\n PositionGroupList.add(pg);\n }\n }", "protected int[] getParticlesByIndexInside( ArrayList<Object> geomObjects,PointXY[] boundingBox ){\r\n\t\t\r\n\t\tArrayList<Integer> pset = new ArrayList<Integer>() ;\r\n\t\tPoint2D testP2D;\r\n\t\tRepulsionFieldParticle particle;\r\n\t\tObject geomObject;\r\n\t\t\r\n\t\tboolean covered;\r\n\t\t\r\n\t\t\r\n\r\n\t\tfor (int i= 0; i<particles.size() ;i++){\r\n\t\t\t\r\n\t\t\tparticle = particles.get(i) ;\r\n\t\t\t\r\n\t\t\t// within bounding box? no? skip the rest , -> next particle by index value\r\n\t\t\tif ((particle.x<boundingBox[0].x-averageDistance*1.1) || (particle.x>boundingBox[1].x+averageDistance*1.1)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((particle.y<boundingBox[0].y-averageDistance*1.1) || (particle.y>boundingBox[3].y+averageDistance*1.1)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\ttestP2D = new Point2D( particle.x, particle.y);\r\n\t\t\t\r\n\t\t\t// test particle across all ellipses\r\n\t\t\tfor (int s=0;s<geomObjects.size();s++){\r\n\t\t\t\t\r\n\t\t\t\tgeomObject = geomObjects.get(s) ;\r\n\t\t\t\t \r\n\t\t\t\tcovered = isInsideGeomObject(geomObject,testP2D);\r\n\t\t\t\t\r\n\t\t\t\tif (covered) {\r\n\t\t\t\t\tif (pset.contains(i)==false){\r\n\t\t\t\t\t\tpset.add(i) ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// out.print(2, \"+++ particle added, index:\"+i+\", location x,y:\" + df.format(particle.x)+\",\" + df.format(particle.y)+\" +++\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// out.print(2, \"--- particle NOT added, index:\"+i+\", location x,y:\" + df.format(particle.x)+\",\" + df.format(particle.y)+\" ---\");\r\n\t\t\t\t}\r\n\t\t\t} // s->\r\n\t\t\t\r\n\t\t} // i->\r\n\t\t\r\n\t\t\r\n\t\tint[] particleIndexes = new int[pset.size()] ;\r\n\t\t\r\n\t\tfor (int i=0;i< pset.size();i++){\r\n\t\t\tparticleIndexes[i] = pset.get(i) ;\r\n\t\t}\r\n\t\treturn particleIndexes;\r\n\t}", "public void addGroup(VParticleGroup g) {\n\t\tif (this.groups == null)\n\t\t\tgroups = new ArrayList<VParticleGroup>();\n\t\tgroups.add(g);\n\t}", "public void onTick() {\n // Tick all particles\n Iterator<Particle> iterator = this.particles.iterator();\n while (iterator.hasNext()) {\n Particle particle = iterator.next();\n\n // Tick this particle\n particle.onTick();\n\n // Remove particle when removed flag is set\n if (particle.removed) {\n iterator.remove();\n }\n }\n }", "public int getParticles() {\r\n\t\treturn particles;\r\n\t}", "private void draw() {\n ctx.clearRect(0, 0, width, height);\n\n for (ImageParticle p : particles) {\n p.opacity = p.remainingLife / p.life * 0.5;\n\n // Draw particle from image\n ctx.save();\n ctx.translate(p.x, p.y);\n ctx.scale(p.size, p.size);\n //ctx.translate(p.image.getWidth() * (-0.5), p.image.getHeight() * (-0.5));\n ctx.translate(-HALF_WIDTH, -HALF_HEIGHT);\n ctx.setGlobalAlpha(p.opacity);\n ctx.drawImage(p.image, 0, 0);\n ctx.restore();\n\n //p.remainingLife--;\n p.remainingLife *= 0.98;\n //p.size *= 0.99;\n p.x += p.vX;\n p.y += p.vY;\n\n //regenerate particles\n if (p.remainingLife < 0 || p.size < 0 || p.opacity < 0.01) {\n if (running) {\n p.reInit();\n } else {\n particles.remove(p);\n }\n }\n }\n }", "private void setPersonProceduresByGroups(IacucProtocol iacucProtocol, List<IacucProtocolStudyGroup> iacucProtocolStudyGroups) {\n for(ProtocolPersonBase protocolPerson : iacucProtocol.getProtocolPersons()) {\n List<IacucProtocolSpeciesStudyGroup> iacucProtocolSpeciesStudyGroups = getListOfProcedureStudyBySpeciesGroup(iacucProtocolStudyGroups);\n IacucProtocolPerson iacucProtocolPerson = (IacucProtocolPerson)protocolPerson;\n iacucProtocolPerson.setProcedureDetails(getPersonProcedureDetails(iacucProtocolSpeciesStudyGroups, iacucProtocolPerson));\n iacucProtocolPerson.setAllProceduresSelected(isAllProceduresChecked(iacucProtocolPerson.getProcedureDetails()));\n }\n }", "public void updateParticles() {\n\n // Update walkingAnimation particle effect\n walkingParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(walkingParticleEffect.isComplete()) {\n walkingParticleEffect.reset();\n }\n\n // Update getting hit particle effect\n if(damaged) {\n gettingHitParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(gettingHitParticleEffect.isComplete() && !dead) {\n damaged = false;\n gettingHitParticleEffect.reset();\n }\n }\n }", "private void displayParticles(Player p, double radius, ParticleColor color){\n //just some math to create a circle, and send it to the player. z+0.1f so they arent inside of the bottom block.\n double part = 2 * Math.PI / particlePoints;\n for (int i = 0; i < particlePoints; i++)\n {\n double alpha = part * i;\n float x = (float) (location.getX() + radius * Math.cos(alpha));\n float z = (float) (location.getZ() + radius * Math.sin(alpha));\n float y = (float) (location.getY()+0.1f);\n PacketHelper.displaySingleParticle(p, x, y, z, color);\n }\n }", "private void visitPublications(Collection<? extends Publication> publicationList, Visitor visitor) {\n\n publicationList.forEach(publication -> publication.accept(visitor));\n }", "public void process(String groupId) throws Exception {\n if (patientMembers == null) {\n Group group = findGroupByID(groupId);\n uniquenessGuard = new HashSet<>();\n patientMembers = new ArrayList<>();\n // List for the group and sub groups in the expansion paths, this is used to avoid dead loop caused by circle reference of the groups.\n Set<String> groupsInPath = new HashSet<>();\n expandGroupToPatients(group, groupsInPath);\n }\n }", "public void scatterNodes() {\n\t\tfor (int k = 0; k < nodes.length; k++) {\n\t\t\tNode got = nodes[k];\n\t\t\tif (!got.display) continue;\n\t\t\tscatterNode(got);\n\t\t}\n\t}", "public void render(Graphics2D g2d) {\n Iterator<Particle> iter = particles.iterator();\n g2d.setStroke(new BasicStroke(1.0f));\n\n while (iter.hasNext()) {\n Particle p = iter.next();\n p.render(g2d);\n }\n }", "private static void updateParticle(int index) {\n\n\t\tfloat posX = particles[index].getPositionX(); // Current X position of the particle\n\t\tfloat posY = particles[index].getPositionY(); // Current Y position of the particle\n\t\tfloat vX = particles[index].getVelocityX(); // Current horizontal velocity of the particle\n\t\tfloat vY = particles[index].getVelocityY();\t// Current vertical velocity of the particle\n\t\tint age = particles[index].getAge();\t// Current age of the particle\n\t\t\n\t\t// Fill the circle's color and transparency\n\t\tUtility.fill(particles[index].getColor(), particles[index].getTransparency());\n\t\t\n\t\t// Draw the circle\n\t\tUtility.circle(posX, posY, particles[index].getSize());\n\t\t\n\t\t// Update vertical velocity effected by gravity\n\t\tvY = vY + 0.3f;\n\t\t// Update the particle's vertical velocity, XY positions and its age\n\t\tparticles[index].setVelocityY(vY);\n\t\tparticles[index].setPositionX(posX + vX);\n\t\tparticles[index].setPositionY(posY + vY);\n\t\tparticles[index].setAge(age + 1);\n\t\t\n\t\t// Call this method to remove the old particles\n\t\tremoveOldParticles(80);\n\t\t\n\n\t}", "public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ , double extra ) {\n\t\tspawnParticle ( particle , x , y , z , count , offsetX , offsetY , offsetZ );\n\t}", "public void updateWorld() {\n\t\t/*\n\t\t * The particles are created during the simulation, this prevents some strange behaviors\n\t\t * that rises when all the particles are added at the start of a simulation, for example \n\t\t * the it was noticed that the random generation for the position followed some sort of pattern\n\t\t * and this influenced the formation the DLA cluster, resulting in an unxpected formation\n\t\t * */\n\t\tif( elements < getInitialParticleNumber() ){\n\t\t\tcreateParticleOutsideOfBB();\t\t\n\t\t\telements++;\n\t\t}\n\t\t//now for the each particles that are still floating a movement update is made,\n\t\t//according to the type of movement\n\t\tfor(int i=0; i<particleCollection.size(); i++){\n\t\t\tif( particleCollection.get(i).isFloating() == false ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t}\n\t\t\t//If the particle has gone outside of the boundaries then \n\t\t\t//a new one is created to replace it, this can happen only if the movementType is 2 or 3 (balistic or square spiral)\n\t\t\telse if( particleCollection.get(i).isOutsideOfTheWorld() == true ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t\tcreateParticleOutsideOfBB();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tswitch(movementType){\n\t\t\t\tcase 0:\n\t\t\t\t\t/*\n\t\t\t\t\t * each movement method return a boolean if it's false it mean that the particle ha moved and\n\t\t\t\t\t * the collided to the cluster and so the static particle counter il incremented by one\n\t\t\t\t\t * */\n\t\t\t\t\tif( particleCollection.get(i).snowFlakeFallMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: \n\t\t\t\t\tif( particleCollection.get(i).randomMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif( particleCollection.get(i).straightMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif( particleCollection.get(i).squareSpiralMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void createNewParticles(int number) {\n\t\t// The following declarations are to initialize the random range for the \n\t\t// particle's feature\n\t\tint maxX = Fountain.positionX + 3;\n\t\tint minX = Fountain.positionX - 3;\n\t\tint boundX = maxX - minX;\n\t\tint maxY = Fountain.positionY + 3;\n\t\tint minY = Fountain.positionY - 3;\n\t\tint boundY = maxY - minY;\n\t\t\n\t\tint particleCount = 0; // For counting the new particles' amount\n\n\t\t\n\t\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t\tif (particles[i] == null) {\n\t\t\t\t\t++particleCount;\n\t\t\t\t\t\n\t\t\t\t\t// Following codes are to prepare the setting for the particle\n\t\t\t\t\tint positionX = randGen.nextInt(boundX + 1) + maxX;\n\t\t\t\t\tint positionY = randGen.nextInt(boundY + 1) + maxY;\n\t\t\t\t\tfloat xVelocity = -1 + randGen.nextFloat() * (2);\n\t\t\t\t\tfloat yVelocity = -10 + randGen.nextFloat() * (5);\n\t\t\t\t\tfloat amount = randGen.nextFloat() * 1;\n\t\t\t\t\tint color = Utility.lerpColor(Fountain.startColor, Fountain.endColor, amount);\n\t\t\t\t\tfloat size = randGen.nextFloat() * (11 - 4);\n\t\t\t\t\tint age = randGen.nextInt(40 + 1);\n\t\t\t\t\tint transparency = randGen.nextInt((96)) + 32;\n\t\t\t\t\t\n\t\t\t\t\t// TO set the new particle with random feature\n\t\t\t\t\tparticles[i] = new Particle();\n\t\t\t\t\tparticles[i].setPositionX(positionX);\n\t\t\t\t\tparticles[i].setPositionY(positionY);\n\t\t\t\t\tparticles[i].setVelocityX(xVelocity);\n\t\t\t\t\tparticles[i].setVelocityY(yVelocity);\n\t\t\t\t\tparticles[i].setSize(size);\n\t\t\t\t\tparticles[i].setColor(color);\n\t\t\t\t\tparticles[i].setAge(age);\n\t\t\t\t\tparticles[i].setTransparency(transparency);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Once after creating 10 new particles, ends this method\n\t\t\t\tif (particleCount >= number) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "@Override\n\tpublic void forEach(Processor processor) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tprocessor.process(elements[i]);\n\t\t}\n\t}", "protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}", "public void ajoutPions() {\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 10; j += 2) {\n if (i % 2 == 0) {\n this.ajoutPieces(new Pion(i, j, true, (String) JouerIA.getColor1().first()));\n\n } else {\n this.ajoutPieces(new Pion(i, j+1, true, (String) JouerIA.getColor1().first()));\n }\n }\n\n }\n\n for (int i = 6; i < 10; i++) {\n for (int j = 0; j < 10; j += 2) {\n if (i % 2 == 0) {\n this.ajoutPieces(new Pion(i, j, false, (String) JouerIA.getColor2().first()));\n } else {\n this.ajoutPieces(new Pion(i, j + 1, false, (String) JouerIA.getColor2().first()));\n }\n }\n\n }\n }", "private void preprocess(ArrayList<Point>[] dsg) {\n preprocessGroup = new ArrayList<>();\n for(ArrayList<Point> l:dsg){\n \tfor(Point p:l){\n \t\tif(p.layer<=constructor.k_point_GSkyline_groups&&p.getUnitGroupSize()<=constructor.k_point_GSkyline_groups){\n \t\t\tpreprocessGroup.add(p);\n \t\t}\n \t}\n }\n for(int i=0;i<preprocessGroup.size();i++){\n \tpreprocessGroup.get(i).index=i;\n }\n }", "private void setPersonProceduresBySpecies(IacucProtocol iacucProtocol, List<IacucProtocolStudyGroup> iacucProtocolStudyGroups) {\n for(ProtocolPersonBase protocolPerson : iacucProtocol.getProtocolPersons()) {\n List<IacucProtocolSpeciesStudyGroup> iacucProtocolSpeciesStudyGroups = getListOfProcedureStudyBySpecies(iacucProtocolStudyGroups);\n IacucProtocolPerson iacucProtocolPerson = (IacucProtocolPerson)protocolPerson;\n iacucProtocolPerson.setProcedureDetails(getPersonProcedureDetails(iacucProtocolSpeciesStudyGroups, iacucProtocolPerson));\n iacucProtocolPerson.setAllProceduresSelected(isAllProceduresChecked(iacucProtocolPerson.getProcedureDetails()));\n }\n }", "boolean emitParticleMaybe(RenderState renderData, IParticle reusedParticle, PointF point, PointF vec);", "private void init(int numberOfParticles, int dimensions) {\n MersenneTwisterFast mt = Utils.getMTInstance();\n double pos;\n double vel;\n \n Particle p = null;\n for (int i = 0; i < numberOfParticles; i++) {\n\n\n List<Double> tempPosition = new ArrayList<Double>(dimensions);\n List<Double> tempVelocity = new ArrayList<Double>(dimensions);\n for (int j = 0; j < dimensions; j++) {\n pos = this.getLowerBound().get(j) + (mt.nextDouble() * (this.getUpperBound().get(j) - this.getLowerBound().get(j)));\n vel = (this.getLowerBound().get(j) - this.getUpperBound().get(j)) / 2 + (mt.nextDouble() * (((this.getUpperBound().get(j)\n - this.getLowerBound().get(j)) / 2 - (this.getLowerBound().get(j) - this.getUpperBound().get(j)) / 2) + 1));\n tempPosition.add(pos);\n tempVelocity.add(vel);\n }\n if (this.phi == 0) {\n p = new Particle(this, tempPosition, this.informantsPerParticle);\n } else {\n p = new Particle(this, tempPosition, this.informantsPerParticle, this.phi);\n }\n\n p.setBestPosition(Utils.doubleListDeepCopy(tempPosition));\n p.setVelocity(tempVelocity);\n p.evaluate(getCostFunction());\n this.getPopulation().add(p);\n\n }\n \n }", "public void ajoutVitesse(Perso p, ArrayList<Perso> groupie){\r\n\t\tif(groupie.isEmpty()){//array vide => ajout simple\r\n\t\t\tgroupie.add(p);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tint cpt =0;\r\n\t\t\twhile(groupie.get(cpt).getSpeed()>p.getSpeed() && cpt<groupie.size()){\r\n\t\t\t\tcpt++;//trouver la position de de l'element\r\n\t\t\t}\r\n\t\t\tif (cpt<groupie.size()){//si ce n'est pas le dernier\r\n\t\t\t\tgroupie.add(cpt,p);\r\n\t\t\t}\r\n\t\t\telse{//si c'est le dernier on l'ajoute a la fin (exception si cpt=size())\r\n\t\t\t\tgroupie.add(p);\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "public void spawnParticle(String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count);", "private ThirdLevelFrameGroup [] groupIntoScenes() {\r\n\r\n\t\t/**-----------------------------------------------------------------------**/\r\n\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t/**Get all the motion values within each frame into one array\r\n\t\t * and computed the standard deviation of these values. **/\r\n\t\tVector<Double> all_motion_values = new Vector<Double>();\r\n\t\tfor(int i = 0; i < skeletonNodes.length; i++) {\r\n\t\t\tSkeletonNode [] root_iter = skeletonNodes[i].getIterator();\r\n\t\t\tfor(int k = 0; k < root_iter.length; k++)\r\n\t\t\t\tall_motion_values.add(root_iter[k].getMotionValue());\r\n\t\t}\r\n\r\n\t\tdouble[]all_motion_values_arr = new double[all_motion_values.size()];\r\n\t\tEnumeration<Double> mot_val_enum = all_motion_values.elements();\r\n\t\tint mot_val_counter = 0;\r\n\r\n\t\twhile(mot_val_enum.hasMoreElements()) {\r\n\t\t\tdouble next_val = mot_val_enum.nextElement();\r\n\t\t\tif(next_val > 0) {\r\n\t\t\t\tall_motion_values_arr[mot_val_counter++] = next_val;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdouble motion_val_std = PCATools.getStdDev(all_motion_values_arr);\r\n\t\tdouble num_stds = ControlVariables.num_third_level_motion_val_stds;\r\n\t\t/**-----------------------------------------------------------------------**/\r\n\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t/**-----------------------------------------------------------------------**/\r\n\t\t/**Create frame groups for each node that has been\r\n\t\t * found to contain a significant motion value**/\r\n\t\tfor(int i = 0; i < skeletonWrappers.length-ControlVariables.min_slack_size; i++) {\r\n\r\n\t\t\t/**---------------------------------------------------------------**/\r\n\t\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t\tSkeletonWrapper main_wrapper = skeletonWrappers[i];\r\n\t\t\tSkeletonNode main_wrapper_root = main_wrapper.getRoot();\r\n\t\t\tdouble main_wrapper_root_size = main_wrapper_root.getSize();\r\n\r\n\t\t\t/**---------------------------------------------------------------**/\r\n\t\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t\t/**---------------------------------------------------------------**/\r\n\t\t\tSkeletonNode [] root_iter = main_wrapper_root .getIterator();\r\n\t\t\tint roots_iterated = 0;\r\n\r\n\t\t\tfor(int k = 0; k < root_iter.length; k++) {\r\n\t\t\t\troots_iterated++;\r\n\t\t\t\t\r\n\t\t\t\t/**-------------------------------------------------------**/\r\n\t\t\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t\t\tboolean first_level = \t\troot_iter[k].isFirstLevel();\r\n\t\t\t\tdouble next_root_mot_val =\troot_iter[k].getMotionValue();\r\n\t\t\t\tdouble next_root_size =\t\troot_iter[k].getSize();\r\n\t\t\t\tint next_root_mag =\t\t\troot_iter[k].getMag();\r\n\t\t\t\tdouble [] next_root_disp =\troot_iter[k].getDisplacement();\r\n\r\n\t\t\t\tString next_root_name = \troot_iter[k].getName();\r\n\t\t\t\tString next_root_parent_name =\r\n\t\t\t\t\t\troot_iter[k].getParent() == null ? next_root_name : root_iter[k].getParent().getName();\r\n\t\t\t\t/**-------------------------------------------------------**/\r\n\t\t\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t\t\t/**-------------------------------------------------------**/\r\n\t\t\t\t/**See if a frame group can be created from this group.\r\n\t\t\t\t * Not existing in the wrapped hashtable means in must\r\n\t\t\t\t * belong to some other frame group already.**/\r\n\t\t\t\tdouble motion_val_threshold = num_stds*motion_val_std;\r\n\t\t\t\tif(\r\n\t\t\t\t\t\t(!first_level) &&\r\n\t\t\t\t\t\t(next_root_mag > 1) &&\r\n\t\t\t\t\t\t(main_wrapper.getFromHash(next_root_name) != null) &&\r\n\t\t\t\t\t\t(next_root_mot_val > motion_val_threshold) &&\r\n\t\t\t\t\t\t(ControlVariables.skeleton_sub_size_factor*next_root_size < main_wrapper_root_size)\r\n\t\t\t\t\t\t) {\r\n\r\n\t\t\t\t\tThirdLevelFrameGroup tlfg = createFrameGroup(\r\n\t\t\t\t\t\t\tskeletonWrappers,\r\n\t\t\t\t\t\t\ti,\r\n\t\t\t\t\t\t\tnext_root_parent_name,\r\n\t\t\t\t\t\t\tnext_root_mot_val,\r\n\t\t\t\t\t\t\tnext_root_disp,\r\n\t\t\t\t\t\t\tmotion_val_threshold);\r\n\t\t\t\t\tif(tlfg.getRightBoundOffset() > ControlVariables.min_slack_size)\r\n\t\t\t\t\t\troot_iter[k].setTLFG(tlfg);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**Make sure a left bound is created here**/\r\n\t\t\t\t\tint abc = 11;\r\n\t\t\t\t\tif(abc<0) {\r\n\t\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\"Frame: \"+ i +\r\n\t\t\t\t\t\t\t\t\" Roots iterated: \"+roots_iterated+\r\n\t\t\t\t\t\t\t\t\" Frame Group Size: \" + tlfg.getRightBoundOffset());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t\t\t/**-------------------------------------------------------**/\r\n\t\t\t}\r\n\t\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t\t/**---------------------------------------------------------------**/\r\n\t\t}\r\n\t\t/**-----------------------------------------------------------------------**/\r\n\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t/**-----------------------------------------------------------------------**/\r\n\t\t/**Extract all the frame groups collected**/\r\n\t\tVector<ThirdLevelFrameGroup> all_frame_groups = new Vector<ThirdLevelFrameGroup>();\r\n\t\tfor(int i = 0; i < skeletonNodes.length; i++) {\r\n\r\n\t\t\tSkeletonNode [] root_iter = skeletonNodes[i].getIterator();\r\n\t\t\tfor(int k = 0; k < root_iter.length; k++) {\r\n\r\n\t\t\t\tThirdLevelFrameGroup temp_TLFG = root_iter[k].getTLFG();\r\n\t\t\t\tif(temp_TLFG != null)\r\n\t\t\t\t\tall_frame_groups.add(temp_TLFG);\r\n\t\t\t}\r\n\t\t}\r\n\t\tThirdLevelFrameGroup [] all_frame_groups_arr =\r\n\t\t\t\tnew ThirdLevelFrameGroup [all_frame_groups.size()];\r\n\t\tall_frame_groups.toArray(all_frame_groups_arr);\r\n\t\t/**=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=**/\r\n\t\t/**-----------------------------------------------------------------------**/\r\n\r\n\t\treturn all_frame_groups_arr;\r\n\t}", "private void groupProcedureStudyBySpecies(IacucProtocol iacucProtocol) {\n for(IacucProtocolStudyGroupBean iacucProtocolStudyGroupBean : iacucProtocol.getIacucProtocolStudyGroups()) {\n groupProcedureStudyBySpecies(iacucProtocolStudyGroupBean);\n }\n }", "private Particle[] createParticles(int N){\n Particle[] arr = new Particle[N];\n double v = 0, avgV = 0;\n\n int i = 0;\n while(i < N) {\n double sum = 0, d = (1.0 / N);\n if(T < 150.0) d *= 0.5;\n if(T < 50.0) d *= 0.5;\n while (sum < 1.0 / (N + 1)) {\n sum += func(v) * d;\n v += d;\n }\n System.out.println(\"v=\" + v + \", func(v)=\" + func(v));\n\n arr[i] = new Particle(0, 0, 400);\n double dir = Math.random() * 2 * Math.PI;\n arr[i].setVelocity(v, dir);\n\n avgV += v;\n\n i += 1;\n }\n\n avgV /= N;\n System.out.println(\"AvgV=\" + avgV);\n return arr;\n }", "private java.util.List<Node> divideEvenly(Slice.D d, String prefix, String[] names, int n, float p) {\n\t\tjava.util.List<Node> return_value = new ArrayList<Node>();\n\t\tfor(Node node : selected_nodes) {\n\t\t\treturn_value.addAll(node.divideEvenly(d, prefix, names, n, p));\n\t\t}\n\t\treturn return_value;\n\t}", "public void visit(Personnes p) {\n pers = p;\n tpsAttentePerso = p.getTpsAttente();\n tpsAttentePerso2 = p.getTpsArrive();\n totalTime += tpsAttentePerso;\n\tnbVisited += 1;\n moyenne = totalTime/nbVisited; \n }", "private ArrayList<double[]> generatePoints(int divisions) {\n\t\tArrayList<double[]> result = new ArrayList<double[]>();\n\t\tdouble[] weight = new double[Run.NUMBER_OF_OBJECTIVES];\n\t\t\n\t\tif (divisions != 0) {\n\t\t\tgenerateRecursive(result, weight, Run.NUMBER_OF_OBJECTIVES, divisions, divisions, 0);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public void draw() {\n\t\tfor (int i = 0; i < particleCount; i++) {\r\n\t\t\tif (particles[i] != null) {\r\n\t\t\t\tglBegin(GL_QUADS);\r\n\t\t\t\t{\r\n\t\t\t\t\tparticles[i].draw();\r\n\t\t\t\t}\r\n\t\t\t\tglEnd();\r\n\t\t\t}\r\n\t\t}\r\n\t\tglColor3f(1, 1, 1);\r\n\t}", "@Override\r\n\tpublic Node visitDataParallelPattern(DataParallelPatternContext ctx) {\n\t\treturn super.visitDataParallelPattern(ctx);\r\n\t}", "@Override\n\tpublic void visit(final GrandPa person) {\n\t\t\n\t}", "@Test\n public void testIterator() {\n System.out.println(\"iterator\");\n Goban g = createGoban();\n ArrayList<PierrePoint> groupeAttendu = new ArrayList<>();\n groupeAttendu.add(g.getPierre(0, 0));\n groupeAttendu.add(g.getPierre(0, 1));\n groupeAttendu.add(g.getPierre(1, 0));\n GroupeDePierres groupe = new GroupeDePierres(g.getPierre(0, 0), g);\n \n for( PierrePoint p : groupe)\n {\n assertTrue(groupeAttendu.contains(p));\n }\n \n assertEquals(groupeAttendu.size(),groupe.size());\n }", "private Collection<VertexObject> addPeptideVertices(VertexObject groupV, Boolean collapsed) {\n List<VertexObject> peptides = new ArrayList<>();\n IntermediateGroup group = (IntermediateGroup)groupV.getObject();\n if (collapsed && (group.getPeptides().size() > 1)) {\n // show the peptides collapsed\n String peptidesLabel = PEPTIDES_OF_PREFIX + groupV.getLabel();\n VertexObject peptidesV = new VertexObject(peptidesLabel, group.getPeptides());\n\n graph.addVertex(peptidesV);\n peptides.add(peptidesV);\n\n String edgeName = \"groupPeptide_\" + groupV.getLabel() + \"_\" + peptidesLabel;\n graph.addEdge(edgeName, groupV, peptidesV);\n \n expandedPeptidesMap.put(groupV.getLabel(), false);\n } else {\n // uncollapsed peptides\n for (IntermediatePeptide peptide : group.getPeptides()) {\n String peptideLabel = peptide.getID().toString();\n VertexObject peptideV = new VertexObject(peptideLabel, peptide);\n\n graph.addVertex(peptideV);\n peptides.add(peptideV);\n\n String edgeName = \"groupPeptide_\" + groupV.getLabel() + \"_\" + peptideLabel;\n graph.addEdge(edgeName, groupV, peptideV);\n\n showPSMsMap.put(peptideLabel, false);\n }\n expandedPeptidesMap.put(groupV.getLabel(), true);\n }\n \n return peptides;\n }", "public void iterateEventList();", "private void iterateLandProducers(){\n landPrimaryProducerManager.produceAll();\n\n for(Map.Entry<Sector, SecondaryProducer> v : landSecondaryProducerManager.getManagerMap().entrySet()){\n resourceManager.addProducerResourceVisitor(v.getValue(), v.getKey());\n }\n landSecondaryProducerManager.produceAll();\n }", "@Override\r\n public void mostrarProfesores(){\n for(Persona i: listaPersona){\r\n if(i instanceof Profesor){\r\n i.mostrar();\r\n }\r\n }\r\n }", "public void printaPiedras(){\n for(Piedra p: piedras){\n System.out.println(p);\n }\n \n// Iterator<Piedra> it =piedras.iterator();\n// while(it.hasNext()){\n// System.out.println(it.next());\n// }\n \n }", "private void updateParticles() {\n\t\t// TODO Auto-generated method stub\n\t\tpredParticles = new ArrayList<File>();\n\t\tpreyParticles = new ArrayList<File>();\n\t\tFile f = new File(VisualizerMain.experimentBaseLocation+\"/\"+VisualizerMain.selectedRun+\"/Epoch-\"+epochSelected+\"/\");\n\t\tFile[] listFolders = f.listFiles();\n\t\tfor(File file : listFolders){\n\t\t\tpredParticles.add(file);\n\t\t}\n\t\t\n\t\tDefaultListModel listModelPredator = new DefaultListModel();\n\t\tfor (File file: predParticles){\n\t\t\tlistModelPredator.addElement(file.getName());\n\t\t}\n\t\tdisplayPred.setModel(listModelPredator);\n\t\t\n\t\tDefaultListModel listModelPrey = new DefaultListModel();\n\t\tfor (File file: preyParticles){\n\t\t\tlistModelPrey.addElement(file.getName());\n\t\t}\n\t\tdisplayPrey.setModel(listModelPrey);\n\t}", "public static interface Filter\n\t\t{\n\t\t/**\n\t\t * Accept a frame? if false then all particles will be discarded\n\t\t */\n\t\tpublic boolean acceptFrame(EvDecimal frame);\n\t\t\n\t\t/**\n\t\t * Accept a particle?\n\t\t */\n\t\tpublic boolean acceptParticle(int id, ParticleInfo info);\n\t\t}", "Iterable<Position<E>> children(Position<E> p) throws IllegalArgumentException;", "public void draw(Graphics g) {\n for(Entity e : ents) {\n if(!(e instanceof Game.Entities.Dynamic.PlayerEntity)) // Don't draw player yet because it will be drawn later\n e.draw(g);\n }\n for(Particle p : particles) {\n p.draw(g);\n }\n // Draw Player on top of everything else\n if(player != null) player.draw(g);\n }", "@Override\n public IndividualGroupList splitIndividualsIntoGroups(List<Individual> individuals) \n {\n sortByPositiveProbability(individuals);\n return adaptativeSplitIntoGroups(individuals);\n }", "public static void update() {\n\t\t\n\t\t// Fill the background for every call\n\t\tUtility.background(Utility.color(235, 213, 186));\n\t\t\n\t\t// Create 10 new random particles\n\t\tcreateNewParticles(10);\n\t\t\n\t\t// Track every particle in the array then update their feature\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\tif (particles[i] != null) {\n\t\t\t\tupdateParticle(i);\n\t\t\t}\n\n\t\t}\n\n\t}", "public void updateUniverse(int dimension)\n\t{\n\t\tfor(int i = 0; i < this.particles.size(); i++)\n\t\t{\n\t\t\tVector force = new Vector(this.dimension);\n\t\t\t\n\t\t\tfor(int x = 0; x < this.particles.size(); x++)\n\t\t\t{\n\t\t\t\tif(x == i) continue;\n\t\t\t\t\n\t\t\t\tif(checkCollision(i, x) == true)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tparticles.get(i).setVelocity(\n\t\t\t\t\t\t\tparticles.get(i).getVelocity().multiply(particles.get(i).getMass()).add(particles.get(x).getVelocity().multiply(particles.get(x).getMass())).divide(\n\t\t\t\t\t\t\t\t\tparticles.get(i).getMass()+particles.get(x).getMass())\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tthis.particles.get(i).increaseMass(this.particles.get(x).getMass());\n\t\t\t\t\tparticles.remove(x);\n\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble gForce = GRAV_CONST * (particles.get(i).getMass() * particles.get(x).getMass()) / Math.pow((this.particles.get(i).getPosition().distance(this.particles.get(x).getPosition())), 2);\n\t\t\t\tVector directon = particles.get(i).getPosition().direction(particles.get(x).getPosition());\n\t\t\t\t\n\t\t\t\tforce = force.add(directon.multiply(gForce));\n\t\t\t}\n\t\t\t\n\t\t\tparticles.get(i).setAcceleration(force.divide(particles.get(i).getMass()));\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < this.particles.size(); i++)\n\t\t{\n\t\t\tparticles.get(i).update(timebase);\n\t\t}\n\t\t\n\t\telapsedTime += timebase;\n\t}", "@Override\n public void run()\n {\n final int minX = region.getMinimumPoint().getX();\n final int minZ = region.getMinimumPoint().getZ();\n final int maxX = region.getMaximumPoint().getX();\n final int maxZ = region.getMaximumPoint().getZ();\n final int midX = (maxX - minX) / 2;\n final int midZ = (maxZ - minZ) / 2;\n double playerY = player.getLocation().getY();\n\n if (midX / 6 > 0)\n {\n int tmp = 0;\n final int amount = midX / 5;\n for (int i = 0; i < amount; i++)\n {\n final int x = minX + midX - tmp;\n final int x2 = minX + midX + tmp;\n for (double y = playerY - 10; y <= playerY + 10; y++)\n {\n player.spawnParticle(Particle.FLAME, x, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, x, y, maxZ, 0);\n player.spawnParticle(Particle.FLAME, x2, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, x2, y, maxZ, 0);\n }\n tmp += 5;\n }\n }\n if (midZ / 6 > 0)\n {\n int tmp = 0;\n final int amount = midZ / 5;\n for (int i = 0; i < amount; i++)\n {\n final int z = minZ + midZ - tmp;\n final int z2 = minZ + midZ + tmp;\n\n for (double y = playerY - 10; y <= playerY + 10; y++)\n {\n player.spawnParticle(Particle.FLAME, minX, y, z, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, z, 0);\n player.spawnParticle(Particle.FLAME, minX, y, z2, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, z2, 0);\n }\n tmp += 5;\n }\n }\n\n for (double y = playerY - 40; y <= 256; y++)\n {\n player.spawnParticle(Particle.FLAME, minX, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, minX, y, maxZ, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, maxZ, 0);\n }\n timer--;\n\n if (0 > this.timer)\n {\n player.sendMessage(\"§5Boundaries have been expired.\");\n this.cancel();\n }\n }", "public void addInPGM(@NonNull Collection<Group> groups) {\n if (!Guido.isPPGMConnected())\n throw new IllegalStateException(\n \"Groups cannot be added to PGM when it is not in the plugins folder or enabled\");\n Config configuration = PGM.get().getConfiguration();\n if (!(configuration instanceof PGMConfig)) return;\n PGMConfig config = (PGMConfig) configuration;\n for (Group group : groups) {\n PGMConfig.Group toPGM = this.toPGM(group);\n if (this.notLoaded(toPGM)) config.getGroups().add(toPGM);\n }\n }", "public void compute(double[] values, int[] groupStart) {\n\t\tdouble[] mu = new double[groupStart.length];\n\t\tdouble[] sigma = new double[groupStart.length];\n\t\tint[] n = new int[groupStart.length];\n\t\t\n\t\tfor (int i=0; i<groupStart.length; i++) {\n\t\t\tint s = groupStart[i];\n\t\t\tint e = i<groupStart.length-1?groupStart[i+1]:values.length;\n\t\t\tmu[i] = mean.evaluate(values, s, e-s);\n\t\t\tsigma[i] = stddev.evaluate(values, mu[i], s, e-s);\n\t\t\tn[i] = e-s;\n\t\t}\n\t\t\n\t\tcompute(n,mu,sigma);\n\t}", "private void parse ( GPNode node ) {\n\n nodes++;\n\n int d = node.atDepth();\n if ( d > depth ) depth = d;\n\n for ( int i = 0; i < node.children.length; i++ )\n parse(node.children[i]);\n\n }", "private void distribute() {\n\t\t\tfor (Entry<String, List<String>> r : groups.entrySet()) {\n\t\t\t\tRandom random = new Random();\n\t\t\t\tint randomIndex = random.nextInt(r.getValue().size());\n\t\t\t\tdistribution.put(r.getKey(), r.getValue().get(randomIndex));\n\t\t\t}\n\t\t}", "public void end(){\n\t\tfor(ParticleBatch<?> batch : batches)\n\t\t\tbatch.end();\n\t}", "List getElementIDsInGroupID(Object groupID) throws Exception;", "void visit(Circle circle);", "public void add(Particle particle) {\n this.particles.add(particle);\n }", "public Sample run() {\n\t\t// termination criterion\n\t\tint runsUnchanged = 0;\n\t\tboolean terminated = false;\n\t\tdouble prevBestSampleFit = 0; // remember to set this at some\n\t\t\t\t\t\t\t\t\t\t// point\n\t\tint runs = 0; // testing, remove\n\n\t\t System.out.println(\"Evaluating Particles\");\n\t\t// 1) evaluate all particles\n\t\t// 2) set gBest\n\t\tdouble maxFit = problem.getWorstValue();\n\t\tfor (Particle p : pop) {\n\t\t\tp.calcFitness();\n\n\t\t\t// number of evals done is incremented by numSamples\n\t\t\tnumFitnessEvals += numSamples;\n\n\t\t\tdouble fit = p.getBestSample().getFitness();\n\t\t\t// find initial gBest\n\t\t\tif (problem.compare(maxFit, fit) == 1) {\n\t\t\t\tmaxFit = fit;\n\t\t\t\tbestSample = p.getBestSample();\n\t\t\t\tgBest = p.copy();\n\t\t\t\t System.out.println(\"Global best:\");\n\t\t\t\t bestSample.print();\n\t\t\t}\n\t\t}\n\n\t\twhile (!terminated) {\n\t\t\t System.out.println(\"\\n \\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\");\n\t\t\t System.out.println(\" %%%%%%%%%%%%% RUN \" + runs);\n\t\t\t System.out.println(\" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\");\n\n\t\t\t// iterate through all particles\n\t\t\tfor (Particle p : pop) {\n\t\t\t\t// System.out.println(\"\\n >>>> Particle \");\n\t\t\t\t// p.print();\n\n\t\t\t\t// 1) update velocity\n//\t\t\t\tSystem.out.println(\">> Velocity Update\");\n\t\t\t\tp.updateVelocity(omega, phi1, phi2, gBest);\n\n\t\t\t\t// 2) update position\n//\t\t\t\tSystem.out.println(\">> Position Update \");\n\t\t\t\tp.updatePosition();\n\t\t\t\t// p.print();\n\n\t\t\t\t// 2.5) change the previous best sample fitness\n\t\t\t\tprevBestSampleFit = bestSample.getFitness();\n\n\t\t\t\t// 3) evaluate fitness\n//\t\t\t\tSystem.out.println(\">> Fitness Calc\");\n\t\t\t\tdouble fit = p.calcFitness(); // this is never used\n\t\t\t\t// number of evals done is incremented by numSamples\n\t\t\t\tnumFitnessEvals += numSamples;\n\n\t\t\t\tdouble sampleFit = p.getBestSample().getFitness();\n\n\t\t\t\t// System.out.println(\"Sample fitness: \" + sampleFit + \" >? Best\n\t\t\t\t// fitness: \" + bestSample.getFitness());\n\n\t\t\t\t// compares and adjusts gBest\n\t\t\t\tif (problem.compare(bestSample.getFitness(), sampleFit) == 1) {\n\t\t\t\t\tsetBestSample(p.getBestSample());\n\t\t\t\t\t// set gBest and bias\n\t\t\t\t\tsetGBest(p);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// updating fitness for evaluation\n\t\t\tfitnesses.add(bestSample.getFitness());\n\n\t\t\t// Next half-dozen or so lines used to determine convergence\n\t\t\tif (Math.abs(prevBestSampleFit - bestSample.getFitness()) < threshold) {\n\t\t\t\trunsUnchanged++;\n\t\t\t} else {\n\t\t\t\trunsUnchanged = 0;\n\t\t\t}\n\t\t\tif (runsUnchanged >= numToConsiderConverged) {\n\t\t\t\t// return if the solution hasn't significantly changed in a\n\t\t\t\t// certain\n\t\t\t\t// number of iterations\n\t\t\t\tterminated = true;\n\t\t\t}\n\t\t\truns++;\n\t\t\t// System.out.println(\">>>>>> RUNS: \" + runs);\n\t\t}\n\n\t\tSystem.out.println(\"Returning best sample:\");\n\t\tbestSample.print();\n\t\tSystem.out.println(\"Fitness: \" + bestSample.getFitness());\n\n\t\tSystem.out.println(\"Fitness Aross Evals:\");\n\t\tfor (Double d : fitnesses) {\n\t\t\tSystem.out.print(d + \" \");\n\t\t}\n\t\tSystem.out.println();\n\n\t\treturn bestSample;\n\t}", "private void process() {\n\tint i = 0;\n\tIOUtils.log(\"In process\");\n\tfor (Map.Entry<Integer, double[]> entry : vecSpaceMap.entrySet()) {\n\t i++;\n\t if (i % 1000 == 0)\n\t\tIOUtils.log(this.getName() + \" : \" + i + \" : \" + entry.getKey()\n\t\t\t+ \" : \" + this.getId());\n\t double[] cent = null;\n\t double sim = 0;\n\t for (double[] c : clusters.keySet()) {\n\t\t// IOUtils.log(\"before\" + c);\n\t\tdouble csim = cosSim(entry.getValue(), c);\n\t\tif (csim > sim) {\n\t\t sim = csim;\n\t\t cent = c;\n\t\t}\n\t }\n\t if (cent != null && entry.getKey() != null) {\n\t\ttry {\n\t\t clusters.get(cent).add(entry.getKey());\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }", "void evaluate(Set<SegmentRefOrGroup> structure, ConformanceProfile cp, ElementChangeDirective permutation, CompositeProfileDataExtension repo) {\n\t\tfor(ElementChangeDirective p : permutation.getChildren()) {\n\t\t\tSegmentRefOrGroup refOrGrp = get(structure, p.getTargetElementId());\n\t\t\tif(refOrGrp != null) {\n\t\t\t\tif(refOrGrp instanceof SegmentRef) {\n\t\t\t\t\tthis.evaluate(((SegmentRef) refOrGrp), cp, p, repo);\n\t\t\t\t}\n\t\t\t\telse if(refOrGrp instanceof Group) {\n\t\t\t\t\tthis.evaluate((Group) refOrGrp, cp, p, repo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( new Location ( getWorld ( ) , x , y , z ) ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "protected void onDespawn() {\r\n\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tdouble randX = rand.nextDouble(), randZ = rand.nextDouble(), randY = rand.nextGaussian();\r\n\t\t\trandX = randX * (getEntityBoundingBox().maxX - getEntityBoundingBox().minX) + getEntityBoundingBox().minX;\r\n\t\t\trandZ = randZ * (getEntityBoundingBox().maxZ - getEntityBoundingBox().minZ) + getEntityBoundingBox().minZ;\r\n\t\t\trandY += posY;\r\n\t\t\tdouble velX = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tdouble velY = Math.abs(this.rand.nextGaussian() * 0.2D);\r\n\t\t\tdouble velZ = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tworld.spawnParticle(EnumParticleTypes.CLOUD, randX, randY, randZ, velX, velY, velZ);\r\n\t\t}\r\n\t}", "protected void execute() {\n\t\t\r\n\t\tParticleAnalysisReport[] reports = simpleVision.getFrame();\r\n\t\t for (int i = 0; i < reports.length; i++) { // print results\r\n ParticleAnalysisReport r = reports[i];\r\n SmartDashboard.putString(\"Particle\" + i, r.center_mass_x + \", \" + r.center_mass_y);\r\n\t\t }\r\n\t\t\r\n\t}", "public void listGroup() {\r\n List<Group> groupList = groups;\r\n EventMessage evm = new EventMessage(\r\n EventMessage.EventAction.FIND_MULTIPLE,\r\n EventMessage.EventType.OK,\r\n EventMessage.EventTarget.GROUP,\r\n groupList);\r\n notifyObservers(evm);\r\n }", "void printObjects(){\r\n\t\tIterator iterator = gc.getIterator();\r\n\t while(iterator.hasNext()){\r\n\t\t GameObject g = iterator.getNext();\r\n\t\t\t if (!(g instanceof Bar))System.out.println(g.toString());\r\n\t\t}\r\n\t}", "public void forEachExample(){\n createPeople()\n .stream()\n .forEach(print);\n }", "public void group() {\n for (Box box : boxes) {\r\n box.x += this.x;\r\n box.y += this.y;\r\n }\r\n }", "public void buildPathes() {\n\n for (Fruit fruit :game.getFruits()) {\n\n GraphNode.resetCounterId();\n changePlayerPixels();\n addBlocksVertices();\n Point3D fruitPixels = new Point3D(fruit.getPixels()[0],fruit.getPixels()[1]);\n GraphNode fruitNode = new GraphNode(fruitPixels);\n vertices.add(fruitNode);\n Target target = new Target(fruitPixels, fruit);\n\n //find the neigbours\n BFS();\n\n // build the grpah\n buildGraph(target);\n }\n }", "private void updateSimulation(double frameRate) {\n\n GraphicsContext g = canvas.getGraphicsContext2D();\n double w = canvas.getWidth();\n double h = canvas.getHeight();\n double x = w / 2;\n double y = h - 10;\n\n // Clear the canvas\n g.setGlobalAlpha(1.0);\n g.setGlobalBlendMode(BlendMode.SRC_OVER);\n g.setFill(Color.BLACK);\n g.fillRect(0, 0, w, h);\n\n // Generate new particles and them the collection to be drawn.\n particles.addAll(emitter.emit(x, y));\n\n // (Re)draw the particles.\n for (Iterator<Particle> it = particles.iterator(); it.hasNext();) {\n Particle p = it.next();\n\n // Update the particle's position, color and age.\n p.update(frameRate);\n\n // Remove expired particles.\n if (!p.isAlive()) {\n it.remove();\n continue;\n }\n // Draw\n p.render(g);\n }\n fpsLabel.setText(String.format(\"Current frame rate: %.3f\", frameRate));\n countLabel.setText(String.format(\"Particle count: %d\", particles.size()));\n\n }", "private void addProceduresForSpeciesGroups(IacucProtocol protocol) {\n for(IacucProtocolSpeciesStudyGroup protocolStudyGroupSpecies : protocol.getIacucProtocolStudyGroupSpeciesList()) {\n protocolStudyGroupSpecies.setResponsibleProcedures(new ArrayList<IacucProtocolStudyGroupBean>());\n protocolStudyGroupSpecies.getResponsibleProcedures().addAll(getStudyGroupProceduresForSpeciesGroup(protocol, protocolStudyGroupSpecies.getIacucProtocolSpecies()));\n }\n }", "public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}", "public void feedAll() {\n\t\tfor (VirtualPet p : shelterPets.values()) {\n\t\t\tp.feedPet();\n\t\t}\n\t}", "public void begin(){\n\t\tfor(ParticleBatch<?> batch : batches)\n\t\t\tbatch.begin();\n\t}", "public void parsePopulation(ArrayList<Entity> players){\n for (int i = 0; i < players.size(); i++) {\n players.get(i).getComponent(PlayerComponent.class).setStudent(students.get(i));\n students.get(i).setPlayer(players.get(i));\n students.get(i).setIdNum(i);\n }\n }", "List<GroupMembers> findAll();", "public void calc()\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(oldInfo.calcInfo!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldInfo.calcInfo.calc();\n\t\t\t\t\t\t\toldInfo.calcInfo=null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Filter particles\n\t\t\t\t\t\tfor(int id:oldInfo.keySet())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tParticleInfo pInfo=oldInfo.get(id);\n\t\t\t\t\t\t\tif(filter.acceptParticle(id, pInfo))\n\t\t\t\t\t\t\t\tnewInfo.put(id,pInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "Collection<? extends Subdomain_group> getIsVertexOf();", "public void spawnParticle ( Particle particle , Location location , int count , double offsetX , double offsetY ,\n\t\t\tdouble offsetZ , double extra ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "public abstract void visit(Circle circle);", "public void spawnParticle ( Particle particle , Location location , int count ,\n\t\t\tdouble offsetX , double offsetY , double offsetZ ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "void visit(CircleModel circleModel);", "public static void tick() {\n try {\n getActiveParticles().stream().filter((p) -> (p != null)).filter((p) -> (p.active)).forEach((p) -> {\n p.tick();\n });\n } catch (java.util.ConcurrentModificationException ex) {}\n }" ]
[ "0.60797197", "0.5839098", "0.5742477", "0.5653143", "0.54640675", "0.5239802", "0.52167946", "0.51687855", "0.5121152", "0.5117427", "0.5082845", "0.50770736", "0.50051504", "0.49827623", "0.49569118", "0.495633", "0.49059537", "0.48925108", "0.4868324", "0.48554546", "0.48186252", "0.47953558", "0.47872692", "0.471663", "0.47091594", "0.47011685", "0.45973203", "0.4594028", "0.4566019", "0.4553072", "0.45452636", "0.45301095", "0.45279428", "0.4525601", "0.45015973", "0.44753733", "0.44722906", "0.44546208", "0.44431582", "0.4441707", "0.44305158", "0.4419694", "0.4416948", "0.44121665", "0.44108242", "0.44059536", "0.4395292", "0.43949267", "0.43845934", "0.4383326", "0.4347869", "0.43462148", "0.43418398", "0.43302998", "0.43170366", "0.4304567", "0.43038747", "0.4301432", "0.42903355", "0.42784137", "0.42744714", "0.42637298", "0.42604688", "0.4258865", "0.4245017", "0.4241681", "0.4238006", "0.4236144", "0.42280576", "0.42234525", "0.42191485", "0.42156217", "0.42103353", "0.4209132", "0.42036077", "0.4203264", "0.42027748", "0.4194633", "0.4190349", "0.41890207", "0.41874057", "0.41850156", "0.41797003", "0.4176544", "0.41758916", "0.41739273", "0.41723272", "0.416064", "0.41522512", "0.4150303", "0.4148212", "0.41448298", "0.41372988", "0.41319257", "0.41233954", "0.41168487", "0.41112012", "0.40962797", "0.40929824", "0.4092956" ]
0.6143673
0
Invoked for an empty type.
void emptyType(ComplexTypeSG type) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EmptyType() {\n super(\"<EMPTY>\");\n }", "EmptyType createEmptyType();", "@Test\n public void allowedEmptyType() throws Exception {\n Query query = Query.parse(\"/allow-empty-type\");\n doAllowedEmptyTest(query);\n }", "@Override\n\tpublic Object visitType(Type type) {\n\t\treturn null;\n\t}", "public void any_type() {\n if (var_type()) {\n return;\n }\n if (lexer.token != Symbol.VOID) {\n error.signal(\"Wrong type\");\n }\n lexer.nextToken();\n }", "@Override\n public Type getType() {\n return null;\n }", "@Override\n public Type type() {\n return null;\n }", "@Override\n public boolean isEmpty() { return true; }", "@Override\n\tpublic Type getType() {\n\t\treturn null;\n\t}", "public String typeOf() { return null; }", "AstroArg empty();", "public interface EmptyInterface {}", "public abstract void makeEmpty();", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\r\n\t\tprotected boolean skipInitialType() {\r\n\t\t\treturn false;\r\n\t\t}", "@Override\npublic boolean isEmpty() {\n\treturn false;\n}", "void unsetType();", "@Override\n public boolean isEmpty()\n {\n return false;\n }", "public void makeEmpty();", "public void makeEmpty();", "@Override public Type make_nil(byte nil) { return make(nil,_any); }", "@Override\npublic String getType() {\n\treturn null;\n}", "boolean no_type(DiagnosticChain diagnostics, Map<Object, Object> context);", "@Override\n public String getType() {\n return \"\";\n }", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "public boolean isEmpty() { return true; }", "@Override\n\tpublic boolean isEmpty ()\n\t{\n\t\treturn false;\n\t}", "@Override\npublic Boolean isEmpty() {\n\treturn null;\n}", "public boolean is_T_EMPTY() {\n return (this.t.get_T().length() == 0) ? true : false;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000008);\n type_ = fi.kapsi.koti.jpa.nanopb.Nanopb.FieldType.FT_DEFAULT;\n onChanged();\n return this;\n }", "@Override\n\t\t\tpublic boolean isEmpty() {\n\t\t\t\treturn false;\n\t\t\t}", "public Builder clearType() {\n\n\t\t\t\t\ttype_ = 0;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void setEmpty() {\n\t\t\n\t}", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000004);\n type_ = 0;\n onChanged();\n return this;\n }", "@Override\n public boolean isEmpty() {\n return false;\n }", "public Builder clearType() {\n\n\t\t\t\ttype_ = 0;\n\t\t\t\tonChanged();\n\t\t\t\treturn this;\n\t\t\t}", "public Object VisitEmptyStatement(ASTEmptyStatement emptystate) {\n return bt.emptyStatement();\n }", "@Override\n public String visit(TypeExpr n, Object arg) {\n return null;\n }", "DOMType() {\n // Constructs an empty type node\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn (getSize() == 0);\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000001);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public TypeUndefined() { super(\"undefined\"); }", "@Override\n\tpublic boolean isEmpty() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000002);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000002);\n type_ = 0;\n onChanged();\n return this;\n }", "protected void clearData() {\n any.type(any.type());\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000020);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000001);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000001);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000001);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000001);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000001);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000001);\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public void postEmpty() {\n postValue(new StateData<T>().empty());\n }", "public boolean isEmpty() {\n return true;\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "@Override\r\n public boolean isEmpty() {\n return size == 0;\r\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "@Override\r\n public boolean isEmpty() {\r\n return size == 0;\r\n }", "public void makeEmpty( )\n {\n doClear( );\n }", "@Override\n public boolean isEmpty() {\n return size()==0;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000004);\n type_ = 1;\n onChanged();\n return this;\n }", "public boolean isEmpty()\n {\n return false;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return false;\n }", "public boolean isEmpty() {\n return false;\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn (t==1);\r\n\t}", "public static DefaultExpression empty() { throw Extensions.todo(); }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}" ]
[ "0.73762155", "0.7277866", "0.6961325", "0.694799", "0.6735405", "0.67075187", "0.66107357", "0.65698624", "0.64083004", "0.634462", "0.633344", "0.62934595", "0.62932813", "0.62529916", "0.62529916", "0.62529916", "0.62529916", "0.62529916", "0.62529916", "0.62529916", "0.6252566", "0.62355375", "0.62215495", "0.62126315", "0.62096536", "0.62096536", "0.619532", "0.6188769", "0.61851394", "0.6139359", "0.6129006", "0.6129006", "0.6117212", "0.6111166", "0.6095328", "0.6084858", "0.606911", "0.6037378", "0.60360503", "0.60354865", "0.60354865", "0.6034828", "0.60304344", "0.60304344", "0.60304344", "0.60304344", "0.60304344", "0.60215724", "0.6018863", "0.6008538", "0.59870386", "0.59814084", "0.5978799", "0.5978796", "0.5970649", "0.59672767", "0.5959689", "0.5959689", "0.5959689", "0.5953914", "0.5952872", "0.59500396", "0.59486866", "0.59437805", "0.5940741", "0.5936363", "0.5936363", "0.5936363", "0.5936363", "0.5936363", "0.5936363", "0.5932739", "0.5929171", "0.59230363", "0.59065837", "0.5896966", "0.5890542", "0.5886023", "0.58829546", "0.587599", "0.5875195", "0.5875195", "0.5875195", "0.5875195", "0.5875195", "0.5875195", "0.5875195", "0.58716285", "0.5868286", "0.5867944", "0.5867944", "0.5867944", "0.5867944", "0.5867944", "0.58672214", "0.58672214", "0.5867057", "0.58539146", "0.5840904", "0.5840904" ]
0.6980669
2
Invoked for a complex type with simple content.
void simpleContent(ComplexTypeSG type) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void startComplexContent(ComplexTypeSG type) throws SAXException;", "public static ObjectInstance getComplexTypeObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 1);\n properties.put(\"theLabel\", getComplexTypeMBean().getTheLabel());\n properties.put(\"complexitem\", getComplexTypeMBean()\n .getComplexClass().toString());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'ComplexType' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new ComplexType().getClass().getName());\n }", "public static ComplexTypeMBean getComplexTypeMBean()\n {\n return new ComplexType();\n }", "public T caseComplexNode(ComplexNode object) {\r\n\t\treturn null;\r\n\t}", "@Override\r\n public boolean isComplex()\r\n {\n return false;\r\n }", "void emptyType(ComplexTypeSG type) throws SAXException;", "protected CompositeTypeImpl getSingleCompositeWithSimpleCollection() {\n // Complex object retrieve\n CompositeTypeImpl toReturn = new CompositeTypeImpl(\"compositeNameSpace\", COMPOSITE_TYPE_NAME, null);\n\n CompositeTypeImpl phoneNumberComposite = getPhoneNumberComposite(false);\n\n CompositeTypeImpl detailsComposite = new CompositeTypeImpl(null, \"tDetails\", \"tDetails\");\n detailsComposite.addField(\"gender\", new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n detailsComposite.addField(\"weight\", new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n\n SimpleTypeImpl nameSimple = new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null);\n\n SimpleTypeImpl friendsSimpleCollection = new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null, true, null, null, null);\n\n toReturn.addField(\"friends\", friendsSimpleCollection);\n toReturn.addField(EXPANDABLE_PROPERTY_PHONENUMBERS, phoneNumberComposite);\n toReturn.addField(EXPANDABLE_PROPERTY_DETAILS, detailsComposite);\n toReturn.addField(\"name\", nameSimple);\n\n return toReturn;\n }", "public ComplexType searchEdmComplexType(FullQualifiedName type);", "public ComplexType searchEdmComplexType(String embeddableTypeName);", "void endComplexContent(ComplexTypeSG type) throws SAXException;", "public interface JPAEdmComplexTypeView extends JPAEdmBaseView {\n\n /**\n * The method returns an EDM complex type that is currently being processed.\n * \n * @return an instance of type {@link org.apache.olingo.odata2.api.edm.provider.ComplexType}\n */\n public ComplexType getEdmComplexType();\n\n /**\n * The method returns an JPA embeddable type that is currently being\n * processed.\n * \n * @return an instance of type {@link javax.persistence.metamodel.EmbeddableType}\n */\n public javax.persistence.metamodel.EmbeddableType<?> getJPAEmbeddableType();\n\n /**\n * The method returns a consistent list of EDM complex types.\n * \n * @return a list of {@link org.apache.olingo.odata2.api.edm.provider.ComplexType}\n */\n public List<ComplexType> getConsistentEdmComplexTypes();\n\n /**\n * The method searches for the EDM complex type with in the container for\n * the given JPA embeddable type name.\n * \n * @param embeddableTypeName\n * is the name of JPA embeddable type\n * @return a reference to EDM complex type if found else null\n */\n public ComplexType searchEdmComplexType(String embeddableTypeName);\n\n /**\n * The method add a JPA EDM complex type view to the container.\n * \n * @param view\n * @param isReferencedInKey\n * is the complex type referenced in an Entity as a key property\n * is an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmComplexTypeView}\n */\n public void addJPAEdmCompleTypeView(JPAEdmComplexTypeView view);\n\n /**\n * The method searches for the EDM complex type with in the container for\n * the given EDM complex type's fully qualified name.\n * \n * @param type\n * is the fully qualified name of EDM complex type\n * @return a reference to EDM complex type if found else null\n */\n public ComplexType searchEdmComplexType(FullQualifiedName type);\n\n /**\n * The method expands the given EDM complex type into a list of EDM simple\n * properties.\n * \n * @param complexType\n * is the EDM complex type to expand\n * @param expandedPropertyList\n * is the list to be populated with expanded EDM simple\n * properties\n * @param embeddablePropertyName\n * is the name of the complex property. The name is used as the\n * qualifier for the expanded simple property names.\n */\n public void expandEdmComplexType(ComplexType complexType, List<Property> expandedPropertyList,\n String embeddablePropertyName);\n\n /**\n * The method checks if the given EDM complex type is referenced as a Key property in any Entity\n * @param complexTypeName\n * EDM complex type name\n * @return\n * <ul><li><b>true</b> : if the complex type is referenced as an entity's key property</li>\n * <li><b>false</b> : if the complex type is not referenced as an entity's key property</li>\n * </ul>\n * \n */\n public boolean isReferencedInKey(String complexTypeName);\n\n /**\n * The method sets the given EDM complex type as referenced in an Entity as a key property\n * @param complexTypeName\n * EDM complex Type name\n */\n public void setReferencedInKey(String complexTypeName);\n\n}", "public void testConstructorWithComplexTypeWithNullSimpleParam() throws Exception {\r\n ConfigurationObject configurationObject = createObject(\"name\", TYPE_OBJECT);\r\n ConfigurationObject paramsChild = new DefaultConfigurationObject(\"params\");\r\n ConfigurationObject param = new DefaultConfigurationObject(\"param1\");\r\n param.setPropertyValue(PROPERTY_TYPE, TYPE_INT);\r\n paramsChild.addChild(param);\r\n configurationObject.addChild(paramsChild);\r\n root.addChild(configurationObject);\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "public void expandEdmComplexType(ComplexType complexType, List<Property> expandedPropertyList,\n String embeddablePropertyName);", "public static boolean simpleType(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"simpleType\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, SIMPLE_TYPE, \"<simple type>\");\n r = simpleQualifiedReferenceExpression(b, l + 1);\n r = r && simpleType_1(b, l + 1);\n r = r && simpleType_2(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public void setSimpleName(String simpleName) {\n this.simpleName = simpleName;\n }", "public Complex() {\n initComponents();\n }", "public DefaultSimpleMetaDataModel(DataType dataType)\n {\n super(dataType);\n\n if (complexTypes.contains(dataType))\n {\n throw new IllegalArgumentException(\"Invalid DataType for SimpleMetadataModel \" + dataType);\n }\n }", "public T caseComplexExpr(ComplexExpr object) {\n\t\treturn null;\n\t}", "protected void parseXmpSimpleProperty(XMPMetadata metadata,\n\t\t\tQName propertyName, XmpPropertyType stype,\n\t\t\tComplexPropertyContainer container)\n\t\t\t\t\tthrows XmpUnknownPropertyTypeException, XmpPropertyFormatException,\n\t\t\t\t\tXMLStreamException {\n\t\ttry {\n\t\t\tAbstractSimpleProperty prop = null;\n\t\t\tArrayList<Attribute> attributes = new ArrayList<Attribute>();\n\t\t\tint cpt = reader.get().getAttributeCount();\n\t\t\tfor (int i = 0; i < cpt; i++) {\n\t\t\t\tattributes.add(new Attribute(null, reader.get()\n\t\t\t\t\t\t.getAttributePrefix(i), reader.get()\n\t\t\t\t\t\t.getAttributeLocalName(i), reader.get()\n\t\t\t\t\t\t.getAttributeValue(i)));\n\t\t\t}\n\t\t\tif (stype == XmpPropertyType.Text) {\n\t\t\t\tprop = new TextType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Integer) {\n\t\t\t\tprop = new IntegerType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Date) {\n\t\t\t\tprop = new DateType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Boolean) {\n\t\t\t\tprop = new BooleanType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Real) {\n\t\t\t\tprop = new RealType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t}\n\t\t\tif (prop != null) {\n\t\t\t\tcontainer.addProperty(prop);\n\t\t\t\t// ADD ATTRIBUTES\n\t\t\t\tfor (Attribute att : attributes) {\n\t\t\t\t\tprop.setAttribute(att);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new XmpUnknownPropertyTypeException(\n\t\t\t\t\t\t\"Unknown simple type found\");\n\t\t\t}\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tthrow new XmpPropertyFormatException(\n\t\t\t\t\t\"Unexpected type found for the property '\"\n\t\t\t\t\t\t\t+ propertyName.getLocalPart() + \"'\", e);\n\t\t}\n\t}", "public void testConstructorWithComplexTypeWithNullParam() throws Exception {\r\n ConfigurationObject configurationObject = createObject(\"name\", TYPE_OBJECT);\r\n ConfigurationObject paramsChild = new DefaultConfigurationObject(\"params\");\r\n ConfigurationObject param = new DefaultConfigurationObject(\"param1\");\r\n param.setPropertyValue(PROPERTY_TYPE, TYPE_OBJECT);\r\n paramsChild.addChild(param);\r\n configurationObject.addChild(paramsChild);\r\n root.addChild(configurationObject);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification object = specificationFactory.getObjectSpecification(\"name\", null);\r\n\r\n assertEquals(\"SpecType should be complex.\", ObjectSpecification.COMPLEX_SPECIFICATION,\r\n object.getSpecType());\r\n assertNull(\"Identifier should be null.\", object.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, object.getType());\r\n\r\n Object[] params = object.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n\r\n assertEquals(\"Object should have 1 param.\", 1, params.length);\r\n assertEquals(\"SpecType of array elements should be null.\",\r\n ObjectSpecification.NULL_SPECIFICATION, param1.getSpecType());\r\n }", "public ComplexFractal(String name, FractalType type) {\r\n\t\tif(name == null){\r\n\t\t\tthrow new NullPointerException(\"Argument name is null\");\r\n\t\t}\r\n\t\tthis.name = name;\r\n\t\tthis.type = type;\r\n\t\tformulas = new ArrayList<IComplexFormula>();\r\n\t}", "public @NotNull PersistentDataContainer toPrimitive(@NotNull Waypoint complex, @NotNull PersistentDataAdapterContext context) {\n return complex.toNBTTag(context.newPersistentDataContainer());\n }", "public Object echoObject1(Object customType) {\n return customType;\n }", "public final EObject ruleComplexTypeSpecifier() throws RecognitionException {\n EObject current = null;\n\n EObject lv_unit_3_0 = null;\n\n EObject lv_dimensions_6_0 = null;\n\n EObject lv_dimensions_8_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1859:6: ( ( () 'complex' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1860:1: ( () 'complex' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1860:1: ( () 'complex' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1860:2: () 'complex' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )?\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1860:2: ()\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1861:5: \n {\n \n temp=factory.create(grammarAccess.getComplexTypeSpecifierAccess().getComplexTypeSpecifierAction_0().getType().getClassifier());\n current = temp; \n temp = null;\n CompositeNode newNode = createCompositeNode(grammarAccess.getComplexTypeSpecifierAccess().getComplexTypeSpecifierAction_0(), currentNode.getParent());\n newNode.getChildren().add(currentNode);\n moveLookaheadInfo(currentNode, newNode);\n currentNode = newNode; \n associateNodeWithAstElement(currentNode, current); \n \n\n }\n\n match(input,36,FOLLOW_36_in_ruleComplexTypeSpecifier3278); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getComplexKeyword_1(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1875:1: ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )?\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( (LA26_0==25) ) {\n alt26=1;\n }\n switch (alt26) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1875:3: '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')'\n {\n match(input,25,FOLLOW_25_in_ruleComplexTypeSpecifier3289); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getLeftParenthesisKeyword_2_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1879:1: ( (lv_unit_3_0= ruleUnitExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1880:1: (lv_unit_3_0= ruleUnitExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1880:1: (lv_unit_3_0= ruleUnitExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1881:3: lv_unit_3_0= ruleUnitExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getComplexTypeSpecifierAccess().getUnitUnitExpressionParserRuleCall_2_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleUnitExpression_in_ruleComplexTypeSpecifier3310);\n lv_unit_3_0=ruleUnitExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getComplexTypeSpecifierRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"unit\",\n \t \t\tlv_unit_3_0, \n \t \t\t\"UnitExpression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n match(input,26,FOLLOW_26_in_ruleComplexTypeSpecifier3320); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getRightParenthesisKeyword_2_2(), null); \n \n\n }\n break;\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1907:3: ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )?\n int alt28=2;\n int LA28_0 = input.LA(1);\n\n if ( (LA28_0==33) ) {\n alt28=1;\n }\n switch (alt28) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1907:5: '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']'\n {\n match(input,33,FOLLOW_33_in_ruleComplexTypeSpecifier3333); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getLeftSquareBracketKeyword_3_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1911:1: ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1912:1: (lv_dimensions_6_0= ruleArrayDimensionSpecification )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1912:1: (lv_dimensions_6_0= ruleArrayDimensionSpecification )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1913:3: lv_dimensions_6_0= ruleArrayDimensionSpecification\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getComplexTypeSpecifierAccess().getDimensionsArrayDimensionSpecificationParserRuleCall_3_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleArrayDimensionSpecification_in_ruleComplexTypeSpecifier3354);\n lv_dimensions_6_0=ruleArrayDimensionSpecification();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getComplexTypeSpecifierRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"dimensions\",\n \t \t\tlv_dimensions_6_0, \n \t \t\t\"ArrayDimensionSpecification\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1935:2: ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( (LA27_0==14) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1935:4: ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) )\n \t {\n \t match(input,14,FOLLOW_14_in_ruleComplexTypeSpecifier3365); \n\n \t createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getCommaKeyword_3_2_0(), null); \n \t \n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1939:1: ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1940:1: (lv_dimensions_8_0= ruleArrayDimensionSpecification )\n \t {\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1940:1: (lv_dimensions_8_0= ruleArrayDimensionSpecification )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1941:3: lv_dimensions_8_0= ruleArrayDimensionSpecification\n \t {\n \t \n \t \t currentNode=createCompositeNode(grammarAccess.getComplexTypeSpecifierAccess().getDimensionsArrayDimensionSpecificationParserRuleCall_3_2_1_0(), currentNode); \n \t \t \n \t pushFollow(FOLLOW_ruleArrayDimensionSpecification_in_ruleComplexTypeSpecifier3386);\n \t lv_dimensions_8_0=ruleArrayDimensionSpecification();\n \t _fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = factory.create(grammarAccess.getComplexTypeSpecifierRule().getType().getClassifier());\n \t \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t \t }\n \t \t try {\n \t \t \t\tadd(\n \t \t \t\t\tcurrent, \n \t \t \t\t\t\"dimensions\",\n \t \t \t\tlv_dimensions_8_0, \n \t \t \t\t\"ArrayDimensionSpecification\", \n \t \t \t\tcurrentNode);\n \t \t } catch (ValueConverterException vce) {\n \t \t\t\t\thandleValueConverterException(vce);\n \t \t }\n \t \t currentNode = currentNode.getParent();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n match(input,34,FOLLOW_34_in_ruleComplexTypeSpecifier3398); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getRightSquareBracketKeyword_3_3(), null); \n \n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "void addComplexType(ComplexTypeDefinition ctd) throws ResultException, DmcValueException {\n if (checkAndAdd(ctd.getObjectName(),ctd,complexTypeDefs) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsg(ctd.getObjectName(),ctd,complexTypeDefs,\"complex type names\"));\n \tthrow(ex);\n }\n \n if (checkAndAddDOT(ctd.getDotName(),ctd,globallyUniqueMAP,null) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsgDOT(ctd.getObjectName(),ctd,globallyUniqueMAP,\"definition names\"));\n currentSchema = null;\n \tthrow(ex);\n } \n \n TypeDefinition td = new TypeDefinition(ctd);\n td.setInternallyGenerated(true);\n td.setName(ctd.getName());\n \n // The name of a complex type definition is schema.complextype.ComplexTypeDefinition\n // For the associated type, it will be schema.complextype.TypeDefinition\n DotName typeName = new DotName((DotName) ctd.getDotName().getParentName(),\"TypeDefinition\");\n// DotName nameAndTypeName = new DotName(td.getName() + \".TypeDefinition\");\n td.setDotName(typeName);\n// td.setNameAndTypeName(nameAndTypeName);\n\n td.addDescription(\"This is an internally generated type to represent complex type \" + ctd.getName() + \" values.\");\n td.setIsEnumType(false);\n td.setIsRefType(false);\n \n td.setTypeClassName(ctd.getDefinedIn().getSchemaPackage() + \".generated.types.DmcType\" + ctd.getName());\n td.setPrimitiveType(ctd.getDefinedIn().getSchemaPackage() + \".generated.types.\" + ctd.getName());\n td.setDefinedIn(ctd.getDefinedIn());\n \n // We add the new type to the schema's list of internally generated types\n ctd.getDefinedIn().addInternalTypeDefList(td);\n \n internalTypeDefs.put(td.getName(), td);\n \n // And then we add the type if it's not already there - this can happen when\n // we're managing a generated schema and the type definition has already been added\n // from the typedefList attribute\n if (typeDefs.get(td.getName()) == null)\n \taddType(td);\n }", "public ComplexStatLM(String fld, boolean single) { super(fld); this.single = single; }", "public static boolean writeComplex(Output out, Object complex) {\n log.trace(\"writeComplex\");\n if (writeListType(out, complex)) {\n return true;\n } else if (writeArrayType(out, complex)) {\n return true;\n } else if (writeXMLType(out, complex)) {\n return true;\n } else if (writeCustomType(out, complex)) {\n return true;\n } else if (writeObjectType(out, complex)) {\n return true;\n } else {\n return false;\n }\n }", "public interface ComplexField {\n\tpublic abstract int numberOfTokens();\n\n\tpublic abstract void addProperty(String name, TokenFilterAdder filterAdder);\n\n\tpublic abstract void addPropertyAlternative(String sourceName, String altPostfix);\n\n\tpublic abstract void addPropertyAlternative(String sourceName, String altPostfix,\n\t\t\tTokenFilterAdder filterAdder);\n\n\tpublic abstract void addProperty(String name);\n\n\tpublic abstract void addValue(String value);\n\n\tpublic abstract void addStartChar(int startChar);\n\n\tpublic abstract void addEndChar(int endChar);\n\n\tpublic abstract void addPropertyValue(String name, String value);\n\n\tpublic abstract void addToLuceneDoc(Document doc);\n\n\tpublic abstract void clear();\n\n\tpublic abstract void addAlternative(String altPostfix);\n\n\tpublic abstract void addAlternative(String altPostfix, TokenFilterAdder filterAdder);\n\n\tpublic abstract void addTokens(TokenStream c) throws IOException;\n\n\tpublic abstract void addPropertyTokens(String propertyName, TokenStream c) throws IOException;\n\n\tpublic abstract List<String> getPropertyValues(String name);\n}", "@Test\r\n public void testParamterizedWithComplexTypeParameters()\r\n {\r\n test(Types.create(Map.class)\r\n .withSubtypeOf(Number.class)\r\n .withSupertypeOf(Comparable.class)\r\n .build());\r\n }", "public Complex getComplex() {return this;}", "protected SimpleTypeImpl getSimpleNoCollection() {\n return new SimpleTypeImpl(\"simpleNameSpace\", SIMPLE_TYPE_NAME, null);\n }", "public void setReferencedInKey(String complexTypeName);", "Simple createSimple();", "public T caseSimple(Simple object) {\n\t\treturn null;\n\t}", "ComplexType getTechnologySpecificComplexType();", "@GET\n @Path(\"simpleTypes\")\n @Produces(MediaType.APPLICATION_JSON)\n public String getSimpleTypes() {\n return typesJSONResponse(_types.getSimpleTypes());\n }", "public static boolean isComplex(Object o) {\n return isComplex(findType(o));\n }", "protected SimpleTypeImpl getSimpleNoCollectionWithBaseType() {\n return new SimpleTypeImpl(\"simpleNameSpace\", \"simpleType\", null, false, null, getSimpleNoCollection(), null);\n }", "protected SimpleTypeImpl getSimpleCollection() {\n // Single property collection retrieve\n SimpleTypeImpl simpleCollectionString = new SimpleTypeImpl(\"simpleNameSpace\", SIMPLE_TYPE_NAME, null, true, null, null, null);\n return simpleCollectionString;\n }", "public JTypeView(JNODE aCD) { super(aCD); }", "private StaticContent() {\r\n super(IStaticContent.TYPE_ID);\r\n }", "public void setSimpleTypeList(List<String> simpleTypeList)\n\t{\n\t\tthis.simpleTypeList = simpleTypeList;\n\t}", "public boolean visit(CommonComplexModification node) {\n return visit((CommonTypeDerivation)node);\n }", "public static ObjectInstance getComplexTypeObjectInstanceForMaxFileSize()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(1);\n \n \n properties.put(\"theLabel\", getComplexTypeMBeanforMaxFileSize().getTheLabel()); \n properties.put(\"complexitem\", getComplexTypeMBeanforMaxFileSize()\n .getComplexClass().toString()); \n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'ComplexType' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n \n return new ObjectInstance(o, new ComplexTypeForMaxFileSize().getClass().getName());\n }", "public JTypeView() { }", "public final void mT__55() throws RecognitionException {\n try {\n int _type = T__55;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalEsm.g:49:7: ( 'COMPLEX' )\n // InternalEsm.g:49:9: 'COMPLEX'\n {\n match(\"COMPLEX\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "Complex() {\n real = 0.0;\n imag = 0.0;\n }", "public Complex() {\n this(0);\n }", "public void testConstructorWithComplexTypeWithParams() throws Exception {\r\n ConfigurationObject configurationObject = createObject(\"name\", TYPE_OBJECT);\r\n ConfigurationObject paramsChild = new DefaultConfigurationObject(\"params\");\r\n paramsChild.addChild(createParam(1, TYPE_INT, \"2\"));\r\n paramsChild.addChild(createParam(2, TYPE_INT, \"1\"));\r\n configurationObject.addChild(paramsChild);\r\n root.addChild(configurationObject);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification object = specificationFactory.getObjectSpecification(\"name\", null);\r\n\r\n assertEquals(\"SpecType should be complex.\", ObjectSpecification.COMPLEX_SPECIFICATION,\r\n object.getSpecType());\r\n assertNull(\"Identifier should be null.\", object.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, object.getType());\r\n\r\n Object[] params = object.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n ObjectSpecification param2 = (ObjectSpecification) params[1];\r\n\r\n assertEquals(\"Object should have 2 params.\", 2, params.length);\r\n assertTrue(\"SpecType of array elements should be simple.\", param1.getSpecType().equals(\r\n ObjectSpecification.SIMPLE_SPECIFICATION)\r\n && param2.getSpecType().equals(ObjectSpecification.SIMPLE_SPECIFICATION));\r\n assertTrue(\"Elements should be 'int'.\", param1.getType().equals(TYPE_INT)\r\n && param2.getType().equals(TYPE_INT));\r\n assertEquals(\"Element should be 1.\", \"2\", param1.getValue());\r\n assertEquals(\"Element should be 2.\", \"1\", param2.getValue());\r\n }", "HateosContentType() {\n super();\n }", "protected CompositeTypeImpl getSingleCompositeWithNestedCollection() {\n // Complex object retrieve\n CompositeTypeImpl toReturn = new CompositeTypeImpl(\"compositeNameSpace\", COMPOSITE_TYPE_NAME, null);\n\n CompositeTypeImpl phoneNumberCompositeCollection = new CompositeTypeImpl(null, \"tPhoneNumber\", null, true);\n phoneNumberCompositeCollection.addField(PHONENUMBER_PREFIX, new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n SimpleTypeImpl numbers = new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null, true, null, null, null);\n phoneNumberCompositeCollection.addField(\"numbers\", numbers);\n\n CompositeTypeImpl detailsComposite = new CompositeTypeImpl(null, \"tDetails\", \"tDetails\");\n detailsComposite.addField(\"gender\", new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n detailsComposite.addField(\"weight\", new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n\n SimpleTypeImpl nameSimple = new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null);\n\n SimpleTypeImpl friendsSimple = new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null);\n\n toReturn.addField(\"friends\", friendsSimple);\n toReturn.addField(EXPANDABLE_PROPERTY_PHONENUMBERS, phoneNumberCompositeCollection);\n toReturn.addField(EXPANDABLE_PROPERTY_DETAILS, detailsComposite);\n toReturn.addField(\"name\", nameSimple);\n\n return toReturn;\n }", "LocalSimpleType getSimpleType();", "public Complex(){\r\n\t this(0,0);\r\n\t}", "@Override\n public int getContentType() {\n return 0;\n }", "public void setComplexValue(final Map<String, String> complexVal) {\r\n if (complexVal != null) {\r\n this.complexValue = complexVal;\r\n }\r\n }", "@Test\r\n\tpublic void testComplexProperty() throws Exception {\r\n\t\tAdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tXMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider.getInstance()\r\n\t\t\t\t.getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\t// Retreiving value of the property.\r\n\t\tProperty subProperty = container.getProperty(\"complexProperty.stringProperty\");\r\n\t\tassertNotNull(subProperty);\r\n\r\n\t\t// Attaching monitor to the property.\r\n\t\tPropertyMonitorStub monitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexProperty.stringProperty\", monitor);\r\n\t\tsubProperty.setValue(subProperty.getValue() + \" - new value\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexProperty.stringProperty\", monitor);\r\n\r\n\t\t// Attaching monitor only to \"complexProperty\"\r\n\t\tmonitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexProperty\", monitor);\r\n\t\tsubProperty.setValue(\"\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexProperty\", monitor);\r\n\r\n\t\t// The monitor should not get the message now.\r\n\t\tsubProperty.setValue(\"newValue\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t}", "protected SimpleTypeImpl getSimpleCollection(DMNType typeOfCollection) {\n // Single property collection retrieve\n String name = typeOfCollection.getName() + \"list\";\n SimpleTypeImpl simpleCollectionString = new SimpleTypeImpl(\"simpleNameSpace\", name, null, true, null, null, null);\n simpleCollectionString.setBaseType(typeOfCollection);\n return simpleCollectionString;\n }", "public ContentType () {\n\t\tsuper();\n\t}", "@SuppressWarnings(\"unchecked\")\n private JSimpleField createSimpleField(String description, TypeToken<?> fieldTypeToken, String fieldName,\n int storageId, io.permazen.annotation.JField annotation, Method getter, Method setter, String fieldDescription) {\n\n // Get explicit type name, if any\n final String typeName = annotation.type().length() > 0 ? annotation.type() : null;\n\n // Include containing type for annotation description; with autogenProperties it can be more than one\n description += \" in \" + this.type;\n\n // Complex sub-field?\n final boolean isSubField = setter == null;\n\n // Sanity check annotation\n if (isSubField && annotation.unique())\n throw new IllegalArgumentException(\"invalid \" + description + \": unique() constraint not allowed on complex sub-field\");\n if (annotation.uniqueExclude().length > 0 && !annotation.unique())\n throw new IllegalArgumentException(\"invalid \" + description + \": use of uniqueExclude() requires unique = true\");\n\n // See if field type encompasses one or more JClass types and is therefore a reference type\n final Class<?> fieldRawType = fieldTypeToken.getRawType();\n boolean isReferenceType = false;\n for (JClass<?> jclass : this.jdb.jclasses.values()) {\n if (fieldRawType.isAssignableFrom(jclass.type)) {\n isReferenceType = true;\n break;\n }\n }\n\n // Check for reference to UntypedJObject - not currently allowed\n if (UntypedJObject.class.isAssignableFrom(fieldRawType)) {\n throw new IllegalArgumentException(\"invalid \" + description + \": references to \"\n + (!UntypedJObject.class.equals(fieldRawType) ? \"sub-types of \" : \"\")\n + UntypedJObject.class.getName() + \" are not allowed; use \" + JObject.class.getName() + \" instead\");\n }\n\n // See if field type is a simple type, known either by explicitly-given name or type\n FieldType<?> nonReferenceType = null;\n if (typeName != null) {\n\n // Field type is explicitly specified by name\n if ((nonReferenceType = this.jdb.db.getFieldTypeRegistry().getFieldType(typeName)) == null)\n throw new IllegalArgumentException(\"invalid \" + description + \": unknown simple field type `\" + typeName + \"'\");\n\n // Verify field type matches what we expect\n final TypeToken<?> expectedType = isSubField ? nonReferenceType.getTypeToken().wrap() : nonReferenceType.getTypeToken();\n if (!expectedType.equals(fieldTypeToken)) {\n throw new IllegalArgumentException(\"invalid \" + description + \": field type `\" + typeName\n + \"' supports values of type \" + nonReferenceType.getTypeToken() + \" but \" + fieldTypeToken\n + \" is required (according to the getter method's return type)\");\n }\n } else {\n\n // Try to find a field type supporting getter method return type\n final List<? extends FieldType<?>> fieldTypes = this.jdb.db.getFieldTypeRegistry().getFieldTypes(fieldTypeToken);\n switch (fieldTypes.size()) {\n case 0:\n nonReferenceType = null;\n break;\n case 1:\n nonReferenceType = fieldTypes.get(0);\n break;\n default:\n if (!isReferenceType) {\n throw new IllegalArgumentException(\"invalid \" + description + \": an explicit type() must be specified\"\n + \" because type \" + fieldTypeToken + \" is supported by multiple registered simple field types: \"\n + fieldTypes);\n }\n break;\n }\n }\n\n // Handle enum and enum array types\n Class<? extends Enum<?>> enumType = null;\n Class<?> enumArrayType = null;\n int enumArrayDimensions = -1;\n if (nonReferenceType == null) {\n\n // Handle non-array Enum type\n enumType = Enum.class.isAssignableFrom(fieldRawType) ?\n (Class<? extends Enum<?>>)fieldRawType.asSubclass(Enum.class) : null;\n if (enumType != null) {\n nonReferenceType = new EnumFieldType(enumType);\n enumArrayDimensions = 0;\n }\n\n // Handle array Enum type\n if (fieldRawType.isArray()) {\n\n // Get base type and count dimensions\n assert nonReferenceType == null;\n enumArrayDimensions = 0;\n Class<?> baseType = fieldRawType;\n while (baseType != null && baseType.isArray()) {\n enumArrayDimensions++;\n baseType = baseType.getComponentType();\n }\n\n // Is array base type an Enum type?\n if (Enum.class.isAssignableFrom(baseType)) {\n\n // Get base Enum<?> type\n enumType = (Class<? extends Enum<?>>)baseType.asSubclass(Enum.class);\n\n // Get the corresponding EnumValue[][]... Java type and FieldType (based on the Enum's identifier list)\n Class<?> enumValueArrayType = EnumValue.class;\n nonReferenceType = new EnumFieldType(enumType);\n for (int i = 0; i < enumArrayDimensions; i++) {\n enumValueArrayType = Array.newInstance(enumValueArrayType, 0).getClass();\n nonReferenceType = this.jdb.db.getFieldTypeRegistry().getArrayType(nonReferenceType);\n }\n\n // Save type info\n enumType = (Class<? extends Enum<?>>)baseType.asSubclass(Enum.class);\n enumArrayType = fieldRawType;\n }\n }\n }\n\n // If field type neither refers to a JClass type, nor is a registered field type, nor is an enum type, fail\n if (!isReferenceType && nonReferenceType == null && enumType == null && enumArrayType == null) {\n throw new IllegalArgumentException(\"invalid \" + description + \": an explicit type() must be specified\"\n + \" because no known type supports values of type \" + fieldTypeToken);\n }\n\n // Handle ambiguity between reference vs. non-reference\n if (isReferenceType && nonReferenceType != null) {\n\n // If an explicit type name was provided, assume they want the specified non-reference type\n if (typeName != null)\n isReferenceType = false;\n else {\n throw new IllegalArgumentException(\"invalid \" + description + \": an explicit type() must be specified\"\n + \" because type \" + fieldTypeToken + \" is ambiguous, being both a @\" + PermazenType.class.getSimpleName()\n + \" reference type and a simple Java type supported by type `\" + nonReferenceType + \"'\");\n }\n }\n\n // Sanity check annotation some more\n if (!isReferenceType && annotation.onDelete() != DeleteAction.EXCEPTION)\n throw new IllegalArgumentException(\"invalid \" + description + \": onDelete() only allowed on reference fields\");\n if (!isReferenceType && annotation.cascadeDelete())\n throw new IllegalArgumentException(\"invalid \" + description + \": cascadeDelete() only allowed on reference fields\");\n if (!isReferenceType && annotation.unique() && !annotation.indexed())\n throw new IllegalArgumentException(\"invalid \" + description + \": unique() constraint requires field to be indexed\");\n if (nonReferenceType != null && nonReferenceType.getTypeToken().isPrimitive()\n && Arrays.asList(annotation.uniqueExclude()).contains(io.permazen.annotation.JField.NULL)) {\n throw new IllegalArgumentException(\"invalid \" + description + \": uniqueExclude() = JField.NULL is incompatible\"\n + \" with fields having primitive type\");\n }\n if (!isReferenceType && annotation.cascades().length != 0)\n throw new IllegalArgumentException(\"invalid \" + description + \": cascades() only allowed on reference fields\");\n if (!isReferenceType && annotation.inverseCascades().length != 0)\n throw new IllegalArgumentException(\"invalid \" + description + \": inverseCascades() only allowed on reference fields\");\n\n // Create simple, enum, enum array, or reference field\n try {\n return\n isReferenceType ?\n new JReferenceField(this.jdb, fieldName, storageId, fieldDescription, fieldTypeToken, annotation, getter, setter) :\n enumArrayType != null ?\n new JEnumArrayField(this.jdb, fieldName, storageId, enumType,\n enumArrayType, enumArrayDimensions, nonReferenceType, annotation, fieldDescription, getter, setter) :\n enumType != null ?\n new JEnumField(this.jdb, fieldName, storageId, enumType, annotation, fieldDescription, getter, setter) :\n new JSimpleField(this.jdb, fieldName, storageId, fieldTypeToken,\n nonReferenceType, annotation.indexed(), annotation, fieldDescription, getter, setter);\n } catch (IllegalArgumentException e) {\n throw new IllegalArgumentException(\"invalid \" + description + \": \" + e.getMessage(), e);\n }\n }", "public static boolean isSimpleType (Class c)\n\t{\n\t\treturn getSimpleTypes().contains(c);\n\t}", "@Override\r\n\tpublic void buildPart() {\n\t\t\r\n\t}", "public boolean visit(ComplexExtensionElement node) {\n return visit((CommonComplexModification)node);\n }", "InstrumentedType.WithFlexibleName represent(TypeDescription typeDescription);", "public static boolean isComplex(byte dataType) {\n return ((dataType == BAG) || (dataType == TUPLE) ||\n (dataType == MAP) || (dataType == INTERNALMAP));\n }", "@Override\n\tpublic void setPrimitiveAsString(boolean arg0) {\n\n\t}", "public void testComplex() throws Exception\n {\n QdoxModelBuilder builder = new QdoxModelBuilder();\n\n ClassLoader classLoader = this.getClass().getClassLoader();\n URL sourceUrl = classLoader\n .getResource(\"builder/complex/ComponentBase.java\");\n String parentDirName = new File(sourceUrl.getFile()).getParent();\n File parentDir = new File(parentDirName);\n List sourceDirs = new ArrayList();\n sourceDirs.add(parentDir.getAbsolutePath());\n\n Model model = new Model();\n model.setModelId(\"test\");\n ModelParams parameters = new ModelParams();\n parameters.setSourceDirs(sourceDirs);\n builder.buildModel(model, parameters);\n\n // basic sanity checks\n assertTrue(model.getComponents().size() > 0);\n\n // Now write it. Optionally, we could just write it to an in-memory\n // buffer.\n File outfile = new File(\"target/complex-out.xml\");\n IOUtils.saveModel(model, outfile);\n\n StringWriter outbuf = new StringWriter();\n IOUtils.writeModel(model, outbuf);\n\n compareData(outfile, \"builder/complex/goodfile.xml\");\n }", "public static boolean checkComplexDerivationOk(XSComplexTypeDecl derived, XSTypeDefinition base, short block) {\n/* 176 */ if (derived == SchemaGrammar.fAnyType)\n/* 177 */ return (derived == base); \n/* 178 */ return checkComplexDerivation(derived, base, block);\n/* */ }", "@Override\n public String getType() {\n return \"\";\n }", "int getSimpleType() {\n\t\treturn ((type / 1000)) * 1000;\n\t}", "TypeDescription validated();", "@Test\n public void serialSimpleTest(){\n\n byte b = 1;\n Object obj = new SimpleObject(1, 1.0, 1f, b);\n Document document = Serializer.serialize(obj);\n assertNotNull(document);\n\n assertNotNull(document.getRootElement());\n Element rootElement = document.getRootElement();\n assertTrue(rootElement.getName().equals(\"serialized\"));\n assertNotNull(rootElement.getChildren());\n\n List objList = rootElement.getChildren();\n assertNotNull(objList);\n assertNotNull(objList.get(0));\n\n Element objElement = (Element) objList.get(0);\n assertTrue(objElement.getName().equals(\"object\"));\n assertNotNull(objElement.getAttribute(\"class\"));\n assertNotNull(objElement.getAttribute(\"id\"));\n assertNull(objElement.getAttribute(\"length\"));\n assertEquals(\"0\", objElement.getAttributeValue(\"id\"));\n assertNotNull(objElement.getChildren());\n\n\n List objContents = objElement.getChildren();\n for (int i =0; i < objContents.size(); i++){\n Element contentElement = (Element) objContents.get(i);\n assertEquals(null, contentElement.getAttributeValue(\"declaringclass\"));\n assertNotNull(contentElement.getValue());\n\n if(contentElement.getName().equals(\"simpleInt\"))\n assertEquals(\"1\", contentElement.getValue());\n if(contentElement.getName().equals((\"simpleDouble\")))\n assertEquals(\"1.0\", contentElement.getValue());\n if(contentElement.getName().equals(\"simpleFloat\"))\n assertEquals(\"1\", contentElement.getValue());\n if(contentElement.getName().equals((\"simpleByte\")))\n assertEquals(\"1\", contentElement.getValue());\n }\n }", "public void testConstructorWithSingleDimensionComplexTypeArray() throws Exception {\r\n root\r\n .addChild(createArray(\"array1\", TYPE_OBJECT, \"1\", \"{object:ob1,object:ob2, object:ob1}\"));\r\n root.addChild(createObject(\"object:ob1\", TYPE_OBJECT));\r\n root.addChild(createObject(\"object:ob2\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n\r\n assertEquals(\"array1[0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), array1[0]);\r\n assertEquals(\"array1[1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), array1[1]);\r\n assertEquals(\"array1[2] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), array1[2]);\r\n }", "public Commande_structureSerializationTest(){\n }", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "public ComplexVariable(String name) {\n\t\tthis.name = name;\n\t}", "public static ComplexTypeMBean getComplexTypeMBeanforMaxFileSize()\n { \n return new ComplexTypeForMaxFileSize();\n }", "public BeanSimpleConverter() {\n super(BeanSimple.class);\n }", "@Test\r\n public void testParamterizedWithObject()\r\n {\r\n test(Types.create(List.class).withSubtypeOf(Object.class).build());\r\n }", "public boolean isComplexCollection() {\n return m_complexCollection;\n }", "public static void objectDemo() {\n\t}", "protected ObjectRepresentant (Object counterPart, TypeSystemNode type, String name) {\r\n this.counterPart = counterPart;\r\n if (name!=null) {\r\n setName(name);\r\n }\r\n else {\r\n setName(\"this\");\r\n }\r\n typeSystemNode = type;\r\n System.out.println(this+\" value: \"+value());\r\n }", "public final EObject ruleDataType() throws RecognitionException {\n EObject current = null;\n\n EObject this_SimpleDataType_0 = null;\n\n EObject this_ComplexDataType_1 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4350:28: ( (this_SimpleDataType_0= ruleSimpleDataType | this_ComplexDataType_1= ruleComplexDataType ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4351:1: (this_SimpleDataType_0= ruleSimpleDataType | this_ComplexDataType_1= ruleComplexDataType )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4351:1: (this_SimpleDataType_0= ruleSimpleDataType | this_ComplexDataType_1= ruleComplexDataType )\n int alt43=2;\n int LA43_0 = input.LA(1);\n\n if ( ((LA43_0>=70 && LA43_0<=72)) ) {\n alt43=1;\n }\n else if ( (LA43_0==73) ) {\n alt43=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 43, 0, input);\n\n throw nvae;\n }\n switch (alt43) {\n case 1 :\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4352:5: this_SimpleDataType_0= ruleSimpleDataType\n {\n \n newCompositeNode(grammarAccess.getDataTypeAccess().getSimpleDataTypeParserRuleCall_0()); \n \n pushFollow(FOLLOW_ruleSimpleDataType_in_ruleDataType9799);\n this_SimpleDataType_0=ruleSimpleDataType();\n\n state._fsp--;\n\n \n current = this_SimpleDataType_0; \n afterParserOrEnumRuleCall();\n \n\n }\n break;\n case 2 :\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4362:5: this_ComplexDataType_1= ruleComplexDataType\n {\n \n newCompositeNode(grammarAccess.getDataTypeAccess().getComplexDataTypeParserRuleCall_1()); \n \n pushFollow(FOLLOW_ruleComplexDataType_in_ruleDataType9826);\n this_ComplexDataType_1=ruleComplexDataType();\n\n state._fsp--;\n\n \n current = this_ComplexDataType_1; \n afterParserOrEnumRuleCall();\n \n\n }\n break;\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public Object echoObject3(ServerCustomType customType) {\n return customType;\n }", "public void setContentObj(String contentObj) {\n this.contentObj = contentObj;\n }", "public boolean isEmptyComplexValue() {\r\n if(complexValue==null){\r\n return true;\r\n }\r\n return complexValue.isEmpty();\r\n }", "public sym_complex_enum() {\n }", "@Test\r\n\tpublic void testComplexArrayProperty() throws Exception {\r\n\t\tAdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tXMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider.getInstance()\r\n\t\t\t\t.getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\t// Retreiving value of complex property.\r\n\t\tProperty subProperty = container.getProperty(\"complexArrayProperty[0].intProperty\");\r\n\t\tsubProperty.setValue(0);\r\n\t\tassertNotNull(subProperty);\r\n\r\n\t\t// Attaching monitor to the property.\r\n\t\tPropertyMonitorStub monitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexArrayProperty[0].intProperty\", monitor);\r\n\t\tsubProperty.setValue(1);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexArrayProperty[0].intProperty\", monitor);\r\n\r\n\t\t// Attaching monitor only to \"complexArrayProperty\"\r\n\t\tmonitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexArrayProperty\", monitor);\r\n\t\tsubProperty.setValue(0);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexArrayProperty\", monitor);\r\n\r\n\t\t// The monitor should not get the message now.\r\n\t\tsubProperty.setValue(1);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t}", "public org.apache.xmlbeans.impl.xb.xsdschema.LocalSimpleType addNewSimpleType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.LocalSimpleType target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.LocalSimpleType)get_store().add_element_user(SIMPLETYPE$0);\n return target;\n }\n }", "public void addGeneralEncapsulatedObject(DataObject value) {\r\n\t\tBase.add(this.model, this.getResource(), GENERALENCAPSULATEDOBJECT, value);\r\n\t}", "public interface ComplexDataObjectParser extends IKeyValueObjectParser<Object, ComplexDataObject> {\r\n\r\n}", "@Override\r\n\tpublic boolean isStructure() {\n\t\treturn false;\r\n\t}", "public boolean visit(ComplexRestrictionElement node) {\n return visit((CommonComplexModification)node);\n }", "@Test\n\tpublic void testComplex() throws JDOMException, IOException {\n\t\tSAXBuilder sb = new SAXBuilder();\n\t\tsb.setExpandEntities(false);\n\t\tDocument doc = sb.build(FidoFetch.getFido().getURL(\"/complex.xml\"));\n\t\tfinal Iterator<Content> des = doc.getDescendants();\n\t\tfinal ArrayList<NamespaceAware> allc = new ArrayList<NamespaceAware>();\n\t\tfinal XPathFactory fac = getFactory();\n\t\twhile (des.hasNext()) {\n\t\t\tfinal Content c = des.next();\n//\t\t\tif (c.getParent() == doc && c != doc.getRootElement()) {\n//\t\t\t\t// ignore document level content (except root element.\n//\t\t\t\tcontinue;\n//\t\t\t}\n\t\t\tcheckAbsolute(fac, c);\n\t\t\tallc.add(c);\n\t\t\tif (c instanceof Element) {\n\t\t\t\tif (((Element) c).hasAttributes()) {\n\t\t\t\t\tfor (Attribute a : ((Element)c).getAttributes()) {\n\t\t\t\t\t\tcheckAbsolute(fac, a);\n\t\t\t\t\t\tallc.add(a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (NamespaceAware nsa : allc) {\n\t\t\tfor (NamespaceAware nsb : allc) {\n\t\t\t\tcheckRelative(fac, nsa, nsb);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "@Override\n public void setObjectType(String type) {\n this.objectType = type;\n }", "public void testSimpleTypeMapping() throws MPXJException {\n TaskManager taskManager = getTaskManager();\n CustomPropertyDefinition col1 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(String.class), \"col1\", null);\n CustomPropertyDefinition col2 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Boolean.class), \"col2\", null);\n CustomPropertyDefinition col3 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"col3\", null);\n CustomPropertyDefinition col4 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Double.class), \"col4\", null);\n CustomPropertyDefinition col5 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(GanttCalendar.class), \"col5\", null);\n\n Map<CustomPropertyDefinition, FieldType> mapping = CustomPropertyMapping.buildMapping(taskManager);\n assertEquals(TaskField.TEXT1, mapping.get(col1));\n assertEquals(TaskField.FLAG1, mapping.get(col2));\n assertEquals(TaskField.NUMBER1, mapping.get(col3));\n assertEquals(TaskField.NUMBER2, mapping.get(col4));\n assertEquals(TaskField.DATE1, mapping.get(col5));\n }", "private static boolean checkComplexDerivation(XSComplexTypeDecl derived, XSTypeDefinition base, short block) {\n/* 238 */ if (derived == base) {\n/* 239 */ return true;\n/* */ }\n/* */ \n/* 242 */ if ((derived.fDerivedBy & block) != 0) {\n/* 243 */ return false;\n/* */ }\n/* */ \n/* 246 */ XSTypeDefinition directBase = derived.fBaseType;\n/* */ \n/* 248 */ if (directBase == base) {\n/* 249 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 253 */ if (directBase == SchemaGrammar.fAnyType || directBase == SchemaGrammar.fAnySimpleType)\n/* */ {\n/* 255 */ return false;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 260 */ if (directBase.getTypeCategory() == 15) {\n/* 261 */ return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);\n/* */ }\n/* */ \n/* 264 */ if (directBase.getTypeCategory() == 16) {\n/* */ \n/* 266 */ if (base.getTypeCategory() == 15)\n/* */ {\n/* */ \n/* 269 */ if (base == SchemaGrammar.fAnyType) {\n/* 270 */ base = SchemaGrammar.fAnySimpleType;\n/* */ } else {\n/* 272 */ return false;\n/* */ } } \n/* 274 */ return checkSimpleDerivation((XSSimpleType)directBase, (XSSimpleType)base, block);\n/* */ } \n/* */ \n/* */ \n/* 278 */ return false;\n/* */ }", "public InsulinType(){\n super();\n }", "public boolean isComplex() { throw new RuntimeException(\"Stub!\"); }", "private ComplexMessage(Builder builder) {\n super(builder);\n }" ]
[ "0.6711864", "0.61490756", "0.5977668", "0.5956424", "0.5812093", "0.5657462", "0.5565166", "0.5532274", "0.5491002", "0.54776937", "0.5437474", "0.5400474", "0.53920513", "0.53572357", "0.53569716", "0.53404546", "0.5336324", "0.53337544", "0.5316224", "0.52471876", "0.52443814", "0.5237444", "0.5223975", "0.521284", "0.51904625", "0.5181914", "0.51700616", "0.5163017", "0.5159726", "0.51509964", "0.5148165", "0.5127184", "0.5119928", "0.5100055", "0.5007667", "0.5002824", "0.49991766", "0.49866566", "0.49687445", "0.49401003", "0.49399966", "0.49392793", "0.49357396", "0.49246642", "0.49137232", "0.49086764", "0.49033204", "0.48923677", "0.48914558", "0.48829594", "0.4879182", "0.48770782", "0.48659962", "0.48589322", "0.48515037", "0.48437437", "0.48399255", "0.48385653", "0.48381492", "0.482927", "0.48258898", "0.48078927", "0.4803054", "0.47955194", "0.47950345", "0.4791707", "0.4784051", "0.4774594", "0.47742218", "0.4773775", "0.4767045", "0.47602013", "0.4751166", "0.47380835", "0.47346222", "0.47232565", "0.47071576", "0.47062373", "0.46991873", "0.46977943", "0.46952888", "0.46949226", "0.4694454", "0.46821848", "0.46747354", "0.46723196", "0.4669476", "0.4666567", "0.46635348", "0.46635324", "0.46575955", "0.4657364", "0.46555766", "0.46449566", "0.4644015", "0.46432808", "0.46352595", "0.46347573", "0.46337208", "0.46242905" ]
0.68244946
0
Invoked to begin a sequence.
void startSequence(GroupSG group) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Sequence createSequence();", "@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}", "public void begin() {}", "public SequenceImpl() {\n super();\n initSequence();\n }", "public void start( )\n {\n // Implemented by student.\n }", "public Sequence(){\r\n \r\n }", "protected void sequence_Compilation_initial(ISerializationContext context, Compilation_initial semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public void playSequence() {\n sequence.play(seq);\n }", "@Override\n\tpublic void beginGeneration() {\n\t\tfor(int seqIndex = 0; seqIndex < NUM_SEQUENCES; ++seqIndex) {\n\t\t\tfor(int pieceIndex = 0; pieceIndex < SEQUENCE_LENGTH; ++pieceIndex) {\n\t\t\t\tsequences[seqIndex][pieceIndex] = random.nextInt(State.N_PIECES);\n\t\t\t}\n\t\t}\n\t}", "protected void sequence_Sequence(ISerializationContext context, Sequence semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public void beginCall() {\n yielding = false;\n\n currentFrame++;\n if(currentFrame >= frames.length) {\n ensureSize(frames.length * 2);\n frames[currentFrame] = null;\n\n programCounter = -1;\n } else {\n ExecutionFrame frame = getCurrentFrame();\n if(frame == null) {\n programCounter = -1;\n } else {\n programCounter = frame.programCounter;\n }\n }\n }", "ISequence sequence();", "private void presentShowcaseSequence() {\n }", "@Override\n\t\tpublic void beginTask(String arg0, int arg1) {\n\n\t\t}", "public Sequence(){\n\n }", "@Override\n public void onSequenceFinish() {\n // Yay\n }", "Sequence() {\r\n // this helps with converting bytes back to a string.\r\n }", "public void setSequence(String sequence) {\r\n this.sequence = sequence;\r\n }", "protected void sequence_Declaration(ISerializationContext context, Declaration semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public void setSequence(Integer sequence) {\n this.sequence = sequence;\n }", "public Sequence(String title) { this(title, new Vector<Step>(), \"\"); }", "protected void sequence_Declaration(ISerializationContext context, Declaration semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "SequenceFlow createSequenceFlow();", "public void beginTask(String tr, int i) {\n\t\t\n\t}", "int getSeq();", "int getSeq();", "int getSeq();", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "protected void sequence_Source1(ISerializationContext context, Source1 semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public void beginTask(String tr) {\n\t\t\n\t}", "void setSequenceNumber(int sequenceNumber);", "public Sequence(int id) {\n this.id = id;\n }", "public void start() {\n\t\tSystem.out.println(\"parent method\");\n\t}", "void start() {\n \tm_e.step(); // 1, 3\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public ItemSequence(final int start) {\n\t\tlookupPrefix = null;\n\t\tsequenceStartNumber = start;\n\t\tcurrentSequenceNumber = Integer.MIN_VALUE;\n\t}", "public void beforeFirst() {\n\t\tmoveTo(0);\n\t}", "public void onBegin() {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "FlowSequence createFlowSequence();", "public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}", "protected void sequence_Signature(ISerializationContext context, Signature semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "@Override\n public void onStart(boolean fromBeginning)\n {\n if(fromBeginning)\n {\n System.out.println(mLabel + \" Started!\");\n }\n else\n {\n System.out.println(mLabel + \" resumed\");\n }\n }", "void requestSequenceNumber() {\r\n\t\t// 부모가 가지고있는 메시지의 순서번호(시작 ~ 끝)를 요청 \r\n\t}", "public TestSequence() {\n }", "protected void sequence_Agent(ISerializationContext context, Agent semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public SequenceNumberTest() {}", "public void start( )\r\n {\r\n if (cursor != head){\r\n \t cursor = head; // Implemented by student.\r\n \t precursor = null;\r\n }\r\n }", "public final void setSequence(java.lang.Integer sequence)\r\n\t{\r\n\t\tsetSequence(getContext(), sequence);\r\n\t}", "void receiveSequenceNumber() {\r\n\t\t\r\n\t}", "protected void sequence_StateMachine(ISerializationContext context, StateMachine semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "void setSeq(long seq) {\n this.seq = seq;\n }", "protected void sequence_SimpleAction(ISerializationContext context, SimpleAction semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "protected void sequence_Expression(ISerializationContext context, Expression semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "protected void resetSequence() {\n doQuery(\"ALTER SEQUENCE feedentryqueue_id_seq RESTART\");\n }", "protected void sequence_Task(ISerializationContext context, Task semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "@Override\n\tvoid start() {\n\t\tSystem.out.println(\"starts\");\n\t}", "public SequenceRegion sequencesBefore(Sequence sequence) {\n\tthrow new PasseException();\n/*\nudanax-top.st:15743:SequenceSpace methodsFor: 'smalltalk: passe'!\n{SequenceRegion} sequencesBefore: sequence {Sequence}\n\t\"Essential. All sequences less than or equal to the given sequence.\n\tShould this just be supplanted by CoordinateSpace::region ()?\"\n\t\n\tself passe.\n\t^SequenceRegion usingx: true\n\t\twith: (PrimSpec pointer arrayWith: (AfterSequence make: sequence))!\n*/\n}", "public abstract void started();", "protected void sequence_PrimaryExpr(ISerializationContext context, PrimaryExpr semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public abstract int start(int i);", "public start() {\n\t\tsuper();\n\t}", "public int getSequence() {\n return sequence;\n }", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n public void start() { }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }", "@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }", "public void Done(int seq) {\n // Your code here\n }", "public String getSequence()\r\n\t{\r\n\t\treturn sequence;\r\n\t}", "protected void sequence_Objective(ISerializationContext context, Objective semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "@Override\n\tpublic void start() {\n\n\t}", "public void setSequenceNumber(int sequence) {\n\t\tfSequenceNumber= sequence;\n\t}", "public void tableStarted(int position) {\r\n }", "protected void beginExecution() {\r\n\t\tframeAdvancer = provideFrameAdvancer();\r\n\t\tanimation = provideAnimation();\r\n\t\tcontinuation = provideContinuationPredicate();\r\n\t\tObjects.requireNonNull(frameAdvancer);\r\n\t\tObjects.requireNonNull(animation);\r\n\t\tObjects.requireNonNull(continuation);\r\n\t}", "void start(String meta);", "@Override\r\n\tpublic void tellStarting() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t\t// Not used here\r\n\t}", "protected void sequence_ExecutionElement(ISerializationContext context, ExecutionElement semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "@Override\n public void start() {}", "public SequenceImpl(XMLDocument d) {\n super(d);\n initSequence();\n }", "@Override\r\n public void start() {\r\n }", "public void start() {}", "public void start() {}", "void keySequencePassed();", "protected void sequence_Statement(ISerializationContext context, Statement semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public int start() { return _start; }", "public SequenceFasta(){\n description = null;\n\t sequence = null;\n\t}", "public void startRecord() {\n\t\tcmd = new StartRecordCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "public void start() {\n start(mRangeStart, mRange, mIsPositive);\n }", "void moveToStart();", "abstract public void startFunction();", "protected void sequence_Regola(ISerializationContext context, Regola semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public ItemSequence(final String prefix, final int start) {\n\t\tlookupPrefix = prefix;\n\t\tsequenceStartNumber = start;\n\t\tcurrentSequenceNumber = Integer.MIN_VALUE;\n\t}", "public void startPosition();" ]
[ "0.6995613", "0.6967453", "0.68074906", "0.67598444", "0.6707172", "0.6700821", "0.66318035", "0.650013", "0.6498856", "0.6454672", "0.64240605", "0.63974917", "0.6336758", "0.6313771", "0.62947917", "0.61987215", "0.6188553", "0.61505103", "0.61479366", "0.6143264", "0.61307234", "0.61266065", "0.6082142", "0.60701907", "0.6058566", "0.6058566", "0.6058566", "0.6048685", "0.6048685", "0.6048685", "0.60228825", "0.6014131", "0.60122454", "0.5998174", "0.5989382", "0.5986893", "0.59848857", "0.59797055", "0.5973966", "0.5968315", "0.5953918", "0.5947477", "0.5941606", "0.5914721", "0.5913568", "0.59083825", "0.5905178", "0.58929414", "0.58921444", "0.5863484", "0.5837411", "0.58370084", "0.58329564", "0.58052415", "0.57965463", "0.57948536", "0.5794082", "0.57914144", "0.5789145", "0.57814425", "0.57744783", "0.57536197", "0.5751991", "0.57483894", "0.57442373", "0.5741493", "0.5741493", "0.5741493", "0.5741493", "0.57358396", "0.5734032", "0.5734032", "0.5719665", "0.5719665", "0.5707664", "0.56982195", "0.5692769", "0.5688477", "0.5684974", "0.568286", "0.5680765", "0.5674902", "0.5674338", "0.56732893", "0.56656885", "0.56656426", "0.56636566", "0.5662283", "0.5662283", "0.5657531", "0.56565267", "0.56549746", "0.5652741", "0.5651569", "0.56505096", "0.5645537", "0.56442", "0.56434137", "0.56426316", "0.56417155" ]
0.56529504
92
Invoked to end a sequence.
void endSequence(GroupSG group) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void end();", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "public void end() {\n\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "public abstract void end();", "@Override\n\tpublic void end() {\n\t\t\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "@Override\n public void end() {\n }", "protected void end() {\n \t// theres nothing to end\n }", "protected void end()\n\t{\n\t}", "protected void end() {\n \n \n }", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "protected abstract boolean end();", "protected void end() {\n\r\n\t}", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void end() {\r\n\t}", "@Override\n\tprotected void end() {\n\t\t\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n protected void end() {\n }", "protected void end() {\n \tclimber.ascend(0, 0);\n }", "public void end() {\n\t\tsigue = false;\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "public void end() throws Exception;", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\n protected void end() {\n\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\n\tpublic void end() {\n\t\t// Empty on purpose, no cleanup required yet\n\t}", "protected void end() {\n \tSystem.out.println(\"end ReturnToStart\");\n }", "@Override\n\tprotected void end() {\n\t\t//System.out.println(this.getClass().getSimpleName() + \" end\");\n\t}", "public T end() {\n return end;\n }", "protected void end() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" ending\");\r\n\t\t }", "public void Done(int seq) {\n // Your code here\n }", "protected void end() {\n \twrist.rotateWrist(0);\n }", "protected void end() {\n isFinished();\n }", "@Override\n protected void end() {\n \n }", "public interface EndSequenceEventListener {\n void sequenceEnd();\n}", "protected void end()\n\t{\n\t\tstop();\n\t}", "public int end() {\n return end;\n }", "public abstract void endRecord();", "public void endCommand();", "protected void end() {\n Robot.arm.moveArm(0, 1);\n }", "protected void end() {\r\n // stop motor, reset position on the dumper, enable closed loop\r\n }", "void endGeneration();" ]
[ "0.76306266", "0.7522459", "0.750901", "0.750901", "0.750901", "0.750901", "0.7503626", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7499137", "0.7473795", "0.7455439", "0.7425967", "0.7425967", "0.7425967", "0.7425967", "0.7425967", "0.7425967", "0.74029845", "0.7402921", "0.7385892", "0.7385266", "0.7373517", "0.7373517", "0.7363953", "0.7295953", "0.7277499", "0.72696114", "0.7230468", "0.7221525", "0.7221525", "0.7221525", "0.7221525", "0.7204742", "0.71956974", "0.7167758", "0.71327823", "0.71327823", "0.71327823", "0.7117996", "0.7085577", "0.7085577", "0.70525837", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.70473915", "0.7005145", "0.6955323", "0.6924448", "0.6920749", "0.68838596", "0.6821125", "0.67978215", "0.6789439", "0.6746189", "0.6741075", "0.6710554", "0.6700807", "0.66694856", "0.6660189", "0.66551435", "0.66310364", "0.6626756", "0.66106015" ]
0.0
-1
Invoked to start a choice group.
void startChoice(GroupSG group) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CreateGroup() {\n initComponents();\n start();\n }", "public final void rule__Choice__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8416:1: ( ( () ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8417:1: ( () )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8417:1: ( () )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8418:1: ()\n {\n before(grammarAccess.getChoiceAccess().getChoiceLeftAction_1_0()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8419:1: ()\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8421:1: \n {\n }\n\n after(grammarAccess.getChoiceAccess().getChoiceLeftAction_1_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tpublic void provideInitialChoice() throws RemoteException {\n\t\tgamePane.showAsStatus(\"Please choose your figure to decide who starts\");\n\t\tgamePane.showInitialChoicePane();\n\t}", "public void run()\n {\n getMenuChoice();\n }", "@Override\n public void initDefaultCommand() {\n setDefaultCommand(new GroupIntakeDefault());\n }", "public final void rule__Choice__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8404:1: ( rule__Choice__Group_1__0__Impl rule__Choice__Group_1__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8405:2: rule__Choice__Group_1__0__Impl rule__Choice__Group_1__1\n {\n pushFollow(FOLLOW_rule__Choice__Group_1__0__Impl_in_rule__Choice__Group_1__016470);\n rule__Choice__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Choice__Group_1__1_in_rule__Choice__Group_1__016473);\n rule__Choice__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Choice__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8343:1: ( rule__Choice__Group__0__Impl rule__Choice__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8344:2: rule__Choice__Group__0__Impl rule__Choice__Group__1\n {\n pushFollow(FOLLOW_rule__Choice__Group__0__Impl_in_rule__Choice__Group__016349);\n rule__Choice__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Choice__Group__1_in_rule__Choice__Group__016352);\n rule__Choice__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void start () {\n int choice = NO_CHOICE;\n while (choice != EXIT) {\n displayMainMenu();\n choice = readIntWithPrompt(\"Enter choice: \");\n executeChoice(choice);\n }\n }", "public final void rule__Choice__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8435:1: ( rule__Choice__Group_1__1__Impl rule__Choice__Group_1__2 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8436:2: rule__Choice__Group_1__1__Impl rule__Choice__Group_1__2\n {\n pushFollow(FOLLOW_rule__Choice__Group_1__1__Impl_in_rule__Choice__Group_1__116531);\n rule__Choice__Group_1__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Choice__Group_1__2_in_rule__Choice__Group_1__116534);\n rule__Choice__Group_1__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@FXML\n\tprivate void createGroup(ActionEvent event){\n\t\tif(subgroup_menu.getValue().equals(\"--- INGEN ---\")){\n\t\t\tif(GroupName_field.getText().equals(\"\")){\n\t\t\t\tmakeDialog(\"Du må gi gruppen et navn.\");\n\t\t\t} else {\n\t\t\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\t\tdb.setGroup(GroupName_field.getText(), findInvited());\n\t\t\t\tStage stage = (Stage) create_btn.getScene().getWindow();\n\t\t\t stage.close();\n\t\t\t}\n\t//-------This kicks in if a user chose a group in the dropdown menu-----\\\\\n\t\t} else {\n\t\t\tif(GroupName_field.getText().equals(\"\")){\n\t\t\t\tmakeDialog(\"Du må gi gruppen et navn.\");\n\t\t\t} else {\n\t\t\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\t\tString supergroup_name = (String) subgroup_menu.getValue();\n\t\t\t\tint SubGroupId = db.setGroup(GroupName_field.getText(), findInvited()).getGroup_id();\n\t\t\t\tint SuperGroupId = getSupergroupID(supergroup_name);\n\t\t\t\tdb.setSubGroup(SuperGroupId, SubGroupId);\n\t\t\t\tStage stage = (Stage) create_btn.getScene().getWindow();\n\t\t\t stage.close();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t\tselectedAutonomousCommand = new AutoModeCommandGroup(autoChooser.getSelected());\n\t\tif (selectedAutonomousCommand!=null) {\n\t\t\tselectedAutonomousCommand.start();\n\t\t}\n\t}", "public final void rule__Choice__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8372:1: ( rule__Choice__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8373:2: rule__Choice__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__Choice__Group__1__Impl_in_rule__Choice__Group__116408);\n rule__Choice__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Choice__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8383:1: ( ( ( rule__Choice__Group_1__0 )* ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8384:1: ( ( rule__Choice__Group_1__0 )* )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8384:1: ( ( rule__Choice__Group_1__0 )* )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8385:1: ( rule__Choice__Group_1__0 )*\n {\n before(grammarAccess.getChoiceAccess().getGroup_1()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8386:1: ( rule__Choice__Group_1__0 )*\n loop44:\n do {\n int alt44=2;\n int LA44_0 = input.LA(1);\n\n if ( (LA44_0==30) ) {\n alt44=1;\n }\n\n\n switch (alt44) {\n \tcase 1 :\n \t // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8386:2: rule__Choice__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__Choice__Group_1__0_in_rule__Choice__Group__1__Impl16435);\n \t rule__Choice__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop44;\n }\n } while (true);\n\n after(grammarAccess.getChoiceAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmFaceManager.createGroup(\"first_group\");\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}", "@Override\n public void addChoice(){\n System.out.println(\"Chocolate cake size: \");\n //print out choice\n choice.addChoice();\n }", "void start(String option);", "@Override\n\tpublic void addChoice(String choice) {\n\t}", "public final void rule__Choice__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8447:1: ( ( '+' ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8448:1: ( '+' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8448:1: ( '+' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8449:1: '+'\n {\n before(grammarAccess.getChoiceAccess().getPlusSignKeyword_1_1()); \n match(input,30,FOLLOW_30_in_rule__Choice__Group_1__1__Impl16562); \n after(grammarAccess.getChoiceAccess().getPlusSignKeyword_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void run(){\n int selection = -1;\n super.myConsole.listOptions(menuOptions);\n selection = super.myConsole.getInputOption(menuOptions);\n branchMenu(selection);\n }", "@Override\n\tpublic void startRadio() {\n\t\tSystem.out.println(\"Radio started...\");\t\t\n\t}", "public void beginSelection()\n {\n\tisMultiSelection = true;\n\tsetMaxCheckCount(-1);\n }", "@Override\n public void autonomousInit() {\n\n autonomousCommand = new Autonomous(start.getSelected(), chooser.getSelected());\n \n autonomousCommand.start();\n }", "@Override\n\tpublic void start() {\n\t\tsendOptionsDialogue(\"Achievement cape stand\", \"List requirements\",\n\t\t\t\t\"Max cape\", \"Completionist cape\", \"Trimmed completionist\");\n\t}", "private void loadGroups(){\n ArrayAdapter<String> groupAdaptor = new ArrayAdapter<>(getApplicationContext(),\n android.R.layout.simple_spinner_item, groupsCurrent);\n // Drop down layout style - list view with radio button\n groupAdaptor.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerGroups.setAdapter(groupAdaptor);\n }", "public void start() {\n\t\tinitializeComponents();\r\n\r\n\t\tint userChoice;\r\n\r\n\t\tdo {\r\n\t\t\t// Display start menu\r\n\t\t\tview.displayMainMenu();\r\n\r\n\t\t\t// Get users choice\r\n\t\t\tuserChoice = view.requestUserChoice();\r\n\r\n\t\t\t// Run the respective service\r\n\t\t\tswitch (userChoice) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tservice.register();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tservice.login();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tservice.forgotPassword();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tservice.logout();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tservice.displayAllUserInfo(); // Secret method\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"Invalid choice\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (userChoice != 4);\r\n\t}", "public void chooseYourMode(){\r\n ActionHandlers.ChooseModeHandler chooseModeHandler = (s) -> {\r\n try {\r\n choice.put(s);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n };\r\n runLater(() -> main.run(chooseModeHandler));\r\n }", "private void groupSearchActivity() {\n startActivity(new Intent(CreateGroup.this, AutoCompleteGroupSearch.class));\n }", "public void autonomousInit() {\n autonomousCommand = (Command) autoChooser.getSelected();\n autonomousCommand.start();\n// \n }", "private void createGrpClinicSelection() {\n\n\t}", "public void setPlayerChoice(){\n\t\tthis.setAlignment(Pos.CENTER);\n\t\tthis.getChildren().clear();\n\t\tthis.getChildren().add(playerChoice);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tIntent i;\n\t\tswitch (id){\n\t\tcase 1:\n\t\t\ti=new Intent(this, CreateGroup.class);\n\t\t\tstartActivity(i);\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "public StartPanel(JFrame theFrame, Group theGroup) {\n super();\n\n myFrame = theFrame;\n myGroup = theGroup;\n\n setup();\n }", "public final void rule__Parallel__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8198:1: ( ( ruleChoice ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8199:1: ( ruleChoice )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8199:1: ( ruleChoice )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8200:1: ruleChoice\n {\n before(grammarAccess.getParallelAccess().getChoiceParserRuleCall_0()); \n pushFollow(FOLLOW_ruleChoice_in_rule__Parallel__Group__0__Impl16072);\n ruleChoice();\n\n state._fsp--;\n\n after(grammarAccess.getParallelAccess().getChoiceParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void createControl() {\n Button button1 = new Button(getShell(), SWT.PUSH);\n button1.setText(\"PolicyValueSelectionDialog with valid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog1 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy1\", selectionElement1);\n button1.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog1.open();\n String[] results = (String[]) dialog1.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n dialog1.setInitialSelections(new String[]{\"choice7\", \"choice3\"});\n\n Button button2 = new Button(getShell(), SWT.PUSH);\n button2.setText(\"PolicyValueSelectionDialog with invalid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog2 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy2\", selectionElement2);\n button2.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog2.open();\n String[] results = (String[]) dialog2.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n\n\n }", "@Override\n public void onClick(View paramView) {\n\n if (!etGroup.getText().toString().equals(\"\")) {\n inputDialog.dismiss();\n String groupName = etGroup.getText().toString();\n inputGroupName = groupName;\n processAddGroup(chosenRunner, groupName);\n }\n }", "public void run(int choice) {\n\t\tswitch(choice) {\n\t\tcase 0:\n\t\t\tthis.startBook();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tthis.home();\n\t\t\tbreak;\n\t\t}\n\t}", "public void start() {\n dialogContainer.getChildren().addAll(\n DialogBox.getDukeDialog(Messages.START, dukeImage)\n );\n }", "public void populateChoiceBoxes() {\n subjects.setItems(FXCollections.observableArrayList(\"Select\", \"computers\", \"not-computers\", \"subjects\"));\n className.setItems(FXCollections.observableArrayList(\"Select\", \"101\", \"202\", \"303\", \"505\"));\n subjects.getSelectionModel().select(0);\n className.getSelectionModel().select(0);\n this.points.setPromptText(Integer.toString(100));\n\n }", "public void clickOnNewGroupButton()\n\t{\n\t\twaitForElement(newGroupButton);\n\t\tclickOn(newGroupButton);\n\t}", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonGroupChoice = new javax.swing.ButtonGroup();\n jGTILabelCaption = new de.unisiegen.gtitool.ui.swing.JGTILabel();\n jGTIPanelChoice = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIRadioButtonRegularGrammar = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();\n jGTIRadioButtonContextFreeGrammar = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();\n jGTIPanelColumn0 = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIPanelButtons = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIButtonPrevious = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n jGTIButtonNext = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n jGTIButtonCancel = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n\n setLayout(new java.awt.GridBagLayout());\n\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\"); // NOI18N\n jGTILabelCaption.setText(bundle.getString(\"NewDialog.ChooseGrammar\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 16, 5, 16);\n add(jGTILabelCaption, gridBagConstraints);\n\n buttonGroupChoice.add(jGTIRadioButtonRegularGrammar);\n jGTIRadioButtonRegularGrammar.setSelected(true);\n jGTIRadioButtonRegularGrammar.setText(bundle.getString(\"NewDialog.RG\")); // NOI18N\n jGTIRadioButtonRegularGrammar.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jGTIRadioButtonRegularGrammarItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);\n jGTIPanelChoice.add(jGTIRadioButtonRegularGrammar, gridBagConstraints);\n\n buttonGroupChoice.add(jGTIRadioButtonContextFreeGrammar);\n jGTIRadioButtonContextFreeGrammar.setText(bundle.getString(\"NewDialog.CFG\")); // NOI18N\n jGTIRadioButtonContextFreeGrammar.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jGTIRadioButtonContextFreeGrammarItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);\n jGTIPanelChoice.add(jGTIRadioButtonContextFreeGrammar, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);\n add(jGTIPanelChoice, gridBagConstraints);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);\n add(jGTIPanelColumn0, gridBagConstraints);\n\n jGTIButtonPrevious.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.PreviousMnemonic\").charAt(0));\n jGTIButtonPrevious.setText(bundle.getString(\"NewDialog.Previous\")); // NOI18N\n jGTIButtonPrevious.setToolTipText(bundle.getString(\"NewDialog.PreviousToolTip\")); // NOI18N\n jGTIButtonPrevious.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonPreviousActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);\n jGTIPanelButtons.add(jGTIButtonPrevious, gridBagConstraints);\n\n jGTIButtonNext.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.NextMnemonic\").charAt(0));\n jGTIButtonNext.setText(bundle.getString(\"NewDialog.Next\")); // NOI18N\n jGTIButtonNext.setToolTipText(bundle.getString(\"NewDialog.NextToolTip\")); // NOI18N\n jGTIButtonNext.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonNextActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);\n jGTIPanelButtons.add(jGTIButtonNext, gridBagConstraints);\n\n jGTIButtonCancel.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.CancelMnemonic\").charAt(0));\n jGTIButtonCancel.setText(bundle.getString(\"NewDialog.Cancel\")); // NOI18N\n jGTIButtonCancel.setToolTipText(bundle.getString(\"NewDialog.CancelToolTip\")); // NOI18N\n jGTIButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonCancelActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jGTIPanelButtons.add(jGTIButtonCancel, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 16, 16);\n add(jGTIPanelButtons, gridBagConstraints);\n }", "private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void clickOnGroupNameDropdownButton() {\r\n\t\tsafeClick(vehicleLinkPath.replace(\"ant-card-head-title\", \"ant-select ant-select-enabled\"), MEDIUMWAIT);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_choise_group);\n\n buttonNext = (Button) findViewById(R.id.buttonNext);\n buttonNext.setOnClickListener(this);\n buttonNext.setEnabled(false);\n buttonNext.setBackgroundColor(0xFFF4F4F4);\n\n //аdapter of faculty\n ArrayAdapter<String> adapterFaculty = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, faculty);\n adapterFaculty.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n Spinner spinnerFaculty = (Spinner) findViewById(R.id.spinnerFaculty);\n spinnerFaculty.setAdapter(adapterFaculty);\n //set of the click handler\n spinnerFaculty.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n faculty_position = position;\n test_can();\n }\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }\n });\n\n //adapter for klass\n ArrayAdapter<String> adapterKlass = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, klass);\n adapterKlass.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n Spinner spinnerKlass = (Spinner) findViewById(R.id.spinnerKlass);\n spinnerKlass.setAdapter(adapterKlass);\n //set of the click handler\n spinnerKlass.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n klass_position = position;\n test_can();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }\n });\n\n\n myDbHelper = new DatabaseHelper(ChoiceGroupActivity.this);\n try {\n myDbHelper.createDataBase();\n } catch (IOException ioe) {\n throw new Error(\"Unable to create database\");\n }\n try {\n myDbHelper.openDataBase();\n } catch (SQLException sqle) {\n throw sqle;\n }\n\n spinnerGroup = (Spinner) findViewById(R.id.spinnerGroup);\n sampleOfGroups();\n setSpinnerGroup();\n spinnerGroup.setEnabled(false);\n\n }", "public FlxRadioButtonGroup()\n\t{\n\t\tthis(0);\n\t}", "public void addFormChoice(Element parent, ChoiceType type, int count, String label, List<Option> options) {\r\n\t\tElement choiceItem = mDocument.createElement(\"IppChoiceGroup\");\r\n\t\tchoiceItem.setAttribute(\"Type\", type.toString());\r\n\t\tchoiceItem.setAttribute(\"Count\", String.valueOf(count));\r\n\t\tparent.appendChild(choiceItem);\r\n\r\n\t\taddTextNode(choiceItem, \"Label\", label);\r\n\r\n\t\taddSingleOptions(choiceItem, options);\r\n\t}", "public final void rule__Choice__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8466:1: ( rule__Choice__Group_1__2__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8467:2: rule__Choice__Group_1__2__Impl\n {\n pushFollow(FOLLOW_rule__Choice__Group_1__2__Impl_in_rule__Choice__Group_1__216593);\n rule__Choice__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public void setQuestion(Question question) {\n super.setQuestion(question);\n\n options = ((MultipleChoiceQuestionResponse) question.getCorrectAnswer()).getChoices();\n for (int i = 0; i < options.size(); i ++) {\n String option = options.get(i);\n RadioButton button = new RadioButton(option);\n button.setToggleGroup(group);\n\n button.setLayoutY(i * 30);\n choices.getChildren().add(button);\n }\n }", "public void start(Stage stage) {\n\t\tLabel chooseADifficulty = new Label(\"Please choose your difficulty preference\");\n\t\tchooseADifficulty.setMinWidth(300);\n\t\tchooseADifficulty.setAlignment(Pos.CENTER);\n\t\t\n\t\t//A combobox containing Strings, which acts as a drop down menu for the player to use. Easy, Medium\n\t\t//and Hard are the options available. getSelectionModel().selectFirst() automatically selects the\n\t\t//first option on the drop down menu, preventing Null Pointer Exceptions for if the player tried to\n\t\t//continue without selecting a difficulty.\n\t\tComboBox<String> difficultyChoices = new ComboBox<String>();\n\t\tdifficultyChoices.getItems().add(\"Easy\");\n\t\tdifficultyChoices.getItems().add(\"Medium\");\n\t\tdifficultyChoices.getItems().add(\"Hard\");\n\t\tdifficultyChoices.getSelectionModel().selectFirst();\n\t\t\n\t\t//A confirmation button that the player can use to progress from this screen.\n\t\tButton difficultyConfirm = new Button(\"Confirm\");\n\t\t\n\t\t//VBox places the nodes within itself one atop the other\n\t\tVBox difficultyVBox = new VBox(20,chooseADifficulty, difficultyChoices, difficultyConfirm);\n\t\tdifficultyVBox.setAlignment(Pos.CENTER);\n\t\t\n\t\t//The Group object is now set to use the VBox\n\t\tgroup = new Group(difficultyVBox);\n\t\t\n\t\t//The group is now prepared on the scene, with a window size of 300 by 300, with a background colour\n\t\t//of light grey. The scene is placed on the stage. The window cannot be resized and the title is set \n\t\t//to Hangman. It is then displayed to the player.\n\t\tscene = new Scene(group, 300,300, Color.LIGHTGREY);\n\t\tstage.setScene(scene);\n\t\tstage.setResizable(false);\n\t\tstage.setTitle(\"Hangman\");\n\t\tstage.show();\n\t\t\n\t\t//The drawnPieces double variable is set to 0.0, the statusMessageLabel variable has its value \n\t\t//removed and the finished boolean is set back to false, acting as a reset for each time the \n\t\t//player is returned to this part of the code, such as when they wish to start a new game.\n\t\tdrawnPieces = 0.0;\n\t\tstatusMessageLabel = new Label();\n\t\tfinished = false;\n\n\t\t//An eventHandler is created for the confirmation button created earlier\n\t\tdifficultyConfirm.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>(){\n\t\t\t@Override\n\t\t\tpublic void handle(MouseEvent e){\n\t\t\t\t//Clicking the button causes an Alert window to appear on the screen. It is stylised to\n\t\t\t\t//appear as a confirmation screen, as opposed to a warning or error screen. It uses the\n\t\t\t\t//selected option of the drop down menu to determine the message that is displayed to\n\t\t\t\t//the player.\n\t\t\t\tAlert confirmation = new Alert(AlertType.CONFIRMATION);\n\t\t\t\tconfirmation.setTitle(\"Start game?\");\n\t\t\t\tconfirmation.setHeaderText(\"Do you wish to start the game on \" + difficultyChoices.getValue() + \" difficulty?\");\n\n\t\t\t\t//The Alert window has two buttons, an OK button and a cancel button. This variable is\n\t\t\t\t//created to store which button was clicked on by the player.\n\t\t\t\tOptional<ButtonType> result = confirmation.showAndWait();\n\t\t\t\t\n\t\t\t\t//If the player clicked on the OK button, this if statement is used.\n\t\t\t\tif(result.get() == ButtonType.OK) {\n\n\t\t\t\t\t//A switch statement checks the choice selected from the drop down menu\n\t\t\t\t\tswitch(difficultyChoices.getValue()) {\n\t\t\t\t\t//Depending on which difficulty was chosen, the difficultyGuesses int variable is\n\t\t\t\t\t//set to the maximum amount of guesses that the player is allowed, and debug messages\n\t\t\t\t\t//are displayed on the console. If the player was somehow able to reach this point\n\t\t\t\t\t//without selecting one of the options, the program closes, to prevent any issues later.\n\t\t\t\t\tcase \"Easy\" : difficultyGuesses = 7;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Picked Easy mode\");\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Medium\" : difficultyGuesses = 5;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Picked Medium mode\");\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Hard\" : difficultyGuesses = 3;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Picked Hard mode\");\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault \t : System.out.println(\"For some reason, we didn't get a difficulty setting.\");\n\t\t\t\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Using the PrintWriter, a message is sent to the server. StartUpGame acts like a \n\t\t\t\t\t//keyword so that the server can access the right area of the code to use the \n\t\t\t\t\t//second parameter correctly.\n\t\t\t\t\tout.println(\"StartUpGame \" + difficultyGuesses);\n\t\t\t\t\t\n\t\t\t\t\t//A boolean is created and set to false. It is used as a crude way of waiting for a\n\t\t\t\t\t//response from the server. The while loop afterwards continues for as long as the\n\t\t\t\t\t//boolean remains false. When the correct message is received from the server, it\n\t\t\t\t\t//will set the boolean to true, which will end the while loop and continue with the\n\t\t\t\t\t//code afterwards. \n\t\t\t\t\tboolean connectionCheck = false;\n\t\t\t\t\twhile(!connectionCheck) {\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconnectionCheck = Boolean.parseBoolean(in.readLine());\n\t\t\t\t\t\t}catch(IOException ioe) {\n\t\t\t\t\t\t\t//If nothing is received, do nothing. The loop will continue as the boolean\n\t\t\t\t\t\t\t//remains false. May need to be refined in some way to determine whether no\n\t\t\t\t\t\t\t//message was received because the server's message hasn't arrived yet, or\n\t\t\t\t\t\t\t//because the connection has been completely lost and act accordingly.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//The Alert window can now be closed\n\t\t\t\t\tconfirmation.close();\n\t\t\t\t\t\n\t\t\t\t\t//Call the game method, passing over the stage so that it can be redesigned\n\t\t\t\t\tgame(stage);\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t}", "public final void ruleChoice() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1736:2: ( ( ( rule__Choice__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1737:1: ( ( rule__Choice__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1737:1: ( ( rule__Choice__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1738:1: ( rule__Choice__Group__0 )\n {\n before(grammarAccess.getChoiceAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1739:1: ( rule__Choice__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1739:2: rule__Choice__Group__0\n {\n pushFollow(FOLLOW_rule__Choice__Group__0_in_ruleChoice3271);\n rule__Choice__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getChoiceAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\n\t\t\t\t\tshowwindow(presentadd_group);\n\t\t\t\t}", "private void drawOptions() {\n RadioGroup rgpOptions = (RadioGroup) findViewById(R.id.rgpOptions);\n rgpOptions.removeAllViews();\n int lastId = 0;\n for (int i = 0; i < criteriaList.get(currentCriteria).getOptionList().size(); i++) {\n RadioButton rdbtn = new RadioButton(this);\n lastId = i;\n rdbtn.setId(i);\n rdbtn.setText(criteriaList.get(currentCriteria).getOptionList().get(i).getDescription());\n rdbtn.setAllCaps(true);\n rdbtn.setTextSize(18);\n rgpOptions.addView(rdbtn);\n }\n RadioButton rdbtn = new RadioButton(this);\n rdbtn.setId(lastId + 1);\n rdbtn.setText(\"No lo se\");\n rdbtn.setAllCaps(true);\n rdbtn.setTextSize(18);\n rgpOptions.addView(rdbtn);\n rgpOptions.check(rdbtn.getId());\n }", "public void itemStateChanged (ItemEvent event)\n {\n ((GroupItem)gbox.getSelectedItem()).activate();\n }", "private void setUpMenu() {\n\t\trg = (RadioGroup) findViewById(R.id.rg);\n\t\trb1 = (RadioButton) findViewById(R.id.rb1);\n\t\trb2 = (RadioButton) findViewById(R.id.rb2);\n\t\trb3 = (RadioButton) findViewById(R.id.rb3);\n\t\trb4 = (RadioButton) findViewById(R.id.rb4);\n\t\trb5 = (RadioButton) findViewById(R.id.rb5);\n\t\trg.setOnCheckedChangeListener(this);\n\t\trb1.setChecked(true);\n\t\t// OnCheckedChangeListener listener = null;\n\t}", "@objid (\"7f47c8ab-1dec-11e2-8cad-001ec947c8cc\")\n public SimpleModeDeferredGroupCommand(GroupRequest req, EditPart sender) {\n this.req = req;\n this.gmComposite = (GmCompositeNode) sender.getModel();\n this.editPartRegistry = sender.getViewer().getEditPartRegistry();\n }", "public void setChoice(Choice choice) {\n this.choice = choice;\n }", "@FXML\n private void initialize() {\n group = new ToggleGroup();\n // choices.setCellFactory(listview -> new RadioListCell());\n }", "public final void rule__Spinner__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:718:1: ( rule__Spinner__Group__1__Impl )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:719:2: rule__Spinner__Group__1__Impl\n {\n pushFollow(FollowSets000.FOLLOW_rule__Spinner__Group__1__Impl_in_rule__Spinner__Group__11413);\n rule__Spinner__Group__1__Impl();\n _fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tmFaceManager.createGroup(\"first_group\");\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}\n\t\t\t\t}).start();\n\t\t\t\t\n\t\t\t\t//Log.d(\"a\", mResult.toString());\n\t\t\t}", "void startVisit(Group group);", "void endChoice(GroupSG group) throws SAXException;", "private void checkSingleChoice(){\n \t\t\t\n \t\t\t// get selected radio button from radioGroup\n \t\t\tint selectedId = radioGroup.getCheckedRadioButtonId();\n \t\t\t\n \t\t\tRadioButton selectedButton = (RadioButton)getView().findViewById(selectedId);\n \t\t\t\n \t\t\tif(selectedButton!=null){\n \t\t\t\t\n \t\t\t\tString choice = selectedButton.getTag().toString();\n \t\t\t\tString choiceText = selectedButton.getText().toString();\n \t\t\t\t\n \t\t\t\t// TESTING ONLY\n \t\t\t\tint qid = eventbean.getQid();\n \t\t\t\tLog.v(\"schoice\",\"QID=\"+qid+\"/Choice=\"+choice);\n \t\t\t\t\n \t\t\t\t//setting the response for that survey question\n \t\t\t\teventbean.setChoiceResponse(choice+\".\"+choiceText);\n \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t}", "public void newGroup() {\n addGroup(null, true);\n }", "public void setup(){\n\t\tgui.getCenter().setText(\"No book info is yet available. Submit some!\");\n\t\tconstrain(gui.getGroups());\n\t\t\n\t\tgui.getMasterCheck().selectedProperty().addListener(new ChangeListener<Boolean>() {\n\t\t @Override\n\t\t public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n\t\t for (InputGroup group: gui.getGroups()){\n\t\t \tgroup.getCheck().setSelected(newValue);\n\t\t }\n\t\t }\n\t\t});\n\t}", "public void goToSelectMultipleContactsAtOnce(View view){\n\t\tIntent intent = new Intent(this,CreateGroupUsingListActivity.class); \n\t\tintent.putExtra(\"group_name\", groupName);\n\t\tintent.putExtra(\"group_icon\", groupIcon);\n\t\tstartActivityForResult(intent, 1);\n\t\t\n\t}", "private void runMenu() {\n\t\tint selection;\n\t\tdo {\n\t\t\tdisplayMenu();\n\t\t\tselection = Integer.parseInt(sc.nextLine());\n\t\t\tprocessSelection(selection);\n\t\t} while (selection != 5);\n\t}", "public static void chsrInit(){\n for(int i = 0; i < chsrDesc.length; i++){\n chsr.addOption(chsrDesc[i], chsrNum[i]);\n }\n chsr.setDefaultOption(chsrDesc[2] + \" (Default)\", chsrNum[2]); //Default MUST have a different name\n SmartDashboard.putData(\"JS/Choice\", chsr);\n SmartDashboard.putString(\"JS/Choosen\", chsrDesc[chsr.getSelected()]); //Put selected on sdb\n }", "public static void startAuto(){\n cancelAuto();\n //Turn our ID into a Command\n \tswitch(autonomousChooser.getSelected()){\n case 0:\n command = new BaseLine();\n break;\n default:\n\t\t\t\tSystem.out.println(\"No auto picked\");\n command = null;\n }\n //Run the Command\n\t\tif (command != null){\n\t\t\tcommand.start();\n\t\t}\n }", "private void startGame() {\n betOptionPane();\n this.computerPaquetView.setShowJustOneCard(true);\n blackjackController.startNewGame(this);\n }", "public void category1() {\r\n\t\tmySelect1.click();\r\n\t}", "public void initChoice() {\n\t\t\t\t\n\t\tChoiceDialog<String> dialog = new ChoiceDialog<>(DB_MYSQL);\n\t\tdialog.setTitle(\"Base de datos\");\n\t\tdialog.setContentText(\"Seleccione una base de datos con la que trabajar\");\n\t\tdialog.getItems().addAll(DB_MYSQL, DB_SQL, DB_ACCESS);\n\t\n\t\tOptional<String> dbType = dialog.showAndWait();\n\t\t\n\t\tif( dbType.isPresent() ) {\t\n\t\t\t// Ajustamos nuestro modelo\n\t\t\tsetBd(dbType.get());\n\t\t\t\n\t\t} else {\n\t\t\tPlatform.exit(); // Entonces hemos acabado\n\t\t}\n\t}", "public QuizCreatorView() {\n answerInput1.setText(\"\");\n answerInput2.setText(\"\");\n answerInput3.setText(\"\");\n answerInput4.setText(\"\");\n optionsGroup = new ButtonGroup();\n optionsGroup.add(OptionA);\n optionsGroup.add(OptionB);\n optionsGroup.add(OptionC);\n optionsGroup.add(OptionD);\n }", "private void RadioButton_Click(RadioGroup rGroup, int checkedId) {\n // Reset everything\n if (this.micClient != null) {\n this.micClient.endMicAndRecognition();\n try {\n this.micClient.finalize();\n } catch (Throwable throwable) {\n throwable.printStackTrace();\n }\n this.micClient = null;\n }\n\n if (this.dataClient != null) {\n try {\n this.dataClient.finalize();\n } catch (Throwable throwable) {\n throwable.printStackTrace();\n }\n this.dataClient = null;\n }\n\n //this.ShowMenu(false);\n this._startButton.setEnabled(true);\n }", "public StartupOptions() {\n initComponents();\n done.addActionListener(Seasonality.bi);\n\n }", "@Override\n public void onClick(View view) {\n int radioId = radioGroup.getCheckedRadioButtonId();\n radioButton = findViewById(radioId);\n if(radioButton.getText().equals(\"Egg\")){\n appConstant.modeEgg();\n }else if(radioButton.getText().equals(\"Duckling\")){\n appConstant.modeDuckling();\n }else if(radioButton.getText().equals(\"Adult\")){\n appConstant.modeAdult();\n }\n startActivity(new Intent(StartActivity.this, GameActivity.class));\n }", "private void initiateChoiceButtons() {\n\t\trock = new JButton(\"Rock\");\n\t\trock.setPreferredSize(selectionButtonSize);\n\t\tpaper = new JButton(\"Paper\");\n\t\tpaper.setPreferredSize(selectionButtonSize);\n\t\tscissors = new JButton(\"Scissors\");\n\t\tscissors.setPreferredSize(selectionButtonSize);\n\n\t\taddButtonListener();\n\t}", "private void startButtonAction(){\n scoreboard.setStartAction(event->initControl());\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult createGroup = mFacePlus.createGroup(groupname.getText().toString(), groupname.getText().toString(), null);\n\t\t\t\tif(createGroup.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + createGroup.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tGroup group = (Group) createGroup.data;\n\t\t\t\tLog.e(TAG,\"groupid = \"+group.getId());\n\t\t\t\tLog.e(TAG,group.toString());\n\t\t\t}", "public final void rule__Choice__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8355:1: ( ( rulePrimaryProcess ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8356:1: ( rulePrimaryProcess )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8356:1: ( rulePrimaryProcess )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8357:1: rulePrimaryProcess\n {\n before(grammarAccess.getChoiceAccess().getPrimaryProcessParserRuleCall_0()); \n pushFollow(FOLLOW_rulePrimaryProcess_in_rule__Choice__Group__0__Impl16379);\n rulePrimaryProcess();\n\n state._fsp--;\n\n after(grammarAccess.getChoiceAccess().getPrimaryProcessParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public abstract void startCompetition();", "public static void launch() {\r\n\t\tint choice = EXIT;\r\n\t\tdo {\r\n\t\t\tchoice = displayMenu();\r\n\t\t\texecuteMenuItem(choice);\r\n\t\t} while (choice != EXIT);\r\n\t}", "public SelectGroupDlg(Dialog parent, Vector list, boolean add) {\n super(parent,\"Choix du groupe à \"+DConst.BUT_ADD);\n _list= list;\n //_parent = parent;\n _sectionMod = (SectionModifDlg)parent;\n //_addGroup = add;\n if(add)\n jbInitAddGroup();\n else\n jbInitRemGroup();\n\n }", "public void execute(View view){\n //method in view to show the choice\n }", "private void createNewGroup() {\r\n if(selectedNode != null) { \r\n DefaultMutableTreeNode nextNode = (DefaultMutableTreeNode)selectedNode.getNextNode();\r\n if(selectedNode.isLeaf() && !selectedNode.getAllowsChildren()) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1254\"));\r\n return;\r\n } else if(selTreePath.getPathCount() == 10) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1255\"));\r\n return;\r\n }else if (nextNode != null && nextNode.isLeaf()) {\r\n CoeusOptionPane.showInfoDialog(\"The group '\"+selectedNode.toString()+\"' has sponsors assigned to it. \\nCannot create subgroups for this group.\");\r\n return;\r\n }else {\r\n nextNode = new DefaultMutableTreeNode(\"New Group - \"+(selectedNode.getLevel()+1)+\".\"+selectedNode.getChildCount(),true);\r\n model.insertNodeInto(nextNode, selectedNode, selectedNode.getChildCount());\r\n TreePath newSelectionPath = selTreePath.pathByAddingChild(nextNode);\r\n sponsorHierarchyTree.clearSelection();\r\n sponsorHierarchyTree.addSelectionPath(newSelectionPath);\r\n sponsorHierarchyTree.startEditingAtPath(newSelectionPath);\r\n newGroup = true;\r\n saveRequired = true;\r\n }\r\n }\r\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n choice=pos;\n }", "void startSequence(GroupSG group) throws SAXException;", "public void fillSpecChoices(List ChoiceMenu) {\n\n ChoiceMenu.add(\"Quadratic Koch Island 1 pg. 13\"); /* pg. 13 */\n ChoiceMenu.add(\"Quadratic Koch Island 2 pg. 14\"); /* pg. 14 */\n ChoiceMenu.add(\"Island & Lake Combo. pg. 15\"); /* pg.15 */\n ChoiceMenu.add(\"Koch Curve A pg. 16\");\n ChoiceMenu.add(\"Koch Curve B pg. 16\");\n ChoiceMenu.add(\"Koch Curve C pg. 16\");\n ChoiceMenu.add(\"Koch Curve D pg. 16\");\n ChoiceMenu.add(\"Koch Curve E pg. 16\");\n ChoiceMenu.add(\"Koch Curve F pg. 16\");\n ChoiceMenu.add(\"Mod of Snowflake pg. 14\");\n ChoiceMenu.add(\"Dragon Curve pg. 17\");\n ChoiceMenu.add(\"Hexagonal Gosper Curve pg. 19\");\n ChoiceMenu.add(\"Sierpinski Arrowhead pg. 19\");\n ChoiceMenu.add(\"Peano Curve pg. 18\");\n ChoiceMenu.add(\"Hilbert Curve pg. 18\");\n ChoiceMenu.add(\"Approx of Sierpinski pg. 18\");\n ChoiceMenu.add(\"Tree A pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 25\");\n ChoiceMenu.add(\"Tree C pg. 25\");\n ChoiceMenu.add(\"Tree D pg. 25\");\n ChoiceMenu.add(\"Tree E pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 43\");\n ChoiceMenu.add(\"Tree C pg. 43\");\n ChoiceMenu.add(\"Spiral Tiling pg. 70\");\n ChoiceMenu.add(\"BSpline Triangle pg. 20\");\n ChoiceMenu.add(\"Snake Kolam pg. 72\");\n ChoiceMenu.add(\"Anklets of Krishna pg. 73\");\n\n /*-----------\n Color examples \n -----------*/\n ChoiceMenu.add(\"Color1, Koch Curve B\");\n ChoiceMenu.add(\"Color2, Koch Curve B\");\n ChoiceMenu.add(\"Color X, Spiral Tiling\");\n ChoiceMenu.add(\"Color Center, Spiral Tiling\");\n ChoiceMenu.add(\"Color Spokes, Spiral Tiling\");\n ChoiceMenu.add(\"Color, Quad Koch Island 1\");\n ChoiceMenu.add(\"Color, Tree E\");\n ChoiceMenu.add(\"Color, Mod of Snowflake\");\n ChoiceMenu.add(\"Color, Anklets of Krishna\");\n ChoiceMenu.add(\"Color, Snake Kolam\");\n\n ChoiceMenu.add(\"Simple Branch\");\n\n\n }", "public void start() {\n String command = \"\";\n boolean exitCommandIsNotGiven = true;\n System.out.println(\"\\nSorting Algorithms Demonstration\\n\");\n\n while (exitCommandIsNotGiven) {\n command = initialMenu(command);\n exitCommandIsNotGiven = handleStartMenuCommands(command);\n }\n }", "@Override\n public void onClick(View v) {\n repeat = \"\";\n if(groupName_array.length == 0){//如果沒有group\n title = \"您還沒有加入任何群組\";\n }else{\n title = \"選擇群組\";\n }\n new AlertDialog.Builder(editBeacon.this)\n .setTitle(title)\n .setMultiChoiceItems(\n groupName_array,\n group_select,\n new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n // TODO Auto-generated method stub\n\n }\n })\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n horizontalList_group=new ArrayList<>();//初始化\n\n for (int i = 0; i < group_select.length; i++) {\n if (group_select[i]) { //如果選擇的是true(被勾選)\n groupIdSelect.append(Integer.toString(groupId_array[i])).append(\",\");\n //連接stringbuffer eventIdSelect(這是一段傳給Php的stringbuffer) }\n horizontalList_group.add(groupName_array[i]);\n\n }\n }\n\n horizontalAdapter_group=new HorizontalAdapter(horizontalList_group);\n LinearLayoutManager horizontalLayoutManagaer\n = new LinearLayoutManager(editBeacon.this, LinearLayoutManager.HORIZONTAL, false);\n horizontal_recycler_view_group.setLayoutManager(horizontalLayoutManagaer);\n horizontal_recycler_view_group.setAdapter(horizontalAdapter_group);\n\n\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n }\n }).show();\n\n\n }", "private void start() // Start the game\n\t{\n\t\tdouble startingPlayerDecider = 0; // Used in the process of deciding who goes first.\t\n\n\t\tif (needToReset == true) // If the game needs to be reset...\n\t\t{\n\t\t\treset(); // Then do so..\n\t\t}\n\n\t\tswitch (gameState) // Check the state of the game and change the messages as needed.\n\t\t{\n\t\tcase waitingForStart:\n\t\t\tlabelGameState.setText(\"Welcome to dig for diamonds.\");\t\n\t\t\tbuttonStart.setText(\"Next\"); // The start button now acts as the next button.\n\t\t\tgameState = GameState.gameWelcome;\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase gameWelcome:\n\t\t\tlabelGameState.setText(\"We shall now randomly decide who goes first.\");\t\n\t\t\tgameState = GameState.decideWhoGoesFirst;\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase decideWhoGoesFirst:\n\t\t\tswitch(totalPlayers) // Decide based on the number of players who goes first.\n\t\t\t{\n\t\t\tcase 2: // For two players...\n\t\t\t\tstartingPlayerDecider = control.randomNumber(100,0); // Generate a random number between 0 and 100\n\n\t\t\t\tif (startingPlayerDecider >= 50) // If it is greater then or equal to 50...\n\t\t\t\t{\n\t\t\t\t\tplayers.get(0).setIsPlayerTurn(true); // Player 1 goes first.\t\n\t\t\t\t\tlabelGameState.setText(\"Player 1 shall go first this time.\");\t\n\t\t\t\t\tgameState = GameState.twoPlayersPlayerOneGoesFirst;\n\t\t\t\t\tgameStateString = gameStateToString();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tplayers.get(1).setIsPlayerTurn(true); // Else player two goes first.\n\t\t\t\t\tlabelGameState.setText(\"Player 2 shall go first this time.\");\t\n\t\t\t\t\tgameState = GameState.twoPlayersPlayerTwoGoesFirst;\n\t\t\t\t\tgameStateString = gameStateToString();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerOneGoesFirst:\n\t\t\tgameState = GameState.twoPlayersNowPlayerOnesTurn;\n\t\t\tlabelGameState.setText(\"It is now \" + players.get(0).getPlayerName() + \"'s turn.\");\t\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerTwoGoesFirst:\n\t\t\tgameState = GameState.twoPlayersNowPlayerTwosTurn;\n\t\t\tlabelGameState.setText(\"It is now \" + players.get(1).getPlayerName() + \"'s turn.\");\t\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\t}\t\t\n\t}", "public startingMenu() {\r\n initComponents();\r\n }", "public ChoiceQuestion() {\n m_choices = new ArrayList<>();\n }", "public void onButtonStartQuiz(View view) {\n if(radioButtonLevelOne.isChecked()) level = 1;\n if(radioButtonLevelTwo.isChecked()) level = 2;\n if(radioButtonLevelThree.isChecked()) level = 3;\n\n if(radioButton30.isChecked()) seconds = 30;\n if(radioButton60.isChecked()) seconds = 60;\n if(radioButton90.isChecked()) seconds = 90;\n \n Intent intent = new Intent(this, QuizActivity.class);\n intent.putExtra(\"level\", level);\n intent.putExtra(\"seconds\", seconds);\n startActivity(intent);\n }", "@Override\r\n\tpublic void launch(ISelection arg0, String arg1) {\n\t\tSystem.out.println(\"Launch Raoul by sel \" + arg1);\r\n\t}", "public void getChoice()\n {\n }", "public AddNewContactGroupAction() {\r\n\t\tsuper();\r\n\t}", "public void onLoadMenuRadioSelected();", "public void openPatternSelect() {\n timeline.pause();\n startButton.setText(\"Start\");\n isRunning = false;\n\n //Creates a new stage with modality WINDOW_MODAL and loads it.\n patternSelectStage = new Stage();\n patternSelectStage.initModality(Modality.WINDOW_MODAL);\n patternSelectStage.initOwner(canvasArea.getScene().getWindow());\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/view/PatternSelect.fxml\"));\n try {\n //Tries to load the fxml and sets the patternPickerController from that.\n Parent root = fxmlLoader.load();\n PatternSelectController patternPickerController = fxmlLoader.getController();\n patternPickerController.setFileHandler(fileHandler);\n\n //Opens and waits\n patternSelectStage.setTitle(\"GameOfLife\");\n patternSelectStage.setScene(new Scene(root, 600, 400));\n patternSelectStage.showAndWait();\n\n //Resets and redraws when the window is closed.\n isMovable = true;\n canvasDrawer.resetOffset(board, canvasArea);\n draw();\n canvasArea.requestFocus();\n setFocusTraversable(false);\n }catch (IOException ioe){\n //Shows a warning should the loading of the FXML fail.\n PopUpAlerts.ioAlertFXML();\n }\n }", "protected void setChoice(int index) {\n\t\tchoiceOption = getOption(index);\n\t}", "private void choiceBoxInitializer() {\n searchChoiceBox.getItems().addAll(\"Learning Applications\", \"Learning Categories\",\n \"Learning Units\");\n searchChoiceBox.setValue(\"Learning Applications\");\n }", "@FXML\n final void btnOptionsPress() {\n new Thread(() -> sceneHandler.setActiveScene(GameScene.OPTIONS)).start();\n }" ]
[ "0.6528462", "0.63383627", "0.6047374", "0.6010456", "0.60017234", "0.5968041", "0.5964102", "0.5897367", "0.5861887", "0.58597404", "0.58459073", "0.5829381", "0.5786527", "0.56538576", "0.5652888", "0.5649089", "0.5643465", "0.5593659", "0.55538404", "0.5513639", "0.5421824", "0.539203", "0.5389475", "0.53751343", "0.53668386", "0.53620106", "0.53494215", "0.5346714", "0.5339759", "0.53312683", "0.53308076", "0.530531", "0.53043646", "0.5296152", "0.5284582", "0.52834696", "0.5277057", "0.52729195", "0.5271916", "0.5261051", "0.5257934", "0.52550524", "0.52459437", "0.5242028", "0.52387846", "0.523571", "0.5232435", "0.52269584", "0.5218178", "0.521767", "0.5206475", "0.5198078", "0.51976377", "0.5188116", "0.5175244", "0.517008", "0.5157585", "0.5155563", "0.51542366", "0.5153898", "0.515334", "0.5145611", "0.5140621", "0.51387966", "0.5138772", "0.51263", "0.5123204", "0.51196545", "0.51188725", "0.511755", "0.51099247", "0.51064336", "0.51040274", "0.5101822", "0.50943464", "0.5091993", "0.5085695", "0.50672", "0.5063821", "0.5062116", "0.5057627", "0.5039902", "0.50372154", "0.502924", "0.50239205", "0.50141096", "0.5002221", "0.5001359", "0.5001149", "0.49982905", "0.499568", "0.49902612", "0.49885255", "0.49882787", "0.49874333", "0.49861836", "0.4985891", "0.4985509", "0.49845406", "0.49806857" ]
0.70399266
0
Invoked to end a choice group.
void endChoice(GroupSG group) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void endVisit(Group group);", "public void endSelection()\n {\n\tisMultiSelection = false;\n\tsetMaxCheckCount(1);\n\tuncheckAll();\n }", "public void endCommand();", "private void ending() {\n\t\tstartView.ending();\n\t\tSystem.exit(-1);\n\t}", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\n \n \n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "public abstract void end();", "protected void end()\n\t{\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "private void exitQuestionDialog() {\n\t\tquestion = false;\n\t\tdialog.loadResponse();\n\t\tchangeDirBehaviour(Values.DETECT_ALL);\n\t}", "private void finishPlayAlong() {\n\n callback.questionPressed(null, score, lives); // ENDS this question\n\n }", "public void end();", "public static void endGameSequence()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t\tlblUpdate.setText(\"Game over! You are out of money!\");\n\t}", "@Override\n\tpublic void endCompetition1() {\n\n\t}", "protected abstract boolean end();", "protected void end() {\n\t\tPickup.setRollers(0);\n\t}", "public void endPress();", "protected void end() {\n\r\n\t}", "protected void end() {\n \tRobot.m_elevator.disable();\n \tRobot.m_elevator.free();\n }", "public void endTurn() {\n suggestionMade = false;\n locAtTurnStart = currentPlayersTurn.getPiece().getLocation();\n accusationChoices = new CardChoice();\n suggestionChoices = new CardChoice();\n turnIndicator = (turnIndicator + 1) % playerOrder.size();\n currentPlayersTurn = playerOrder.get(turnIndicator).getKey();\n currentPlayersSteps = 0;\n }", "public void forceEnd() throws Exception {\r\n\r\n\t\twhile (callStack.canPopThread())\r\n\t\t\tcallStack.popThread();\r\n\r\n\t\twhile (callStack.canPop())\r\n\t\t\tcallStack.pop();\r\n\r\n\t\tcurrentChoices.clear();\r\n\r\n\t\tsetCurrentContentObject(null);\r\n\t\tsetPreviousContentObject(null);\r\n\r\n\t\tsetDidSafeExit(true);\r\n\t}", "public void end(){\r\n\t\tsetResult( true ); \r\n\t}", "void endRangeSelection() {\n mRanger = null;\n }", "public void end() {\n\t\tsigue = false;\n\t}", "protected void end() {\n isFinished();\n }", "private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }", "@Override\n public void endActionMode() {\n if (mActionMode != null) {\n mActionMode.finish();\n }\n }", "public void gameModelEnd() {\n\t\tsetChanged();\r\n\t\tdeleteObservers();\r\n\t\tnotifyObservers(Message.End);\r\n\t}", "protected void end() {\n \t// theres nothing to end\n }", "public void endCollection() {\n if (recordHandler != null)\n recordHandler.endCollection();\n }", "public void end() {\n\n }", "public void buttonEndTurn() {\n\t\tendTurn();\n\t\t}", "protected void end() {\n\t\tL.ogEnd(this);\n\t\t_xboxControllerToRumble.setRumble(_rumbleType, 0);\n\t}", "public void finish() {\n PackageManagerActivity.super.finish();\n d a2 = d.a((Context) this);\n Iterator<String> it = this.g.iterator();\n while (it.hasNext()) {\n String next = it.next();\n a2.e(next);\n com.miui.permcenter.a.a.a(next);\n }\n }", "public void exit(GroupElement node) {\n exit((AnnotatedBase)node);\n }", "@Override\n\tpublic void endGame() {\n\t\tsuper.endGame();\n\t}", "protected void end() {\n\t\tcrossLine.cancel();\n\t\tapproachSwitch.cancel();\n\t\tdriveToSwitch.cancel();\n\t\tdriveToScale.cancel();\n\t\tapproachScale.cancel();\n\t\tturnTowardsSwitchOrScale.cancel();\n\t\t\n\t\tdrivetrain.stop();\n\t}", "void conversationEnding(Conversation conversation);", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "@Override\r\n\tprotected void end() {\r\n\t}", "@Override\n\tprotected void cmdCloseWidgetSelected() {\n\t\tcmdCloseSelected();\n\t}", "@Override\n public void end() {\n }", "public void endDrawing() {\r\n SelectionResult res = SelectionResult.getInstance();\r\n\r\n res.selection = selection;\r\n res.referenceY = selectedY;\r\n\r\n res.previewWidth = getWidth();\r\n res.previewHeight = getHeight();\r\n\r\n selectedY = -1;\r\n }", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "public void endTurn()\n\t{\n\t\tthis.decrementEffectDurations();\n\t\tdoneWithTurn = true;\n\t}", "@Override\n\tpublic void end() {\n\t\t\n\t}", "private void endMyTurn() {\n // end my turn, then.\n Entity next = clientgui.getClient().getGame()\n .getNextEntity(clientgui.getClient().getGame().getTurnIndex());\n if ((IGame.Phase.PHASE_DEPLOYMENT == clientgui.getClient().getGame()\n .getPhase())\n && (null != next)\n && (null != ce())\n && (next.getOwnerId() != ce().getOwnerId())) {\n clientgui.setDisplayVisible(false);\n }\n cen = Entity.NONE;\n clientgui.getBoardView().select(null);\n clientgui.getBoardView().highlight(null);\n clientgui.getBoardView().cursor(null);\n clientgui.bv.markDeploymentHexesFor(null);\n disableButtons();\n }", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "void endSequence(GroupSG group) throws SAXException;", "void endEntry();", "@Override\n protected void end() {\n }", "public void endGame(){\n updateHighscore();\n reset();\n }", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "public void endTurn() {\n\t\tfireChanges();\n\t\t\n\t\tif(!isConfirmed())\n\t\t\tfirePropertyChange(Handler.END_TURN_PROPERTY, \"Do you want to confirm ending your turn?\");\n\t\telse{\n\t\t\tAbstractGameCommand endTurnCommand = new EndTurnCommand(getGame());\n\t\t\tendTurnCommand.execute();\n\t\t\t\n\t \tfirePropertyChange(Handler.CURRENT_PLAYER_PROPERTY, getGame().getCurrentPlayer().getName());\n\t\t\tresetConfirm();\n\t\t}\n\t\t\n\t\tfireChanges();\n\t}", "public int endOfTurn(int choice) {\n\t\tfor (int i = 0; i < dragoes.length; i++) {\n\t\t\tif (dragoes[i].isAlive() && choice != 0) {\n\t\t\t\tchoice = check_if_dead(i);\n\t\t\t\tchange_status(i);\n\t\t\t}\n\t\t\tif (choice == 5) {\n\t\t\t\tif (inter == 0) \n\t\t\t\t\tconsole_interface.youDied();\n\t\t\t\telse {}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdisplayDardos();\n\t\treturn choice;\n\t}" ]
[ "0.6427839", "0.64044684", "0.6167032", "0.61076313", "0.60360587", "0.60360587", "0.60360587", "0.60360587", "0.6033545", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.5999176", "0.59848297", "0.5975598", "0.59620553", "0.59620553", "0.59620553", "0.59620553", "0.59620553", "0.59620553", "0.5960724", "0.59584504", "0.5939221", "0.5933566", "0.59306675", "0.5925732", "0.59197587", "0.59115475", "0.5909886", "0.589778", "0.5884808", "0.5863898", "0.58534664", "0.5841445", "0.5827086", "0.5815947", "0.58150595", "0.5793604", "0.5785979", "0.5785977", "0.57859194", "0.5771944", "0.57641387", "0.57441944", "0.5736753", "0.572352", "0.5715988", "0.57100934", "0.57064426", "0.5703348", "0.57005084", "0.56869644", "0.567195", "0.5662566", "0.56589025", "0.56589025", "0.56555635", "0.5650706", "0.5642348", "0.5634813", "0.5634813", "0.5634813", "0.5634813", "0.56307024", "0.56306547", "0.56251967", "0.56204087", "0.56199557", "0.56199557", "0.56199557", "0.56165403", "0.5609958" ]
0.7133956
0
Invoked to start an all group.
void startAll(GroupSG group) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CreateGroup() {\n initComponents();\n start();\n }", "void startVisit(Group group);", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmFaceManager.createGroup(\"first_group\");\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}", "public void newGroup() {\n addGroup(null, true);\n }", "public void startAll() {\n distributors.forEach(Distributor::startThread);\n }", "private void sendGroupInit() {\n \t\ttry {\n \t\t\tmyEndpt=new Endpt(serverName+\"@\"+vsAddress.toString());\n \n \t\t\tEndpt[] view=null;\n \t\t\tInetSocketAddress[] addrs=null;\n \n \t\t\taddrs=new InetSocketAddress[1];\n \t\t\taddrs[0]=vsAddress;\n \t\t\tview=new Endpt[1];\n \t\t\tview[0]=myEndpt;\n \n \t\t\tGroup myGroup = new Group(\"DEFAULT_SERVERS\");\n \t\t\tvs = new ViewState(\"1\", myGroup, new ViewID(0,view[0]), new ViewID[0], view, addrs);\n \n \t\t\tGroupInit gi =\n \t\t\t\tnew GroupInit(vs,myEndpt,null,gossipServers,vsChannel,Direction.DOWN,this);\n \t\t\tgi.go();\n \t\t} catch (AppiaEventException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (NullPointerException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (AppiaGroupException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} \n \t}", "@Override\n public void initDefaultCommand() {\n setDefaultCommand(new GroupIntakeDefault());\n }", "void syncGroup();", "Group getNextExecutableGroup();", "private void expandAll()\r\n\t{\r\n\t\tint count = listAdapter.getGroupCount();\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tmyList.expandGroup(i);\r\n\t\t}\r\n\t}", "@Override\n\tpublic String startAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void preStart() {\n\t\tlog.info(\"DeviceGroup {} started\", groupId);\n\t}", "@Override\n public void start(int totalTasks) {\n }", "public void startAllReporter() {\n compositeReporter.startAll();\n }", "public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}", "public void listGroup() {\r\n List<Group> groupList = groups;\r\n EventMessage evm = new EventMessage(\r\n EventMessage.EventAction.FIND_MULTIPLE,\r\n EventMessage.EventType.OK,\r\n EventMessage.EventTarget.GROUP,\r\n groupList);\r\n notifyObservers(evm);\r\n }", "@Override\n public Map<String, Object> startTaskGroup(User loginUser, Integer id) {\n Map<String, Object> result = new HashMap<>();\n if (isNotAdmin(loginUser, result)) {\n return result;\n }\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n if (taskGroup.getStatus() == 1) {\n putMsg(result, Status.TASK_GROUP_STATUS_ERROR);\n return result;\n }\n taskGroup.setStatus(1);\n taskGroup.setUpdateTime(new Date(System.currentTimeMillis()));\n int update = taskGroupMapper.updateById(taskGroup);\n putMsg(result, Status.SUCCESS);\n return result;\n }", "void resetAndComputeGroups( long start_id )\n {\n setTitle( R.string.calib_compute_groups );\n setTitleColor( TDColor.COMPUTE );\n new CalibComputer( this, start_id, CalibComputer.CALIB_RESET_AND_COMPUTE_GROUPS ).execute();\n }", "private void createGroupCommand(Command root){\n\t\tif(codeReader.hasNext(END_GROUP))\n\t\t\tthrow new SLogoException(\"No arguments specified in grouping.\");\n\t\twhile(!codeReader.hasNext(END_GROUP)) {\n\t\t\ttry {\n\t\t\t\thandleSpecialCases(root);\n\t\t\t\tString s = codeReader.next();\n\t\t\t\troot.addChild(parseCommand(s));\n\t\t\t}\n\t\t\tcatch(NoSuchElementException n) {\n\t\t\t\tthrow new SLogoException(\"Unclosed Parenthesis.\");\n\t\t\t}\n\t\t}\n\t\tcodeReader.next();\n\t}", "public void setStartBayGroup(int num)\n\t{\n\t\tsetGroup(_Prefix + HardZone.STARTBAY.toString(), num);\n\t}", "protected void started() {\n for(MinMaxListener listener : listeners) {\n listener.started();\n }\n }", "void startSequence(GroupSG group) throws SAXException;", "private void group(String[] args){\n String name;\n \n switch(args[1]){\n case \"view\":\n this.checkArgs(args,2,2);\n ms.listGroups(this.groups);\n break;\n case \"add\":\n this.checkArgs(args,3,2);\n name = args[2];\n db.createGroup(name);\n break;\n case \"rm\":\n this.checkArgs(args,3,2);\n name = args[2];\n Group g = this.findGroup(name);\n if(g == null)\n ms.err(4);\n db.removeGroup(g);\n break;\n default:\n ms.err(3);\n break;\n }\n }", "void doResetGroups( long start_id )\n {\n // Log.v(\"DistoX\", \"Reset CID \" + mApp.mCID + \" from gid \" + start_id );\n mApp_mDData.resetAllGMs( mApp.mCID, start_id ); // reset all groups where status=0, and id >= start_id\n }", "public static void createEveryone(OpBroker broker) {\n OpQuery query = broker.newQuery(OpGroup.EVERYONE_ID_QUERY);\r\n Iterator result = broker.iterate(query);\r\n if (!result.hasNext()) {\r\n OpTransaction t = broker.newTransaction();\r\n OpGroup everyone = new OpGroup();\r\n everyone.setName(OpGroup.EVERYONE_NAME);\r\n everyone.setDisplayName(OpGroup.EVERYONE_DISPLAY_NAME);\r\n everyone.setDescription(OpGroup.EVERYONE_DESCRIPTION);\r\n broker.makePersistent(everyone);\r\n t.commit();\r\n }\r\n }", "public void setDefaultGroup(boolean defaultGroup);", "public void setStartLevelGroup(int num)\n\t{\n\t\tsetGroup(_Prefix + HardZone.STARTLEVEL.toString(), num);\n\t}", "protected void startBatch() {\n \n }", "public void start(){\n isFiltersSatisfied();\n }", "public void start(){\n\t\tsuper.start();\n\t}", "public void startCollection() {\n if (recordHandler != null)\n recordHandler.startCollection();\n }", "private void groupQuery() {\n ParseQuery<ParseObject> query = ParseQuery.getQuery(ParseConstants.CLASS_GROUPS);\n query.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject group, ParseException e) {\n setProgressBarIndeterminateVisibility(false);\n if(e == null) {\n mGroup = group;\n mMemberRelation = mGroup.getRelation(ParseConstants.KEY_MEMBER_RELATION);\n mMemberOfGroupRelation = mCurrentUser.getRelation(ParseConstants.KEY_MEMBER_OF_GROUP_RELATION);\n\n //only the admin can delete the group\n mGroupAdmin = mGroup.get(ParseConstants.KEY_GROUP_ADMIN).toString();\n mGroupAdmin = Utilities.removeCharacters(mGroupAdmin);\n if ((mCurrentUser.getUsername()).equals(mGroupAdmin)) {\n mDeleteMenuItem.setVisible(true);\n }\n\n mGroupName = group.get(ParseConstants.KEY_GROUP_NAME).toString();\n mGroupName = Utilities.removeCharacters(mGroupName);\n setTitle(mGroupName);\n\n mCurrentDrinker = mGroup.get(ParseConstants.KEY_CURRENT_DRINKER).toString();\n mCurrentDrinker = Utilities.removeCharacters(mCurrentDrinker);\n mCurrentDrinkerView.setText(mCurrentDrinker);\n\n mPreviousDrinker = mGroup.get(ParseConstants.KEY_PREVIOUS_DRINKER).toString();\n mPreviousDrinker = Utilities.removeCharacters(mPreviousDrinker);\n mPreviousDrinkerView.setText(mPreviousDrinker);\n\n listViewQuery(mMemberRelation);\n }\n else {\n Utilities.getNoGroupAlertDialog(null);\n }\n }\n });\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult createGroup = mFacePlus.createGroup(groupname.getText().toString(), groupname.getText().toString(), null);\n\t\t\t\tif(createGroup.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + createGroup.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tGroup group = (Group) createGroup.data;\n\t\t\t\tLog.e(TAG,\"groupid = \"+group.getId());\n\t\t\t\tLog.e(TAG,group.toString());\n\t\t\t}", "public void start() {\n\n\t}", "private void start() {\n\n\t}", "public void triggerAllAggregators() {\n Map<Integer, TimedDataAggregator> aggregatorMap = new HashMap<>();\n aggregatorMap.putAll(FeatureAggregators.getInstance().getAggregatorMap());\n aggregatorMap.putAll(StateAggregators.getInstance().getAggregatorMap());\n aggregatorMap.putAll(ClassificationAggregators.getInstance().getAggregatorMap());\n aggregatorMap.putAll(TrustLevelAggregators.getInstance().getAggregatorMap());\n\n // create shadow loopers for all aggregators\n Map<Integer, ShadowLooper> shadowLooperMap = createShadowLoopers(aggregatorMap);\n\n // set duration according to record\n long duration = record.getRecorder().getStopTimestamp() - record.getRecorder().getStartTimestamp();\n\n // trigger all aggregators\n triggerAggregators(aggregatorMap, shadowLooperMap, duration);\n }", "public Group()\r\n {\r\n endpoints = new ArrayList<>();\r\n name = \"NewGroup\";\r\n }", "public void setContactsGroup()\n\t{\n\t\tUtility.ThreadSleep(1000);\n\t\tList<Long> group = new ArrayList<Long>(Arrays.asList(new Long[] {1l,2l})); //with DB Call\n\t\tthis.groupIds = group;\n\t\tLong contactGroupId = groupIds.get(0);\n\t\tSystem.out.println(\".\");\n\t}", "public \n MRayInstGroupAction()\n {\n super(\"MRayInstGroup\", new VersionID(\"2.0.9\"), \"Temerity\",\n\t \"Builds an inst group from attached mi files\");\n \n {\n ActionParam param = \n\tnew BooleanActionParam\n\t(renderStateParam,\n\t \"Do you want to build Render statements as well as an instgroup\", \n\t false);\n addSingleParam(param);\n }\n \n {\n ActionParam param = \n\tnew BooleanActionParam\n\t(includeParam,\n\t \"Do you want to add include statements to the file\", \n\t false);\n addSingleParam(param);\n }\n }", "@BeforeGroup\n public void beforeGroup() {\n }", "public void visitGroup(Group group) {\n\t}", "public final void startAll() {\n for (BotTaskInterface bt : TASKS) {\n LOG.info(\"Starting BotTask {}\", bt.getName());\n bt.start();\n\n if (bt.getName().contains(\"UPGRADE\")) {\n bt.doWork();\n } else {\n LOG.info(\"{} scheduled to start at {}:{}\", bt.getName(), START_HOUR, START_MIN);\n }\n }\n }", "protected void start() {\n }", "public void runAll() {\n GameObjectManager.instance.runAll();\n }", "public void start() {\n tickers.stream().forEach(t -> t.start());\n }", "public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}", "Group(String name) {\n this(name, new ArrayList<>());\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.getAllGroupListInfo();\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tList<Group> groupList = (List<Group>) result.data;\n\t\t\t\tString str_groupname = groupname.getText().toString();\n\t\t\t\tfor (int i = 0; i < groupList.size(); i++) {\n\t\t\t\t\tLog.e(TAG,groupList.get(i).getName()+\"\");\n\t\t\t\t\t\tLog.e(TAG,groupList.get(i).getId()+\"\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public final void rule__Intervall__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:4155:1: ( rule__Intervall__Group__0__Impl rule__Intervall__Group__1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:4156:2: rule__Intervall__Group__0__Impl rule__Intervall__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__Intervall__Group__0__Impl_in_rule__Intervall__Group__09035);\r\n rule__Intervall__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Intervall__Group__1_in_rule__Intervall__Group__09038);\r\n rule__Intervall__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public StartPanel(JFrame theFrame, Group theGroup) {\n super();\n\n myFrame = theFrame;\n myGroup = theGroup;\n\n setup();\n }", "public SmilGroup() {\n\t\tsmilFiles = new LinkedList<D202SmilFile>();\n\t\tdiskUsage = -1;\n\t\tallFiles = new HashSet<FilesetFile>();\n\t\t//System.err.println(\"new group\");\n\t}", "void startChoice(GroupSG group) throws SAXException;", "public Group()\n\t{\n\t\tthis.members = new ArrayList<>();\n\t\tthis.groupID= idCounter;\n\t\tidCounter++;\n\t}", "public void start() {\n }", "public boolean startAll() throws ServerException;", "public final void rule__Arguments__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5269:1: ( rule__Arguments__Group_1__0__Impl rule__Arguments__Group_1__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5270:2: rule__Arguments__Group_1__0__Impl rule__Arguments__Group_1__1\n {\n pushFollow(FOLLOW_rule__Arguments__Group_1__0__Impl_in_rule__Arguments__Group_1__010341);\n rule__Arguments__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Arguments__Group_1__1_in_rule__Arguments__Group_1__010344);\n rule__Arguments__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void startProcessGroupComponents(ProcessGroupFlowEntity processGroupFlowEntity, String state) {\n processGroupFlow.startOrStopProcessGroupComponents(processGroupFlowEntity, state);\n\n }", "public void criaGrupo() {\n\t\tThread threadMain = Thread.currentThread(); // determina grupo raiz\n\t\tThreadGroup grupoRaiz = threadMain.getThreadGroup().getParent();\n\t\tThreadGroup newGroup = new ThreadGroup(grupoRaiz, \"Extra-\"\n\t\t\t\t+ gruposCriados++);\n\t\tnewGroup.setDaemon(true); // ajusta auto-remocao do grupo\n\t\tint quant = (int) (Math.random() * 10);\n\t\tfor (int i = 0; i < quant; i++) { // adiciona EmptyThreads ao grupo\n\t\t\tnew EmptyThread(newGroup, \"EmptyThread-\" + i).start();\n\t\t}\n\t\tbRefresh.doClick();\n\t}", "@Override\n\tpublic void start() {\n\n\t}", "public void populateGroups() {\n new PopulateGroupsTask(this.adapter, this).execute();\n }", "@Override\n\tpublic void start() {\n\t}", "@Override\n\tpublic void start() {\n\t}", "public GroupLayoutRonald ()\n {\n groupFunction();\n }", "public void getAllGroups() { \t\n \tCursor groupsCursor = groupDbHelper.getAllGroupEntries();\n \tList<String> groupNames = new ArrayList<String>();\n \tgroupNames.add(\"Create a Group\");\n \t\n \t// If query returns group, display them in Groups Tab\n \t// Might want to add ordering query so that most recent\n \t// spots display first...\n \tif (groupsCursor.getCount() > 0) {\n \t\tgroupsCursor.moveToFirst();\n \t\twhile (!groupsCursor.isAfterLast()) {\n \t\t\tgroupNames.add(groupsCursor.getString(1));\n \t\t\tgroupsCursor.moveToLast();\n \t\t}\n \t\t\n \t}\n \t\n \t// Close cursor\n \tgroupsCursor.close();\n \t\n \t// Temporary - Ad`d Sample Groups to List\n \t//for (String groupname : groupSamples) {\n \t\t//groupNames.add(groupname);\n \t//}\n \t\n \tgroupsview.setAdapter(new ArrayAdapter<String>(this, \n \t\t\t\tandroid.R.layout.simple_list_item_1, groupNames));\n }", "void reschedule(Collection<Group> groupInfos);", "@Override\n public void start() { }", "public void start() {}", "public void start() {}", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public void start()\n {\n }", "@Override\r\n\tpublic void start() {\n\t\tsuper.start();\r\n\t\t\r\n\t}", "@Override\n public void start() {}", "@PostMapping(\"/batchStart\")\n @PreAuthorize(ConstantProperties.HAS_ROLE_ADMIN)\n public BaseResponse batchStartGroup(@RequestBody @Valid ReqBatchStartGroup req, BindingResult result)\n throws NodeMgrException {\n checkBindResult(result);\n Instant startTime = Instant.now();\n BaseResponse baseResponse = new BaseResponse(ConstantCode.SUCCESS);\n log.info(\"start batchStartGroup startTime:{} groupId:{}\", startTime.toEpochMilli(),\n req.getGenerateGroupId());\n List<RspOperateResult> operateResultList = groupService.batchStartGroup(req);\n baseResponse.setData(operateResultList);\n log.info(\"end batchStartGroup useTime:{} result:{}\",\n Duration.between(startTime, Instant.now()).toMillis(),\n JsonTools.toJSONString(baseResponse));\n return baseResponse;\n }", "@Override public void start() {\n }", "@Override\n public void start(GameData gameData, World world) {\n asteroids = new ArrayList<>();\n for (int i = 0; i <= random.nextInt(MAX_NUM_ASTEROIDS); i++) {\n asteroid = createAsteroid(gameData);\n System.out.println(\"Build asteroid: \" + (i + 1) + asteroid.getID());\n asteroids.add(asteroid);\n world.addEntity(asteroid);\n }\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}", "@Override\r\n\tpublic synchronized void start() {\n\t\tsuper.start();\r\n\t}", "@Override\r\n public void start() {\r\n }", "protected void createAndRunAServiceInGroup(String group) throws RunNodesException {\n ImmutableMap<String, String> userMetadata = ImmutableMap.of(\"test\", group);\n ImmutableSet<String> tags = ImmutableSet.of(group);\n Stopwatch watch = Stopwatch.createStarted();\n template = buildTemplate(client.templateBuilder());\n template.getOptions().inboundPorts(22, 8080).blockOnPort(22, 300).userMetadata(userMetadata).tags(tags);\n NodeMetadata node = getOnlyElement(client.createNodesInGroup(group, 1, template));\n long createSeconds = watch.elapsed(TimeUnit.SECONDS);\n final String nodeId = node.getId();\n //checkUserMetadataContains(node, userMetadata);\n //checkTagsInNodeEquals(node, tags);\n getAnonymousLogger().info(\n format(\"<< available node(%s) os(%s) in %ss\", node.getId(), node.getOperatingSystem(), createSeconds));\n watch.reset().start();\n client.runScriptOnNode(nodeId, JettyStatements.install(), nameTask(\"configure-jetty\"));\n long configureSeconds = watch.elapsed(TimeUnit.SECONDS);\n getAnonymousLogger().info(\n format(\n \"<< configured node(%s) with %s and jetty %s in %ss\",\n nodeId,\n exec(nodeId, \"java -fullversion\"),\n exec(nodeId, JettyStatements.version()), configureSeconds));\n trackProcessOnNode(JettyStatements.start(), \"start jetty\", node);\n client.runScriptOnNode(nodeId, JettyStatements.stop(), runAsRoot(false).wrapInInitScript(false));\n trackProcessOnNode(JettyStatements.start(), \"start jetty\", node);\n }", "public final void rule__AstInitialize__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:13395:1: ( rule__AstInitialize__Group__1__Impl rule__AstInitialize__Group__2 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:13396:2: rule__AstInitialize__Group__1__Impl rule__AstInitialize__Group__2\n {\n pushFollow(FOLLOW_rule__AstInitialize__Group__1__Impl_in_rule__AstInitialize__Group__127124);\n rule__AstInitialize__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstInitialize__Group__2_in_rule__AstInitialize__Group__127127);\n rule__AstInitialize__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Arguments__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:14261:1: ( rule__Arguments__Group__0__Impl rule__Arguments__Group__1 )\r\n // InternalGo.g:14262:2: rule__Arguments__Group__0__Impl rule__Arguments__Group__1\r\n {\r\n pushFollow(FOLLOW_72);\r\n rule__Arguments__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__Arguments__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "public void start(){\n return;\n }", "public final void rule__Commands__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:940:1: ( rule__Commands__Group_1__0__Impl rule__Commands__Group_1__1 )\n // InternalWh.g:941:2: rule__Commands__Group_1__0__Impl rule__Commands__Group_1__1\n {\n pushFollow(FOLLOW_9);\n rule__Commands__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Commands__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void start(){\n }", "public final void rule__Compilation_initial__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:4379:1: ( rule__Compilation_initial__Group__0__Impl rule__Compilation_initial__Group__1 )\r\n // InternalGo.g:4380:2: rule__Compilation_initial__Group__0__Impl rule__Compilation_initial__Group__1\r\n {\r\n pushFollow(FOLLOW_3);\r\n rule__Compilation_initial__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__Compilation_initial__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public void setStartBankGroup(int num)\n\t{\n\t\tsetGroup(_Prefix + HardZone.STARTBANK.toString(), num);\n\t}", "public RunGroupShared() {\n\t\t// This is 1 if there are no RunGroups in the archive, and increments thereafter.\n\t\trunNum = ChronoTimer.getArchive().size() + 1;\n\t\t\n\t\t// Instantiations.\n\t\tstartQueue = new LinkedBlockingQueue<Run>();\n\t\tfinishQueue = new LinkedBlockingQueue<Run>();\n\t\tcompletedRuns = new LinkedBlockingQueue<Run>();\n\t}" ]
[ "0.6420724", "0.63605994", "0.62691", "0.6219143", "0.6187566", "0.601007", "0.58749366", "0.57307297", "0.56964344", "0.5648612", "0.5619462", "0.5593754", "0.55855215", "0.55443966", "0.55278474", "0.5511684", "0.5486733", "0.5484433", "0.54698664", "0.54598886", "0.54530084", "0.5437808", "0.541768", "0.5415751", "0.5415414", "0.5412774", "0.54123616", "0.53982776", "0.53845066", "0.5380044", "0.5376182", "0.5374338", "0.5370007", "0.536452", "0.5360543", "0.5352956", "0.53473115", "0.53441256", "0.5338721", "0.53339225", "0.5333222", "0.5330719", "0.5325085", "0.5323848", "0.5317071", "0.5310889", "0.5297117", "0.52961177", "0.52923644", "0.5280157", "0.5280157", "0.52734816", "0.5271185", "0.52599025", "0.52313465", "0.52270764", "0.5218471", "0.52124286", "0.52077013", "0.52041477", "0.5196647", "0.51869714", "0.51865053", "0.51865053", "0.51847064", "0.518291", "0.51811713", "0.517539", "0.51747185", "0.51747185", "0.5172637", "0.5164476", "0.515975", "0.5159277", "0.51525515", "0.51512325", "0.51501644", "0.513389", "0.513389", "0.513389", "0.513389", "0.513389", "0.513389", "0.513389", "0.51333755", "0.5132264", "0.51307297", "0.51303005", "0.5121512", "0.51196796", "0.51167303", "0.51167303", "0.51167303", "0.51167303", "0.5115728", "0.51100653", "0.51042", "0.510388", "0.5102839", "0.5096956" ]
0.688958
0
Invoked to end an all group.
void endAll(GroupSG group) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void endVisit(Group group);", "protected void end() {\n \t// theres nothing to end\n }", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\n \n \n }", "protected void end()\n\t{\n\t}", "protected void end() {\n\r\n\t}", "void endSequence(GroupSG group) throws SAXException;", "public void end();", "protected abstract boolean end();", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void end() {\n\t\t// Empty on purpose, no cleanup required yet\n\t}", "@Override\n\tpublic void end() {\n\t\t\n\t}", "protected void endBatch() {\n \n }", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n public void end() {\n }", "public void exit(GroupElement node) {\n exit((AnnotatedBase)node);\n }", "public void end() {\n\n }", "@Override\r\n\tprotected void end() {\r\n\t}", "public abstract void end();", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "public void end() {\n\t\tsigue = false;\n\t}", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "public void endCollection() {\n if (recordHandler != null)\n recordHandler.endCollection();\n }", "@Override\n\tprotected void end() {\n\t\t\n\t}", "protected void finished(){\n if (doFilterUpdate) {\n //runFilterUpdates();\n }\n \n double groupTotalTimeSecs = (System.currentTimeMillis() - (double) groupStartTime) / 1000;\n log.info(\"Job \"+id+\" finished \" /*+ parsedType*/ + \" after \"\n + groupTotalTimeSecs + \" seconds\");\n \n ((DistributedTileBreeder)breeder).jobDone(this);\n }", "void endChoice(GroupSG group) throws SAXException;", "public void allFinished() {\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n protected void end() {\n }", "protected void end() {\n \tclimber.ascend(0, 0);\n }", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "protected void end() {\n isFinished();\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n\n }", "@Override\r\n protected void end() {\r\n\r\n }", "void endEntry();", "public void end(){\n\t\tfor(ParticleBatch<?> batch : batches)\n\t\t\tbatch.end();\n\t}", "public final void rule__VoidOperation__Group__9__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2231:1: ( ( 'END' ) )\n // InternalBSQL2Java.g:2232:1: ( 'END' )\n {\n // InternalBSQL2Java.g:2232:1: ( 'END' )\n // InternalBSQL2Java.g:2233:2: 'END'\n {\n before(grammarAccess.getVoidOperationAccess().getENDKeyword_9()); \n match(input,34,FOLLOW_2); \n after(grammarAccess.getVoidOperationAccess().getENDKeyword_9()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tprotected void end() {\n\t\t//System.out.println(this.getClass().getSimpleName() + \" end\");\n\t}", "public GroupConditions endGroup(){\r\n\t\tSqlNode parent = getParent();\r\n\t\tif(parent instanceof GroupConditions){\r\n\t\t\treturn (GroupConditions)parent;\r\n\t\t}\r\n\t\tthrow new RuntimeException(\"GroupConditions.end(): GroupConditions' parent should be the same type!!\");\r\n\t}", "protected void end() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" ending\");\r\n\t\t }", "public void redo() {\n for (NoteGroupable noteGroupable : group.getNoteGroupables()) {\n compositionManager.deleteGroupable(noteGroupable);\n }\n compositionManager.addGroupable(group);\n }" ]
[ "0.7165791", "0.65336674", "0.6446589", "0.6446589", "0.6446589", "0.6446589", "0.6446589", "0.6446589", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.64147663", "0.6412464", "0.6412464", "0.6412464", "0.6412464", "0.64024967", "0.6342986", "0.6334028", "0.63215053", "0.6307307", "0.62769973", "0.6273418", "0.6228927", "0.6218925", "0.621216", "0.6210542", "0.6210542", "0.6203764", "0.6202629", "0.6187905", "0.6169713", "0.6167659", "0.61431855", "0.61431855", "0.61431855", "0.61431855", "0.61384606", "0.6123367", "0.60931474", "0.6090789", "0.60878026", "0.60831237", "0.6081655", "0.60717064", "0.60717064", "0.60717064", "0.6062188", "0.60209537", "0.60121423", "0.60121423", "0.5973953", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59679914", "0.59648967", "0.5921437", "0.5903923", "0.5874737", "0.58485854", "0.5847848", "0.583157", "0.58301544", "0.58120036" ]
0.7423041
0
Invoked to start a complex content types content.
void startComplexContent(ComplexTypeSG type) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startContent() {\n iTextContext.pageNumber().startMainMatter();\n }", "void simpleContent(ComplexTypeSG type) throws SAXException;", "void endComplexContent(ComplexTypeSG type) throws SAXException;", "abstract public Content createContent();", "public ContentType () {\n\t\tsuper();\n\t}", "public Content createContent();", "HateosContentType() {\n super();\n }", "@Override\r\n\tpublic void buildPart() {\n\t\t\r\n\t}", "protected abstract Content newContent();", "public void inflate(){\n\t\tInflateTextContent();\n\t\tif(tempData.get(\"Media_Type\").equals(\"1\")){\n\t\t\tgenerateMediaView();\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"2\")){\n\t\t\tprocessURL(2);\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"3\")){\n\t\t\tprocessURL(3);\n\t\t}\t\n\t}", "public ContentKj () {\n\t\tsuper();\n\t}", "public void startContent() throws XPathException {\r\n if (depthOfHole == 0) {\r\n nextReceiver.startContent();\r\n }\r\n }", "public void setContentObj(String contentObj) {\n this.contentObj = contentObj;\n }", "private StaticContent() {\r\n super(IStaticContent.TYPE_ID);\r\n }", "@Override\n\tpublic void startDocument() {\n\t\t\n\t}", "protected void initializeContent() throws PiaRuntimeException{\n InputStream in;\n String ztype = null;\n\n try{\n in = fromMachine().inputStream();\n\n if( (ztype = contentType()) == null )\n\tztype = \"text/html\";\n\n contentObj = cf.createContent( ztype, in );\n if( contentObj != null )\n\tcontentObj.setHeaders( headers() );\n else{\n\tPia.debug(this, \"Unknown header type...\");\n\tString msg = \"Unknown header type...\\n\";\n\tthrow new PiaRuntimeException (this\n\t\t\t\t , \"initializeContent\"\n\t\t\t\t , msg) ;\n }\n\n }catch(IOException e){\n Pia.debug( e.toString() );\n }\n }", "public void startPage() {\n\t\tthis.dataComposer.startPage();\n\t}", "@Override\n public void setContentType(String arg0) {\n\n }", "public void LoadContent(){\n }", "@Override\n public int getContentType() {\n return 0;\n }", "void start(String meta);", "private void LoadContent()\n {\n \n }", "public void run() {\n LOG.info(\"Starting Contentful crawling\");\n //Partition of ContentTypes: TRUE: vocabularies and FALSE: non-vocabularies/web content\n Map<Boolean, List<CMAContentType>> contentTypes = getContentTypes();\n List<CMAContentType> vocContentTypes = contentTypes.get(Boolean.TRUE);\n List<CMAContentType> webContentTypes = contentTypes.get(Boolean.FALSE);\n\n //Extract vocabularies meta data\n VocabularyTerms vocabularyTerms = getVocabularyTerms(vocContentTypes);\n\n //Mapping generator can be re-used for all content types\n MappingGenerator mappingGenerator = new MappingGenerator(vocContentTypes);\n\n //Gets the ContentType.resourceId for news and articles, which vary by space\n newsContentTypeId = getContentTypeId(webContentTypes, configuration.getNewsContentType());\n articleContentTypeId = getContentTypeId(webContentTypes, configuration.getArticleContentType());\n projectContentTypeId = getContentTypeId(webContentTypes, configuration.getProjectContentType());\n\n\n //Crawl all Content Types, except for vocabularies\n crawlContentTypes(webContentTypes, mappingGenerator, vocabularyTerms);\n LOG.info(\"Contentful crawling has finished\");\n }", "protected abstract Component addContent();", "public void setContentType(String contentType);", "public void construct(){\n\t\tbuilder.buildPart1();\n\t\tbuilder.buildPart2();\n\t\tbuilder.retrieveResult();\n\t}", "public void setContentType(String s) {\n\n\t}", "@Override\n public void baseSetContentView() {\n View layout = View.inflate(this,\n R.layout.ac_ext_sharedfilesd_grouphome, mContentLayout);\n // mContentLayout.addView(layout);\n intent1 = getIntent();\n context = this;\n\n }", "public Content() {\n\t}", "public void setContentType(java.lang.Object contentType) {\r\n this.contentType = contentType;\r\n }", "@Override\n\t\tpublic void start(Bundle msgData) {\n\n\t\t}", "protected void createContents() {\n\n\t}", "public void setContentTypes(String contentTypes) {\n this.contentTypes = contentTypes;\n }", "public void setContent(Object content) {\n this.content = content;\n }", "@Override\n\tpublic void setContentView() {\n\t\tsetContentView(R.layout.activity_edit_person);\n\t\tMyApplication.getInstance().addActivity(this);\n\t\tflag=getIntent().getStringExtra(\"CONTEXT\");\n\t\tcontent=getIntent().getStringExtra(\"CONTENT\");\n\t\tLog.i(\"TAG\", flag);\n\t\tif(flag==null){\n\t\t\treturn;\n\t\t}\n\t}", "abstract ContentType getContnentType();", "public void startContent() throws XPathException {\r\n nextReceiver.startElement(elementNameCode, elementProperties);\r\n\r\n final int length = bufferedAttributes.getLength();\r\n for (int i=0; i<length; i++) {\r\n nextReceiver.attribute(bufferedAttributes.getNameCode(i),\r\n bufferedAttributes.getValue(i)\r\n );\r\n }\r\n for (NamespaceBinding nb : bufferedNamespaces) {\r\n nextReceiver.namespace(nb, 0);\r\n }\r\n\r\n nextReceiver.startContent();\r\n }", "public abstract Object getContent();", "public void runStarted(OpenDefinitionsDocument doc) { }", "public static ObjectInstance getComplexTypeObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 1);\n properties.put(\"theLabel\", getComplexTypeMBean().getTheLabel());\n properties.put(\"complexitem\", getComplexTypeMBean()\n .getComplexClass().toString());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'ComplexType' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new ComplexType().getClass().getName());\n }", "public Complex() {\n initComponents();\n }", "public abstract void startObject();", "public void startDocument() throws SAXException {\n super.startDocument();\n mThumbnailList = new ArrayList<ThumbnailMode>();\n }", "@Override\n public void run() {\n // Definition init\n // ===================================================================================================\n\n cElementalPrimitive.run();\n\n cPrimitiveDefinition.run();\n\n eQuarkDefinition.run();\n eLeptonDefinition.run();\n eNeutrinoDefinition.run();\n eBosonDefinition.run();\n\n dHadronDefinition.run();\n\n iaeaNuclide.run();\n\n dAtomDefinition.run();\n\n ePrimalAspectDefinition.run();\n\n dComplexAspectDefinition.run();\n }", "private void setContentTypeImmediate(AppsCustomizePagedView.ContentType type) {\n onTabChangedStart();\n onTabChangedEnd(type);\n }", "protected void sequence_SlideContent(ISerializationContext context, SlideContent semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "@Override\n public void executeByPluginType(String contentType) {\n pluginFactory\n .getPlugin(contentType)\n .otherOutput();\n }", "private void buildPart(String objectName, MetaExpression bodyPart, ConstructContext context, MultipartEntityBuilder builder) {\n if (bodyPart.getType() != OBJECT) {\n throw new RobotRuntimeException(\"A multipart body part must always be an OBJECT. Please check the documentation.\");\n }\n\n Map<String, MetaExpression> fields = bodyPart.getValue();\n // Check if there are unknown options\n fields.keySet()\n .stream()\n .filter(or(negate(FIELD_NAME::equals), objectName != null))\n .filter(negate(FIELD_CONTENT::equals))\n .filter(negate(FIELD_TYPE::equals))\n .filter(negate(FIELD_CONTENT_TYPE::equals))\n .findAny()\n .ifPresent(key -> {\n throw new RobotRuntimeException(\"Unknown option '\" + key + \"' in body part.\");\n });\n\n String name = objectName == null ? getNameField(fields).getStringValue() : objectName;\n\n // Extract the required information\n MetaExpression content = getRequiredField(fields, FIELD_CONTENT, name);\n MetaExpression type = getRequiredField(fields, FIELD_TYPE, name);\n Optional<ContentType> contentType = get(fields, FIELD_CONTENT_TYPE)\n .map(MetaExpression::getStringValue)\n .map(OptionsFactory::parseContentType);\n\n // Parse the body\n switch (type.getStringValue().toLowerCase()) {\n case \"text\":\n buildTextPart(name, content, contentType.orElse(BodyType.TEXT.getDefaultType()), builder);\n break;\n case \"stream\":\n buildBinaryPart(name, content, contentType.orElse(BodyType.STREAM.getDefaultType()), builder);\n break;\n case \"file\":\n buildFilePart(name, content, contentType.orElse(BodyType.STREAM.getDefaultType()), context, builder);\n break;\n default:\n throw new RobotRuntimeException(\"Invalid type '\" + type.getStringValue() + \" for body part \" + name + \"\\n\" +\n \"Available types: text, stream and file\"\n );\n }\n }", "public boolean handles(String contentType, String packaging);", "public abstract void setContentType(ContentType contentType);", "public StartEngagementRequest withContent(String content) {\n setContent(content);\n return this;\n }", "public void start(){\n this.speakerMessageScreen.printScreenName();\n mainPart();\n }", "@Override\r\n\tpublic void launch(IEditorPart arg0, String arg1) {\n\r\n\t}", "public void setContentType(String contentType) {\n this.contentType = contentType;\n }", "public void setContentType(String contentType) {\n this.contentType = contentType;\n }", "public void setContentType(String contentType) {\n this.contentType = contentType;\n }", "public abstract Content processCompleteRequest(ContentCompleteRequest contentCompleteRequest);", "public void importMedia(){\r\n \r\n }", "public void startDocument ()\n\t\t{\n\t\t\t//System.out.println(\"Start document\");\n\t\t}", "public void start() {\n if (editor == null) {\n return;\n }\n \n DocumentManager.register(doc, styledText, documentManager);\n \n preCode = doc.get();\n \n super.start();\n }", "public NGetData00MDataContent() {\n\t\tsuper();\n\n\t\t// Add design-time configured components.\n\t\tinitComponents();\n\t}", "public void startInfo(Document src);", "public StartEngagementRequest withPublicContent(String publicContent) {\n setPublicContent(publicContent);\n return this;\n }", "void startEntry(String type);", "public static void generateUploadRichMedia()\n\t{\t\n\t\t\n\t\tAdvRMContentDetail rmContentDetail = new AdvRMContentDetail();\n\t\trmContentDetail.getContentId();\n\t\trmContentDetail.getAdGroupLandingURL();\n\t\trmContentDetail.getRmContent().getContentProvider();\n\t\n\t\t\n\t}", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "@Override\n public Map<String, Object> contentDescription(URI uri, InputStream inputStream, Map<?, ?> options, Map<Object, Object> context) throws IOException\n {\n Map<String, Object> result = super.contentDescription(uri, inputStream, options, context);\n \n XMLResource xmlResource = load(uri, inputStream, options, context);\n EList<EObject> contents = xmlResource.getContents();\n if (!contents.isEmpty())\n {\n EObject eObject = contents.get(0);\n if (eObject instanceof XMLTypeDocumentRoot)\n {\n XMLTypeDocumentRoot documentRoot = (XMLTypeDocumentRoot)eObject;\n EList<EObject> rootContents = documentRoot.eContents();\n String rootElementName = null;\n String rootElementNamespace = null;\n if (!rootContents.isEmpty())\n {\n EObject root = rootContents.get(0);\n EReference eContainmentFeature = root.eContainmentFeature();\n rootElementName = eContainmentFeature.getName();\n rootElementNamespace = ExtendedMetaData.INSTANCE.getNamespace(eContainmentFeature);\n if (XMI_KIND.equals(kind) && isXMINameAndNamespace(rootElementName, rootElementNamespace))\n {\n // Look for the first non-XMI element.\n //\n for (EObject candidate : root.eContents())\n {\n eContainmentFeature = candidate.eContainmentFeature();\n rootElementNamespace = ExtendedMetaData.INSTANCE.getNamespace(eContainmentFeature);\n if (!isXMINamespace(rootElementNamespace))\n {\n rootElementName = eContainmentFeature.getName();\n break;\n }\n }\n }\n }\n \n if (rootElementName != null && isMatchingNamespace(rootElementNamespace))\n {\n boolean elementNameMatched = false;\n if (elementNames == null || elementNames.length == 0)\n {\n elementNameMatched = true;\n }\n else\n {\n for (String elementName : elementNames)\n {\n if (rootElementName.equals(elementName))\n {\n elementNameMatched = true;\n break;\n }\n }\n }\n if (elementNameMatched)\n {\n result.put(VALIDITY_PROPERTY, ContentHandler.Validity.VALID);\n result.put(CONTENT_TYPE_PROPERTY, contentTypeID == null ? rootElementNamespace == null ? \"\" : rootElementNamespace : contentTypeID);\n return result;\n }\n }\n }\n }\n return result;\n }", "public void startResponse(String contentType) throws IOException {\n if (!endedLastResponse) {\n endResponse();\n }\n // Start the next one\n //out.println(\"Content-Type: \" + contentType);\n //out.println();\n endedLastResponse = false;\n }", "@Override\n public void actionPerformed(ActionEvent event)\n {\n TransformationsListener.getListener().setStarted(true);\n if (this.getName().equals(sACTION_TITLE))\n {\n ContentClassInsertionDialog dialog=new ContentClassInsertionDialog();\n if (dialog.getClassName()!=null)\n {\n ElementCollector.ReturnElement cCreatedElement=ReqToConTransformations.createContentClass(dialog.getClassName(),\n TransformationsListener.getListener().getPosition(),((Package)(dialog.getPackage())));\n\n int iAttributes=0;\n int iAssociations=0;\n \n if (dialog.getAttributesCheck())\n {\n iAttributes=ReqToConTransformations.addAttributesToContentClass(cCreatedElement.cClass, dialog.getAssociationsCheck());\n }\n\n if (dialog.getAssociationsCheck())\n {\n iAssociations=ReqToConTransformations.addAssociationsToContentClass(cCreatedElement.cClass,cCreatedElement.cShape);\n }\n \n MessageWriter.log(\"Content class \\\"\"+cCreatedElement.cClass.getName()+\"\\\" including \"+\n iAttributes+\" attributes and \"+iAssociations+\" associations created\",\n Logger.getLogger(ContentModelInsertion.class));\n }\n }\n TransformationsListener.getListener().setStarted(false);\n }", "public CmsLayoutXmlContentHandler() {\n\n super();\n }", "@Override\n\tpublic void start() {\n\n\t}", "public void addContent() {\n content.add(neuralNetAndDataSet);\n content.add(trainingController);\n JMEVisualizationTopComponent.this.requestActive();\n }", "@Override\n public boolean startContent(int statusCode, Compression compression) {\n return true;\n }", "public void startDocument ()\n {\n\tSystem.out.println(\"Start document\");\n }", "public DocumentLifecycleWorkflowRequest setContentTypeJson() {\n\t\tthis.headerContentType = HttpRequestConnector.HTTP_CONTENT_TYPE_JSON;\n\t\treturn this;\n\t}", "void start(JavaScriptObject source, JavaScriptObject type);", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "public void playContent() {\n this.taskHandler.run(this::inlinePlay);\n }", "public void start()\n {\n uploadDataFromFile();\n menu.home();\n home();\n }", "void addComplexType(ComplexTypeDefinition ctd) throws ResultException, DmcValueException {\n if (checkAndAdd(ctd.getObjectName(),ctd,complexTypeDefs) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsg(ctd.getObjectName(),ctd,complexTypeDefs,\"complex type names\"));\n \tthrow(ex);\n }\n \n if (checkAndAddDOT(ctd.getDotName(),ctd,globallyUniqueMAP,null) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsgDOT(ctd.getObjectName(),ctd,globallyUniqueMAP,\"definition names\"));\n currentSchema = null;\n \tthrow(ex);\n } \n \n TypeDefinition td = new TypeDefinition(ctd);\n td.setInternallyGenerated(true);\n td.setName(ctd.getName());\n \n // The name of a complex type definition is schema.complextype.ComplexTypeDefinition\n // For the associated type, it will be schema.complextype.TypeDefinition\n DotName typeName = new DotName((DotName) ctd.getDotName().getParentName(),\"TypeDefinition\");\n// DotName nameAndTypeName = new DotName(td.getName() + \".TypeDefinition\");\n td.setDotName(typeName);\n// td.setNameAndTypeName(nameAndTypeName);\n\n td.addDescription(\"This is an internally generated type to represent complex type \" + ctd.getName() + \" values.\");\n td.setIsEnumType(false);\n td.setIsRefType(false);\n \n td.setTypeClassName(ctd.getDefinedIn().getSchemaPackage() + \".generated.types.DmcType\" + ctd.getName());\n td.setPrimitiveType(ctd.getDefinedIn().getSchemaPackage() + \".generated.types.\" + ctd.getName());\n td.setDefinedIn(ctd.getDefinedIn());\n \n // We add the new type to the schema's list of internally generated types\n ctd.getDefinedIn().addInternalTypeDefList(td);\n \n internalTypeDefs.put(td.getName(), td);\n \n // And then we add the type if it's not already there - this can happen when\n // we're managing a generated schema and the type definition has already been added\n // from the typedefList attribute\n if (typeDefs.get(td.getName()) == null)\n \taddType(td);\n }", "@Override\n\tprotected void initContentView() {\n\t\t\n\t}", "@Override\r\n\tpublic void start() {\n\t\tsuper.start();\r\n\t\t\r\n\t}", "public void startContent() throws XPathException {\n if (activeDepth > 0) {\n super.startContent();\n } else if (matched) {\n activeDepth = 1;\n super.startContent();\n }\n }", "public void start(){\n\t\tsuper.start();\n\t}", "@Override\n public void start() { }", "public void setContent(String content) { this.content = content; }", "@Override\n\tpublic void start() {\n\t}", "@Override\n\tpublic void start() {\n\t}", "@Override\r\n public void start() {\r\n }", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\teActorEClass.getESuperTypes().add(this.getEDomainSpecificEntity());\n\t\teItemEClass.getESuperTypes().add(this.getEDomainSpecificEntity());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(eDomainSchemaEClass, EDomainSchema.class, \"EDomainSchema\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEDomainSchema_Cs(), this.getEControlSchema(), null, \"cs\", null, 0, 1, EDomainSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDomainSchema_Ds(), this.getEDataSchema(), null, \"ds\", null, 0, 1, EDomainSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eControlSchemaEClass, EControlSchema.class, \"EControlSchema\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEControlSchema_Actor(), this.getEActor(), null, \"actor\", null, 1, -1, EControlSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDataSchemaEClass, EDataSchema.class, \"EDataSchema\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getEDataSchema_Cs(), this.getEControlSchema(), null, \"cs\", null, 1, 1, EDataSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDataSchema_Item(), this.getEItem(), null, \"item\", null, 1, -1, EDataSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificEntityEClass, EDomainSpecificEntity.class, \"EDomainSpecificEntity\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificEntity_CommandPriority(), ecorePackage.getEInt(), \"commandPriority\", null, 0, 1, EDomainSpecificEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEDomainSpecificEntity_Cmd(), this.getEDomainSpecificCommand(), null, \"cmd\", null, 0, -1, EDomainSpecificEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificCommandEClass, EDomainSpecificCommand.class, \"EDomainSpecificCommand\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificCommand_CmdId(), ecorePackage.getEInt(), \"cmdId\", null, 0, 1, EDomainSpecificCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eActorEClass, EActor.class, \"EActor\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEActor_KindInteraction(), this.getECoordinationBehavior(), \"kindInteraction\", null, 0, 1, EActor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEActor_TypesControlled(), this.getEDomainSpecificType(), null, \"typesControlled\", null, 0, -1, EActor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eItemEClass, EItem.class, \"EItem\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEItem_ArisingBehavior(), this.getEArising(), \"arisingBehavior\", null, 0, 1, EItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getEItem_Type(), this.getEDomainSpecificType(), null, \"type\", null, 1, 1, EItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(eDomainSpecificTypeEClass, EDomainSpecificType.class, \"EDomainSpecificType\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getEDomainSpecificType_InteractionBehavior(), this.getEInteractionBehavior(), \"interactionBehavior\", null, 0, 1, EDomainSpecificType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getEDomainSpecificType_Cardinality(), this.getECardinality(), \"cardinality\", null, 0, 1, EDomainSpecificType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Initialize enums and add enum literals\n\t\tinitEEnum(eArisingEEnum, EArising.class, \"EArising\");\n\t\taddEEnumLiteral(eArisingEEnum, EArising.STATIC);\n\t\taddEEnumLiteral(eArisingEEnum, EArising.DYNAMIC);\n\n\t\tinitEEnum(eCardinalityEEnum, ECardinality.class, \"ECardinality\");\n\t\taddEEnumLiteral(eCardinalityEEnum, ECardinality.ONE);\n\t\taddEEnumLiteral(eCardinalityEEnum, ECardinality.MANY);\n\n\t\tinitEEnum(eInteractionBehaviorEEnum, EInteractionBehavior.class, \"EInteractionBehavior\");\n\t\taddEEnumLiteral(eInteractionBehaviorEEnum, EInteractionBehavior.SYNC);\n\t\taddEEnumLiteral(eInteractionBehaviorEEnum, EInteractionBehavior.ASYNC);\n\n\t\tinitEEnum(eCoordinationBehaviorEEnum, ECoordinationBehavior.class, \"ECoordinationBehavior\");\n\t\taddEEnumLiteral(eCoordinationBehaviorEEnum, ECoordinationBehavior.LOCAL);\n\t\taddEEnumLiteral(eCoordinationBehaviorEEnum, ECoordinationBehavior.DISTRIBUTED);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "@Override\n public void loadViewContent(PortletRequest request) {\n }", "private void setWebContent() {\r\n\t\tsetDataContent();\r\n\t\twebContent.addComponent(new Label(\"Concesionario\"));\r\n\t\twebContent.addComponent(dataContent);\r\n\t}", "public String getContentType() {\n return this.contentType;\n }", "public abstract void setContentObject(Object object);", "public void setContenttype(String contenttype) {\n\t\tthis.contenttype = contenttype;\n\t}", "void serialize(CAS cas, ContentHandler contentHandler, XmiDocSerializer ser) throws SAXException {\n contentHandler.startDocument();\n try {\n ser.cds.serialize();\n } catch (Exception e) {\n throw (SAXException) e;\n }\n contentHandler.endDocument();\n }", "private void addContentToLuceneDoc() {\n\t\t// Finish storing the document in the document store (parts of it may already have been\n\t\t// written because we write in chunks to save memory), retrieve the content id, and store\n\t\t// that in Lucene.\n\t\tint contentId = storeCapturedContent();\n\t\tcurrentLuceneDoc.add(new NumericField(ComplexFieldUtil.fieldName(\"contents\", \"cid\"),\n\t\t\t\tStore.YES, false).setIntValue(contentId));\n\n\t\t// Store the different properties of the complex contents field that were gathered in\n\t\t// lists while parsing.\n\t\tcontentsField.addToLuceneDoc(currentLuceneDoc);\n\t}" ]
[ "0.61629", "0.5855198", "0.5693609", "0.55060077", "0.5465003", "0.5457315", "0.5417028", "0.5340758", "0.5321302", "0.53063697", "0.53016233", "0.52662086", "0.5224364", "0.52077216", "0.51536375", "0.51506984", "0.51472795", "0.5121481", "0.5120768", "0.5118557", "0.51177096", "0.51094687", "0.51075983", "0.5094072", "0.50922203", "0.5033854", "0.50101894", "0.498763", "0.49381942", "0.4892608", "0.48894128", "0.48884878", "0.48865247", "0.48831984", "0.4880997", "0.48788485", "0.48776698", "0.4875477", "0.4870508", "0.48699868", "0.4860656", "0.4842054", "0.48403782", "0.4826857", "0.4826707", "0.48194662", "0.4812959", "0.48005754", "0.47943035", "0.47930673", "0.47911644", "0.4791039", "0.4787567", "0.47837043", "0.47837043", "0.47837043", "0.47763744", "0.47693098", "0.47664204", "0.47562057", "0.47557354", "0.47505948", "0.47459912", "0.47440046", "0.4740875", "0.47308117", "0.47210377", "0.47034043", "0.47019684", "0.46983436", "0.46970987", "0.4694027", "0.46896103", "0.46748906", "0.46693626", "0.46693534", "0.46692654", "0.46692654", "0.46692654", "0.46692654", "0.46657273", "0.46640748", "0.4658425", "0.46575332", "0.46541408", "0.46514076", "0.46479577", "0.4647366", "0.4640058", "0.46383852", "0.46383852", "0.46326986", "0.46311146", "0.46236926", "0.4615537", "0.46152377", "0.46135262", "0.46092314", "0.46001342", "0.45931205" ]
0.7184422
0
Invoked to end a complex content types content.
void endComplexContent(ComplexTypeSG type) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void end(MediaContext context) {\n\n\t}", "public void exit(CommonComplexModification node) {\n exit((CommonTypeDerivation)node);\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\n \n \n }", "protected void end()\n\t{\n\t}", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "public void exit(ComplexExtensionElement node) {\n exit((CommonComplexModification)node);\n }", "@Override\r\n\tprotected void end() {\r\n\t}", "protected void end() {\n\r\n\t}", "@Override\n\tpublic void end() {\n\t\t// Empty on purpose, no cleanup required yet\n\t}", "protected abstract void endTextObject();", "public abstract void endObject();", "@Override\n protected void end() {\n }", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void end() {\n\t\t\n\t}", "@Override\n public void end() {\n }", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\t\t\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "protected void finish() {\n }", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\n protected void end() {\n\n }", "public void end();", "public void endDocument() {\n }", "public void endDocument() { }", "public void finish() {\n\n\t}", "private void finish() {\n }", "public abstract void end();", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n\tvoid endHandling() {\n\t}", "@Override\n\tvoid endHandling() {\n\t}", "@Override\n\tvoid endHandling() {\n\t}", "@Override\n\tvoid endHandling() {\n\t}", "protected abstract boolean end();", "protected void end() {\n \t// theres nothing to end\n }", "@Override\n\tpublic void finish() {\n\n\t}", "@Override\n\tpublic void finish() {\n\n\t}", "@Override\n\tpublic void finish() {\n\n\t}", "public void end() {\n\n }", "@Override\n\tpublic void finish() {\n\t\t\n\t}" ]
[ "0.63628805", "0.6250711", "0.62133384", "0.62133384", "0.62133384", "0.62133384", "0.619453", "0.6175744", "0.6170539", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.6163919", "0.61384314", "0.61384314", "0.61384314", "0.61384314", "0.61384314", "0.61384314", "0.6119234", "0.611613", "0.6090422", "0.6068891", "0.6064563", "0.6060106", "0.6056825", "0.6035824", "0.6035824", "0.6035824", "0.6035824", "0.60337186", "0.6031744", "0.6030463", "0.60273725", "0.60273725", "0.60238725", "0.60238725", "0.60238725", "0.60222656", "0.60208666", "0.60208666", "0.60141563", "0.6004851", "0.5980442", "0.5973604", "0.5961026", "0.59499335", "0.59482723", "0.5937689", "0.593203", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.59215367", "0.5912495", "0.5912495", "0.5912495", "0.5912495", "0.590969", "0.5878897", "0.5877725", "0.5877725", "0.5877725", "0.5870524", "0.5866304" ]
0.7547187
0
Invoked to process an element with simple type.
void simpleElementParticle(GroupSG pGroup,ParticleSG particle) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void simpleContent(ComplexTypeSG type) throws SAXException;", "TypeElement getTypeElement();", "void handleElement(Object elemID);", "void startComplexContent(ComplexTypeSG type) throws SAXException;", "void emptyType(ComplexTypeSG type) throws SAXException;", "Element getGenericElement();", "void element() {}", "protected abstract void onElementRegistered(Level level, T element);", "public T caseTypedElement(TypedElement object) {\r\n\t\treturn null;\r\n\t}", "Object element();", "Object element();", "void visitElement_issue_type(org.w3c.dom.Element element) { // <issue-type>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.getName().equals(\"name\")) { // <issue-type name=\"???\">\n list.issueTypes.add(attr.getValue());\n }\n }\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }", "private static <T> T process(AnnotatedElement element, String annotationType,\n\t\t\tProcessor<T> processor) {\n\t\treturn recursivelyProcess(element, annotationType, processor,\n\t\t\t\tnew HashSet<AnnotatedElement>(), 0);\n\t}", "public T caseElement(Element object)\n {\n return null;\n }", "public T caseElement(Element object) {\n\t\treturn null;\n\t}", "public T caseElement(Element object) {\n\t\treturn null;\n\t}", "public T caseElement(Element object) {\n\t\treturn null;\n\t}", "public void setElementType(String element_type) {\n\t\tthis.element_type = element_type;\n\t}", "protected abstract void analyze(E element) throws EX;", "protected abstract Type loadDefaultElement();", "public Object caseElement(Element object) {\r\n\t\treturn null;\r\n\t}", "protected abstract SimpleType doParseString(String s);", "void infoElementAction(String elementType, String elementName, String messageKey, Object... args);", "protected abstract Object handleElement(Element aElement) throws AeXMLDBException;", "protected abstract boolean processElement(Element node, int uolId) throws\n PropertyException;", "Element getElement(ContentType type, char c);", "public void process(Element element, Map<String, Type> localMap) {\r\n\t\r\n\t\tinspectHybrid(element, localMap);\r\n\t \r\n\t List content = element.getContent();\r\n\t Iterator iterator = content.iterator();\r\n\t \r\n\t while (iterator.hasNext()) {\r\n\t Object o = iterator.next();\r\n\t if (o instanceof Element) {\r\n\t Element child = (Element) o;\r\n\t process(child, localMap); \r\n\t }\r\n\t }\r\n\t}", "public Class getType(ElementList element) {\r\n return element.type();\r\n }", "public E element();", "void visit(Element node);", "protected void parseXmpSimpleProperty(XMPMetadata metadata,\n\t\t\tQName propertyName, XmpPropertyType stype,\n\t\t\tComplexPropertyContainer container)\n\t\t\t\t\tthrows XmpUnknownPropertyTypeException, XmpPropertyFormatException,\n\t\t\t\t\tXMLStreamException {\n\t\ttry {\n\t\t\tAbstractSimpleProperty prop = null;\n\t\t\tArrayList<Attribute> attributes = new ArrayList<Attribute>();\n\t\t\tint cpt = reader.get().getAttributeCount();\n\t\t\tfor (int i = 0; i < cpt; i++) {\n\t\t\t\tattributes.add(new Attribute(null, reader.get()\n\t\t\t\t\t\t.getAttributePrefix(i), reader.get()\n\t\t\t\t\t\t.getAttributeLocalName(i), reader.get()\n\t\t\t\t\t\t.getAttributeValue(i)));\n\t\t\t}\n\t\t\tif (stype == XmpPropertyType.Text) {\n\t\t\t\tprop = new TextType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Integer) {\n\t\t\t\tprop = new IntegerType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Date) {\n\t\t\t\tprop = new DateType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Boolean) {\n\t\t\t\tprop = new BooleanType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Real) {\n\t\t\t\tprop = new RealType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t}\n\t\t\tif (prop != null) {\n\t\t\t\tcontainer.addProperty(prop);\n\t\t\t\t// ADD ATTRIBUTES\n\t\t\t\tfor (Attribute att : attributes) {\n\t\t\t\t\tprop.setAttribute(att);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new XmpUnknownPropertyTypeException(\n\t\t\t\t\t\t\"Unknown simple type found\");\n\t\t\t}\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tthrow new XmpPropertyFormatException(\n\t\t\t\t\t\"Unexpected type found for the property '\"\n\t\t\t\t\t\t\t+ propertyName.getLocalPart() + \"'\", e);\n\t\t}\n\t}", "String getElementStringValue(Object element);", "public void push(TYPE element);", "public Class getType(Element element) {\r\n Class type = element.type();\r\n \r\n if(type == void.class) {\r\n return contact.getType();\r\n }\r\n return type;\r\n }", "public boolean visit(SimpleExtensionElement node) {\n return visit((CommonTypeDerivation)node);\n }", "Element asElement();", "ElementType getElementType();", "@objid (\"002ff058-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public Object visitElement(Element theElement) {\n return null;\n }", "private Object parseElementRaw(XmlElement element) throws Exception\n {\n ElementType type = ElementType.valueOf(element.getName().toUpperCase());\n switch (type)\n {\n case INTEGER:\n return parseInt(element.getValue());\n case REAL:\n return Double.valueOf(element.getValue());\n case STRING:\n return element.getValue();\n case DATE:\n return m_dateFormat.parse(element.getValue());\n case DATA:\n return base64decode(element.getValue());\n case ARRAY:\n return parseArray(element);\n case TRUE:\n return Boolean.TRUE;\n case FALSE:\n return Boolean.FALSE;\n case DICT:\n return parseDict(element);\n default:\n throw new RuntimeException(\"Unexpected type: \" + element.getName());\n }\n }", "@Override\n\tpublic Object visit(SimpleNode node, Object data)\n\t{\n\t\t//Delegate to the appropriate class\n\t\treturn node.jjtAccept(this, data);\n\t}", "String getModeledType(Object elementID) throws Exception;", "public Object firstElement();", "void visitElement_issue_types(org.w3c.dom.Element element) { // <issue-types>\n // element.getValue();\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n if (nodeElement.getTagName().equals(\"issue-type\")) {\n visitElement_issue_type(nodeElement);\n }\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }", "public interface WrapperProcessor {\n\n\tabstract void processSingle(ElementWrapper wrapper);\n\n\tdefault void process(ElementWrapper wrapper) {\n\n\t\tprocessSingle(wrapper);\n\n\t\tif (wrapper instanceof ComplexElementWrapper) {\n\n\t\t\tif (!((ComplexElementWrapper) wrapper).getChildren().isEmpty()) {\n\n\t\t\t\tComplexElementWrapper elem = (ComplexElementWrapper) wrapper;\n\n\t\t\t\tfor (ElementWrapper child : elem.getChildren()) {\n\n\t\t\t\t\tprocess(child);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}\n\n}", "public void process(Object value) {}", "public static Object ElementDefaultValidImmediate(XSTypeDefinition type, String value, ValidationContext context, ValidatedInfo vinfo) {\n/* 288 */ XSSimpleType dv = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 293 */ if (type.getTypeCategory() == 16) {\n/* 294 */ dv = (XSSimpleType)type;\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* 300 */ XSComplexTypeDecl ctype = (XSComplexTypeDecl)type;\n/* */ \n/* */ \n/* 303 */ if (ctype.fContentType == 1) {\n/* 304 */ dv = ctype.fXSSimpleType;\n/* */ \n/* */ }\n/* 307 */ else if (ctype.fContentType == 3) {\n/* 308 */ if (!((XSParticleDecl)ctype.getParticle()).emptiable()) {\n/* 309 */ return null;\n/* */ }\n/* */ } else {\n/* 312 */ return null;\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 317 */ Object actualValue = null;\n/* 318 */ if (dv == null)\n/* */ {\n/* */ \n/* */ \n/* 322 */ dv = STRING_TYPE;\n/* */ }\n/* */ \n/* */ try {\n/* 326 */ actualValue = dv.validate(value, context, vinfo);\n/* */ \n/* 328 */ if (vinfo != null)\n/* 329 */ actualValue = dv.validate(vinfo.stringValue(), context, vinfo); \n/* 330 */ } catch (InvalidDatatypeValueException ide) {\n/* 331 */ return null;\n/* */ } \n/* */ \n/* 334 */ return actualValue;\n/* */ }", "public Class getType(ElementMap element) {\r\n return element.valueType();\r\n }", "public boolean visit(SimpleRestrictionElement node) {\n return visit((CommonTypeDerivation)node);\n }", "MediaPackageElement.Type getElementType();", "@Override\r\n \tpublic int getElementType() {\r\n \t\treturn 0; \r\n \t}", "public T getElement();", "@Override\n public void parseXml(Element ele, LoadContext lc) {\n\n }", "public void parseTypeInfo( Element element, GraphObject go ) {\n NodeList elems = element.getElementsByTagName( \"label\" );\n if ( elems != null && elems.getLength() > 0 ) {\n String label = elems.item( 0 ).getTextContent();\n ( (GNode)go ).setTypeLabel( label );\n }\n ArrayList<AbstractTypeDescriptor> descriptors = new ArrayList<>();\n elems = element.getElementsByTagName( GenericTypeDescriptor.getTagName() );\n if ( elems != null && elems.getLength() > 0 ) {\n for ( int n = 0; n < elems.getLength(); n++ ) {\n AbstractTypeDescriptor descr = GenericTypeDescriptor.getInstanceFromXMLDOM( (Element)elems.item( 0 ) );\n descriptors.add( descr );\n }\n }\n elems = element.getElementsByTagName( WordnetTypeDescriptor.getTagName() );\n if ( elems != null && elems.getLength() > 0 ) {\n for ( int n = 0; n < elems.getLength(); n++ ) {\n AbstractTypeDescriptor descr = WordnetTypeDescriptor.getInstanceFromXMLDOM( (Element)elems.item( 0 ) );\n descriptors.add( descr );\n }\n }\n ( (GNode)go ).setTypeDescriptors( descriptors.toArray( new AbstractTypeDescriptor[ descriptors.size() ] ) );\n }", "void endComplexContent(ComplexTypeSG type) throws SAXException;", "public Object getElement();", "private Object parseElement(XmlElement element) throws XmlParseException\n {\n try\n {\n return parseElementRaw(element);\n }\n catch (Exception e)\n {\n throw new XmlParseException(\"Failed to parse: \" + element.toXml(), e);\n }\n }", "public void process(Object value) {\n\t\t//empty\n\t}", "Type getElementType();", "@Override\n public void visitElement(PsiElement psiElement) {\n if(YamlHelper.isStringValue(psiElement) && YamlElementPatternHelper.getInsideKeyValue(\"services\").accepts(psiElement)) {\n visitConstructor(psiElement);\n visitCall(psiElement);\n }\n\n super.visitElement(psiElement);\n }", "String getElement();", "boolean process(JsonElement element);", "protected void sequence_Element(ISerializationContext context, Element semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.ELEMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.ELEMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getElementAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}", "void visit(DocumentType documentType);", "<T> T getElementFromString(final String elementString, final Class<T> movilizerElementClass);", "public void setElement(String element) {\n this.element = element;\n }", "public Object visit(SimpleNode node, Object data) {\n throw new UnsupportedOperationException(\"SimpleNodes not supported\");\n }", "@ProcessElement public void process(@Element String elem, OutputReceiver<MyProduct> out) {\n LOG.info(\"Line read: {}\\n\", elem);\n //------------------------------------------------------------------\n\n out.output(getMyProduct(elem));\n }", "LocalSimpleType getSimpleType();", "public Object caseProcessElement(ProcessElement object) {\n\t\treturn null;\n\t}", "public void setProcessWebElement(ProcessWebElement<T> processWebElement);", "void processElement(File documentPath) \n\t\t\tthrows XMLFormatException;", "private void processSingleType(EnvWithSubmitInfo env, FieldResults fieldResults, Field field) {\n FieldResult result = ((SingleFieldType) field.fieldType).apply(env);\n if (env.isSubmitted()) {\n if (result.getValidationResult() != ValidationResult.undefined()) {\n // type has set the validation itself. This might happen in complex types. And\n // will\n // override the following validation\n // --- do nothing\n } else {\n result =\n result.ofValidationResult(new Validator(field.criteria).validate(result.getValue()));\n\n // validate with external validators\n }\n } else {\n // do nothing, form is not submitted yet.\n }\n if (fieldResults.containsField(field)) {\n throw new IdenticalFieldException(field);\n }\n fieldResults.put(field, result);\n }", "public void root(Element element)\n {\n }", "public abstract T parse(Object valueToParse, Type type);", "ElementSetNameType createElementSetNameType();", "public void setElement(T elem)\n {\n\n element = elem;\n }", "public void addElement(Object ob) {\r\n\t\tif (ob == null) {\r\n\t\t\telements.add(TObject.nullVal());\r\n\t\t} else if (ob instanceof TObject || ob instanceof ParameterSubstitution || ob instanceof Variable || ob instanceof FunctionDef || ob instanceof Operator || ob instanceof StatementTree || ob instanceof TableSelectExpression) {\r\n\t\t\telements.add(ob);\r\n\t\t} else {\r\n\t\t\tthrow new Error(\"Unknown element type added to expression: \" + ob.getClass());\r\n\t\t}\r\n\t}", "void visitElement_status(org.w3c.dom.Element element) { // <status>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.getName().equals(\"name\")) { // <status name=\"???\">\n list.statuses.add(attr.getValue());\n }\n }\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }", "public void addFirst(T element);", "String getElem();", "private FormProvider handleElement() throws XMLStreamException{\n String name = reader.getAttributeValue(0);\n nextTag();\n NamedElement result = new NamedElement(1, 1, name);\n result.setChild(handleAll());\n nextTag();\n return result;\n }", "@Override\r\n\tpublic void visit(TypeID typeID) {\n\r\n\t}", "protected TypeElement extractModelElement(Element attribute) {\r\n Element e = attribute.asType().accept(\r\n new SimpleTypeVisitor6<Element, Void>() {\r\n @Override\r\n public Element visitDeclared(DeclaredType t, Void p) {\r\n List<? extends TypeMirror> args = t.getTypeArguments();\r\n if (args.size() == 1) {\r\n TypeMirror arg = args.get(0);\r\n return processingEnv.getTypeUtils().asElement(arg);\r\n }\r\n return null;\r\n }\r\n }, null);\r\n if (e == null) {\r\n e = processingEnv.getTypeUtils().asElement(attribute.asType());\r\n }\r\n return e.accept(new SimpleElementVisitor6<TypeElement, Void>() {\r\n @Override\r\n public TypeElement visitType(TypeElement e, Void p) {\r\n return e;\r\n }\r\n }, null);\r\n }", "@Override\n\tpublic void setElement(Element element) {\n\t\t\n\t}", "public Object elConvertType(Object value);", "public void setElement(T newvalue);", "public void type(WebElement ElementToType, String StringToType)\n\t{\n\t\ttry {\n\t\t\tif(ElementToType !=null)\n\t\t\t{\n\t\t\t\twait.until(ExpectedConditions. visibilityOf(ElementToType));\n\t\t\t\tElementToType.clear();\n\t\t\t\tElementToType.sendKeys(StringToType);\n\t\t\t\tLog.info(\"Enter the text, \"+StringToType);\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\tLog.error(\"Element could not found\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLog.error( \"Error while writing the element\" + e.toString() );\n\t\t}\n\t}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "public boolean test(E element);", "@Override\r\n //Triggered when the start of tag is found.\r\n public void startElement(String uri, String localName,\r\n String qName, Attributes attributes)\r\n throws SAXException {\n if (qName.equalsIgnoreCase(\"ITEM\")) {\r\n issue = new Issues();\r\n issueList.add(issue);\r\n }\r\n\r\n if (qName.equalsIgnoreCase(\"KEY\")) {\r\n issue.id = Integer.parseInt(attributes.getValue(\"id\"));\r\n }\r\n if (qName.equalsIgnoreCase(\"TYPE\")) {\r\n if (attributes.getValue(\"id\").equals(\"16\")) {\r\n issue.issuetype = \"TEST CASE\";\r\n }\r\n }\r\n }", "@Override\r\n\tpublic boolean buscar(T elemento) {\n\t\treturn false;\r\n\t}", "public void setElement (T element) {\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\r\n\t}", "public void setElement(T element) {\n\t\tthis.element = element;\n\t}", "public String getElement() { return element; }", "void info(String message, @Nullable Element element);", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析开始\");\n\t}", "@Override\r\n\tpublic boolean getElemento(T elemento) {\n\t\treturn false;\r\n\t}", "@Override\n public Void visitUnknown(Element e, Void p) {\n return null;\n }", "public interface Iprocessor {\n public void process(RoundEnvironment roundEnvironment, Element typeElement, Filer mfFiler, Elements elements, Messager messager);\n}", "@Override\r\n\tpublic E element() {\n\t\treturn null;\r\n\t}" ]
[ "0.6595936", "0.62066174", "0.60976565", "0.5967336", "0.59013283", "0.5899305", "0.58858097", "0.58767897", "0.5759048", "0.5748681", "0.5748681", "0.57028097", "0.56133294", "0.5580151", "0.55738336", "0.55738336", "0.55738336", "0.5552272", "0.5539191", "0.5535698", "0.5530087", "0.5497489", "0.547135", "0.5468304", "0.5465306", "0.54136145", "0.54127234", "0.54013187", "0.53967917", "0.5390142", "0.53855866", "0.53853524", "0.538318", "0.5375458", "0.5323485", "0.5320809", "0.5287877", "0.5284756", "0.52595025", "0.5256809", "0.5233714", "0.5227179", "0.5213059", "0.51890665", "0.5169831", "0.51690847", "0.5167165", "0.51610976", "0.5156877", "0.5130044", "0.5121707", "0.5110266", "0.5098877", "0.50950193", "0.50826377", "0.50708205", "0.5065267", "0.50590974", "0.50564754", "0.5045961", "0.5045757", "0.50372076", "0.5029004", "0.5019715", "0.5019302", "0.50079525", "0.50019866", "0.500175", "0.500069", "0.49966472", "0.49764365", "0.4974126", "0.49721792", "0.49715164", "0.4947456", "0.4933383", "0.4926202", "0.49238846", "0.49227715", "0.49217105", "0.49213302", "0.49198386", "0.49077863", "0.49067482", "0.4904473", "0.4893215", "0.48842362", "0.48818782", "0.4879008", "0.48760417", "0.48712453", "0.48709017", "0.4866932", "0.4861392", "0.4858115", "0.484457", "0.4827251", "0.48258746", "0.48203984", "0.4818536" ]
0.4906564
84
Invoked to process an element with complex type.
void complexElementParticle(GroupSG pGroup, ParticleSG particle) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void startComplexContent(ComplexTypeSG type) throws SAXException;", "void simpleContent(ComplexTypeSG type) throws SAXException;", "void endComplexContent(ComplexTypeSG type) throws SAXException;", "public boolean visit(ComplexExtensionElement node) {\n return visit((CommonComplexModification)node);\n }", "public T caseComplexNode(ComplexNode object) {\r\n\t\treturn null;\r\n\t}", "public interface WrapperProcessor {\n\n\tabstract void processSingle(ElementWrapper wrapper);\n\n\tdefault void process(ElementWrapper wrapper) {\n\n\t\tprocessSingle(wrapper);\n\n\t\tif (wrapper instanceof ComplexElementWrapper) {\n\n\t\t\tif (!((ComplexElementWrapper) wrapper).getChildren().isEmpty()) {\n\n\t\t\t\tComplexElementWrapper elem = (ComplexElementWrapper) wrapper;\n\n\t\t\t\tfor (ElementWrapper child : elem.getChildren()) {\n\n\t\t\t\t\tprocess(child);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}\n\n}", "public boolean visit(CommonComplexModification node) {\n return visit((CommonTypeDerivation)node);\n }", "@Override\r\n public boolean isComplex()\r\n {\n return false;\r\n }", "public boolean visit(ComplexRestrictionElement node) {\n return visit((CommonComplexModification)node);\n }", "public static boolean writeComplex(Output out, Object complex) {\n log.trace(\"writeComplex\");\n if (writeListType(out, complex)) {\n return true;\n } else if (writeArrayType(out, complex)) {\n return true;\n } else if (writeXMLType(out, complex)) {\n return true;\n } else if (writeCustomType(out, complex)) {\n return true;\n } else if (writeObjectType(out, complex)) {\n return true;\n } else {\n return false;\n }\n }", "public final EObject ruleComplexTypeSpecifier() throws RecognitionException {\n EObject current = null;\n\n EObject lv_unit_3_0 = null;\n\n EObject lv_dimensions_6_0 = null;\n\n EObject lv_dimensions_8_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1859:6: ( ( () 'complex' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1860:1: ( () 'complex' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1860:1: ( () 'complex' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1860:2: () 'complex' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )?\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1860:2: ()\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1861:5: \n {\n \n temp=factory.create(grammarAccess.getComplexTypeSpecifierAccess().getComplexTypeSpecifierAction_0().getType().getClassifier());\n current = temp; \n temp = null;\n CompositeNode newNode = createCompositeNode(grammarAccess.getComplexTypeSpecifierAccess().getComplexTypeSpecifierAction_0(), currentNode.getParent());\n newNode.getChildren().add(currentNode);\n moveLookaheadInfo(currentNode, newNode);\n currentNode = newNode; \n associateNodeWithAstElement(currentNode, current); \n \n\n }\n\n match(input,36,FOLLOW_36_in_ruleComplexTypeSpecifier3278); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getComplexKeyword_1(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1875:1: ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )?\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( (LA26_0==25) ) {\n alt26=1;\n }\n switch (alt26) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1875:3: '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')'\n {\n match(input,25,FOLLOW_25_in_ruleComplexTypeSpecifier3289); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getLeftParenthesisKeyword_2_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1879:1: ( (lv_unit_3_0= ruleUnitExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1880:1: (lv_unit_3_0= ruleUnitExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1880:1: (lv_unit_3_0= ruleUnitExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1881:3: lv_unit_3_0= ruleUnitExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getComplexTypeSpecifierAccess().getUnitUnitExpressionParserRuleCall_2_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleUnitExpression_in_ruleComplexTypeSpecifier3310);\n lv_unit_3_0=ruleUnitExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getComplexTypeSpecifierRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"unit\",\n \t \t\tlv_unit_3_0, \n \t \t\t\"UnitExpression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n match(input,26,FOLLOW_26_in_ruleComplexTypeSpecifier3320); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getRightParenthesisKeyword_2_2(), null); \n \n\n }\n break;\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1907:3: ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )?\n int alt28=2;\n int LA28_0 = input.LA(1);\n\n if ( (LA28_0==33) ) {\n alt28=1;\n }\n switch (alt28) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1907:5: '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']'\n {\n match(input,33,FOLLOW_33_in_ruleComplexTypeSpecifier3333); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getLeftSquareBracketKeyword_3_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1911:1: ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1912:1: (lv_dimensions_6_0= ruleArrayDimensionSpecification )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1912:1: (lv_dimensions_6_0= ruleArrayDimensionSpecification )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1913:3: lv_dimensions_6_0= ruleArrayDimensionSpecification\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getComplexTypeSpecifierAccess().getDimensionsArrayDimensionSpecificationParserRuleCall_3_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleArrayDimensionSpecification_in_ruleComplexTypeSpecifier3354);\n lv_dimensions_6_0=ruleArrayDimensionSpecification();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getComplexTypeSpecifierRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"dimensions\",\n \t \t\tlv_dimensions_6_0, \n \t \t\t\"ArrayDimensionSpecification\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1935:2: ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( (LA27_0==14) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1935:4: ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) )\n \t {\n \t match(input,14,FOLLOW_14_in_ruleComplexTypeSpecifier3365); \n\n \t createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getCommaKeyword_3_2_0(), null); \n \t \n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1939:1: ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1940:1: (lv_dimensions_8_0= ruleArrayDimensionSpecification )\n \t {\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1940:1: (lv_dimensions_8_0= ruleArrayDimensionSpecification )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1941:3: lv_dimensions_8_0= ruleArrayDimensionSpecification\n \t {\n \t \n \t \t currentNode=createCompositeNode(grammarAccess.getComplexTypeSpecifierAccess().getDimensionsArrayDimensionSpecificationParserRuleCall_3_2_1_0(), currentNode); \n \t \t \n \t pushFollow(FOLLOW_ruleArrayDimensionSpecification_in_ruleComplexTypeSpecifier3386);\n \t lv_dimensions_8_0=ruleArrayDimensionSpecification();\n \t _fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = factory.create(grammarAccess.getComplexTypeSpecifierRule().getType().getClassifier());\n \t \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t \t }\n \t \t try {\n \t \t \t\tadd(\n \t \t \t\t\tcurrent, \n \t \t \t\t\t\"dimensions\",\n \t \t \t\tlv_dimensions_8_0, \n \t \t \t\t\"ArrayDimensionSpecification\", \n \t \t \t\tcurrentNode);\n \t \t } catch (ValueConverterException vce) {\n \t \t\t\t\thandleValueConverterException(vce);\n \t \t }\n \t \t currentNode = currentNode.getParent();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n match(input,34,FOLLOW_34_in_ruleComplexTypeSpecifier3398); \n\n createLeafNode(grammarAccess.getComplexTypeSpecifierAccess().getRightSquareBracketKeyword_3_3(), null); \n \n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "void emptyType(ComplexTypeSG type) throws SAXException;", "@Test\n\tpublic void testComplex() throws JDOMException, IOException {\n\t\tSAXBuilder sb = new SAXBuilder();\n\t\tsb.setExpandEntities(false);\n\t\tDocument doc = sb.build(FidoFetch.getFido().getURL(\"/complex.xml\"));\n\t\tfinal Iterator<Content> des = doc.getDescendants();\n\t\tfinal ArrayList<NamespaceAware> allc = new ArrayList<NamespaceAware>();\n\t\tfinal XPathFactory fac = getFactory();\n\t\twhile (des.hasNext()) {\n\t\t\tfinal Content c = des.next();\n//\t\t\tif (c.getParent() == doc && c != doc.getRootElement()) {\n//\t\t\t\t// ignore document level content (except root element.\n//\t\t\t\tcontinue;\n//\t\t\t}\n\t\t\tcheckAbsolute(fac, c);\n\t\t\tallc.add(c);\n\t\t\tif (c instanceof Element) {\n\t\t\t\tif (((Element) c).hasAttributes()) {\n\t\t\t\t\tfor (Attribute a : ((Element)c).getAttributes()) {\n\t\t\t\t\t\tcheckAbsolute(fac, a);\n\t\t\t\t\t\tallc.add(a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (NamespaceAware nsa : allc) {\n\t\t\tfor (NamespaceAware nsb : allc) {\n\t\t\t\tcheckRelative(fac, nsa, nsb);\n\t\t\t}\n\t\t}\n\t}", "@ProcessElement public void process(ProcessContext c) {\n MyProduct elem = c.element();\n c.output(KV.of(elem.getId(), elem));\n }", "private Object parseElement(XmlElement element) throws XmlParseException\n {\n try\n {\n return parseElementRaw(element);\n }\n catch (Exception e)\n {\n throw new XmlParseException(\"Failed to parse: \" + element.toXml(), e);\n }\n }", "public interface ComplexField {\n\tpublic abstract int numberOfTokens();\n\n\tpublic abstract void addProperty(String name, TokenFilterAdder filterAdder);\n\n\tpublic abstract void addPropertyAlternative(String sourceName, String altPostfix);\n\n\tpublic abstract void addPropertyAlternative(String sourceName, String altPostfix,\n\t\t\tTokenFilterAdder filterAdder);\n\n\tpublic abstract void addProperty(String name);\n\n\tpublic abstract void addValue(String value);\n\n\tpublic abstract void addStartChar(int startChar);\n\n\tpublic abstract void addEndChar(int endChar);\n\n\tpublic abstract void addPropertyValue(String name, String value);\n\n\tpublic abstract void addToLuceneDoc(Document doc);\n\n\tpublic abstract void clear();\n\n\tpublic abstract void addAlternative(String altPostfix);\n\n\tpublic abstract void addAlternative(String altPostfix, TokenFilterAdder filterAdder);\n\n\tpublic abstract void addTokens(TokenStream c) throws IOException;\n\n\tpublic abstract void addPropertyTokens(String propertyName, TokenStream c) throws IOException;\n\n\tpublic abstract List<String> getPropertyValues(String name);\n}", "void handleElement(Object elemID);", "private void processPCDATAContent(ElementType elementType)\n throws Exception\n {\n\n addPCDATAProperty(elementType);\n }", "ComplexType getTechnologySpecificComplexType();", "private Object parseElementRaw(XmlElement element) throws Exception\n {\n ElementType type = ElementType.valueOf(element.getName().toUpperCase());\n switch (type)\n {\n case INTEGER:\n return parseInt(element.getValue());\n case REAL:\n return Double.valueOf(element.getValue());\n case STRING:\n return element.getValue();\n case DATE:\n return m_dateFormat.parse(element.getValue());\n case DATA:\n return base64decode(element.getValue());\n case ARRAY:\n return parseArray(element);\n case TRUE:\n return Boolean.TRUE;\n case FALSE:\n return Boolean.FALSE;\n case DICT:\n return parseDict(element);\n default:\n throw new RuntimeException(\"Unexpected type: \" + element.getName());\n }\n }", "protected abstract boolean processElement(Element node, int uolId) throws\n PropertyException;", "public Complex getComplex() {return this;}", "public Object caseProcessElement(ProcessElement object) {\n\t\treturn null;\n\t}", "public void addElement(Object ob) {\r\n\t\tif (ob == null) {\r\n\t\t\telements.add(TObject.nullVal());\r\n\t\t} else if (ob instanceof TObject || ob instanceof ParameterSubstitution || ob instanceof Variable || ob instanceof FunctionDef || ob instanceof Operator || ob instanceof StatementTree || ob instanceof TableSelectExpression) {\r\n\t\t\telements.add(ob);\r\n\t\t} else {\r\n\t\t\tthrow new Error(\"Unknown element type added to expression: \" + ob.getClass());\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testComplexArrayProperty() throws Exception {\r\n\t\tAdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tXMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider.getInstance()\r\n\t\t\t\t.getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\t// Retreiving value of complex property.\r\n\t\tProperty subProperty = container.getProperty(\"complexArrayProperty[0].intProperty\");\r\n\t\tsubProperty.setValue(0);\r\n\t\tassertNotNull(subProperty);\r\n\r\n\t\t// Attaching monitor to the property.\r\n\t\tPropertyMonitorStub monitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexArrayProperty[0].intProperty\", monitor);\r\n\t\tsubProperty.setValue(1);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexArrayProperty[0].intProperty\", monitor);\r\n\r\n\t\t// Attaching monitor only to \"complexArrayProperty\"\r\n\t\tmonitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexArrayProperty\", monitor);\r\n\t\tsubProperty.setValue(0);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexArrayProperty\", monitor);\r\n\r\n\t\t// The monitor should not get the message now.\r\n\t\tsubProperty.setValue(1);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t}", "void addComplexType(ComplexTypeDefinition ctd) throws ResultException, DmcValueException {\n if (checkAndAdd(ctd.getObjectName(),ctd,complexTypeDefs) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsg(ctd.getObjectName(),ctd,complexTypeDefs,\"complex type names\"));\n \tthrow(ex);\n }\n \n if (checkAndAddDOT(ctd.getDotName(),ctd,globallyUniqueMAP,null) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsgDOT(ctd.getObjectName(),ctd,globallyUniqueMAP,\"definition names\"));\n currentSchema = null;\n \tthrow(ex);\n } \n \n TypeDefinition td = new TypeDefinition(ctd);\n td.setInternallyGenerated(true);\n td.setName(ctd.getName());\n \n // The name of a complex type definition is schema.complextype.ComplexTypeDefinition\n // For the associated type, it will be schema.complextype.TypeDefinition\n DotName typeName = new DotName((DotName) ctd.getDotName().getParentName(),\"TypeDefinition\");\n// DotName nameAndTypeName = new DotName(td.getName() + \".TypeDefinition\");\n td.setDotName(typeName);\n// td.setNameAndTypeName(nameAndTypeName);\n\n td.addDescription(\"This is an internally generated type to represent complex type \" + ctd.getName() + \" values.\");\n td.setIsEnumType(false);\n td.setIsRefType(false);\n \n td.setTypeClassName(ctd.getDefinedIn().getSchemaPackage() + \".generated.types.DmcType\" + ctd.getName());\n td.setPrimitiveType(ctd.getDefinedIn().getSchemaPackage() + \".generated.types.\" + ctd.getName());\n td.setDefinedIn(ctd.getDefinedIn());\n \n // We add the new type to the schema's list of internally generated types\n ctd.getDefinedIn().addInternalTypeDefList(td);\n \n internalTypeDefs.put(td.getName(), td);\n \n // And then we add the type if it's not already there - this can happen when\n // we're managing a generated schema and the type definition has already been added\n // from the typedefList attribute\n if (typeDefs.get(td.getName()) == null)\n \taddType(td);\n }", "public final EObject entryRuleComplexType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleComplexType = null;\n\n\n try {\n // InternalMappingDsl.g:5602:52: (iv_ruleComplexType= ruleComplexType EOF )\n // InternalMappingDsl.g:5603:2: iv_ruleComplexType= ruleComplexType EOF\n {\n newCompositeNode(grammarAccess.getComplexTypeRule()); \n pushFollow(FOLLOW_1);\n iv_ruleComplexType=ruleComplexType();\n\n state._fsp--;\n\n current =iv_ruleComplexType; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public T caseComplexExpr(ComplexExpr object) {\n\t\treturn null;\n\t}", "private boolean processCustomTypes(Object value, ProcessorContext<T> processorContext)\r\n {\r\n CustomFieldProcessor cfp = getCustomTypeProcessor(processorContext.getField().getType());\r\n LOG.debug(\"processCustomTypes() - CustomFieldProcessor: \" + cfp);\r\n if (cfp != null) {\r\n cfp.processCustomField(value, processorContext);\r\n return true;\r\n }\r\n return false;\r\n \r\n }", "public static boolean isComplex(byte dataType) {\n return ((dataType == BAG) || (dataType == TUPLE) ||\n (dataType == MAP) || (dataType == INTERNALMAP));\n }", "protected abstract Object handleElement(Element aElement) throws AeXMLDBException;", "public void expandEdmComplexType(ComplexType complexType, List<Property> expandedPropertyList,\n String embeddablePropertyName);", "public void process(Element element, Map<String, Type> localMap) {\r\n\t\r\n\t\tinspectHybrid(element, localMap);\r\n\t \r\n\t List content = element.getContent();\r\n\t Iterator iterator = content.iterator();\r\n\t \r\n\t while (iterator.hasNext()) {\r\n\t Object o = iterator.next();\r\n\t if (o instanceof Element) {\r\n\t Element child = (Element) o;\r\n\t process(child, localMap); \r\n\t }\r\n\t }\r\n\t}", "protected abstract void analyze(E element) throws EX;", "public final EObject entryRuleComplexDataType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleComplexDataType = null;\n\n\n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4429:2: (iv_ruleComplexDataType= ruleComplexDataType EOF )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4430:2: iv_ruleComplexDataType= ruleComplexDataType EOF\n {\n newCompositeNode(grammarAccess.getComplexDataTypeRule()); \n pushFollow(FOLLOW_ruleComplexDataType_in_entryRuleComplexDataType10007);\n iv_ruleComplexDataType=ruleComplexDataType();\n\n state._fsp--;\n\n current =iv_ruleComplexDataType; \n match(input,EOF,FOLLOW_EOF_in_entryRuleComplexDataType10017); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "private static <T> T process(AnnotatedElement element, String annotationType,\n\t\t\tProcessor<T> processor) {\n\t\treturn recursivelyProcess(element, annotationType, processor,\n\t\t\t\tnew HashSet<AnnotatedElement>(), 0);\n\t}", "public static ObjectInstance getComplexTypeObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 1);\n properties.put(\"theLabel\", getComplexTypeMBean().getTheLabel());\n properties.put(\"complexitem\", getComplexTypeMBean()\n .getComplexClass().toString());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'ComplexType' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new ComplexType().getClass().getName());\n }", "public interface ComplexDataObjectParser extends IKeyValueObjectParser<Object, ComplexDataObject> {\r\n\r\n}", "@org.junit.Test\n public void k2ComputeConElem11() {\n final XQuery query = new XQuery(\n \"element e {\\\"content\\\"} instance of element(a, xs:anyType)\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertBoolean(false)\n );\n }", "public ComplexType searchEdmComplexType(FullQualifiedName type);", "protected void parseXmpSimpleProperty(XMPMetadata metadata,\n\t\t\tQName propertyName, XmpPropertyType stype,\n\t\t\tComplexPropertyContainer container)\n\t\t\t\t\tthrows XmpUnknownPropertyTypeException, XmpPropertyFormatException,\n\t\t\t\t\tXMLStreamException {\n\t\ttry {\n\t\t\tAbstractSimpleProperty prop = null;\n\t\t\tArrayList<Attribute> attributes = new ArrayList<Attribute>();\n\t\t\tint cpt = reader.get().getAttributeCount();\n\t\t\tfor (int i = 0; i < cpt; i++) {\n\t\t\t\tattributes.add(new Attribute(null, reader.get()\n\t\t\t\t\t\t.getAttributePrefix(i), reader.get()\n\t\t\t\t\t\t.getAttributeLocalName(i), reader.get()\n\t\t\t\t\t\t.getAttributeValue(i)));\n\t\t\t}\n\t\t\tif (stype == XmpPropertyType.Text) {\n\t\t\t\tprop = new TextType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Integer) {\n\t\t\t\tprop = new IntegerType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Date) {\n\t\t\t\tprop = new DateType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Boolean) {\n\t\t\t\tprop = new BooleanType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t} else if (stype == XmpPropertyType.Real) {\n\t\t\t\tprop = new RealType(metadata, propertyName.getPrefix(),\n\t\t\t\t\t\tpropertyName.getLocalPart(), reader.get()\n\t\t\t\t\t\t.getElementText());\n\t\t\t}\n\t\t\tif (prop != null) {\n\t\t\t\tcontainer.addProperty(prop);\n\t\t\t\t// ADD ATTRIBUTES\n\t\t\t\tfor (Attribute att : attributes) {\n\t\t\t\t\tprop.setAttribute(att);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new XmpUnknownPropertyTypeException(\n\t\t\t\t\t\t\"Unknown simple type found\");\n\t\t\t}\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tthrow new XmpPropertyFormatException(\n\t\t\t\t\t\"Unexpected type found for the property '\"\n\t\t\t\t\t\t\t+ propertyName.getLocalPart() + \"'\", e);\n\t\t}\n\t}", "protected void sequence_ChannelType(ISerializationContext context, ChannelType semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CHANNEL_TYPE__ELEMTYPE) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CHANNEL_TYPE__ELEMTYPE));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getChannelTypeAccess().getElemtypeElementTypeParserRuleCall_1_0(), semanticObject.getElemtype());\r\n\t\tfeeder.finish();\r\n\t}", "@Override\n\t\tpublic abstract List<T> parse(Object valueToParse, Type elementType);", "void infoElementAction(String elementType, String elementName, String messageKey, Object... args);", "public static ComplexTypeMBean getComplexTypeMBean()\n {\n return new ComplexType();\n }", "public static boolean checkComplexDerivationOk(XSComplexTypeDecl derived, XSTypeDefinition base, short block) {\n/* 176 */ if (derived == SchemaGrammar.fAnyType)\n/* 177 */ return (derived == base); \n/* 178 */ return checkComplexDerivation(derived, base, block);\n/* */ }", "public T caseTypedElement(TypedElement object) {\r\n\t\treturn null;\r\n\t}", "boolean process(JsonElement element);", "public Object caseElement(Element object) {\r\n\t\treturn null;\r\n\t}", "private void processTypes(Object value, ProcessorContext<T> processorContext)\r\n {\r\n CustomFieldProcessor cfp = getTypeProcessor(processorContext.getField().getType());\r\n LOG.debug(\"processTypes() - CustomFieldProcessor: \" + cfp);\r\n if (cfp == null) {\r\n cfp = getTypeProcessor(Object.class);\r\n }\r\n cfp.processCustomField(value, processorContext);\r\n }", "public ComplexType searchEdmComplexType(String embeddableTypeName);", "public void add(Complex c){\n\t\tre += c.getRe();\n\t\tim += c.getIm();\n\t}", "public void process(Object value) {}", "public void impactoContra(Elemento elemento){}", "public void add(ComplexNumber one){\n this.real += one.real;\n this.imaginary += one.imaginary;\n }", "protected void parseElements(XmlElement processElement) {\n\n parseStartEvents(processElement);\n parseActivities(processElement);\n parseEndEvents(processElement);\n parseSequenceFlow(processElement);\n }", "private static boolean checkComplexDerivation(XSComplexTypeDecl derived, XSTypeDefinition base, short block) {\n/* 238 */ if (derived == base) {\n/* 239 */ return true;\n/* */ }\n/* */ \n/* 242 */ if ((derived.fDerivedBy & block) != 0) {\n/* 243 */ return false;\n/* */ }\n/* */ \n/* 246 */ XSTypeDefinition directBase = derived.fBaseType;\n/* */ \n/* 248 */ if (directBase == base) {\n/* 249 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 253 */ if (directBase == SchemaGrammar.fAnyType || directBase == SchemaGrammar.fAnySimpleType)\n/* */ {\n/* 255 */ return false;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 260 */ if (directBase.getTypeCategory() == 15) {\n/* 261 */ return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);\n/* */ }\n/* */ \n/* 264 */ if (directBase.getTypeCategory() == 16) {\n/* */ \n/* 266 */ if (base.getTypeCategory() == 15)\n/* */ {\n/* */ \n/* 269 */ if (base == SchemaGrammar.fAnyType) {\n/* 270 */ base = SchemaGrammar.fAnySimpleType;\n/* */ } else {\n/* 272 */ return false;\n/* */ } } \n/* 274 */ return checkSimpleDerivation((XSSimpleType)directBase, (XSSimpleType)base, block);\n/* */ } \n/* */ \n/* */ \n/* 278 */ return false;\n/* */ }", "MediaPackageElement.Type getElementType();", "public final void mT36() throws RecognitionException {\n try {\n int _type = T36;\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:34:5: ( 'complex' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:34:7: 'complex'\n {\n match(\"complex\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "public final ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return complexPropertyExpression() {\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return retval = new ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree IDENTIFIER9 = null;\n ManchesterOWLSyntaxTree ENTITY_REFERENCE10 = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return p = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:190:1:\n // ( ^( INVERSE_OBJECT_PROPERTY_EXPRESSION p=\n // complexPropertyExpression ) | ^(\n // INVERSE_OBJECT_PROPERTY_EXPRESSION IDENTIFIER ) | ^(\n // INVERSE_OBJECT_PROPERTY_EXPRESSION ENTITY_REFERENCE ) )\n int alt9 = 3;\n int LA9_0 = input.LA(1);\n if (LA9_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n int LA9_1 = input.LA(2);\n if (LA9_1 == DOWN) {\n switch (input.LA(3)) {\n case IDENTIFIER: {\n alt9 = 2;\n }\n break;\n case ENTITY_REFERENCE: {\n alt9 = 3;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt9 = 1;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9,\n 2, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9, 1, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9, 0, input);\n throw nvae;\n }\n switch (alt9) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:191:2:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION p=\n // complexPropertyExpression )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression528);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_complexPropertyExpression_in_complexPropertyExpression534);\n p = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(p.node\n .getCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:195:4:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION IDENTIFIER )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression544);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n IDENTIFIER9 = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_complexPropertyExpression546);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n IDENTIFIER9.getText()));\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:199:4:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION ENTITY_REFERENCE )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression556);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n ENTITY_REFERENCE10 = (ManchesterOWLSyntaxTree) match(input,\n ENTITY_REFERENCE,\n FOLLOW_ENTITY_REFERENCE_in_complexPropertyExpression558);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n ENTITY_REFERENCE10.getText()));\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "@Override\n\t\tpublic abstract T[] parse(Object valueToParse, Type componentType);", "public @NotNull PersistentDataContainer toPrimitive(@NotNull Waypoint complex, @NotNull PersistentDataAdapterContext context) {\n return complex.toNBTTag(context.newPersistentDataContainer());\n }", "public Object process(Izvod izvod) throws JAXBException, IOException,\r\n\t\t\tSAXException, Exception {\n\t\treturn processor.process(izvod);\r\n\t}", "Object element();", "Object element();", "public void build(OMElement elem) {\r\n if (builder == null) {\r\n builder = new SalesforceMediatorBuilder();\r\n }\r\n if (log.isDebugEnabled()) {\r\n log.debug(\"Building.....\");\r\n }\r\n builder.buildMediator(elem, this);\r\n if (log.isDebugEnabled()) {\r\n log.debug(\"The Build output \" + elem);\r\n }\r\n }", "public interface Iprocessor {\n public void process(RoundEnvironment roundEnvironment, Element typeElement, Filer mfFiler, Elements elements, Messager messager);\n}", "void visitElement_issue_type(org.w3c.dom.Element element) { // <issue-type>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.getName().equals(\"name\")) { // <issue-type name=\"???\">\n list.issueTypes.add(attr.getValue());\n }\n }\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }", "public T caseElement(Element object) {\n\t\treturn null;\n\t}", "public T caseElement(Element object) {\n\t\treturn null;\n\t}", "public T caseElement(Element object) {\n\t\treturn null;\n\t}", "TypeElement getTypeElement();", "public void setElementType(QName elementType) {\n this.fieldElementType = elementType;\n }", "void processElement(File documentPath) \n\t\t\tthrows XMLFormatException;", "@objid (\"002ff058-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public Object visitElement(Element theElement) {\n return null;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void parseElectronicForRIFCSElement(Electronic electronic) {\n\t\tif (!electronic.getType().isEmpty()) {\n\t\t\tString key = \"location.address.electronic.\" + electronic.getType();\n\t\t\tString csvFieldName = filedsMapping.getString(\"\",key);\n\t\t\tif(!\"\".equals(csvFieldName)) {\n\t\t\t\tthis.data.put(csvFieldName, electronic.getValue());\n\t\t\t}\n\t\t}\n\t}", "Element getGenericElement();", "@org.junit.Test\n public void k2ComputeConElem8() {\n final XQuery query = new XQuery(\n \"element e {\\\"content\\\"} instance of element(*, xs:anyType)\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertBoolean(true)\n );\n }", "public static boolean isComplex(Object o) {\n return isComplex(findType(o));\n }", "protected void processElements(Node node, int uolId) throws\n PropertyException {\n Node child = node.getFirstChild();\n\n while (child != null) {\n\n if ( (child.getNodeType() == Node.ELEMENT_NODE) &&\n (!processElement((Element) child, uolId))) {\n //if the child node was not processed already, process it now.\n processElements(child, uolId);\n\n }\n child = child.getNextSibling();\n }\n }", "void handleComplexChangeOrg(String complexId);", "protected void setElement (XmlNode thisNode, Object obj, XmlDescriptor desc, UnmarshalContext context) throws Exception {\n String elName = thisNode.getName (); //getTagName();\n\n JField jf = (JField)desc.elementList.get(elName);\n if (jf == null)\n throw new FieldNotFoundException (\"ephman.abra.tools.nofield\", \n\t\t\t\t\t\t\t\t\t\t\t new Object[]{elName, desc.className});\n\n\t\tif (jf.isArray ()) return ; // will do seperately..\n Class thisClass = obj.getClass();\n\n Object value = null;\n Method m = null;\n if (jf.isCollection()) {\n m = getASetMethod (thisClass, \"addTo\" + jf.getGetSet(), jf.getObjectType());\n } else {\n m = getASetMethod (thisClass, \"set\" + jf.getGetSet(), jf.getObjectType());\n }\n\n if (jf instanceof JCompositeField) {\n XmlDescriptor fieldDesc = (XmlDescriptor)this.classList.get (jf.getObjectType());\n value = unmarshal (thisNode, context, fieldDesc);\n }\n else {\n\t\t\tvalue = getPrimitive (thisNode, jf, context);\n \n }\n\n m.invoke(obj, new Object[]{value});\n\t\t//\t\tif (jf.getObjectType ().equals (\"char\"))\n\t\t//System.out.println (\"was ok\");\n }", "public static Complex parseComplex(String thingToParse) {\r\n\t\tString trimed = thingToParse.trim();\r\n\t\tString insidTrim = trimed.replaceAll(\"\\\\s+\", \"\");\r\n\t\tint strlen = insidTrim.length();\r\n\t\tif (strlen == 1) {\r\n\t\t\tString realAndImage = insidTrim.substring(0, strlen);\r\n\t\t\tdouble theImag = Double.parseDouble(realAndImage);\r\n\t\t\tif (theImag == 0) {\r\n\t\t\t\tMyDouble realFinal = new MyDouble(0);\r\n\t\t\t\tMyDouble imageFinal = new MyDouble(0);\r\n\t\t\t\tComplex parse = new Complex(realFinal, imageFinal);\r\n\t\t\t\treturn parse;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tint indeOfPlus = insidTrim.indexOf(\"+\");\r\n\r\n\t\tif (indeOfPlus == -1) {\r\n\t\t\tString stringToAvoidFirstMin = insidTrim.substring(1, strlen);\r\n\r\n\t\t\tint indesofMinus = stringToAvoidFirstMin.indexOf(\"-\");\r\n\t\t\tString realString = insidTrim.substring(0, indesofMinus + 1);\r\n\t\t\tdouble thereal = Double.parseDouble(realString);\r\n\t\t\tString imagString = insidTrim.substring(indesofMinus + 1, strlen - 1);\r\n\t\t\tdouble theImag = Double.parseDouble(imagString);\r\n\t\t\tMyDouble realFinal = new MyDouble(thereal);\r\n\t\t\tMyDouble imageFinal = new MyDouble(theImag);\r\n\t\t\tComplex parse = new Complex(realFinal, imageFinal);\r\n\t\t\treturn parse;\r\n\t\t} else {\r\n\t\t\tString realString = insidTrim.substring(0, indeOfPlus);\r\n\t\t\tdouble thereal = Double.parseDouble(realString);\r\n\t\t\tString imagString = insidTrim.substring(indeOfPlus + 1, strlen - 1);\r\n\t\t\tdouble theImag = Double.parseDouble(imagString);\r\n\t\t\tMyDouble realFinal = new MyDouble(thereal);\r\n\t\t\tMyDouble imageFinal = new MyDouble(theImag);\r\n\t\t\tComplex parse = new Complex(realFinal, imageFinal);\r\n\t\t\treturn parse;\r\n\t\t}\r\n\t}", "public WildcardUnmarshaller(final SchemaContext schemaContext, final ComplexType complexType,\n final Schema schema, final String element, final AttributeSet atts) {\n this(schemaContext, schema, element, atts, new Wildcard(complexType));\n }", "public T caseElement(Element object)\n {\n return null;\n }", "public void setElementType(String element_type) {\n\t\tthis.element_type = element_type;\n\t}", "@Test\r\n\tpublic void testComplexProperty() throws Exception {\r\n\t\tAdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tXMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider.getInstance()\r\n\t\t\t\t.getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\t// Retreiving value of the property.\r\n\t\tProperty subProperty = container.getProperty(\"complexProperty.stringProperty\");\r\n\t\tassertNotNull(subProperty);\r\n\r\n\t\t// Attaching monitor to the property.\r\n\t\tPropertyMonitorStub monitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexProperty.stringProperty\", monitor);\r\n\t\tsubProperty.setValue(subProperty.getValue() + \" - new value\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexProperty.stringProperty\", monitor);\r\n\r\n\t\t// Attaching monitor only to \"complexProperty\"\r\n\t\tmonitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexProperty\", monitor);\r\n\t\tsubProperty.setValue(\"\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexProperty\", monitor);\r\n\r\n\t\t// The monitor should not get the message now.\r\n\t\tsubProperty.setValue(\"newValue\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t}", "private void serializeOutOfTypeSystemElements() throws SAXException {\n if (cds.marker != null) {\n return;\n }\n if (cds.sharedData == null) {\n return;\n }\n Iterator<OotsElementData> it = cds.sharedData.getOutOfTypeSystemElements().iterator();\n while (it.hasNext()) {\n OotsElementData oed = it.next();\n workAttrs.clear();\n // Add ID attribute\n addIdAttribute(workAttrs, oed.xmiId);\n\n // Add other attributes\n Iterator<XmlAttribute> attrIt = oed.attributes.iterator();\n while (attrIt.hasNext()) {\n XmlAttribute attr = attrIt.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n // debug\n if (oed.elementName.qName.endsWith(\"[]\")) {\n Misc.internalError(new Exception(\n \"XMI Cas Serialization: out of type system data has type name ending with []\"));\n }\n // serialize element\n startElement(oed.elementName, workAttrs, oed.childElements.size());\n\n // serialize features encoded as child elements\n Iterator<XmlElementNameAndContents> childElemIt = oed.childElements.iterator();\n while (childElemIt.hasNext()) {\n XmlElementNameAndContents child = childElemIt.next();\n workAttrs.clear();\n Iterator<XmlAttribute> attrIter = child.attributes.iterator();\n while (attrIter.hasNext()) {\n XmlAttribute attr = attrIter.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n\n if (child.contents != null) {\n startElement(child.name, workAttrs, 1);\n addText(child.contents);\n } else {\n startElement(child.name, workAttrs, 0);\n }\n endElement(child.name);\n }\n\n endElement(oed.elementName);\n }\n }", "protected boolean isValidElement(Object element) {\r\n\t\treturn element instanceof IRubyProject || element instanceof ISourceFolderRoot;\r\n\t}", "@Override\n public void visitElement(PsiElement psiElement) {\n if(YamlHelper.isStringValue(psiElement) && YamlElementPatternHelper.getInsideKeyValue(\"services\").accepts(psiElement)) {\n visitConstructor(psiElement);\n visitCall(psiElement);\n }\n\n super.visitElement(psiElement);\n }", "void element() {}", "private FormProvider handleElement() throws XMLStreamException{\n String name = reader.getAttributeValue(0);\n nextTag();\n NamedElement result = new NamedElement(1, 1, name);\n result.setChild(handleAll());\n nextTag();\n return result;\n }", "public boolean isComplexCollection() {\n return m_complexCollection;\n }", "public Object getElement();", "public Object caseProcessPackageableElement(ProcessPackageableElement object) {\n\t\treturn null;\n\t}", "protected abstract void onElementRegistered(Level level, T element);", "public boolean isComplex() { throw new RuntimeException(\"Stub!\"); }", "private void parseRIFCSElement(RIFCSElement element) throws HarvesterException {\n\t\tif (element instanceof Activity) {\n\t\t\tActivity activity = (Activity) element;\n\n\t\t\tparseElement(activity.getType(), activity.getIdentifiers(),\n\t\t\t\t\tactivity.getNames(), activity.getLocations(),\n\t\t\t\t\tactivity.getRelatedObjects(),\n\t\t\t\t\tactivity.getSubjects(), activity.getDescriptions(),\n\t\t\t\t\tactivity.getCoverage(), activity.getRelatedInfo(),\n\t\t\t\t\tactivity.getRights(), activity.getExistenceDates(),\n\t\t\t\t\tnull, null);\n\n\t\t} else if (element instanceof Collection) {\n\t\t\tCollection collection = (Collection) element;\n\n\t\t\tparseElement(collection.getType(),\n\t\t\t\t\tcollection.getIdentifiers(), collection.getNames(),\n\t\t\t\t\tcollection.getLocations(),\n\t\t\t\t\tcollection.getRelatedObjects(),\n\t\t\t\t\tcollection.getSubjects(),\n\t\t\t\t\tcollection.getDescriptions(),\n\t\t\t\t\tcollection.getCoverage(),\n\t\t\t\t\tcollection.getRelatedInfo(),\n\t\t\t\t\tcollection.getRightsList(), null,\n\t\t\t\t\tcollection.getCitationInfos(), null);\n\t\t} else if (element instanceof Party) {\n\t\t\tParty party = (Party) element;\n\n\t\t\tparseElement(party.getType(), party.getIdentifiers(),\n\t\t\t\t\tparty.getNames(), party.getLocations(),\n\t\t\t\t\tparty.getRelatedObjects(), party.getSubjects(),\n\t\t\t\t\tparty.getDescriptions(), party.getCoverage(),\n\t\t\t\t\tparty.getRelatedInfo(), party.getRights(),\n\t\t\t\t\tparty.getExistenceDates(), null, null);\n\t\t}\n\t\telse if (element instanceof Service) {\n\t\t\tService service = (Service) element;\n\n\t\t\tparseElement(service.getType(), service.getIdentifiers(),\n\t\t\t\t\tservice.getNames(), service.getLocations(),\n\t\t\t\t\tservice.getRelatedObjects(), service.getSubjects(),\n\t\t\t\t\tservice.getDescriptions(), service.getCoverage(),\n\t\t\t\t\tservice.getRelatedInfo(), service.getRights(),\n\t\t\t\t\tservice.getExistenceDates(), null,\n\t\t\t\t\tservice.getAccessPolicies());\n\t\t}\n\t\telse {\n\t\t\tthrow new HarvesterException(\n\t\t\t\t\t\"Wrong element found, only supports activity, collection, party, or service\");\n\t\t}\n\t}", "@Test\r\n public void testParamterizedWithComplexTypeParameters()\r\n {\r\n test(Types.create(Map.class)\r\n .withSubtypeOf(Number.class)\r\n .withSupertypeOf(Comparable.class)\r\n .build());\r\n }", "public void getVal(Complex c) {\n\t\tc.re =re;\n\t\tc.im = im;\n\t}" ]
[ "0.66648984", "0.6245654", "0.6113332", "0.5678406", "0.5628724", "0.56242085", "0.5584683", "0.5538534", "0.5516355", "0.5471929", "0.5419494", "0.5314044", "0.52532953", "0.52274317", "0.520177", "0.51842535", "0.51841277", "0.5161828", "0.5154463", "0.5147871", "0.5139696", "0.51132995", "0.50866705", "0.5081943", "0.50803554", "0.5051416", "0.5048357", "0.50413173", "0.5028274", "0.5013604", "0.50036556", "0.49816257", "0.49801978", "0.4971811", "0.4941723", "0.49348563", "0.4931724", "0.49252826", "0.49104938", "0.48713464", "0.48359603", "0.4834416", "0.48273805", "0.4818532", "0.4815935", "0.48101813", "0.48059872", "0.48036715", "0.4799437", "0.47901687", "0.47776473", "0.47658744", "0.47634193", "0.47567186", "0.47439846", "0.47385687", "0.47372723", "0.47326812", "0.4729182", "0.47265008", "0.47207564", "0.4716562", "0.4711614", "0.47069326", "0.47069326", "0.46952912", "0.46889302", "0.46672368", "0.46491703", "0.46491703", "0.46491703", "0.46396935", "0.46272832", "0.4618152", "0.46166375", "0.46161467", "0.46115395", "0.46084762", "0.45942625", "0.45931253", "0.4592297", "0.4591782", "0.45823073", "0.45794234", "0.45645046", "0.4562364", "0.45546404", "0.45518646", "0.45498502", "0.4546444", "0.4536979", "0.45346665", "0.45108068", "0.45019338", "0.45018375", "0.44954538", "0.44950086", "0.4485148", "0.44841546", "0.44816118" ]
0.5105112
22
Invoked to process a wildcard particle.
void wildcardParticle(ParticleSG particle) throws SAXException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}", "public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ , double extra ) {\n\t\tspawnParticle ( particle , x , y , z , count , offsetX , offsetY , offsetZ );\n\t}", "public void subscribe(Particle p) {\n p_sub_queue.add(p);\n }", "public void spawnParticle(String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count);", "public void spawnParticle ( Particle particle , Location location , int count , double offsetX , double offsetY ,\n\t\t\tdouble offsetZ , double extra ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( new Location ( getWorld ( ) , x , y , z ) ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void wild(){\n\t}", "public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }", "void simpleElementParticle(GroupSG pGroup,ParticleSG particle) throws SAXException;", "public void spawnParticle ( Particle particle , Location location , int count ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location , 0.0F , 0.0F , 0.0F , 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void spawnParticle ( Particle particle , Location location , int count ,\n\t\t\tdouble offsetX , double offsetY , double offsetZ ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void processWildcards() {\n ws = new WildcardSegment();\n WildcardSegment next;\n int sw,mw; //Single Wildcard, Multi-Wildcard\n currIndex = 0;\n int ci = -1;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n if (hasWildcards(text)) {\n int index = 0;\n int currIndex_w = currIndex;\n boolean tryAgain = false;\n text = processEscapeChars_w(text);\n text = validateWildcards(text);\n \n ws.setStart(0);\n next = ws.next;\n \n text = text.replace(\"^^\",\"~!~\");\n \n do {\n sw = text.indexOf(\"^#\");\n mw = text.indexOf(\"^*\");\n \n if ((sw != -1) && (mw != -1)) {\n if (sw < mw) {\n text = text.replaceFirst(\"\\\\Q^#\\\\E\",\"`#\");\n if (sw == 0) {\n ws.type = 1;\n }\n else {\n next.setStart(sw,1);\n index = next.start;\n next = next.next;\n }\n }\n else {\n text = text.replaceFirst(\"\\\\Q^*\\\\E\",\"`*\");\n if (mw == 0) {\n ws.type = 2;\n }\n else {\n next.setStart(mw,2);\n index = next.start;\n next = next.next;\n }\n }\n }\n else if (sw != -1) {\n text = text.replaceFirst(\"\\\\Q^#\\\\E\",\"`#\");\n if (sw == 0) {\n ws.type = 1;\n }\n else {\n next.setStart(sw,1);\n index = next.start;\n next = next.next;\n }\n }\n else {\n text = text.replaceFirst(\"\\\\Q^*\\\\E\",\"`*\");\n if (mw == 0) {\n ws.type = 2;\n }\n else {\n next.setStart(mw,2);\n index = next.start;\n next = next.next;\n }\n }\n \n sw = text.indexOf(\"^#\");\n mw = text.indexOf(\"^*\");\n if ((index != text.length() - 2) && (sw != (index + 2)) && (mw != (index + 2))) {\n next.setStart(index+2);\n index = next.start;\n next = next.next;\n }\n }\n while ((sw != -1) || (mw != -1));\n \n next = ws;\n while(next.start != -1) {\n switch (next.type) {\n case 0:\n if (next.next.type == -1) {\n next.seg = text.substring(next.start);\n }\n else {\n next.seg = text.substring(next.start,next.next.start);\n }\n break;\n case 1:\n next.seg = \"~`~\";\n break;\n case 2:\n next.seg = \"`~`\";\n break;\n default:\n //Do nothing\n break;\n }\n next = next.next;\n }\n //text = text.replace(\"~!~\",\"^\");\n next = ws;\n boolean keepLooking = true;\n int bSpace,bTab,bNewline,bIndex;\n while(next.start != -1) {\n switch (next.type) {\n case 0:\n index = jText.toLowerCase().indexOf(next.seg.toLowerCase(),currIndex_w);\n if (index == -1) {\n keepLooking = false;\n }\n else {\n if (next.start == 0) {\n //currIndex = index + 1;\n if (ci == -1) {\n ci = index + 1;\n }\n }\n if (ci == -1) {\n ci = index + 1;\n }\n if (next.next.start != -1) {\n currIndex_w = index + next.seg.length();\n }\n else {\n currIndex_w = index + 1;\n }\n }\n break;\n case 1:\n //index = jText.toLowerCase().indexOf(next.seg.toLowerCase(),currIndex_w);\n if (currIndex_w != jText.length()) {\n index = currIndex_w;\n }\n else {\n index = -1;\n }\n if (index == -1) {\n keepLooking = false;\n }\n else {\n if (next.start == 0) {\n //currIndex = index + 1;\n if (ci == -1) {\n ci = index + 1;\n }\n }\n if (ci == -1) {\n ci = index + 1;\n }\n if (next.next.start != -1) {\n next.seg = String.valueOf(jText.charAt(currIndex_w));\n currIndex_w = index + next.seg.length();\n }\n else {\n next.seg = String.valueOf(jText.charAt(currIndex_w));\n currIndex_w = index + 1;\n }\n }\n break;\n case 2:\n \n if (next.next.start != -1) {\n bIndex = jText.toLowerCase().indexOf(next.next.seg.toLowerCase(),currIndex_w);\n bSpace = jText.toLowerCase().indexOf(StringUtil.ASPACE,currIndex_w);\n bTab = jText.toLowerCase().indexOf(StringUtil.ATAB,currIndex_w);\n bNewline = jText.toLowerCase().indexOf(\"\\n\",currIndex_w);\n if ((bSpace != -1) && ((bSpace < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n \n if ((bTab != -1) && ((bTab < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n if ((bNewline != -1) && ((bNewline < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n index = bIndex;\n if ((currIndex_w != jText.length()) && (index == -1)) {\n tryAgain = true;\n }\n }\n else {\n bSpace = jText.toLowerCase().indexOf(StringUtil.ASPACE,currIndex_w);\n bTab = jText.toLowerCase().indexOf(StringUtil.ATAB,currIndex_w);\n bNewline = jText.toLowerCase().indexOf(\"\\n\",currIndex_w);\n \n bIndex = bSpace;\n if ((bTab != -1) && ((bTab < bIndex) || (bIndex == -1))) {\n bIndex = bTab;\n }\n if ((bNewline != -1) && ((bNewline < bIndex) || (bIndex == -1))) {\n bIndex = bNewline;\n }\n index = bIndex;\n if ((currIndex_w != jText.length()) && (index == -1)) {\n index = jText.length();\n }\n }\n \n if (index == -1) {\n keepLooking = false;\n }\n else {\n next.seg = jText.substring(currIndex_w,index);\n if (next.start == 0) {\n //currIndex = index + 1;\n if (ci == -1) {\n ci = index + 1;\n }\n }\n if (ci == -1) {\n ci = index + 1;\n }\n if (next.next.start != -1) {\n currIndex_w = index + next.seg.length();\n }\n else {\n currIndex_w = index + next.seg.length();\n }\n }\n break;\n default:\n //Do nothing\n break;\n }\n if (keepLooking) {\n next = next.next;\n }\n else {\n if (tryAgain) {\n next = ws;\n tryAgain = false;\n keepLooking = true;\n }\n else {\n break;\n }\n }\n }\n /*\n TestInfo.testWriteLn(\"Find String: \" + ws.makeFindString());\n TestInfo.testWriteLn(\"Find Type: \" + ws.makeFindType());\n TestInfo.testWriteLn(\"Find Start: \" + ws.makeFindStart());\n */\n if (keepLooking) {\n TestInfo.testWriteLn(\"String Found!\");\n }\n else {\n TestInfo.testWriteLn(\"String Not Found!\");\n }\n \n //Do search\n text = ws.makeFindString();\n index = jText.toLowerCase().indexOf(text.toLowerCase(),currIndex);\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = ci;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n else {\n text = processEscapeChars(text);\n \n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }\n }", "void complexElementParticle(GroupSG pGroup, ParticleSG particle) throws SAXException;", "Particles particles();", "public void spawnParticle ( Particle particle , double x , double y , double z , int count ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( new Location ( getWorld ( ) , x , y , z ) ,\n\t\t\t\t\t\t\t\t\t 0.0F , 0.0F , 0.0F , 1.0F , count , null , handle );\n\t\t} );\n\t}", "public interface ParticleVisitor {\r\n\t/** Invoked for an empty type.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid emptyType(ComplexTypeSG type) throws SAXException;\r\n\t/** Invoked for a complex type with simple content.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid simpleContent(ComplexTypeSG type) throws SAXException;\r\n\t/** Invoked to begin a sequence.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid startSequence(GroupSG group) throws SAXException;\r\n\t/** Invoked to end a sequence.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid endSequence(GroupSG group) throws SAXException;\r\n\t/** Invoked to start a choice group.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid startChoice(GroupSG group) throws SAXException;\r\n\t/** Invoked to end a choice group.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid endChoice(GroupSG group) throws SAXException;\r\n\t/** Invoked to start an all group.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid startAll(GroupSG group) throws SAXException;\r\n\t/** Invoked to end an all group.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid endAll(GroupSG group) throws SAXException;\r\n\t/** Invoked to start a complex content types\r\n\t * content.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid startComplexContent(ComplexTypeSG type) throws SAXException;\r\n\t/** Invoked to end a complex content types content.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid endComplexContent(ComplexTypeSG type) throws SAXException;\r\n\t/** Invoked to process an element with simple type.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid simpleElementParticle(GroupSG pGroup,ParticleSG particle) throws SAXException;\r\n\t/** Invoked to process an element with complex type.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid complexElementParticle(GroupSG pGroup, ParticleSG particle) throws SAXException;\r\n\t/** Invoked to process a wildcard particle.\r\n\t * @throws SAXException The visitor failed.\r\n\t */\r\n\tvoid wildcardParticle(ParticleSG particle) throws SAXException;\r\n}", "void onPsubscribe(String pattern, int no);", "public void _applyModifier(Particle particle) {\n this.particle = particle;\n life = particle.life;\n outer = particle.outer;\n texture = particle.texture;\n sprite = particle.sprite;\n isInnerScreen = particle.isInnerScreen;\n this.physicParticle = particle.physicParticle;\n x = physicParticle.x;\n y = physicParticle.y;\n mass = physicParticle.mass;\n charge = physicParticle.charge;\n\n modify();\n }", "public void updateWildcard(int inFace) {\r\n\t\tif (face == inFace) {\r\n\t\t\twildcard = true;\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\twildcard = false;\r\n\t\t}\r\n\t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,sound_cache);\r\n\t\t\t\t\t\t\t\t\t\t}", "List<? extends Particle> update(double timeDelta);", "public final void mT__242() throws RecognitionException {\n try {\n int _type = T__242;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:240:8: ( 'wildcard' )\n // InternalMyDsl.g:240:10: 'wildcard'\n {\n match(\"wildcard\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void processWildcardsNext() {\n ws = new WildcardSegment();\n WildcardSegment next;\n int sw,mw; //Single Wildcard, Multi-Wildcard\n //currIndex = jta.getSelectionStart();\n int ci = -1;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n if (hasWildcards(text)) {\n int index = 0;\n int currIndex_w = currIndex;\n boolean tryAgain = false;\n text = processEscapeChars_w(text);\n text = validateWildcards(text);\n \n ws.setStart(0);\n next = ws.next;\n \n text = text.replace(\"^^\",\"~!~\");\n \n do {\n sw = text.indexOf(\"^#\");\n mw = text.indexOf(\"^*\");\n \n if ((sw != -1) && (mw != -1)) {\n if (sw < mw) {\n text = text.replaceFirst(\"\\\\Q^#\\\\E\",\"`#\");\n if (sw == 0) {\n ws.type = 1;\n }\n else {\n next.setStart(sw,1);\n index = next.start;\n next = next.next;\n }\n }\n else {\n text = text.replaceFirst(\"\\\\Q^*\\\\E\",\"`*\");\n if (mw == 0) {\n ws.type = 2;\n }\n else {\n next.setStart(mw,2);\n index = next.start;\n next = next.next;\n }\n }\n }\n else if (sw != -1) {\n text = text.replaceFirst(\"\\\\Q^#\\\\E\",\"`#\");\n if (sw == 0) {\n ws.type = 1;\n }\n else {\n next.setStart(sw,1);\n index = next.start;\n next = next.next;\n }\n }\n else {\n text = text.replaceFirst(\"\\\\Q^*\\\\E\",\"`*\");\n if (mw == 0) {\n ws.type = 2;\n }\n else {\n next.setStart(mw,2);\n index = next.start;\n next = next.next;\n }\n }\n \n sw = text.indexOf(\"^#\");\n mw = text.indexOf(\"^*\");\n if ((index != text.length() - 2) && (sw != (index + 2)) && (mw != (index + 2))) {\n next.setStart(index+2);\n index = next.start;\n next = next.next;\n }\n }\n while ((sw != -1) || (mw != -1));\n \n next = ws;\n while(next.start != -1) {\n switch (next.type) {\n case 0:\n if (next.next.type == -1) {\n next.seg = text.substring(next.start);\n }\n else {\n next.seg = text.substring(next.start,next.next.start);\n }\n break;\n case 1:\n next.seg = \"~`~\";\n break;\n case 2:\n next.seg = \"`~`\";\n break;\n default:\n //Do nothing\n break;\n }\n next = next.next;\n }\n //text = text.replace(\"~!~\",\"^\");\n next = ws;\n boolean keepLooking = true;\n int bSpace,bTab,bNewline,bIndex;\n while(next.start != -1) {\n switch (next.type) {\n case 0:\n index = jText.toLowerCase().indexOf(next.seg.toLowerCase(),currIndex_w);\n if (index == -1) {\n keepLooking = false;\n }\n else {\n if (next.start == 0) {\n if (ci == -1) {\n ci = index + 1;\n }\n }\n \n if (next.next.start != -1) {\n currIndex_w = index + next.seg.length();\n }\n else {\n currIndex_w = index + 1;\n }\n }\n break;\n case 1:\n //index = jText.toLowerCase().indexOf(next.seg.toLowerCase(),currIndex_w);\n if (currIndex_w != jText.length()) {\n index = currIndex_w;\n }\n else {\n index = -1;\n }\n if (index == -1) {\n keepLooking = false;\n }\n else {\n if (next.start == 0) {\n if (ci == -1) {\n ci = index + 1;\n }\n }\n if (ci == -1) {\n ci = index + 1;\n }\n if (next.next.start != -1) {\n next.seg = String.valueOf(jText.charAt(currIndex_w));\n currIndex_w = index + next.seg.length();\n }\n else {\n next.seg = String.valueOf(jText.charAt(currIndex_w));\n currIndex_w = index + 1;\n }\n }\n break;\n case 2:\n \n if (next.next.start != -1) {\n bIndex = jText.toLowerCase().indexOf(next.next.seg.toLowerCase(),currIndex_w);\n bSpace = jText.toLowerCase().indexOf(StringUtil.ASPACE,currIndex_w);\n bTab = jText.toLowerCase().indexOf(StringUtil.ATAB,currIndex_w);\n bNewline = jText.toLowerCase().indexOf(\"\\n\",currIndex_w);\n if ((bSpace != -1) && ((bSpace < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n \n if ((bTab != -1) && ((bTab < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n if ((bNewline != -1) && ((bNewline < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n index = bIndex;\n if ((currIndex_w != jText.length()) && (index == -1)) {\n tryAgain = true;\n }\n }\n else {\n bSpace = jText.toLowerCase().indexOf(StringUtil.ASPACE,currIndex_w);\n bTab = jText.toLowerCase().indexOf(StringUtil.ATAB,currIndex_w);\n bNewline = jText.toLowerCase().indexOf(\"\\n\",currIndex_w);\n \n bIndex = bSpace;\n if ((bTab != -1) && ((bTab < bIndex) || (bIndex == -1))) {\n bIndex = bTab;\n }\n if ((bNewline != -1) && ((bNewline < bIndex) || (bIndex == -1))) {\n bIndex = bNewline;\n }\n index = bIndex;\n if (currIndex_w != jText.length()) {\n index = jText.length();\n }\n }\n \n if (index == -1) {\n keepLooking = false;\n }\n else {\n next.seg = jText.substring(currIndex_w,index);\n if (next.start == 0) {\n \n }\n if (ci == -1) {\n ci = index + 1;\n }\n if (next.next.start != -1) {\n currIndex_w = index + next.seg.length();\n }\n else {\n currIndex_w = index + next.seg.length();\n }\n }\n break;\n default:\n //Do nothing\n break;\n }\n if (keepLooking) {\n next = next.next;\n }\n else {\n if (tryAgain) {\n next = ws;\n tryAgain = false;\n keepLooking = true;\n }\n else {\n break;\n }\n }\n }\n TestInfo.testWriteLn(\"Find String: \" + ws.makeFindString());\n TestInfo.testWriteLn(\"Find Type: \" + ws.makeFindType());\n TestInfo.testWriteLn(\"Find Start: \" + ws.makeFindStart());\n if (keepLooking) {\n TestInfo.testWriteLn(\"String Found!\");\n }\n else {\n TestInfo.testWriteLn(\"String Not Found!\");\n }\n \n //Do search\n text = ws.makeFindString();\n index = jText.toLowerCase().indexOf(text.toLowerCase(),currIndex);\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n currIndex = 0;\n }\n else {\n try {\n currIndex = ci;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n else {\n text = processEscapeChars(text);\n \n int index = jText.toLowerCase().indexOf(text.toLowerCase(),currIndex);\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }\n }", "public void add(Particle particle) {\n this.particles.add(particle);\n }", "public Filter spawn(String x);", "boolean emitParticleMaybe(RenderState renderData, IParticle reusedParticle, PointF point, PointF vec);", "public void secrete() {\n\t\t/* Instantiate a new virus particle */\n\t\tSim.lps.add(new Lambda_phage(prob_surface, prob_enzymes));\n\t}", "@Override\n\tpublic void visitXmatch(Xmatch p) {\n\n\t}", "void onPart(String partedNick);", "public Wildcard getWildcard() {\n return _wildcard;\n }", "private void deleteWildcard(StringBuilder charSeq, String wildcard) {\n int startIndex = charSeq.indexOf(wildcard);\n if (startIndex >= 0) {\n charSeq.delete(startIndex, startIndex + wildcard.length());\n }\n }", "void matchStart();", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,gst.resultFile);\r\n\t\t\t\t\t\t\t\t\t\t}", "public static interface Filter\n\t\t{\n\t\t/**\n\t\t * Accept a frame? if false then all particles will be discarded\n\t\t */\n\t\tpublic boolean acceptFrame(EvDecimal frame);\n\t\t\n\t\t/**\n\t\t * Accept a particle?\n\t\t */\n\t\tpublic boolean acceptParticle(int id, ParticleInfo info);\n\t\t}", "public void place (Particle particle)\n {\n _layer.pointToLayer(place(particle.getPosition()), true);\n }", "public void runForEachSample(String dirName, String fnamePattern){\n System.out.println(\"Getting all files with reads per transcripts counts. Files names finish with \" + fnamePattern);\n File dir = new File(dirName);\n for (File ch : dir.listFiles()) {\n if (ch.isDirectory())\n for (File child : ch.listFiles()){\n if (child.getName().matches(fnamePattern)){\n try {\n getSNPStatisticsPerSample(child.getPath());\n } catch (IOException ex) {\n Logger.getLogger(GetAllStatisticsRNAseq.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n }\n }", "public abstract void accept(Player player, String component);", "@Override\n\tpublic boolean accept(Spectrum s) {\n\t\treturn s.peptide.matches(this.peptidePattern);\n\t}", "public void process(PDFOperator operator, List<COSBase> arguments) throws IOException\n {\n COSName selectedPattern = (COSName)arguments.get(0);\n Map<String,PDPatternResources> patterns = getContext().getResources().getPatterns();\n PDPatternResources pattern = patterns.get(selectedPattern.getName()); \n getContext().getGraphicsState().getStrokingColor().setPattern(pattern);\n }", "@Override\n \t\t\t\tpublic void doCreateQuadParticle() {\n \n \t\t\t\t}", "@Override\n public String visit(WildcardType n, Object arg) {\n return null;\n }", "public particleFilterStep1(PilotRobot robot) {\r\n\t\tthis.robot = robot;\r\n\t\tpilot = robot.getPilot();\r\n\r\n\t}", "private void predict(Particle a) {\n if (a == null) return;\n double dt;\n\n for (int i = 0; i < this.N; i++) { // add events to collisions with other particles\n dt = a.timeToHit(particles[i]);\n if (dt < 0.0) dt = 0.0;\n if (dt != INFINITY)\n pq.insert(new Event(dt, a, particles[i]));\n }\n\n dt = a.timeToHitVerticalWall();\n if (dt < 0.0) dt = 0.0;\n if (dt != INFINITY)\n pq.insert(new Event(dt, a, null)); // add events to collisions with walls\n\n dt = a.timeToHitHorizontalWall();\n if (dt < 0.0) dt = 0.0;\n if (dt != INFINITY)\n pq.insert(new Event(dt, null, a));\n }", "public void process() {\n\t}", "public void processing();", "public static void showParticle(Player p, Location loc, EnumParticle particle, int amount){\n PacketPlayOutWorldParticles pckt = new PacketPlayOutWorldParticles(particle, false, (float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 0f, 0f, 0f, /*speed*/0f, amount);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(pckt);\n }", "public void processMessage( String from, Object[] data )\n {\n\t\tif( data.length > 0 )\n\t\t{\n\t\t\tif( data[0].equals( \"PA\" ) )\n\t\t\t{\n\t\t\t\tdouble x = ((Number)data[2]).doubleValue();\n\t\t\t\tdouble y = ((Number)data[3]).doubleValue();\n\t\t\t\tdouble z = ((Number)data[4]).doubleValue();\n\t\t\t\t\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.particleAdded( data[1], x, y, z );\n\t\t\t}\n\t\t\telse if( data[0].equals( \"PAC\" ) )\n\t\t\t{\n\t\t\t\tString attribute = (String) data[2];\n\t\t\t\tboolean removed = (Boolean) data[4];\n\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.particleAttributeChanged( data[1], attribute, data[3], removed );\n\t\t\t}\n\t\t\telse if( data[0].equals( \"PM\" ) )\n\t\t\t{\n\t\t\t\tdouble x = ((Number)data[2]).doubleValue();\n\t\t\t\tdouble y = ((Number)data[3]).doubleValue();\n\t\t\t\tdouble z = ((Number)data[4]).doubleValue();\n\t\t\t\t\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.particleMoved( data[1], x, y, z );\n\t\t\t}\n\t\t\telse if( data[0].equals( \"PR\" ) )\n\t\t\t{\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.particleRemoved( data[1] );\t\t\t\t\n\t\t\t}\n\t\t\telse if( data[0].equals( \"SF\" ) )\n\t\t\t{\n\t\t\t\tint time = ((Number)data[1]).intValue();\n\t\t\t\t\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.stepFinished( time );\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// What to do ?\n\n\t\t\t\tif( data.length > 0 && data[0] instanceof String )\n\t\t\t\t\tthrow new RuntimeException( \"ParticleBoxListenerProxy: uncaught message from \"+\n\t\t\t\t\t from+\" : \"+data[0]+\"[\"+ data.length+\"]\" );\n\t\t\t\telse\n\t\t\t\t\tthrow new RuntimeException( \"ParticleBoxListenerProxy: uncaught message from \"+\n\t\t\t\t\t from+\" : [\"+data.length+\"]\" );\n\t\t\t}\n\t\t}\t \n }", "public void processPacket(Packet p)\n {\n PacketExtension pe = p.getExtension(\"event\", \"http://jabber.org/protocol/pubsub#event\");\n if(pe != null)\n {\n System.out.println(\"pe: \"+pe.toXML());\n }\n\n }", "public WildcardFilenameFilter( String wildcard ) {\n\t\tpattern = Pattern.compile( wildcardAsRegex( wildcard ) );\n\t\tsetAcceptDirectories( true );\n\t}", "@Override\n public void processPlayer(Player sender, CDPlayer playerData, String[] args) {\n }", "@Override\n\tpublic void visit(LikeExpression arg0) {\n\n\t}", "@Override\n\tpublic void visit(LikeExpression arg0) {\n\t\t\n\t}", "QueryElement addLikeWithWildcardSetting(String property, String value);", "public static void main(String[] args) {\r\n\t\tList<String> tracklist = TracklistCreator.readTrackList(\"work\\\\all_wav.txt\");\r\n\t\tint filesProcessed = 0;\r\n\t\tfor (String wavFilePath : tracklist) {\r\n\t\t\ttry {\r\n\t\t\t\tString track = StringUtils.substringAfterLast(wavFilePath, File.separator);\r\n\t\t\t\tString beatFilePath = TARGET_DIR + track + PathConstants.EXT_BEAT;\r\n\t\t\t\tnew VampBeatTimesProvider(wavFilePath, beatFilePath, new Configuration().pre);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t if (++filesProcessed % 10 == 0) {\r\n\t \tLOG.info(filesProcessed + \" files were processed\");\r\n\t }\r\n\t\t}\r\n\t\tLOG.info(\"Done. \" + filesProcessed + \" files were saved to '\" + TARGET_DIR + \"'\");\r\n\t}", "public static void main (String ... args) {\n\n String titulo = \"simple\";\n String pattern = \"abc\";\n String source = \"avsfvasdfabcwefewafabc\";\n find(titulo, pattern, source);\n\n ////////////////////////\n titulo = \"Digitos...\";\n pattern = \"\\\\d\";\n source = \"9a8d70sd98f723708\";\n find(titulo, pattern, source);\n\n titulo = \"NO Digitos...\";\n pattern = \"\\\\D\";\n source = \"9a8d70sd98f723708\";\n find(titulo, pattern, source);\n\n titulo = \"\";\n pattern = \"a?\";\n source = \"aba\";\n find(titulo, pattern, source);\n\n titulo = \"dot methacharacter\";\n pattern = \"a.c\";\n source = \"ac abc a c\";\n find(titulo, pattern, source);\n\n titulo =\"Operator ^ carat\";\n pattern = \"proj1([^,])*\";\n source = \"proj3.txt,proj1sched.pdf,proj1,prof2,proj1.java\";\n find(titulo, pattern, source);\n\n }", "public void mouseDragged() {\n pma_ParticleVerlet p = new pma_ParticleVerlet(mouseX,mouseY);\n p.lock();\n // if there is at least one particle and this is the current continuous line\n if (physics.particles.size() > 0 && continuous == current) {\n // get the previous particle (aka the last in the list)\n pma_ParticleVerlet prev = physics.particles.get(physics.particles.size()-1);\n // create a spring between the previous and the current particle of length 10 and strength 1\n pma_Spring s = new pma_Spring(p,prev,10,1);\n // add the spring to the physics system\n physics.addSpring(s);\n } else {\n current = continuous;\n }\n // unlock previous particle\n if (prev!=null) {\n prev.unlock();\n }\n // add the particle to the physics system\n physics.addParticle(p);\n // create a forcefield around this particle with radius 20 and force -1.5 (aka push)\n pma_i_BehaviorParticle b = new pma_BehaviorAttraction(p,20,-1.5f);\n // add the behavior to the physics system (will be applied to all particles)\n physics.addBehavior(b);\n // make current particle the previous one...\n prev=p;\n}", "public static void main(String[] args) {\n String pattern = \"orl\";\n String text = \"Hello World in Java\";\n\n searchPatternInText(pattern, text);\n\n //pattern = \"xyz\";\n //searchPatternInText(pattern, text);\n }", "default void hit() {\n\t\tcount(1);\n\t}", "public void a(PotionEffect paramwq)\r\n/* 44: */ {\r\n/* 45: 52 */ if (this.id != paramwq.id) {\r\n/* 46: 53 */ a.warn(\"This method should only be called for matching effects!\");\r\n/* 47: */ }\r\n/* 48: 55 */ if (paramwq.amplifier > this.amplifier)\r\n/* 49: */ {\r\n/* 50: 56 */ this.amplifier = paramwq.amplifier;\r\n/* 51: 57 */ this.duration = paramwq.duration;\r\n/* 52: */ }\r\n/* 53: 58 */ else if ((paramwq.amplifier == this.amplifier) && (this.duration < paramwq.duration))\r\n/* 54: */ {\r\n/* 55: 59 */ this.duration = paramwq.duration;\r\n/* 56: */ }\r\n/* 57: 60 */ else if ((!paramwq.ambient) && (this.ambient))\r\n/* 58: */ {\r\n/* 59: 61 */ this.ambient = paramwq.ambient;\r\n/* 60: */ }\r\n/* 61: 63 */ this.showParticles = paramwq.showParticles;\r\n/* 62: */ }", "@Override\n public void run()\n {\n final int minX = region.getMinimumPoint().getX();\n final int minZ = region.getMinimumPoint().getZ();\n final int maxX = region.getMaximumPoint().getX();\n final int maxZ = region.getMaximumPoint().getZ();\n final int midX = (maxX - minX) / 2;\n final int midZ = (maxZ - minZ) / 2;\n double playerY = player.getLocation().getY();\n\n if (midX / 6 > 0)\n {\n int tmp = 0;\n final int amount = midX / 5;\n for (int i = 0; i < amount; i++)\n {\n final int x = minX + midX - tmp;\n final int x2 = minX + midX + tmp;\n for (double y = playerY - 10; y <= playerY + 10; y++)\n {\n player.spawnParticle(Particle.FLAME, x, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, x, y, maxZ, 0);\n player.spawnParticle(Particle.FLAME, x2, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, x2, y, maxZ, 0);\n }\n tmp += 5;\n }\n }\n if (midZ / 6 > 0)\n {\n int tmp = 0;\n final int amount = midZ / 5;\n for (int i = 0; i < amount; i++)\n {\n final int z = minZ + midZ - tmp;\n final int z2 = minZ + midZ + tmp;\n\n for (double y = playerY - 10; y <= playerY + 10; y++)\n {\n player.spawnParticle(Particle.FLAME, minX, y, z, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, z, 0);\n player.spawnParticle(Particle.FLAME, minX, y, z2, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, z2, 0);\n }\n tmp += 5;\n }\n }\n\n for (double y = playerY - 40; y <= 256; y++)\n {\n player.spawnParticle(Particle.FLAME, minX, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, minX, y, maxZ, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, maxZ, 0);\n }\n timer--;\n\n if (0 > this.timer)\n {\n player.sendMessage(\"§5Boundaries have been expired.\");\n this.cancel();\n }\n }", "public void process(WatchedEvent event) {\n\t\t\n\t}", "public void onTick() {\n // Tick all particles\n Iterator<Particle> iterator = this.particles.iterator();\n while (iterator.hasNext()) {\n Particle particle = iterator.next();\n\n // Tick this particle\n particle.onTick();\n\n // Remove particle when removed flag is set\n if (particle.removed) {\n iterator.remove();\n }\n }\n }", "public static void sendGenericParticle(Main plugin, double x, double y, double z, EnumParticle particle) {\n\t\tPacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particle, true, (float) x, (float) y, (float) z, 0, 0, 0, 0, 3);\n\t\tnew BukkitRunnable() {\n\t\t\tint i = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor(Player online : Bukkit.getOnlinePlayers()) {\n ((CraftPlayer)online).getHandle().playerConnection.sendPacket(packet);\n }\n\t\t\t\ti++;\n\t\t\t\tif (i > 2) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t}\n\t\t}.runTaskTimer(plugin, 0, 5);\n\t}", "public static void main(String[] args) {\n\n String[] split = \"hjhk***jklj,j\\nkl\".split(quote(\"***\") + \"|,\");\n for (String every : split)\n System.out.println(\"test slpit: \" + every);\n// Pattern p = Pattern.compile(\"\\\\[([^\\\\]]+)\\\\]\");\n// Matcher m = p.matcher(\"[***]\");\n// while(m.find()) {\n// System.out.println(m.group(0));\n// }\n }", "public void place (Particle particle) {\n float exp = solid ? 3f : 2f;\n float distance = FloatMath.pow(FloatMath.random(\n FloatMath.pow(nearDistance, exp), FloatMath.pow(farDistance, exp)),\n 1f / exp);\n\n // find the location of the edges at the distance\n Camera camera = layer.getCamera();\n float scale = distance / camera.getNear();\n float left = camera.getLeft() * scale;\n float right = camera.getRight() * scale;\n float bottom = camera.getBottom() * scale;\n float top = camera.getTop() * scale;\n\n // if it's solid, choose a random point in the rect; otherwise, choose an edge\n // pair according to their lengths\n Vector3f position = particle.getPosition();\n if (solid) {\n position.set(\n FloatMath.random(left, right),\n FloatMath.random(bottom, top),\n -distance);\n } else {\n float width = right - left;\n float height = top - bottom;\n Randoms r = Randoms.threadLocal();\n if (r.getFloat(width + height) < width) {\n position.set(\n r.getInRange(left, right),\n r.getBoolean() ? top : bottom,\n -distance);\n } else {\n position.set(\n r.getBoolean() ? left : right,\n r.getInRange(top, bottom),\n -distance);\n }\n }\n\n // transform into world space, then into layer space\n layer.pointToLayer(camera.getWorldTransform().transformPointLocal(position),\n false);\n }", "private static boolean particleValidRestriction(XSParticleDecl dParticle, SubstitutionGroupHandler dSGHandler, XSParticleDecl bParticle, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 605 */ return particleValidRestriction(dParticle, dSGHandler, bParticle, bSGHandler, true);\n/* */ }", "@Override\n public Object visit(ASTResource node, Object data) {\n if (node.getNumChildren() == 1) {\n ASTName nameNode = (ASTName) node.getChild(0);\n for (StringTokenizer st = new StringTokenizer(nameNode.getImage(), \".\"); st.hasMoreTokens();) {\n JavaNameOccurrence occ = new JavaNameOccurrence(nameNode, st.nextToken());\n new Search(occ).execute();\n }\n }\n\n return super.visit(node, data);\n }", "public void processInput(String command) {\r\n\t\t//begin\r\n\t\tString word = \"\";\r\n\t\tint i = 0;\r\n\t\tboolean processingInput = true;\r\n\t\t\r\n\t\t//loop that runs through whole command and breaks it apart\r\n\t\twhile(processingInput == true && i < command.length()) {\r\n\t\t\t\r\n\t\t\tif(command.charAt(i) == ',' && i < command.length()) {\r\n\t\t\t\t\r\n\t\t\t\ti += 2;\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\t//word = word.trim();\r\n\t\t\t\tboolean hasError = false;\r\n\t\t\t\t\r\n\t\t\t\tif(word.compareTo(\"publish\") == 0 && checkIfHasCorrectFormat(command, \"publish\") == true) {\r\n\t\t\t\t\tString producer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\tString brandName = \"\";\r\n\t\t\t\t\t//loop that gets producer name from command line\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tproducer += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tproducer = producer.toLowerCase();\r\n\t\t\t\t\t//producer = producer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category from command line\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\t\r\n\t\t\t\t\t\tprodCat += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets brand name from command line\r\n\t\t\t\t\twhile(i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tbrandName += command.charAt(i);\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbrandName = brandName.toLowerCase();\r\n\t\t\t\t\t//brandName = brandName.trim();\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\t//adds producer to producerList\r\n\t\t\t\t\t\taddProducer(producer);\r\n\t\t\t\t\t\t//performs a publish for the given producer\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < producerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tProducer tempProducer = producerList.get(i);\r\n\t\t\t\t\t\t\tif(producer.compareTo(tempProducer.getPublisherName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempProducer.publish(brandName, prodCat);\r\n\t\t\t\t\t\t\t\tproducerList.set(i, tempProducer); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(word.compareTo(\"subscribe\") == 0 && checkIfHasCorrectFormat(command, \"subscribe\") == true) { \r\n\t\t\t\t\tString retailer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the retailer name\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\t\r\n\t\t\t\t\t\tretailer += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tretailer = retailer.toLowerCase();\r\n\t\t\t\t\t//retailer = retailer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category\r\n\t\t\t\t\twhile(i < command.length() && i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tprodCat += command.charAt(i);\t\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\taddRetailer(retailer);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < retailerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tRetailer tempRetailer = retailerList.get(i);\r\n\t\t\t\t\t\t\tif(retailer.compareTo(tempRetailer.getSubscriberName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempRetailer.subscribe(prodCat);\r\n\t\t\t\t\t\t\t\tretailerList.set(i, tempRetailer); //NOT SURE IF I OR I + 1 OR I - 1 ****************************************8\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//broker.subscribeCommand(retailer, prodCat);\r\n\t\t\t\t}\r\n\t\t\t\telse if(word.compareTo(\"unsubscribe\") == 0 && checkIfHasCorrectFormat(command, \"unsubscribe\") == true) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString retailer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the retailer name\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\r\n\t\t\t\t\t\tretailer += command.charAt(i);\t\t\t\t\t\t\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tretailer = retailer.toLowerCase();\r\n\t\t\t\t\tretailer = retailer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category\r\n\t\t\t\t\twhile(i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tprodCat += command.charAt(i);\t\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < retailerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tRetailer tempRetailer = retailerList.get(i);\r\n\t\t\t\t\t\t\tif(retailer.compareTo(tempRetailer.getSubscriberName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempRetailer.unsubscribe(prodCat);\r\n\t\t\t\t\t\t\t\tretailerList.set(i, tempRetailer); //NOT SURE IF I OR I + 1 OR I - 1 ****************************************8\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tprocessingInput = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tword += command.charAt(i);\t\t\t\t\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t\t//end\r\n\t}", "@Override\n\tpublic void processing() {\n\n\t}", "public void drawParticles() {}", "public static void main(String [] args)\n{\n\n DylockPatternAnalyzer dpa = new DylockPatternAnalyzer(args);\n dpa.process();\n}", "private static boolean censorWildcard(boolean wildcard, String value, String prefix) {\r\n return wildcard \r\n &&!(value.toLowerCase().startsWith(prefix) && (value.length() < prefix.length() + 1));\r\n }", "public void process() {\n\n }", "public PeptideHit(String sequence, SpectrumMatch spectrumMatch) {\r\n this.sequence = sequence;\r\n this.proteinHits = new ArrayList<ProteinHit>();\r\n this.spectrumMatches = new ArrayList<SpectrumMatch>();\r\n addSpectrumMatch(spectrumMatch);\r\n }", "@Override\n public void accept(final Mp3File t) {\n //\n }", "@Override\n\tprotected void execute(CommandEvent event) {\n\t\tString args = event.getArgs();\n\n\t\t//find the snippet\n\t\tSnippet snippet = SnippetsMorphiaConnection.getDatastore()\n\t\t\t\t.find(Snippet.class) //use the snippets collection\n\t\t\t\t.filter(Filters.eq(\"_id\", args)) //filter so that its only the ones with the correct\n\t\t\t\t.iterator(new FindOptions()\n\t\t\t\t\t\t.limit(1)) //limit to one item\n\t\t\t\t.tryNext(); //get that item\n\n\t\tif (snippet != null) {\n\t\t//print that item\n\t\tevent.reply(snippet.asReply());\n\t\t\n\t\tsnippet.incUses();\n\t\tSnippetsMorphiaConnection.getDatastore().save(snippet);\n\t\t\n\t\t} else {\n\t\t\tevent.reply(\"There exists no snippet with this name\");\n\t\t}\n\t}", "public void handlePatternKey(KnightSubject source);", "protected void setWildcardClass(boolean wildcard) \r\n\t{\tthis.wildcard = wildcard;\t}", "@Override\n public void applyParticleAtAttacker(int type, Entity target, float[] vec)\n {\n \t\tTargetPoint point = new TargetPoint(this.dimension, this.posX, this.posY, this.posZ, 64D);\n \n \t\tswitch (type)\n \t\t{\n \t\tcase 1: //light cannon\n \t double shotHeight = 1.85D;\n \t \n \t if(this.isRiding() && this.getRidingEntity() instanceof BasicEntityMount)\n \t {\n \t \tshotHeight = 0.8D;\n \t }\n \t \n \t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, target, shotHeight, 0D, 0D, 0, true), point);\n \t\tbreak;\n \t\tcase 2: //heavy cannon\n \t\tcase 3: //light aircraft\n \t\tcase 4: //heavy aircraft\n\t\tdefault: //melee\n\t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, 0, true), point);\n\t\tbreak;\n \t\t}\n \t}", "@Override\n public void run() {\n\n\n try {\n WatchService watchService = FileSystems.getDefault().newWatchService();\n Path path = Paths.get(INPUT_FILES_DIRECTORY);\n\n path.register( watchService, StandardWatchEventKinds.ENTRY_CREATE); //just on create or add no modify?\n\n WatchKey key;\n while ((key = watchService.take()) != null) {\n for (WatchEvent<?> event : key.pollEvents()) {\n\n String fileName = event.context().toString();\n notifyController.processDetectedFile(fileName);\n\n }\n key.reset();\n }\n\n } catch (Exception e) {\n //Logger.getGlobal().setUseParentHandlers(false);\n //Logger.getGlobal().log(Level.SEVERE, e.toString(), e);\n\n }\n }", "@Override\n public void unknown(String arg0, Object[] arg1, SinkEventAttributes arg2)\n {\n }", "@Override\r\n\tpublic void search(Pattern pattern) {\r\n\t\tregularSearch.setPattern(pattern);\r\n\t\tStringBuffer result = regularSearch.lookAt(new StringBuffer(source\r\n\t\t\t\t.toString()));\r\n\t\tmatchFound(result, source);\r\n\t}", "public void select(String pattern) {\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) getRTComponent().rc; if (myrc == null) return;\n if (pattern == null || pattern.length()==0) return;\n // Extract the set operation first\n char first = pattern.charAt(0); boolean invert = false;\n if (first == '!') { pattern = pattern.substring(1,pattern.length()); invert = true; }\n first = pattern.charAt(0); \n if (first == '*' || first == '-' || first == '+') pattern = pattern.substring(1,pattern.length());\n\n // Get the various sets...\n Set<String> matched_entities = new HashSet<String>(), \n all_entities = new HashSet<String>(), \n already_selected_entities = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (already_selected_entities == null) already_selected_entities = new HashSet<String>();\n\n if (Utils.isIPv4CIDR(pattern)) {\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String str = it.next(); String orig_str = str; if (str.indexOf(BundlesDT.DELIM) >= 0) str = str.substring(str.lastIndexOf(BundlesDT.DELIM)+1,str.length());\n if (Utils.isIPv4(str) && Utils.ipMatchesCIDR(str,pattern)) matched_entities.add(orig_str);\n }\n } else if (Utils.isIPv4(pattern)) {\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String str = it.next(); String orig_str = str; if (str.indexOf(BundlesDT.DELIM) >= 0) str = str.substring(str.lastIndexOf(BundlesDT.DELIM)+1,str.length());\n\tif (str.equals(pattern)) matched_entities.add(orig_str);\n }\n } else if (pattern.startsWith(\"tag\" + BundlesDT.DELIM)) {\n Set<String> tagged_entities = getRTParent().getEntitiesWithTag(pattern.substring(4,pattern.length()));\n if (tagged_entities.size() < myrc.visible_entities.size()) {\n Iterator<String> it = tagged_entities.iterator();\n while (it.hasNext()) {\n String entity = it.next();\n if (myrc.visible_entities.contains(entity)) matched_entities.add(entity);\n }\n } else {\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String entity = it.next();\n if (tagged_entities.contains(entity)) matched_entities.add(entity);\n }\n }\n } else if (pattern.startsWith(\"REGEX:\")) {\n Pattern regex = Pattern.compile(pattern.substring(6));\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String entity = it.next();\n\tif (regex.matcher(entity).matches()) matched_entities.add(entity);\n }\n } else {\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String str = it.next(); if (str.toLowerCase().indexOf(pattern.toLowerCase()) >= 0) matched_entities.add(str);\n }\n }\n\n // Apply the set operation\n if (invert) { \n all_entities.removeAll(matched_entities);\n if (first == '*') { Set<String> set = new HashSet<String>();\n Iterator<String> it = all_entities.iterator();\n while (it.hasNext()) { \n String str = it.next(); \n if (already_selected_entities.contains(str)) \n set.add(str); \n }\n getRTParent().setSelectedEntities(set);\n } else if (first == '-') { already_selected_entities.removeAll(all_entities); getRTParent().setSelectedEntities(already_selected_entities);\n } else if (first == '+') { already_selected_entities.addAll(all_entities); getRTParent().setSelectedEntities(already_selected_entities);\n } else { getRTParent().setSelectedEntities(all_entities); }\n } else if (first == '*') { Set<String> set = new HashSet<String>();\n Iterator<String> it = matched_entities.iterator();\n while (it.hasNext()) { \n String str = it.next(); \n if (already_selected_entities.contains(str)) \n set.add(str); \n }\n getRTParent().setSelectedEntities(set);\n } else if (first == '-') { already_selected_entities.removeAll(matched_entities); getRTParent().setSelectedEntities(already_selected_entities);\n } else if (first == '+') { already_selected_entities.addAll(matched_entities); getRTParent().setSelectedEntities(already_selected_entities);\n } else { getRTParent().setSelectedEntities(matched_entities); }\n }", "@Override\n\tpublic void play(String position, int number) {\n\t\t\n\t}", "@Override\n\tpublic void playerFoundObject(String playerID, int playerNumber) {\n\t}", "public static void main(String[] args) {\n\t\tString s = \"a\";\n\t\tString p = \"ab*\";\n\t\tSystem.out.println(isMatch(s, p));\n\t}", "public static void pscan(Object... args) throws Exception {\n\t\tlogger.debug(\"Called 'pscan' with args: {}\", Arrays.asList(args));\n\t\tPointsScan theScan = new PointsScan(args);\n\t\ttheScan.runScan();\n\t}", "@Override\n\tpublic void visit(Matches arg0) {\n\t\t\n\t}", "public NameParser(WildcardManager wildcardManager)\n {\n this.wildcardManager = wildcardManager;\n }", "@Test\n public void testParticlesFromMaskScript() throws InterruptedException, ExecutionException,\n IOException, URISyntaxException, FileNotFoundException, ScriptException {\n }", "private static void updateParticle(int index) {\n\n\t\tfloat posX = particles[index].getPositionX(); // Current X position of the particle\n\t\tfloat posY = particles[index].getPositionY(); // Current Y position of the particle\n\t\tfloat vX = particles[index].getVelocityX(); // Current horizontal velocity of the particle\n\t\tfloat vY = particles[index].getVelocityY();\t// Current vertical velocity of the particle\n\t\tint age = particles[index].getAge();\t// Current age of the particle\n\t\t\n\t\t// Fill the circle's color and transparency\n\t\tUtility.fill(particles[index].getColor(), particles[index].getTransparency());\n\t\t\n\t\t// Draw the circle\n\t\tUtility.circle(posX, posY, particles[index].getSize());\n\t\t\n\t\t// Update vertical velocity effected by gravity\n\t\tvY = vY + 0.3f;\n\t\t// Update the particle's vertical velocity, XY positions and its age\n\t\tparticles[index].setVelocityY(vY);\n\t\tparticles[index].setPositionX(posX + vX);\n\t\tparticles[index].setPositionY(posY + vY);\n\t\tparticles[index].setAge(age + 1);\n\t\t\n\t\t// Call this method to remove the old particles\n\t\tremoveOldParticles(80);\n\t\t\n\n\t}", "@Override\n\tpublic void startProcessing() {\n\n\t}", "private static void createNewParticles(int number) {\n\t\t// The following declarations are to initialize the random range for the \n\t\t// particle's feature\n\t\tint maxX = Fountain.positionX + 3;\n\t\tint minX = Fountain.positionX - 3;\n\t\tint boundX = maxX - minX;\n\t\tint maxY = Fountain.positionY + 3;\n\t\tint minY = Fountain.positionY - 3;\n\t\tint boundY = maxY - minY;\n\t\t\n\t\tint particleCount = 0; // For counting the new particles' amount\n\n\t\t\n\t\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t\tif (particles[i] == null) {\n\t\t\t\t\t++particleCount;\n\t\t\t\t\t\n\t\t\t\t\t// Following codes are to prepare the setting for the particle\n\t\t\t\t\tint positionX = randGen.nextInt(boundX + 1) + maxX;\n\t\t\t\t\tint positionY = randGen.nextInt(boundY + 1) + maxY;\n\t\t\t\t\tfloat xVelocity = -1 + randGen.nextFloat() * (2);\n\t\t\t\t\tfloat yVelocity = -10 + randGen.nextFloat() * (5);\n\t\t\t\t\tfloat amount = randGen.nextFloat() * 1;\n\t\t\t\t\tint color = Utility.lerpColor(Fountain.startColor, Fountain.endColor, amount);\n\t\t\t\t\tfloat size = randGen.nextFloat() * (11 - 4);\n\t\t\t\t\tint age = randGen.nextInt(40 + 1);\n\t\t\t\t\tint transparency = randGen.nextInt((96)) + 32;\n\t\t\t\t\t\n\t\t\t\t\t// TO set the new particle with random feature\n\t\t\t\t\tparticles[i] = new Particle();\n\t\t\t\t\tparticles[i].setPositionX(positionX);\n\t\t\t\t\tparticles[i].setPositionY(positionY);\n\t\t\t\t\tparticles[i].setVelocityX(xVelocity);\n\t\t\t\t\tparticles[i].setVelocityY(yVelocity);\n\t\t\t\t\tparticles[i].setSize(size);\n\t\t\t\t\tparticles[i].setColor(color);\n\t\t\t\t\tparticles[i].setAge(age);\n\t\t\t\t\tparticles[i].setTransparency(transparency);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Once after creating 10 new particles, ends this method\n\t\t\t\tif (particleCount >= number) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n\tpublic Object process(Object input) {\n\t\treturn filter.process((Waveform2)input);\n\t}", "public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}", "public static void main(String[] args) {\n\t\tString s = \"abc\";\r\n\t\tString p = \".*\";\r\n\t\tSystem.out.println(isMatch(s, p));\r\n\t}", "private void processFilterFlag(String filter) {\r\n\t\tif (filter.equals(\"none\") == true) {\r\n\t\t\tSystem.out.println(\"Removing board filter.\");\r\n\t\t\tresults.removeFilter();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tchar ch;\r\n\t\tint i = 0;\r\n\t\twhile (i < filter.length()) {\r\n\t\t\tch = Character.toLowerCase(filter.charAt(i));\r\n\t\t\tif (ch == '*') {\r\n\t\t\t\ti++;\r\n\t\t\t} else if(ch >= 'a' && ch <= 'z') {\r\n\t\t\t\tint trailing = (filter.length() - 1) - i;\r\n\t\t\t\tSystem.out.format(\"Added filter: %d%c%d%n\", i, ch, trailing);\r\n\t\t\t\tresults.addFilter(i, ch, trailing);\r\n\t\t\t\treturn;\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Board filter syntax error!\");\r\n\t\tSystem.out.println(\"0 or more '*'s followed by 1 lower case character, followed by 0 or more stars.\");\r\n\t}", "@Override\n\tpublic void startElement(final String pUri, final String pLocalName, final String pQualifiedName, final Attributes pAttributes) throws SAXException {\n\t\tif(pLocalName.equals(TAG_PCONF)){\n\t\t\tthis.mInPX = true;\n\t\t} else if(pLocalName.equals(TAG_SYSTEM)){\n\t\t\tthis.mInSystem = true;\n\t\t\tif (mPXEmitter == null) {\n\t\t\t\tthrow new PXParseException(\"Must define emitter before system.\");\n\t\t\t}\n\t\t\tif ((mTextureFile = pAttributes.getValue(TAG_SYSTEM_TEXTURE)) == null) {\n\t\t\t\tthrow new PXParseException(\"Texture is required.\");\n\t\t\t}\n\t\t\t\n\t\t\tmParticleTexture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);\n\t\t\tmParticleTextureRegion = TextureRegionFactory.createFromAsset(this.mParticleTexture, mContext, mTextureFile, 0, 0);\n\t\t\tmTextureManager.loadTexture(this.mParticleTexture);\n\t\t\tmPXSystem = new ParticleSystem(mPXEmitter, \n\t\t\t\t\tnew Integer(pAttributes.getValue(TAG_SYSTEM_MIN_RATE)), \n\t\t\t\t\tnew Integer(pAttributes.getValue(TAG_SYSTEM_MAX_RATE)), \n\t\t\t\t\tnew Integer(pAttributes.getValue(TAG_SYSTEM_MAX_PARTICLES)), \n\t\t\t\t\tmParticleTextureRegion);\n\t\t} else if(pLocalName.equals(TAG_EMITTER)){\n\t\tthis.mInEmitter = true;\n\t\tmEmitter = pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_SHAPE);\n\t\t\tif (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_CIRCLE)) {\n\t\t\t\tmPXEmitter = new CircleParticleEmitter(\n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_RADIUS_X)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_RADIUS_Y))\n\t\t\t\t);\n\t\t\t} else if (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_CIRCLE_OUTLINE)) {\n\t\t\t\tmPXEmitter = new CircleOutlineParticleEmitter(\n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_RADIUS_X)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_RADIUS_Y))\n\t\t\t\t\t);\t\t\t\t\n\t\t\t\t} else if (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_POINT)) {\n\t\t\t\t\tmPXEmitter = new PointParticleEmitter(\n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y))\n\t\t\t\t\t);\n\t\t\t\t} else if (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_RECTANGLE)) {\n\t\t\t\t\tmPXEmitter = new RectangleParticleEmitter(\n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_WIDTH)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_HEIGHT))\n\t\t\t\t\t);\t\n\t\t\t\t} else if (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_RECTANGLE_OUTLINE)) {\n\t\t\t\t\tmPXEmitter = new RectangleOutlineParticleEmitter(\n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_WIDTH)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_HEIGHT))\n\t\t\t\t\t);\t\n\t\t\t\t}\n\t\t} else if(pLocalName.equals(TAG_INITIAL_ACCELERATION)){\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial acceleration inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitAccel = true;\n\t\t\tmPXSystem.addParticleInitializer(new AccelerationInitializer(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ACCELERATION_ATTRIBUTE_MIN_X)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ACCELERATION_ATTRIBUTE_MAX_X)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ACCELERATION_ATTRIBUTE_MIN_Y)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ACCELERATION_ATTRIBUTE_MAX_Y))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_INITIAL_ALPHA)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial alpha inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitAlpha = true;\n\t\t\tmPXSystem.addParticleInitializer(new AlphaInitializer(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ALPHA_ATTRIBUTE_MIN_ALPHA)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ALPHA_ATTRIBUTE_MAX_ALPHA))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_INITIAL_COLOR)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial color inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitColor = true;\n\t\t\tmPXSystem.addParticleInitializer(new ColorInitializer(\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MIN_RED)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MAX_RED)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MIN_GREEN)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MAX_GREEN)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MIN_BLUE)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MAX_BLUE))\n\t\t\t\t));\n\t\t\t\n\t\t} else if(pLocalName.equals(TAG_INITIAL_GRAVITY)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial gravity inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitGravity = true;\n\t\t\tmGravity = new Boolean(pAttributes.getValue(TAG_INITIAL_GRAVITY_ATTRIBUTE_VALUE));\n\t\t\tif (mGravity) mPXSystem.addParticleInitializer(new GravityInitializer());\n\t\t} else if(pLocalName.equals(TAG_INITIAL_ROTATION)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial rotation inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitRotation = true;\n\t\t\tmPXSystem.addParticleInitializer(new RotationInitializer(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ROTATION_ATTRIBUTE_MIN_ROTATION)), \n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ROTATION_ATTRIBUTE_MAX_ROTATION))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_INITIAL_VELOCITY)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial velocity inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitVelocity = true;\n\t\t\tmPXSystem.addParticleInitializer(new VelocityInitializer(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_VELOCITY_ATTRIBUTE_MIN_X)), \n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_VELOCITY_ATTRIBUTE_MAX_X)), \n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_VELOCITY_ATTRIBUTE_MIN_Y)), \n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_VELOCITY_ATTRIBUTE_MAX_Y))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_ALPHA)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define alpha modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModAlpha = true;\n\t\t\tmPXSystem.addParticleModifier(new AlphaModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ALPHA_ATTRIBUTE_FROM_ALPHA)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ALPHA_ATTRIBUTE_TO_ALPHA)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ALPHA_ATTRIBUTE_FROM_TIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ALPHA_ATTRIBUTE_TO_TIME))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_COLOR)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define color modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModColor = true;\n\t\t\tmPXSystem.addParticleModifier(new ColorModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_FROM_RED)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_TO_RED)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_FROM_GREEN)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_TO_GREEN)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_FROM_BLUE)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_TO_BLUE)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_FROM_TIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_TO_TIME))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_EXPIRE)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define expire modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModExpire = true;\n\t\t\tmPXSystem.addParticleModifier(new ExpireModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_EXPIRE_ATTRIBUTE_MIN_LIFETIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_EXPIRE_ATTRIBUTE_MAX_LIFETIME))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_ROTATION)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define rotation modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModRotation = true;\n\t\t\tmPXSystem.addParticleModifier(new RotationModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ROTATION_ATTRIBUTE_FROM_ROTATION)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ROTATION_ATTRIBUTE_TO_ROTATION)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ROTATION_ATTRIBUTE_FROM_TIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ROTATION_ATTRIBUTE_TO_TIME))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_SCALE)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define scale modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModScale = true;\n\t\t\tmPXSystem.addParticleModifier(new ScaleModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_FROM_SCALE_X)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_TO_SCALE_X)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_FROM_SCALE_Y)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_TO_SCALE_Y)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_FROM_TIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_TO_TIME))\n\t\t\t));\n\t\t}\n\t}", "public ObjectCreatedSearchQuery(JiveSearchPattern pattern) {\n\t\tthis.exporter = new NewEventExporter();\n\t\tthis.pattern = pattern;\n\t}" ]
[ "0.5729199", "0.5513689", "0.5416197", "0.53527987", "0.53414387", "0.5263411", "0.51267904", "0.5109469", "0.51080847", "0.51017594", "0.5089462", "0.5025991", "0.5024633", "0.5009996", "0.4981578", "0.4971028", "0.4966606", "0.49641278", "0.49196562", "0.48971123", "0.48946443", "0.4876707", "0.48696208", "0.48636454", "0.4845661", "0.47889757", "0.47600144", "0.47357178", "0.47186685", "0.4696791", "0.46880183", "0.46879965", "0.46769422", "0.46663436", "0.46658686", "0.46538547", "0.46392542", "0.46344876", "0.4629314", "0.46255356", "0.46193227", "0.4596417", "0.45705178", "0.4561901", "0.45533162", "0.4542951", "0.45331854", "0.45271662", "0.45205158", "0.45204198", "0.45146146", "0.45139524", "0.44990298", "0.44980547", "0.44977468", "0.44946173", "0.44934732", "0.44909358", "0.44864082", "0.44580698", "0.4452166", "0.4444637", "0.4443043", "0.44391036", "0.44384903", "0.44267783", "0.44215772", "0.44210917", "0.44182375", "0.4396496", "0.43961295", "0.43951523", "0.437954", "0.43760675", "0.43732408", "0.43710387", "0.43678206", "0.4365162", "0.43585983", "0.4355984", "0.43554312", "0.43553242", "0.43534327", "0.43512642", "0.43477648", "0.43399078", "0.43398926", "0.43387392", "0.43354782", "0.43339768", "0.43274552", "0.43201628", "0.4319587", "0.43187657", "0.43183458", "0.43170908", "0.43143857", "0.43108824", "0.4310544", "0.43075868" ]
0.73693836
0
Create contents of the dialog.
@Override protected Control createDialogArea(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); createContent(container); return container; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(340, 217);\n\t\tshell.setText(\"Benvenuto\");\n\t\tshell.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tFormData fd_composite = new FormData();\n\t\tfd_composite.bottom = new FormAttachment(100, -10);\n\t\tfd_composite.top = new FormAttachment(0, 10);\n\t\tfd_composite.right = new FormAttachment(100, -10);\n\t\tfd_composite.left = new FormAttachment(0, 10);\n\t\tcomposite.setLayoutData(fd_composite);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblUsername = new Label(composite, SWT.NONE);\n\t\tlblUsername.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\ttxtUsername = new Text(composite, SWT.BORDER);\n\t\ttxtUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tfinal String username = txtUsername.getText();\n\t\tSystem.out.println(username);\n\t\t\n\t\tLabel lblPeriodo = new Label(composite, SWT.NONE);\n\t\tlblPeriodo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblPeriodo.setText(\"Periodo\");\n\t\t\n\t\tfinal CCombo combo_1 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_1.setVisibleItemCount(6);\n\t\tcombo_1.setItems(new String[] {\"1 settimana\", \"1 mese\", \"3 mesi\", \"6 mesi\", \"1 anno\", \"Overall\"});\n\t\t\n\t\tLabel lblNumeroCanzoni = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoni.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblNumeroCanzoni.setText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tfinal CCombo combo = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo.setItems(new String[] {\"25\", \"50\"});\n\t\tcombo.setVisibleItemCount(2);\n\t\tcombo.setToolTipText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tLabel lblNumeroCanzoniDa = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoniDa.setText(\"Numero canzoni da consigliare\");\n\t\t\n\t\tfinal CCombo combo_2 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_2.setVisibleItemCount(3);\n\t\tcombo_2.setToolTipText(\"Numero canzoni da consigliare\");\n\t\tcombo_2.setItems(new String[] {\"5\", \"10\", \"20\"});\n\t\t\n\t\tButton btnAvviaRicerca = new Button(composite, SWT.NONE);\n\t\tbtnAvviaRicerca.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfinal String username = txtUsername.getText();\n\t\t\t\tfinal String numSong = combo.getText();\n\t\t\t\tfinal String period = combo_1.getText();\n\t\t\t\tfinal String numConsigli = combo_2.getText();\n\t\t\t\tif(username.isEmpty() || numSong.isEmpty() || period.isEmpty() || numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"si prega di compilare tutti i campi\");\n\t\t\t\t}\n\t\t\t\tif(!username.isEmpty() && !numSong.isEmpty() && !period.isEmpty() && !numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"tutto ok\");\n\t\t\t\t\t\n\t\t\t\t\tFileOutputStream out;\n\t\t\t\t\tPrintStream ps;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout = new FileOutputStream(\"datiutente.txt\");\n\t\t\t\t\t\tps = new PrintStream(out);\n\t\t\t\t\t\tps.println(username);\n\t\t\t\t\t\tps.println(numSong);\n\t\t\t\t\t\tps.println(period);\n\t\t\t\t\t\tps.println(numConsigli);\n\t\t\t\t\t\tps.close();\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\tSystem.err.println(\"Errore nella scrittura del file\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tPrincipaleParteA.main();\n\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t\t\n\t\t});\n\t\tGridData gd_btnAvviaRicerca = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);\n\t\tgd_btnAvviaRicerca.heightHint = 31;\n\t\tbtnAvviaRicerca.setLayoutData(gd_btnAvviaRicerca);\n\t\tbtnAvviaRicerca.setText(\"Avvia Ricerca\");\n\t}", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellActivated(ShellEvent e) {\n\t\t\t\tloadSettings();\n\t\t\t}\n\t\t});\n\t\tshell.setSize(450, 160);\n\t\tshell.setText(\"Settings\");\n\t\t\n\t\ttextUsername = new Text(shell, SWT.BORDER);\n\t\ttextUsername.setBounds(118, 10, 306, 21);\n\t\t\n\t\ttextPassword = new Text(shell, SWT.BORDER | SWT.PASSWORD);\n\t\ttextPassword.setBounds(118, 38, 306, 21);\n\t\t\n\t\tCLabel lblLogin = new CLabel(shell, SWT.NONE);\n\t\tlblLogin.setBounds(10, 10, 61, 21);\n\t\tlblLogin.setText(\"Login\");\n\t\t\n\t\tCLabel lblPassword = new CLabel(shell, SWT.NONE);\n\t\tlblPassword.setText(\"Password\");\n\t\tlblPassword.setBounds(10, 38, 61, 21);\n\t\t\n\t\tButton btnSave = new Button(shell, SWT.NONE);\n\t\tbtnSave.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tApplicationSettings as = new ApplicationSettings();\n\t\t as.savePassword(textPassword.getText());\n\t\t as.saveUsername(textUsername.getText());\n\t\t \n\t\t connectionOK = WSHandler.setAutoFillDailyReports(btnAutomaticDailyReport.getSelection());\n\t\t \n\t\t shell.close();\n\t\t if (!(parentDialog == null)) {\n\t\t \tparentDialog.reloadTable();\n\t\t }\n\t\t\t}\n\t\t});\n\t\tbtnSave.setBounds(10, 87, 414, 25);\n\t\tbtnSave.setText(\"Save\");\n\n\t}", "private void createContents(ArrayList<String> content) {\r\n\t\t// create ne whell for dialog window\r\n\t\tshell = new Shell(getParent(), SWT.APPLICATION_MODAL);\r\n\t\tshell.setSize(367, 348);\r\n\t\tshell.setText(getText());\r\n\t\t\r\n\t\tcenterDialog(shell);\r\n\r\n\t\t// create List component inside dialog window\r\n\t\tfinal List list = new List(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\r\n\t\tlist.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tselectedTopic = list.getSelection()[0];\r\n\t\t\t\tshell.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// fill list with documentation infElements\r\n\t\tfor (int i=0; i<content.size(); i++)\r\n\t\t\tlist.add(content.get(i));\r\n\t\t\r\n\t\t// set default selection\r\n\t\tlist.setSelection(0);\r\n\t\t\r\n\t\t// set position of List component\r\n\t\tlist.setBounds(10, 31, 341, 270);\r\n\t\t\r\n\t\t// create Label for the List component\r\n\t\tLabel lblSelectDocumentationTopic = new Label(shell, SWT.NONE);\r\n\t\tlblSelectDocumentationTopic.setBounds(10, 10, 173, 15);\r\n\t\tlblSelectDocumentationTopic.setText(\"Select Documentation Topic\");\r\n\r\n\t\t// create Cancel button\r\n\t\tButton btnCancel = new Button(shell, SWT.NONE);\r\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedTopic = \"\";\r\n\t\t\t\tshell.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCancel.setBounds(276, 307, 75, 25);\r\n\t\tbtnCancel.setText(\"Cancel\");\r\n\t\t\r\n\t\t// Create OK button\r\n\t\tButton btnOk = new Button(shell, SWT.NONE);\r\n\t\tbtnOk.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedTopic = list.getSelection()[0];\r\n\t\t\t\tshell.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnOk.setBounds(183, 307, 75, 25);\r\n\t\tbtnOk.setText(\"OK\");\r\n\t\t\r\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.MIN |SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(WordWatermarkDialog.class, \"/com/yc/ui/1.jpg\"));\n\t\tshell.setSize(436, 321);\n\t\tshell.setText(\"设置文字水印\");\n\t\t\n\t\tLabel label_font = new Label(shell, SWT.NONE);\n\t\tlabel_font.setBounds(38, 80, 61, 17);\n\t\tlabel_font.setText(\"字体名称:\");\n\t\t\n\t\tLabel label_style = new Label(shell, SWT.NONE);\n\t\tlabel_style.setBounds(232, 77, 61, 17);\n\t\tlabel_style.setText(\"字体样式:\");\n\t\t\n\t\tLabel label_size = new Label(shell, SWT.NONE);\n\t\tlabel_size.setBounds(38, 120, 68, 17);\n\t\tlabel_size.setText(\"字体大小:\");\n\t\t\n\t\tLabel label_color = new Label(shell, SWT.NONE);\n\t\tlabel_color.setBounds(232, 120, 68, 17);\n\t\tlabel_color.setText(\"字体颜色:\");\n\t\t\n\t\tLabel label_word = new Label(shell, SWT.NONE);\n\t\tlabel_word.setBounds(38, 38, 61, 17);\n\t\tlabel_word.setText(\"水印文字:\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(115, 35, 278, 23);\n\t\t\n\t\tButton button_confirm = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_confirm.setBounds(313, 256, 80, 27);\n\t\tbutton_confirm.setText(\"确定\");\n\t\t\n\t\tCombo combo = new Combo(shell, SWT.NONE);\n\t\tcombo.setItems(new String[] {\"宋体\", \"黑体\", \"楷体\", \"微软雅黑\", \"仿宋\"});\n\t\tcombo.setBounds(115, 77, 93, 25);\n\t\tcombo.setText(\"黑体\");\n\t\t\n\t\tCombo combo_1 = new Combo(shell, SWT.NONE);\n\t\tcombo_1.setItems(new String[] {\"粗体\", \"斜体\"});\n\t\tcombo_1.setBounds(300, 74, 93, 25);\n\t\tcombo_1.setText(\"粗体\");\n\t\t\n\t\tCombo combo_2 = new Combo(shell, SWT.NONE);\n\t\tcombo_2.setItems(new String[] {\"1\", \"3\", \"5\", \"8\", \"10\", \"12\", \"16\", \"18\", \"20\", \"24\", \"30\", \"36\", \"48\", \"56\", \"66\", \"72\"});\n\t\tcombo_2.setBounds(115, 117, 93, 25);\n\t\tcombo_2.setText(\"24\");\n\t\t\n\t\tCombo combo_3 = new Combo(shell, SWT.NONE);\n\t\tcombo_3.setItems(new String[] {\"红色\", \"绿色\", \"蓝色\"});\n\t\tcombo_3.setBounds(300, 117, 93, 25);\n\t\tcombo_3.setText(\"红色\");\n\t\t\n\t\tButton button_cancle = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_cancle.setBounds(182, 256, 80, 27);\n\t\tbutton_cancle.setText(\"取消\");\n\t\t\n\t\tLabel label_X = new Label(shell, SWT.NONE);\n\t\tlabel_X.setBounds(31, 161, 68, 17);\n\t\tlabel_X.setText(\"X轴偏移值:\");\n\t\t\n\t\tCombo combo_4 = new Combo(shell, SWT.NONE);\n\t\tcombo_4.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_4.setBounds(115, 158, 93, 25);\n\t\tcombo_4.setText(\"50\");\n\t\t\n\t\tLabel label_Y = new Label(shell, SWT.NONE);\n\t\tlabel_Y.setText(\"Y轴偏移值:\");\n\t\tlabel_Y.setBounds(225, 161, 68, 17);\n\t\t\n\t\tCombo combo_5 = new Combo(shell, SWT.NONE);\n\t\tcombo_5.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_5.setBounds(300, 158, 93, 25);\n\t\tcombo_5.setText(\"50\");\n\t\t\n\t\tLabel label_alpha = new Label(shell, SWT.NONE);\n\t\tlabel_alpha.setBounds(46, 204, 53, 17);\n\t\tlabel_alpha.setText(\"透明度:\");\n\t\t\n\t\tCombo combo_6 = new Combo(shell, SWT.NONE);\n\t\tcombo_6.setItems(new String[] {\"0\", \"0.1\", \"0.2\", \"0.3\", \"0.4\", \"0.5\", \"0.6\", \"0.7\", \"0.8\", \"0.9\", \"1.0\"});\n\t\tcombo_6.setBounds(115, 201, 93, 25);\n\t\tcombo_6.setText(\"0.8\");\n\t\t\n\t\t//取消按钮\n\t\tbutton_cancle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t//确认按钮\n\t\tbutton_confirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tif(text.getText().trim()==null || \"\".equals(text.getText().trim())\n\t\t\t\t\t\t||combo.getText().trim()==null || \"\".equals(combo.getText().trim()) \n\t\t\t\t\t\t\t||combo_1.getText().trim()==null || \"\".equals(combo_1.getText().trim())\n\t\t\t\t\t\t\t\t|| combo_2.getText().trim()==null || \"\".equals(combo_2.getText().trim())\n\t\t\t\t\t\t\t\t\t|| combo_3.getText().trim()==null || \"\".equals(combo_3.getText().trim())\n\t\t\t\t\t\t\t\t\t\t||combo_4.getText().trim()==null || \"\".equals(combo_4.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t||combo_5.getText().trim()==null || \"\".equals(combo_5.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t\t||combo_6.getText().trim()==null || \"\".equals(combo_6.getText().trim())){\n\t\t\t\t\tMessageDialog.openError(shell, \"错误\", \"输入框不能为空或输入空值,请确认后重新输入!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString word=text.getText().trim();\n\t\t\t\tString wordName=getFontName(combo.getText().trim());\n\t\t\t\tint wordStyle=getFonStyle(combo_1.getText().trim());\n\t\t\t\tint wordSize=Integer.parseInt(combo_2.getText().trim());\n\t\t\t\tColor wordColor=getFontColor(combo_3.getText().trim());\n\t\t\t\tint word_X=Integer.parseInt(combo_4.getText().trim());\n\t\t\t\tint word_Y=Integer.parseInt(combo_5.getText().trim());\n\t\t\t\tfloat word_Alpha=Float.parseFloat(combo_6.getText().trim());\n\t\t\t\t\n\t\t\t\tis=MeituUtils.waterMarkWord(EditorUi.filePath,word, wordName, wordStyle, wordSize, wordColor, word_X, word_Y,word_Alpha);\n\t\t\t\tCommon.image=new Image(display,is);\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tcombo.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t\tcombo_1.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_2.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_3.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\t\n\t\t\n\t\tcombo_4.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_5.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_6.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\".[0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t}", "protected void createContents() {\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(44, 47, 90, 24);\r\n\t\tlabel.setText(\"充值金额:\");\r\n\t\t\r\n\t\ttext_balance = new Text(shell, SWT.BORDER);\r\n\t\ttext_balance.setBounds(156, 47, 198, 30);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\t//确认充值\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tString balance=text_balance.getText().trim();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint i=dao.add(balance);\r\n\t\t\t\t\tif(i>0){\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"成功提示\", \"充值成功\");\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"错误提示\", \"所充值不能为零\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(140, 131, 114, 34);\r\n\t\tbutton.setText(\"确认充值\");\r\n\r\n\t}", "private void createContents() {\r\n\t\tshlAjouterNouvelleEquation = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);\r\n\t\tshlAjouterNouvelleEquation.setSize(363, 334);\r\n\t\tif(modification)\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Modifier Equation\");\r\n\t\telse\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Ajouter Nouvelle Equation\");\r\n\t\tshlAjouterNouvelleEquation.setLayout(new FormLayout());\r\n\r\n\r\n\t\tLabel lblContenuEquation = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblContenuEquation = new FormData();\r\n\t\tfd_lblContenuEquation.top = new FormAttachment(0, 5);\r\n\t\tfd_lblContenuEquation.left = new FormAttachment(0, 5);\r\n\t\tlblContenuEquation.setLayoutData(fd_lblContenuEquation);\r\n\t\tlblContenuEquation.setText(\"Contenu Equation\");\r\n\r\n\r\n\t\tcontrainteButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnContrainte = new FormData();\r\n\t\tfd_btnContrainte.top = new FormAttachment(0, 27);\r\n\t\tfd_btnContrainte.right = new FormAttachment(100, -10);\r\n\t\tcontrainteButton.setLayoutData(fd_btnContrainte);\r\n\t\tcontrainteButton.setText(\"Contrainte\");\r\n\r\n\t\torientationButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnOrinet = new FormData();\r\n\t\tfd_btnOrinet.top = new FormAttachment(0, 27);\r\n\t\tfd_btnOrinet.right = new FormAttachment(contrainteButton, -10);\r\n\r\n\t\torientationButton.setLayoutData(fd_btnOrinet);\r\n\t\t\r\n\t\torientationButton.setText(\"Orient\\u00E9\");\r\n\r\n\t\tcontenuEquation = new Text(shlAjouterNouvelleEquation, SWT.BORDER|SWT.SINGLE);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.right = new FormAttachment(orientationButton, -10, SWT.LEFT);\r\n\t\tfd_text.top = new FormAttachment(0, 25);\r\n\t\tfd_text.left = new FormAttachment(0, 5);\r\n\t\tcontenuEquation.setLayoutData(fd_text);\r\n\r\n\t\tcontenuEquation.addListener(SWT.FocusOut, out->{\r\n\t\t\tSystem.out.println(\"Making list...\");\r\n\t\t\ttry {\r\n\t\t\t\tequation.getListeDeParametresEqn_DYNAMIC();\r\n\t\t\t\tif(!btnTerminer.isDisposed()){\r\n\t\t\t\t\tif(!btnTerminer.getEnabled())\r\n\t\t\t\t\t\t btnTerminer.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tthis.showError(shlAjouterNouvelleEquation, e1.toString());\r\n\t\t\t\t btnTerminer.setEnabled(false);\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\t\r\n\t\t});\r\n\r\n\t\tLabel lblNewLabel = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tfd_lblNewLabel.top = new FormAttachment(0, 51);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 5);\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Param\\u00E8tre de Sortie\");\r\n\r\n\t\tparametreDeSortieCombo = new Combo(shlAjouterNouvelleEquation, SWT.DROP_DOWN |SWT.READ_ONLY);\r\n\t\tparametreDeSortieCombo.setEnabled(false);\r\n\r\n\t\tFormData fd_combo = new FormData();\r\n\t\tfd_combo.top = new FormAttachment(0, 71);\r\n\t\tfd_combo.left = new FormAttachment(0, 5);\r\n\t\tparametreDeSortieCombo.setLayoutData(fd_combo);\r\n\t\tparametreDeSortieCombo.addListener(SWT.FocusIn, in->{\r\n\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\tparametreDeSortieCombo.update();\r\n\t\t});\r\n\r\n\t\tSashForm sashForm = new SashForm(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_sashForm = new FormData();\r\n\t\tfd_sashForm.top = new FormAttachment(parametreDeSortieCombo, 6);\r\n\t\tfd_sashForm.bottom = new FormAttachment(100, -50);\r\n\t\tfd_sashForm.right = new FormAttachment(100);\r\n\t\tfd_sashForm.left = new FormAttachment(0, 5);\r\n\t\tsashForm.setLayoutData(fd_sashForm);\r\n\r\n\r\n\r\n\r\n\t\tGroup propertiesGroup = new Group(sashForm, SWT.NONE);\r\n\t\tpropertiesGroup.setLayout(new FormLayout());\r\n\r\n\t\tpropertiesGroup.setText(\"Propri\\u00E9t\\u00E9s\");\r\n\t\tFormData fd_propertiesGroup = new FormData();\r\n\t\tfd_propertiesGroup.top = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.left = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.bottom = new FormAttachment(100, 0);\r\n\t\tfd_propertiesGroup.right = new FormAttachment(100, 0);\r\n\t\tpropertiesGroup.setLayoutData(fd_propertiesGroup);\r\n\r\n\r\n\r\n\r\n\r\n\t\tproperties = new Text(propertiesGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tFormData fd_grouptext = new FormData();\r\n\t\tfd_grouptext.top = new FormAttachment(0,0);\r\n\t\tfd_grouptext.left = new FormAttachment(0, 0);\r\n\t\tfd_grouptext.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grouptext.right = new FormAttachment(100, 0);\r\n\t\tproperties.setLayoutData(fd_grouptext);\r\n\r\n\r\n\r\n\t\tGroup grpDescription = new Group(sashForm, SWT.NONE);\r\n\t\tgrpDescription.setText(\"Description\");\r\n\t\tgrpDescription.setLayout(new FormLayout());\r\n\t\tFormData fd_grpDescription = new FormData();\r\n\t\tfd_grpDescription.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grpDescription.right = new FormAttachment(100,0);\r\n\t\tfd_grpDescription.top = new FormAttachment(0);\r\n\t\tfd_grpDescription.left = new FormAttachment(0);\r\n\t\tgrpDescription.setLayoutData(fd_grpDescription);\r\n\r\n\t\tdescription = new Text(grpDescription, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tdescription.setParent(grpDescription);\r\n\r\n\t\tFormData fd_description = new FormData();\r\n\t\tfd_description.top = new FormAttachment(0,0);\r\n\t\tfd_description.left = new FormAttachment(0, 0);\r\n\t\tfd_description.bottom = new FormAttachment(100, 0);\r\n\t\tfd_description.right = new FormAttachment(100, 0);\r\n\r\n\t\tdescription.setLayoutData(fd_description);\r\n\r\n\r\n\t\tsashForm.setWeights(new int[] {50,50});\r\n\r\n\t\tbtnTerminer = new Button(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tbtnTerminer.setEnabled(false);\r\n\t\tFormData fd_btnTerminer = new FormData();\r\n\t\tfd_btnTerminer.top = new FormAttachment(sashForm, 6);\r\n\t\tfd_btnTerminer.left = new FormAttachment(sashForm,0, SWT.CENTER);\r\n\t\tbtnTerminer.setLayoutData(fd_btnTerminer);\r\n\t\tbtnTerminer.setText(\"Terminer\");\r\n\t\tbtnTerminer.addListener(SWT.Selection, e->{\r\n\t\t\t\r\n\t\t\tboolean go = true;\r\n\t\t\tresult = null;\r\n\t\t\tif (status.equals(ValidationStatus.ok())) {\r\n\t\t\t\t//perform all the neccessary tests before validating the equation\t\t\t\t\t\r\n\t\t\t\tif(equation.isOriented()){\r\n\t\t\t\t\tif(!equation.getListeDeParametresEqn().contains(equation.getParametreDeSortie()) || equation.getParametreDeSortie() == null){\t\t\t\t\t\t\r\n\t\t\t\t\t\tString error = \"Erreur sur l'équation \"+equation.getContenuEqn();\r\n\t\t\t\t\t\tgo = false;\r\n\t\t\t\t\t\tshowError(shlAjouterNouvelleEquation, error);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (go) {\r\n\t\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation.setParametreDeSortie(null);\r\n\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t//Just some cleanup\r\n\t\t\t\t\tfor (Parametre par : equation.getListeDeParametresEqn()) {\r\n\t\t\t\t\t\tif (par.getTypeP().equals(TypeParametre.OUTPUT)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpar.setTypeP(TypeParametre.UNDETERMINED);\r\n\t\t\t\t\t\t\t\tpar.setSousTypeP(SousTypeParametre.FREE);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t//\tSystem.out.println(equation.getContenuEqn() +\"\\n\"+equation.isConstraint()+\"\\n\"+equation.isOriented()+\"\\n\"+equation.getParametreDeSortie());\r\n\t\t});\r\n\r\n\t\t//In this sub routine I bind the values to the respective controls in order to observe changes \r\n\t\t//and verify the data insertion\r\n\t\tbindValues();\r\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), getStyle());\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(getText());\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite = new Composite(shell, SWT.NONE);\r\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(composite, SWT.NONE);\r\n\t\tRowLayout rl_composite_1 = new RowLayout(SWT.VERTICAL);\r\n\t\trl_composite_1.center = true;\r\n\t\trl_composite_1.fill = true;\r\n\t\tcomposite_1.setLayout(rl_composite_1);\r\n\t\t\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\t\r\n\t\tButton btnNewButton = new Button(composite_2, SWT.NONE);\r\n\t\tbtnNewButton.setText(\"New Button\");\r\n\t\t\r\n\t\tButton btnRadioButton = new Button(composite_2, SWT.RADIO);\r\n\t\tbtnRadioButton.setText(\"Radio Button\");\r\n\t\t\r\n\t\tButton btnCheckButton = new Button(composite_2, SWT.CHECK);\r\n\t\tbtnCheckButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCheckButton.setText(\"Check Button\");\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(538, 450);\n\t\tshell.setText(\"SWT Application\");\n\n\t\tfinal DateTime dateTime = new DateTime(shell, SWT.BORDER | SWT.CALENDAR);\n\t\tdateTime.setBounds(10, 10, 514, 290);\n\n\t\tfinal DateTime dateTime_1 = new DateTime(shell, SWT.BORDER | SWT.TIME);\n\t\tdateTime_1.setBounds(10, 306, 135, 29);\n\t\tvideoPath = new Text(shell, SWT.BORDER);\n\t\tvideoPath.setBounds(220, 306, 207, 27);\n\n\t\tButton btnBrowseVideo = new Button(shell, SWT.NONE);\n\t\tbtnBrowseVideo.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\tvideoPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.setBounds(433, 306, 91, 29);\n\t\tbtnBrowseVideo.setText(\"browse\");\n\t\ttorrentPath = new Text(shell, SWT.BORDER);\n\t\ttorrentPath.setBounds(220, 341, 207, 27);\n\t\tButton btnBrowseTorrent = new Button(shell, SWT.NONE);\n\t\tbtnBrowseTorrent.setText(\"browse\");\n\t\tbtnBrowseTorrent.setBounds(433, 339, 91, 29);\n\t\tbtnBrowseTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\ttorrentPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tButton btnGenerateTorrent = new Button(shell, SWT.NONE);\n\t\tbtnGenerateTorrent.setBounds(10, 374, 516, 29);\n\t\tbtnGenerateTorrent.setText(\"Generate Torrent\");\n\n\t\tvideoLength = new Text(shell, SWT.BORDER);\n\t\tvideoLength.setBounds(10, 341, 135, 27);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.RIGHT);\n\t\tlblNewLabel.setAlignment(SWT.LEFT);\n\t\tlblNewLabel.setBounds(157, 315, 48, 18);\n\t\tlblNewLabel.setText(\"Video\");\n\t\t\n\t\tLabel lblTorrent = new Label(shell, SWT.RIGHT);\n\t\tlblTorrent.setText(\"Torrent\");\n\t\tlblTorrent.setBounds(157, 341, 48, 18);\n\t\tbtnGenerateTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFile video = new File(videoPath.getText());\n\t\t\t\ttry {\n\t\t\t\t\tif (video.exists() && torrentPath.getText() != \"\") {\n\t\t\t\t\t\tMap parameters = new HashMap();\n\t\t\t\t\t\tparameters.put(\"start\", dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds());\n\t\t\t\t\t\tparameters.put(\"target\", torrentPath.getText());\n\t\t\t\t\t\tparameters.put(\"length\", videoLength.getText());\n\t\t\t\t\t\tSystem.out.println(\"start generating \"+parameters.get(\"length\"));\n\t\t\t\t\t\tnew MakeTorrent(videoPath.getText(), new URL(\"https://jomican.csie.org/~jimmy/tracker/announce.php\"), parameters);\n\t\t\t\t\t\tSystem.out.println(\"end generating\");\n\t\t\t\t\t\tFile var = new File(\"var.js\");\n\t\t\t\t\t\tPrintStream stream=new PrintStream(new FileOutputStream(var,false));\n\t\t\t\t\t\tstream.println(\"start_time = \"+(new SimpleDateFormat(\"yyyy/MM/dd-HH:mm:ss\").parse(dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds()).getTime() / 1000)+\";\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"jizz\");\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "private void createContents() {\n shell = new Shell(getParent(), SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);\n shell.setSize(FORM_WIDTH, 700);\n shell.setText(getText());\n shell.setLayout(new GridLayout(1, false));\n\n TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n // STRUCTURE PARAMETERS\n\n TabItem tbtmStructure = new TabItem(tabFolder, SWT.NONE);\n tbtmStructure.setText(\"Structure\");\n\n Composite grpStructure = new Composite(tabFolder, SWT.NONE);\n tbtmStructure.setControl(grpStructure);\n grpStructure.setLayout(TAB_GROUP_LAYOUT);\n grpStructure.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n ParmDialogText.load(grpStructure, parms, \"meta\");\n ParmDialogText.load(grpStructure, parms, \"col\");\n ParmDialogText.load(grpStructure, parms, \"id\");\n ParmDialogChoices.load(grpStructure, parms, \"init\", Activation.values());\n ParmDialogChoices.load(grpStructure, parms, \"activation\", Activation.values());\n ParmDialogFlag.load(grpStructure, parms, \"raw\");\n ParmDialogFlag.load(grpStructure, parms, \"batch\");\n ParmDialogGroup cnn = ParmDialogText.load(grpStructure, parms, \"cnn\");\n ParmDialogGroup filters = ParmDialogText.load(grpStructure, parms, \"filters\");\n ParmDialogGroup strides = ParmDialogText.load(grpStructure, parms, \"strides\");\n ParmDialogGroup subs = ParmDialogText.load(grpStructure, parms, \"sub\");\n if (cnn != null) {\n if (filters != null) cnn.setGrouped(filters);\n if (strides != null) cnn.setGrouped(strides);\n if (subs != null) cnn.setGrouped(subs);\n }\n ParmDialogText.load(grpStructure, parms, \"lstm\");\n ParmDialogGroup wGroup = ParmDialogText.load(grpStructure, parms, \"widths\");\n ParmDialogGroup bGroup = ParmDialogText.load(grpStructure, parms, \"balanced\");\n if (bGroup != null && wGroup != null) {\n wGroup.setExclusive(bGroup);\n bGroup.setExclusive(wGroup);\n }\n\n // SEARCH CONTROL PARAMETERS\n\n TabItem tbtmSearch = new TabItem(tabFolder, SWT.NONE);\n tbtmSearch.setText(\"Training\");\n\n ScrolledComposite grpSearch0 = new ScrolledComposite(tabFolder, SWT.V_SCROLL);\n grpSearch0.setLayout(new FillLayout());\n grpSearch0.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n tbtmSearch.setControl(grpSearch0);\n Composite grpSearch = new Composite(grpSearch0, SWT.NONE);\n grpSearch0.setContent(grpSearch);\n grpSearch.setLayout(TAB_GROUP_LAYOUT);\n grpSearch.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n Enum<?>[] preferTypes = (this.modelType == TrainingProcessor.Type.CLASS ? RunStats.OptimizationType.values()\n : RunStats.RegressionType.values());\n ParmDialogChoices.load(grpSearch, parms, \"prefer\", preferTypes);\n ParmDialogChoices.load(grpSearch, parms, \"method\", Trainer.Type.values());\n ParmDialogText.load(grpSearch, parms, \"bound\");\n ParmDialogChoices.load(grpSearch, parms, \"lossFun\", LossFunctionType.values());\n ParmDialogText.load(grpSearch, parms, \"weights\");\n ParmDialogText.load(grpSearch, parms, \"iter\");\n ParmDialogText.load(grpSearch, parms, \"batchSize\");\n ParmDialogText.load(grpSearch, parms, \"testSize\");\n ParmDialogText.load(grpSearch, parms, \"maxBatches\");\n ParmDialogText.load(grpSearch, parms, \"earlyStop\");\n ParmDialogChoices.load(grpSearch, parms, \"regMode\", Regularization.Mode.values());\n ParmDialogText.load(grpSearch, parms, \"regFactor\");\n ParmDialogText.load(grpSearch, parms, \"seed\");\n ParmDialogChoices.load(grpSearch, parms, \"start\", WeightInit.values());\n ParmDialogChoices.load(grpSearch, parms, \"gradNorm\", GradientNormalization.values());\n ParmDialogChoices.load(grpSearch, parms, \"updater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"learnRate\");\n ParmDialogChoices.load(grpSearch, parms, \"bUpdater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"updateRate\");\n\n grpSearch.setSize(grpSearch.computeSize(FORM_WIDTH - 50, SWT.DEFAULT));\n\n // BOTTOM BUTTON BAR\n\n Composite grpButtonBar = new Composite(shell, SWT.NONE);\n grpButtonBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n grpButtonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n Button btnSave = new Button(grpButtonBar, SWT.NONE);\n btnSave.setText(\"Save\");\n btnSave.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n Button btnClose = new Button(grpButtonBar, SWT.NONE);\n btnClose.setText(\"Cancel\");\n btnClose.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n shell.close();\n }\n });\n\n Button btnOK = new Button(grpButtonBar, SWT.NONE);\n btnOK.setText(\"Save and Close\");\n btnOK.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n shell.close();\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n }", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "private void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tshell.setSize(500, 400);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FormLayout());\r\n\t\t\r\n\t\tSERVER_COUNTRY locale = SERVER_COUNTRY.DE;\r\n\t\tString username = JOptionPane.showInputDialog(\"Username\");\r\n\t\tString password = JOptionPane.showInputDialog(\"Password\");\r\n\t\tBot bot = new Bot(username, password, locale);\r\n\t\t\r\n\t\tGroup grpActions = new Group(shell, SWT.NONE);\r\n\t\tgrpActions.setText(\"Actions\");\r\n\t\tgrpActions.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\r\n\t\tgrpActions.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setLayout(new GridLayout(5, false));\r\n\t\tFormData fd_grpActions = new FormData();\r\n\t\tfd_grpActions.left = new FormAttachment(0, 203);\r\n\t\tfd_grpActions.right = new FormAttachment(100, -10);\r\n\t\tfd_grpActions.top = new FormAttachment(0, 10);\r\n\t\tfd_grpActions.bottom = new FormAttachment(0, 152);\r\n\t\tgrpActions.setLayoutData(fd_grpActions);\r\n\t\t\r\n\t\tConsole = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tFormData fd_Console = new FormData();\r\n\t\tfd_Console.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tfd_Console.right = new FormAttachment(100, -10);\r\n\t\tConsole.setLayoutData(fd_Console);\r\n\r\n\t\t\r\n\t\tButton Feed = new Button(grpActions, SWT.CHECK);\r\n\t\tFeed.setSelection(true);\r\n\t\tFeed.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tfeed = !feed;\r\n\t\t\t\tConsole.append(\"\\nTest\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tFeed.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tFeed.setText(\"Feed\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Drink = new Button(grpActions, SWT.CHECK);\r\n\t\tDrink.setSelection(true);\r\n\t\tDrink.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tdrink = !drink;\r\n\t\t\t}\r\n\t\t});\r\n\t\tDrink.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tDrink.setText(\"Drink\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Stroke = new Button(grpActions, SWT.CHECK);\r\n\t\tStroke.setSelection(true);\r\n\t\tStroke.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tstroke = !stroke;\r\n\t\t\t}\r\n\t\t});\r\n\t\tStroke.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tStroke.setText(\"Stroke\");\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_0 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_0.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tlblNewLabel_0.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/feed.png\"));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_1 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/drink.png\"));\r\n\t\tlblNewLabel_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\t\r\n\t\tGroup grpBreeds = new Group(shell, SWT.NONE);\r\n\t\tgrpBreeds.setText(\"Breeds\");\r\n\t\tgrpBreeds.setLayout(new GridLayout(1, false));\r\n\t\t\r\n\t\tFormData fd_grpBreeds = new FormData();\r\n\t\tfd_grpBreeds.top = new FormAttachment(0, 10);\r\n\t\tfd_grpBreeds.bottom = new FormAttachment(100, -10);\r\n\t\tfd_grpBreeds.right = new FormAttachment(0, 180);\r\n\t\tfd_grpBreeds.left = new FormAttachment(0, 10);\r\n\t\tgrpBreeds.setLayoutData(fd_grpBreeds);\r\n\t\t\r\n\t\tButton Defaults = new Button(grpBreeds, SWT.RADIO);\r\n\t\tDefaults.setText(\"Defaults\");\r\n\t\t//END STATIC\r\n\t\t\r\n\t\tbot.account.api.requests.setTimeout(200);\r\n\t\tbot.logger.printlevel = 1;\t\r\n\t\t\r\n\t\tReturn<HashMap<Integer,Breed>> b = bot.getBreeds();\t\t\r\n\t\tif(!b.sucess) {\r\n\t\t\tConsole.append(\"\\nERROR!\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tIterator<Breed> iterator = b.data.values().iterator();\r\n\t\tHashMap<String, java.awt.Button> buttons = new HashMap<String, Button>();\r\n\t\t\r\n\t\twhile(iterator.hasNext()) {\r\n\t\t\tBreed breed = iterator.next();\r\n\t\t\t\r\n\t\t\tString name = breed.name;\r\n\t\t\t\r\n\t\t\tButton btn = new Button(grpBreeds, SWT.RADIO);\r\n\t\t\tbtn.setText(name);\r\n\t\t\t\r\n\t\t\tbuttons.put(name, btn);\r\n\t\t\t\r\n\t\t\t//\tTODO - Für jeden Breed wird ein Button erstellt:\r\n\t\t\t//\tButton [HIER DER BREED NAME] = new Button(grpBreeds, SWT.RADIO); <-- Dass geht nicht so wirklich so\r\n\t\t\t//\tDefaults.setText(\"[BREED NAME]\");\r\n\t\t}\r\n\t\t\r\n\t\t// um ein button mit name <name> zu bekommen: Button whatever = buttons.get(<name>);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tButton btnStartBot = new Button(shell, SWT.NONE);\r\n\t\tfd_Console.top = new FormAttachment(0, 221);\r\n\t\tbtnStartBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.setText(\"Starting bot... \");\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t/*TODO\r\n\t\t\t\tBreed[] breeds = new Breed[b.data.size()];\r\n\t\t\t\t\r\n\t\t\t\tIterator<Breed> br = b.data.values().iterator();\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < b.data.size(); i++) {\r\n\t\t\t\t\tbreeds[i] = br.next();\r\n\t\t\t\t};\r\n\t\t\t\tBreed s = (Breed) JOptionPane.showInputDialog(null, \"Choose breed\", \"breed selector\", JOptionPane.PLAIN_MESSAGE, null, breeds, \"default\");\r\n\t\t\t\tEND TODO*/\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Breed breed, boolean drink, boolean stroke, boolean groom, boolean carrot, boolean mash, boolean suckle, boolean feed, boolean sleep, boolean centreMission, long timeout, Bot bot, Runnable onEnd\r\n\t\t\t\tReturn<BasicBreedTasksAsync> ret = bot.basicBreedTasks(0, drink, stroke, groom, carrot, mash, suckle, feed, sleep, mission, 500, new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"FINISHED!\", \"Bot\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tbot.logout();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(!ret.sucess) {\r\n\t\t\t\t\tConsole.append(\"ERROR\");\r\n\t\t\t\t\tSystem.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tret.data.start();\r\n\t\t\t\t\r\n\t\t\t\t//TODO\r\n\t\t\t\twhile(ret.data.running()) {\r\n\t\t\t\t\tSleeper.sleep(5000);\r\n\t\t\t\t\tif(ret.data.getProgress() == 1)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tConsole.append(\"progress: \" + (ret.data.getProgress() * 100) + \"%\");\r\n\t\t\t\t\tConsole.append(\"ETA: \" + (ret.data.getEta() / 1000) + \"sec.\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStartBot = new FormData();\r\n\t\tfd_btnStartBot.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tbtnStartBot.setLayoutData(fd_btnStartBot);\r\n\t\tbtnStartBot.setText(\"Start Bot\");\r\n\t\t\r\n\t\tButton btnStopBot = new Button(shell, SWT.NONE);\r\n\t\tfd_btnStartBot.top = new FormAttachment(btnStopBot, 0, SWT.TOP);\r\n\t\tbtnStopBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.append(\"Stopping bot...\");\r\n\t\t\t\tbot.logout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStopBot = new FormData();\r\n\t\tfd_btnStopBot.right = new FormAttachment(grpActions, 0, SWT.RIGHT);\r\n\t\tbtnStopBot.setLayoutData(fd_btnStopBot);\r\n\t\tbtnStopBot.setText(\"Stop Bot\");\r\n\t\t\t\r\n\t\t\r\n\t\tProgressBar progressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tfd_Console.bottom = new FormAttachment(progressBar, -6);\r\n\t\tfd_btnStopBot.bottom = new FormAttachment(progressBar, -119);\r\n\t\t\r\n\t\tFormData fd_progressBar = new FormData();\r\n\t\tfd_progressBar.left = new FormAttachment(grpBreeds, 23);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_2 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_2.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/stroke.png\"));\r\n\t\tlblNewLabel_2.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton Groom = new Button(grpActions, SWT.CHECK);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tgroom = !groom;\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroom.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tGroom.setText(\"Groom\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Treat = new Button(grpActions, SWT.CHECK);\r\n\t\tTreat.setSelection(true);\r\n\t\tTreat.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tcarrot = !carrot;\r\n\t\t\t}\r\n\t\t});\r\n\t\tTreat.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tTreat.setText(\"Treat\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Mash = new Button(grpActions, SWT.CHECK);\r\n\t\tMash.setSelection(true);\r\n\t\tMash.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmash = !mash;\r\n\t\t\t}\r\n\t\t});\r\n\t\tMash.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tMash.setText(\"Mash\");\r\n\t\t\r\n\t\tLabel lblNewLabel_3 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_3.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/groom.png\"));\r\n\t\tlblNewLabel_3.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_4 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_4.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/carotte.png\"));\r\n\t\tlblNewLabel_4.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_5 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_5.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/mash.png\"));\r\n\t\tlblNewLabel_5.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton btnSleep = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnSleep.setSelection(true);\r\n\t\tbtnSleep.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tsleep = !sleep;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSleep.setText(\"Sleep\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton btnMission = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnMission.setSelection(true);\r\n\t\tbtnMission.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmission = !mission;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnMission.setText(\"Mission\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\r\n\t}", "protected void createContents() {\n\t\tshlCarbAndRemainder = new Shell(Display.getDefault(), SWT.TITLE|SWT.CLOSE|SWT.BORDER);\n\t\tshlCarbAndRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tshlCarbAndRemainder.setSize(323, 262);\n\t\tshlCarbAndRemainder.setText(\"CARB and Remainder\");\n\t\t\n\t\tGroup grpCarbSetting = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpCarbSetting.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpCarbSetting.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpCarbSetting.setText(\"CARB Setting\");\n\t\t\n\t\tgrpCarbSetting.setBounds(10, 0, 295, 106);\n\t\t\n\t\tLabel lblCARBValue = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblCARBValue.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblCARBValue.setBounds(10, 32, 149, 22);\n\t\tlblCARBValue.setText(\"CARB Value\");\n\t\t\n\t\tLabel lblAuthenticationPIN = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblAuthenticationPIN.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblAuthenticationPIN.setBounds(10, 68, 149, 22);\n\t\tlblAuthenticationPIN.setText(\"Authentication PIN\");\n\t\t\n\t\tSpinner spinnerCARBValue = new Spinner(grpCarbSetting, SWT.BORDER);\n\t\tspinnerCARBValue.setBounds(206, 29, 72, 22);\n\t\t\n\t\ttextAuthenticationPIN = new Text(grpCarbSetting, SWT.BORDER|SWT.PASSWORD);\n\t\ttextAuthenticationPIN.setBounds(206, 65, 72, 21);\n\t\t\t\t\n\t\tGroup grpRemainder = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpRemainder.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpRemainder.setText(\"Remainder\");\n\t\tgrpRemainder.setBounds(10, 112, 296, 106);\n\t\t\n\t\tButton btnInjectBolus = new Button(grpRemainder, SWT.NONE);\n\t\tbtnInjectBolus.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnInjectBolus.setBounds(183, 38, 103, 41);\n\t\tbtnInjectBolus.setText(\"INJECT BOLUS\");\n\t\t\n\t\tButton btnCancel = new Button(grpRemainder, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshlCarbAndRemainder.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setBounds(10, 38, 80, 41);\n\t\tbtnCancel.setText(\"Cancel\");\n\t\t\n\t\tButton btnSnooze = new Button(grpRemainder, SWT.NONE);\n\t\tbtnSnooze.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnSnooze.setBounds(96, 38, 81, 41);\n\t\tbtnSnooze.setText(\"Snooze\");\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.TITLE | SWT.CLOSE | SWT.BORDER);\n\t\tshell.setSize(713, 226);\n\t\tshell.setText(\"ALT Planner\");\n\t\t\n\t\tCalendarPop calendarComp = new CalendarPop(shell, SWT.NONE);\n\t\tcalendarComp.setBounds(5, 5, 139, 148);\n\t\t\n\t\tComposite composite = new PlannerInterface(shell, SWT.NONE, calendarComp);\n\t\tcomposite.setBounds(0, 0, 713, 200);\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmFile.setText(\"File\");\n\t\t\n\t\tMenu menu_1 = new Menu(mntmFile);\n\t\tmntmFile.setMenu(menu_1);\n\t\t\n\t\tMenuItem mntmSettings = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmSettings.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSettings settings = new Settings(Display.getDefault());\n\t\t\t\tsettings.open();\n\t\t\t}\n\t\t});\n\t\tmntmSettings.setText(\"Settings\");\n\t}", "protected void createContents() {\n\t\tshell = new Shell(shell,SWT.SHELL_TRIM|SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\chaogushenqi.png\"));\n\t\tshell.setSize(467, 398);\n\t\tshell.setText(\"\\u5356\\u7A7A\");\n\t\t\n\t\ttext_code = new Text(shell, SWT.BORDER);\n\t\ttext_code.setBounds(225, 88, 73, 23);\n\t\t\n\t\ttext_uprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_uprice.setBounds(225, 117, 73, 23);\n\t\t\n\t\ttext_downprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_downprice.setBounds(225, 146, 73, 23);\n\t\t\n\t\ttext_price = new Text(shell, SWT.BORDER);\n\t\ttext_price.setBounds(225, 178, 73, 23);\n\t\t\n\t\ttext_num = new Text(shell, SWT.BORDER);\n\t\ttext_num.setBounds(225, 207, 73, 23);\n\t\t\n\t\t//下单,取消按钮\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tpaceoder();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(116, 284, 58, 27);\n\t\tbtnNewButton.setText(\"\\u4E0B\\u5355\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(225, 284, 58, 27);\n\t\tbtnNewButton_1.setText(\"\\u53D6\\u6D88\");\n\t\t\n\t\tLabel lbl_code = new Label(shell, SWT.NONE);\n\t\tlbl_code.setBounds(116, 91, 60, 17);\n\t\tlbl_code.setText(\"股票代码:\");\n\t\t\n\t\tLabel lbl_upprice = new Label(shell, SWT.NONE);\n\t\tlbl_upprice.setBounds(116, 120, 60, 17);\n\t\tlbl_upprice.setText(\"涨停价格:\");\n\t\t\n\t\tLabel lbl_downprice = new Label(shell, SWT.NONE);\n\t\tlbl_downprice.setBounds(116, 152, 60, 17);\n\t\tlbl_downprice.setText(\"跌停价格:\");\n\t\t\n\t\tLabel lbl_price = new Label(shell, SWT.NONE);\n\t\tlbl_price.setBounds(116, 181, 60, 17);\n\t\tlbl_price.setText(\"委托价格:\");\n\t\t\n\t\tLabel lbl_num = new Label(shell, SWT.NONE);\n\t\tlbl_num.setBounds(116, 210, 60, 17);\n\t\tlbl_num.setText(\"委托数量:\");\n\t\t\n\t\tLabel lbl_date = new Label(shell, SWT.NONE);\n\t\tlbl_date.setBounds(116, 243, 61, 17);\n\t\tlbl_date.setText(\"日 期:\");\n\t\t\n\t\ttext_dateTime = new DateTime(shell, SWT.BORDER);\n\t\ttext_dateTime.setBounds(225, 237, 88, 24);\n\t\t\n\t\tlbl_notice = new Label(shell, SWT.BORDER);\n\t\tlbl_notice.setBounds(316, 333, 125, 17);\n\t\t\n\t\tif (information == null) {\n\n\t\t\tfinal Label lbl_search = new Label(shell, SWT.NONE);\n\t\t\tlbl_search.addMouseListener(new MouseAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t\t\tlbl_searchEvent();\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search.addMouseTrackListener(new MouseTrackAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseEnter(MouseEvent e) {\n\t\t\t\t\tlbl_search.setBackground(Display.getCurrent()\n\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_GREEN));\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseExit(MouseEvent e) {\n\t\t\t\t\tlbl_search\n\t\t\t\t\t\t\t.setBackground(Display\n\t\t\t\t\t\t\t\t\t.getCurrent()\n\t\t\t\t\t\t\t\t\t.getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search\n\t\t\t\t\t.setImage(SWTResourceManager\n\t\t\t\t\t\t\t.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\检查.png\"));\n\t\t\tlbl_search.setBounds(354, 91, 18, 18);\n\n\t\t\ttext_place = new Text(shell, SWT.BORDER);\n\t\t\ttext_place.setBounds(304, 88, 32, 23);\n\n\t\t} else {\n\t\t\ttrade_shortsell();// 显示文本框内容\n\t\t}\n\t\t\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tnum1 = new Text(shell, SWT.BORDER);\n\t\tnum1.setBounds(32, 51, 112, 19);\n\t\t\n\t\tnum2 = new Text(shell, SWT.BORDER);\n\t\tnum2.setBounds(32, 120, 112, 19);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setBounds(32, 31, 92, 14);\n\t\tlblNewLabel.setText(\"First Number:\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(32, 100, 112, 14);\n\t\tlblNewLabel_1.setText(\"Second Number: \");\n\t\t\n\t\tfinal Label answer = new Label(shell, SWT.NONE);\n\t\tanswer.setBounds(35, 204, 60, 14);\n\t\tanswer.setText(\"Answer:\");\n\t\t\n\t\tButton plusButton = new Button(shell, SWT.NONE);\n\t\tplusButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint number1, number2;\n\t\t\t\ttry {\n\t\t\t\t\tnumber1 = Integer.parseInt(num1.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnumber2 = Integer.parseInt(num2.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint ans = number1 + number2;\n\t\t\t\tanswer.setText(\"Answer: \" + ans);\n\t\t\t}\n\t\t});\n\t\tplusButton.setBounds(29, 158, 56, 28);\n\t\tplusButton.setText(\"+\");\n\t\t\n\t\t\n\n\t}", "protected void createContents() {\r\n\t\tsetText(\"SWT Application\");\r\n\t\tsetSize(450, 300);\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 395);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tnachname = new Text(shell, SWT.BORDER);\r\n\t\tnachname.setBounds(32, 27, 76, 21);\r\n\t\t\r\n\t\tvorname = new Text(shell, SWT.BORDER);\r\n\t\tvorname.setBounds(32, 66, 76, 21);\r\n\t\t\r\n\t\tLabel lblNachname = new Label(shell, SWT.NONE);\r\n\t\tlblNachname.setBounds(135, 33, 55, 15);\r\n\t\tlblNachname.setText(\"Nachname\");\r\n\t\t\r\n\t\tLabel lblVorname = new Label(shell, SWT.NONE);\r\n\t\tlblVorname.setBounds(135, 66, 55, 15);\r\n\t\tlblVorname.setText(\"Vorname\");\r\n\t\t\r\n\t\tButton btnFgeListeHinzu = new Button(shell, SWT.NONE);\r\n\t\tbtnFgeListeHinzu.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//\r\n\t\t\t\tPerson p = new Person();\r\n\t\t\t\tp.setNachname(getNachname().getText());\r\n\t\t\t\tp.setVorname(getVorname().getText());\r\n\t\t\t\t//\r\n\t\t\t\tPerson.getPersonenListe().add(p);\r\n\t\t\t\tgetGuiListe().add(p.toString());\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFgeListeHinzu.setBounds(43, 127, 147, 25);\r\n\t\tbtnFgeListeHinzu.setText(\"f\\u00FCge liste hinzu\");\r\n\t\t\r\n\t\tButton btnWriteJson = new Button(shell, SWT.NONE);\r\n\t\tbtnWriteJson.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tPerson.write2JSON();\r\n\t\t\t\t\t//\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"JSON geschrieben\");\r\n\t\t\t\t\tmb.setMessage(Person.getPersonenListe().size() + \" Einträge erfolgreich geschrieben\");\r\n\t\t\t\t\tmb.open();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"Fehler bei JSON\");\r\n\t\t\t\t\tmb.setMessage(e1.getMessage());\r\n\t\t\t\t\tmb.open();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnWriteJson.setBounds(54, 171, 75, 25);\r\n\t\tbtnWriteJson.setText(\"write 2 json\");\r\n\t\t\r\n\t\tguiListe = new List(shell, SWT.BORDER);\r\n\t\tguiListe.setBounds(43, 221, 261, 125);\r\n\r\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "private void createContents() throws SQLException {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM);\n\t\tshell.setImage(user.getIcondata().BaoduongIcon);\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\tsetText(\"Tạo Công việc (Đợt Bảo dưỡng)\");\n\t\tshell.setSize(777, 480);\n\t\tnew FormTemplate().setCenterScreen(shell);\n\n\t\tFill_ItemData fi = new Fill_ItemData();\n\n\t\tSashForm sashForm = new SashForm(shell, SWT.NONE);\n\t\tsashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));\n\n\t\tSashForm sashForm_3 = new SashForm(sashForm, SWT.VERTICAL);\n\n\t\tSashForm sashForm_2 = new SashForm(sashForm_3, SWT.NONE);\n\t\tComposite composite = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setText(\"Tên đợt Bảo dưỡng*:\");\n\n\t\ttext_Tendot_Baoduong = new Text(composite, SWT.BORDER);\n\t\ttext_Tendot_Baoduong.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\n\t\tLabel label_3 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_3 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_3.verticalIndent = 3;\n\t\tlabel_3.setLayoutData(gd_label_3);\n\t\tlabel_3.setText(\"Loại phương tiện:\");\n\n\t\tcombo_Loaiphuongtien = new Combo(composite, SWT.READ_ONLY);\n\t\tcombo_Loaiphuongtien.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\tFill_ItemData f = new Fill_ItemData();\n\t\t\t\t\tif ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Xemay()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Xemay());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t} else if ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Oto()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Oto());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcombo_Loaiphuongtien.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));\n\t\tfi.setComboBox_LOAIPHUONGTIEN_Phuongtien_Giaothong(combo_Loaiphuongtien, 0);\n\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_4 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_4.verticalIndent = 3;\n\t\tlabel_4.setLayoutData(gd_label_4);\n\t\tlabel_4.setText(\"Mô tả:\");\n\n\t\ttext_Mota = new Text(composite, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\n\t\ttext_Mota.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));\n\t\tnew Label(composite, SWT.NONE);\n\n\t\tbtnNgunSaCha = new Button(composite, SWT.NONE);\n\t\tGridData gd_btnNgunSaCha = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNgunSaCha.widthHint = 85;\n\t\tbtnNgunSaCha.setLayoutData(gd_btnNgunSaCha);\n\t\tbtnNgunSaCha.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tChonNguonSuachua_Baoduong cnsb = new ChonNguonSuachua_Baoduong(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\tcnsb.open();\n\t\t\t\t\tnsb = cnsb.getResult();\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null) {\n\t\t\t\t\t\tfillNguonSuachuaBaoduong(nsb);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (nsb == null) {\n\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CLOSE);\n\t\t\t\t\t\tm.setText(\"Xóa dữ liệu cũ?\");\n\t\t\t\t\t\tm.setMessage(\"Bạn muốn xóa dữ liệu cũ?\");\n\t\t\t\t\t\tint rc = m.open();\n\t\t\t\t\t\tswitch (rc) {\n\t\t\t\t\t\tcase SWT.CANCEL:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.YES:\n\t\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(-1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.NO:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t}\n\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG(ViewAndEdit_MODE_dsb);\n\t\t\t\t\tfillNguonSuachuaBaoduong(ViewAndEdit_MODE_dsb);\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNgunSaCha.setText(\"Liên hệ\");\n\t\tbtnNgunSaCha.setImage(user.getIcondata().PhoneIcon);\n\n\t\tComposite composite_1 = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite_1.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblSXut = new Label(composite_1, SWT.NONE);\n\t\tlblSXut.setText(\"Số đề xuất: \");\n\n\t\ttext_Sodexuat = new Text(composite_1, SWT.NONE);\n\t\ttext_Sodexuat.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Sodexuat.setEditable(false);\n\t\ttext_Sodexuat.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyThng = new Label(composite_1, SWT.NONE);\n\t\tlblNgyThng.setText(\"Ngày tháng: \");\n\n\t\ttext_NgaythangVanban = new Text(composite_1, SWT.NONE);\n\t\ttext_NgaythangVanban.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_NgaythangVanban.setEditable(false);\n\t\ttext_NgaythangVanban.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblnV = new Label(composite_1, SWT.NONE);\n\t\tlblnV.setText(\"Đơn vị: \");\n\n\t\ttext_Donvi = new Text(composite_1, SWT.NONE);\n\t\ttext_Donvi.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Donvi.setEditable(false);\n\t\ttext_Donvi.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyXL = new Label(composite_1, SWT.NONE);\n\t\tlblNgyXL.setText(\"Ngày xử lý:\");\n\n\t\ttext_Ngaytiepnhan = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaytiepnhan.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaytiepnhan.setEditable(false);\n\t\ttext_Ngaytiepnhan.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyGiao = new Label(composite_1, SWT.NONE);\n\t\tlblNgyGiao.setText(\"Ngày giao:\");\n\n\t\ttext_Ngaygiao = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaygiao.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaygiao.setEditable(false);\n\t\ttext_Ngaygiao.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblTrchYu = new Label(composite_1, SWT.NONE);\n\t\tGridData gd_lblTrchYu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblTrchYu.verticalIndent = 3;\n\t\tlblTrchYu.setLayoutData(gd_lblTrchYu);\n\t\tlblTrchYu.setText(\"Ghi chú: \");\n\n\t\ttext_Trichyeu = new Text(composite_1, SWT.NONE);\n\t\ttext_Trichyeu.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Trichyeu.setEditable(false);\n\t\tGridData gd_text_Trichyeu = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n\t\tgd_text_Trichyeu.heightHint = 27;\n\t\ttext_Trichyeu.setLayoutData(gd_text_Trichyeu);\n\t\tnew Label(composite_1, SWT.NONE);\n\n\t\tbtnThemDexuat = new Button(composite_1, SWT.NONE);\n\t\tbtnThemDexuat.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tInsert_dx = null;\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null\n\t\t\t\t\t\t\t&& ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() > 0) {\n\t\t\t\t\t\tInsert_dx = controler.getControl_DEXUAT().get_DEXUAT(ViewAndEdit_MODE_dsb);\n\t\t\t\t\t}\n\t\t\t\t\tif (Insert_dx != null) {\n\t\t\t\t\t\tTAPHOSO ths = controler.getControl_TAPHOSO().get_TAP_HO_SO(Insert_dx.getMA_TAPHOSO());\n\t\t\t\t\t\tTaphoso_View thsv = new Taphoso_View(shell, SWT.DIALOG_TRIM, user, ths, false);\n\t\t\t\t\t\tthsv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tNhapDeXuat ndx = new NhapDeXuat(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\t\tndx.open();\n\t\t\t\t\t\tInsert_dx = ndx.result;\n\t\t\t\t\t\tif (Insert_dx == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tboolean ict = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(\n\t\t\t\t\t\t\t\t\t\tViewAndEdit_MODE_dsb, Ma_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tif (ict) {\n\t\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_WORKING);\n\t\t\t\t\t\t\tm.setText(\"Hoàn tất\");\n\t\t\t\t\t\t\tm.setMessage(\"Thêm Đề xuất Hoàn tất\");\n\t\t\t\t\t\t\tm.open();\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException | SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnThemDexuat.setImage(user.getIcondata().DexuatIcon);\n\t\tbtnThemDexuat.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));\n\t\tbtnThemDexuat.setText(\"Thêm Hồ sơ\");\n\t\tsashForm_2.setWeights(new int[] { 1000, 618 });\n\n\t\tSashForm sashForm_1 = new SashForm(sashForm_3, SWT.NONE);\n\t\ttree_PTTS = new Tree(sashForm_1, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);\n\t\ttree_PTTS.setLinesVisible(true);\n\t\ttree_PTTS.setHeaderVisible(true);\n\t\ttree_PTTS.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event arg0) {\n\t\t\t\tTreeItem[] til = tree_PTTS.getSelection();\n\t\t\t\tif (til.length > 0) {\n\t\t\t\t\tRow_PTTSthamgia_Baoduong pttg = (Row_PTTSthamgia_Baoduong) til[0].getData();\n\t\t\t\t\tsetHinhthuc_Baoduong(pttg.getHtbd());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttree_PTTS.addListener(SWT.SetData, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tif (tree_PTTS.getItems().length > 0) {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tTreeColumn trclmnStt = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnStt.setWidth(50);\n\t\ttrclmnStt.setText(\"Stt\");\n\n\t\tTreeColumn trclmnTnMT = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnTnMT.setWidth(100);\n\t\ttrclmnTnMT.setText(\"Tên, mô tả\");\n\n\t\tTreeColumn trclmnHngSnXut = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnHngSnXut.setWidth(100);\n\t\ttrclmnHngSnXut.setText(\"Hãng sản xuất\");\n\n\t\tTreeColumn trclmnDngXe = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnDngXe.setWidth(100);\n\t\ttrclmnDngXe.setText(\"Dòng xe\");\n\n\t\tTreeColumn trclmnBinS = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBinS.setWidth(100);\n\t\ttrclmnBinS.setText(\"Biển số\");\n\n\t\tTreeColumn trclmnNgySDng = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnNgySDng.setWidth(100);\n\t\ttrclmnNgySDng.setText(\"Ngày sử dụng\");\n\n\t\tTreeColumn trclmnMPhngTin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnMPhngTin.setWidth(90);\n\t\ttrclmnMPhngTin.setText(\"Mã PTTS\");\n\n\t\tMenu menu = new Menu(tree_PTTS);\n\t\ttree_PTTS.setMenu(menu);\n\n\t\tMenuItem mntmThmPhngTin = new MenuItem(menu, SWT.NONE);\n\t\tmntmThmPhngTin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tThem_PTGT();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmntmThmPhngTin.setText(\"Thêm phương tiện tài sản\");\n\n\t\tMenuItem mntmXoa = new MenuItem(menu, SWT.NONE);\n\t\tmntmXoa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdelete();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tmntmXoa.setText(\"Xóa\");\n\n\t\tTreeColumn trclmnThayNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayNht.setWidth(70);\n\t\ttrclmnThayNht.setText(\"Thay nhớt\");\n\n\t\tTreeColumn trclmnThayLcNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNht.setWidth(100);\n\t\ttrclmnThayLcNht.setText(\"Thay lọc nhớt\");\n\n\t\tTreeColumn trclmnThayLcGi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcGi.setWidth(100);\n\t\ttrclmnThayLcGi.setText(\"Thay lọc gió\");\n\n\t\tTreeColumn trclmnThayLcNhin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNhin.setWidth(100);\n\t\ttrclmnThayLcNhin.setText(\"Thay lọc nhiên liệu\");\n\n\t\tTreeColumn trclmnThayDuPhanh = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuPhanh.setWidth(100);\n\t\ttrclmnThayDuPhanh.setText(\"Thay Dầu phanh - ly hợp\");\n\n\t\tTreeColumn trclmnThayDuHp = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuHp.setWidth(100);\n\t\ttrclmnThayDuHp.setText(\"Thay Dầu hộp số\");\n\n\t\tTreeColumn trclmnThayDuVi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuVi.setWidth(100);\n\t\ttrclmnThayDuVi.setText(\"Thay Dầu vi sai\");\n\n\t\tTreeColumn trclmnLcGiGin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnLcGiGin.setWidth(100);\n\t\ttrclmnLcGiGin.setText(\"Lọc gió giàn lạnh\");\n\n\t\tTreeColumn trclmnThayDuTr = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuTr.setWidth(100);\n\t\ttrclmnThayDuTr.setText(\"Thay dầu trợ lực lái\");\n\n\t\tTreeColumn trclmnBoDngKhcs = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBoDngKhcs.setWidth(100);\n\t\ttrclmnBoDngKhcs.setText(\"Bảo dưỡng khác\");\n\n\t\tExpandBar expandBar = new ExpandBar(sashForm_1, SWT.V_SCROLL);\n\t\texpandBar.setForeground(SWTResourceManager.getColor(SWT.COLOR_LIST_FOREGROUND));\n\n\t\tExpandItem xpndtmLoiHnhBo = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setText(\"Loại hình bảo dưỡng\");\n\n\t\tComposite grpHnhThcBo = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setControl(grpHnhThcBo);\n\t\tgrpHnhThcBo.setLayout(new GridLayout(1, false));\n\n\t\tbtnDaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDaudongco.setText(\"Dầu động cơ\");\n\n\t\tbtnLocdaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocdaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocdaudongco.setText(\"Lọc dầu động cơ\");\n\n\t\tbtnLocgio = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgio.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgio.setText(\"Lọc gió\");\n\n\t\tbtnLocnhienlieu = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocnhienlieu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocnhienlieu.setText(\"Lọc nhiên liệu\");\n\n\t\tbtnDauphanh_lyhop = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauphanh_lyhop.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauphanh_lyhop.setText(\"Dầu phanh và dầu ly hợp\");\n\n\t\tbtnDauhopso = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauhopso.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauhopso.setText(\"Dầu hộp số\");\n\n\t\tbtnDauvisai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauvisai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauvisai.setText(\"Dầu vi sai\");\n\n\t\tbtnLocgiogianlanh = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgiogianlanh.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgiogianlanh.setText(\"Lọc gió giàn lạnh\");\n\n\t\tbtnDautroluclai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDautroluclai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDautroluclai.setText(\"Dầu trợ lực lái\");\n\n\t\tbtnBaoduongkhac = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnBaoduongkhac.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBaoduongkhac.setText(\"Bảo dưỡng khác\");\n\t\txpndtmLoiHnhBo.setHeight(xpndtmLoiHnhBo.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);\n\n\t\tExpandItem xpndtmLinH = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLinH.setText(\"Liên hệ\");\n\n\t\tComposite composite_2 = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLinH.setControl(composite_2);\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblTnLinH = new Label(composite_2, SWT.NONE);\n\t\tlblTnLinH.setText(\"Tên liên hệ: \");\n\n\t\ttext_Tenlienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Tenlienhe.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblGiiThiu = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblGiiThiu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblGiiThiu.verticalIndent = 3;\n\t\tlblGiiThiu.setLayoutData(gd_lblGiiThiu);\n\t\tlblGiiThiu.setText(\"Giới thiệu: \");\n\n\t\ttext_Gioithieu = new Text(composite_2, SWT.BORDER);\n\t\ttext_Gioithieu.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t\tLabel lblLinH = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblLinH = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblLinH.verticalIndent = 3;\n\t\tlblLinH.setLayoutData(gd_lblLinH);\n\t\tlblLinH.setText(\"Liên hệ: \");\n\n\t\ttext_Lienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Lienhe.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\txpndtmLinH.setHeight(120);\n\t\tsashForm_1.setWeights(new int[] { 543, 205 });\n\t\tsashForm_3.setWeights(new int[] { 170, 228 });\n\t\tsashForm.setWeights(new int[] { 1000 });\n\n\t\tbtnLuu = new Button(shell, SWT.NONE);\n\t\tbtnLuu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (dataCreate != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTaoMoi_DotSuachua_Baoduong();\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate void TaoMoi_DotSuachua_Baoduong() throws SQLException {\n\t\t\t\tif (checkTextNotNULL()) {\n\t\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = getDOT_SUACHUA_BAODUONG();\n\t\t\t\t\tint key = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.InsertDOT_THUCHIEN_SUACHUA_BAODUONG(dsb, null, null);\n\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\tif (key >= 0) {\n\t\t\t\t\t\tif (nsb != null)\n\t\t\t\t\t\t\tdsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG().update_DOT_THUCHIEN_SUACHUA_BAODUONG(dsb);\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien > 0)\n\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(dsb,\n\t\t\t\t\t\t\t\t\t\t\tMa_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tTreeItem[] til = tree_PTTS.getItems();\n\t\t\t\t\t\tif (til.length > 0) {\n\t\t\t\t\t\t\tfor (TreeItem ti : til) {\n\t\t\t\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\t\t\t\tRow_PTTSthamgia_Baoduong rp = (Row_PTTSthamgia_Baoduong) ti.getData();\n\t\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG_TAISAN()\n\t\t\t\t\t\t\t\t\t\t.set_DOT_THUCHIEN_SUACHUA_TAISAN(dsb, rp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tshowMessage_Succes();\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tGiaoViec gv = new GiaoViec(user);\n\t\t\t\t\t\tgv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowMessage_Fail();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshowMessage_FillText();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate DOT_THUCHIEN_SUACHUA_BAODUONG getDOT_SUACHUA_BAODUONG() {\n\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = new DOT_THUCHIEN_SUACHUA_BAODUONG();\n\t\t\t\tdsb.setTEN_DOT_THUCHIEN_SUACHUA_BAODUONG(text_Tendot_Baoduong.getText());\n\t\t\t\tdsb.setLOAI_PHUONG_TIEN(\n\t\t\t\t\t\tInteger.valueOf((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText())));\n\t\t\t\tdsb.setSUACHUA_BAODUONG(fi.getInt_Baoduong());\n\t\t\t\tdsb.setMO_TA(text_Mota.getText());\n\t\t\t\treturn dsb;\n\t\t\t}\n\n\t\t});\n\t\tGridData gd_btnLu = new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1);\n\t\tgd_btnLu.widthHint = 75;\n\t\tbtnLuu.setLayoutData(gd_btnLu);\n\t\tbtnLuu.setText(\"Xong\");\n\n\t\tbtnDong = new Button(shell, SWT.NONE);\n\t\tbtnDong.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if (Insert_dx != null)\n\t\t\t\t\t\t// controler.getControl_DEXUAT().delete_DEXUAT(Insert_dx);\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tGridData gd_btnDong = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDong.widthHint = 75;\n\t\tbtnDong.setLayoutData(gd_btnDong);\n\t\tbtnDong.setText(\"Đóng\");\n\t\tinit_loadMODE();\n\t\tinit_CreateMode();\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM | SWT.BORDER | SWT.PRIMARY_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/list-2x.png\"));\n\t\tshell.setSize(610, 340);\n\t\tshell.setText(\"Thuoc List View\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\tshell.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==SWT.ESC){\n\t\t\t\t\tobjThuoc = null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n \n Composite compositeInShellThuoc = new Composite(shell, SWT.NONE);\n\t\tcompositeInShellThuoc.setLayout(new BorderLayout(0, 0));\n\t\tcompositeInShellThuoc.setLayoutData(BorderLayout.CENTER);\n \n\t\tComposite compositeHeaderThuoc = new Composite(compositeInShellThuoc, SWT.NONE);\n\t\tcompositeHeaderThuoc.setLayoutData(BorderLayout.NORTH);\n\t\tcompositeHeaderThuoc.setLayout(new GridLayout(5, false));\n\n\t\ttextSearchThuoc = new Text(compositeHeaderThuoc, SWT.BORDER);\n\t\ttextSearchThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\ttextSearchThuoc.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==13){\n\t\t\t\t\treloadTableThuoc();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnNewButtonSearchThuoc = new Button(compositeHeaderThuoc, SWT.NONE);\n\t\tbtnNewButtonSearchThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/media-play-2x.png\"));\n\t\tbtnNewButtonSearchThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\n\t\tbtnNewButtonSearchThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\treloadTableThuoc();\n\t\t\t}\n\t\t});\n\t\tButton btnNewButtonExportExcelThuoc = new Button(compositeHeaderThuoc, SWT.NONE);\n\t\tbtnNewButtonExportExcelThuoc.setText(\"Export Excel\");\n\t\tbtnNewButtonExportExcelThuoc.setImage(SWTResourceManager.getImage(KhamBenhListDlg.class, \"/png/spreadsheet-2x.png\"));\n\t\tbtnNewButtonExportExcelThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\tbtnNewButtonExportExcelThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\texportExcelTableThuoc();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tGridData gd_btnNewButtonThuoc = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNewButtonThuoc.widthHint = 87;\n\t\tbtnNewButtonSearchThuoc.setLayoutData(gd_btnNewButtonThuoc);\n\t\tbtnNewButtonSearchThuoc.setText(\"Search\");\n \n\t\ttableViewerThuoc = new TableViewer(compositeInShellThuoc, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttableThuoc = tableViewerThuoc.getTable();\n\t\ttableThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\ttableThuoc.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==SWT.F5){\n\t\t\t\t\treloadTableThuoc();\n }\n if(e.keyCode==SWT.F4){\n\t\t\t\t\teditTableThuoc();\n }\n\t\t\t\telse if(e.keyCode==13){\n\t\t\t\t\tselectTableThuoc();\n\t\t\t\t}\n else if(e.keyCode==SWT.DEL){\n\t\t\t\t\tdeleteTableThuoc();\n\t\t\t\t}\n else if(e.keyCode==SWT.F7){\n\t\t\t\t\tnewItemThuoc();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n tableThuoc.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tselectTableThuoc();\n\t\t\t}\n\t\t});\n \n\t\ttableThuoc.setLinesVisible(true);\n\t\ttableThuoc.setHeaderVisible(true);\n\t\ttableThuoc.setLayoutData(BorderLayout.CENTER);\n\n\t\tTableColumn tbTableColumnThuocMA_HOAT_CHAT = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_HOAT_CHAT.setWidth(100);\n\t\ttbTableColumnThuocMA_HOAT_CHAT.setText(\"MA_HOAT_CHAT\");\n\n\t\tTableColumn tbTableColumnThuocMA_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_AX.setWidth(100);\n\t\ttbTableColumnThuocMA_AX.setText(\"MA_AX\");\n\n\t\tTableColumn tbTableColumnThuocHOAT_CHAT = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHOAT_CHAT.setWidth(100);\n\t\ttbTableColumnThuocHOAT_CHAT.setText(\"HOAT_CHAT\");\n\n\t\tTableColumn tbTableColumnThuocHOATCHAT_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHOATCHAT_AX.setWidth(100);\n\t\ttbTableColumnThuocHOATCHAT_AX.setText(\"HOATCHAT_AX\");\n\n\t\tTableColumn tbTableColumnThuocMA_DUONG_DUNG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_DUONG_DUNG.setWidth(100);\n\t\ttbTableColumnThuocMA_DUONG_DUNG.setText(\"MA_DUONG_DUNG\");\n\n\t\tTableColumn tbTableColumnThuocMA_DUONGDUNG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_DUONGDUNG_AX.setWidth(100);\n\t\ttbTableColumnThuocMA_DUONGDUNG_AX.setText(\"MA_DUONGDUNG_AX\");\n\n\t\tTableColumn tbTableColumnThuocDUONG_DUNG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDUONG_DUNG.setWidth(100);\n\t\ttbTableColumnThuocDUONG_DUNG.setText(\"DUONG_DUNG\");\n\n\t\tTableColumn tbTableColumnThuocDUONGDUNG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDUONGDUNG_AX.setWidth(100);\n\t\ttbTableColumnThuocDUONGDUNG_AX.setText(\"DUONGDUNG_AX\");\n\n\t\tTableColumn tbTableColumnThuocHAM_LUONG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHAM_LUONG.setWidth(100);\n\t\ttbTableColumnThuocHAM_LUONG.setText(\"HAM_LUONG\");\n\n\t\tTableColumn tbTableColumnThuocHAMLUONG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHAMLUONG_AX.setWidth(100);\n\t\ttbTableColumnThuocHAMLUONG_AX.setText(\"HAMLUONG_AX\");\n\n\t\tTableColumn tbTableColumnThuocTEN_THUOC = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocTEN_THUOC.setWidth(100);\n\t\ttbTableColumnThuocTEN_THUOC.setText(\"TEN_THUOC\");\n\n\t\tTableColumn tbTableColumnThuocTENTHUOC_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocTENTHUOC_AX.setWidth(100);\n\t\ttbTableColumnThuocTENTHUOC_AX.setText(\"TENTHUOC_AX\");\n\n\t\tTableColumn tbTableColumnThuocSO_DANG_KY = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocSO_DANG_KY.setWidth(100);\n\t\ttbTableColumnThuocSO_DANG_KY.setText(\"SO_DANG_KY\");\n\n\t\tTableColumn tbTableColumnThuocSODANGKY_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocSODANGKY_AX.setWidth(100);\n\t\ttbTableColumnThuocSODANGKY_AX.setText(\"SODANGKY_AX\");\n\n\t\tTableColumn tbTableColumnThuocDONG_GOI = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDONG_GOI.setWidth(100);\n\t\ttbTableColumnThuocDONG_GOI.setText(\"DONG_GOI\");\n\n\t\tTableColumn tbTableColumnThuocDON_VI_TINH = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDON_VI_TINH.setWidth(100);\n\t\ttbTableColumnThuocDON_VI_TINH.setText(\"DON_VI_TINH\");\n\n\n\t\tTableColumn tbTableColumnThuocDON_GIA = new TableColumn(tableThuoc, SWT.NONE);\n\t\ttbTableColumnThuocDON_GIA.setWidth(100);\n\t\ttbTableColumnThuocDON_GIA.setText(\"DON_GIA\");\n\n\n\t\tTableColumn tbTableColumnThuocDON_GIA_TT = new TableColumn(tableThuoc, SWT.NONE);\n\t\ttbTableColumnThuocDON_GIA_TT.setWidth(100);\n\t\ttbTableColumnThuocDON_GIA_TT.setText(\"DON_GIA_TT\");\n\n\t\tTableColumn tbTableColumnThuocSO_LUONG = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocSO_LUONG.setWidth(100);\n\t\ttbTableColumnThuocSO_LUONG.setText(\"SO_LUONG\");\n\n\t\tTableColumn tbTableColumnThuocMA_CSKCB = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_CSKCB.setWidth(100);\n\t\ttbTableColumnThuocMA_CSKCB.setText(\"MA_CSKCB\");\n\n\t\tTableColumn tbTableColumnThuocHANG_SX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHANG_SX.setWidth(100);\n\t\ttbTableColumnThuocHANG_SX.setText(\"HANG_SX\");\n\n\t\tTableColumn tbTableColumnThuocNUOC_SX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNUOC_SX.setWidth(100);\n\t\ttbTableColumnThuocNUOC_SX.setText(\"NUOC_SX\");\n\n\t\tTableColumn tbTableColumnThuocNHA_THAU = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNHA_THAU.setWidth(100);\n\t\ttbTableColumnThuocNHA_THAU.setText(\"NHA_THAU\");\n\n\t\tTableColumn tbTableColumnThuocQUYET_DINH = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocQUYET_DINH.setWidth(100);\n\t\ttbTableColumnThuocQUYET_DINH.setText(\"QUYET_DINH\");\n\n\t\tTableColumn tbTableColumnThuocCONG_BO = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocCONG_BO.setWidth(100);\n\t\ttbTableColumnThuocCONG_BO.setText(\"CONG_BO\");\n\n\t\tTableColumn tbTableColumnThuocMA_THUOC_BV = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_THUOC_BV.setWidth(100);\n\t\ttbTableColumnThuocMA_THUOC_BV.setText(\"MA_THUOC_BV\");\n\n\t\tTableColumn tbTableColumnThuocLOAI_THUOC = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocLOAI_THUOC.setWidth(100);\n\t\ttbTableColumnThuocLOAI_THUOC.setText(\"LOAI_THUOC\");\n\n\t\tTableColumn tbTableColumnThuocLOAI_THAU = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocLOAI_THAU.setWidth(100);\n\t\ttbTableColumnThuocLOAI_THAU.setText(\"LOAI_THAU\");\n\n\t\tTableColumn tbTableColumnThuocNHOM_THAU = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNHOM_THAU.setWidth(100);\n\t\ttbTableColumnThuocNHOM_THAU.setText(\"NHOM_THAU\");\n\n\t\tTableColumn tbTableColumnThuocMANHOM_9324 = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocMANHOM_9324.setWidth(100);\n\t\ttbTableColumnThuocMANHOM_9324.setText(\"MANHOM_9324\");\n\n\t\tTableColumn tbTableColumnThuocHIEULUC = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocHIEULUC.setWidth(100);\n\t\ttbTableColumnThuocHIEULUC.setText(\"HIEULUC\");\n\n\t\tTableColumn tbTableColumnThuocKETQUA = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocKETQUA.setWidth(100);\n\t\ttbTableColumnThuocKETQUA.setText(\"KETQUA\");\n\n\t\tTableColumn tbTableColumnThuocTYP = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocTYP.setWidth(100);\n\t\ttbTableColumnThuocTYP.setText(\"TYP\");\n\n\t\tTableColumn tbTableColumnThuocTHUOC_RANK = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocTHUOC_RANK.setWidth(100);\n\t\ttbTableColumnThuocTHUOC_RANK.setText(\"THUOC_RANK\");\n\n Menu menuThuoc = new Menu(tableThuoc);\n\t\ttableThuoc.setMenu(menuThuoc);\n\t\t\n\t\tMenuItem mntmNewItemThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmNewItemThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tnewItemThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmNewItemThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/arrow-circle-top-2x.png\"));\n\t\tmntmNewItemThuoc.setText(\"New\");\n\t\t\n\t\tMenuItem mntmEditItemThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmEditItemThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/wrench-2x.png\"));\n\t\tmntmEditItemThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\teditTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmEditItemThuoc.setText(\"Edit\");\n\t\t\n\t\tMenuItem mntmDeleteThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmDeleteThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/circle-x-2x.png\"));\n\t\tmntmDeleteThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdeleteTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmDeleteThuoc.setText(\"Delete\");\n\t\t\n\t\tMenuItem mntmExportThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmExportThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\texportExcelTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmExportThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/spreadsheet-2x.png\"));\n\t\tmntmExportThuoc.setText(\"Export Excel\");\n\t\t\n\t\ttableViewerThuoc.setLabelProvider(new TableLabelProviderThuoc());\n\t\ttableViewerThuoc.setContentProvider(new ContentProviderThuoc());\n\t\ttableViewerThuoc.setInput(listDataThuoc);\n //\n //\n\t\tloadDataThuoc();\n\t\t//\n reloadTableThuoc();\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(1200, 1100);\n\t\tshell.setText(\"Zagreb Montaža d.o.o\");\n\n\t\tfinal Composite cmpMenu = new Composite(shell, SWT.NONE);\n\t\tcmpMenu.setBackground(SWTResourceManager.getColor(119, 136, 153));\n\t\tcmpMenu.setBounds(0, 0, 359, 1061);\n\t\t\n\t\tFormToolkit formToolkit = new FormToolkit(Display.getDefault());\n\t\tfinal Section sctnCalculator = formToolkit.createSection(cmpMenu, Section.TWISTIE | Section.TITLE_BAR);\n\t\tsctnCalculator.setExpanded(false);\n\t\tsctnCalculator.setBounds(10, 160, 339, 23);\n\t\tformToolkit.paintBordersFor(sctnCalculator);\n\t\tsctnCalculator.setText(\"Kalkulator temperature preddgrijavanja\");\n\n\t\tfinal Section sctn10112ce = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctn10112ce.setBounds(45, 189, 304, 23);\n\t\tformToolkit.paintBordersFor(sctn10112ce);\n\t\tsctn10112ce.setText(\"1011-2 CE\");\n\t\tsctn10112ce.setVisible(false);\n\n\t\tfinal Section sctn10112cet = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctn10112cet.setBounds(45, 218, 304, 23);\n\t\tformToolkit.paintBordersFor(sctn10112cet);\n\t\tsctn10112cet.setText(\"1011-2 CET\");\n\t\tsctn10112cet.setVisible(false);\n\n\t\tfinal Section sctnAws = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctnAws.setBounds(45, 247, 304, 23);\n\t\tformToolkit.paintBordersFor(sctnAws);\n\t\tsctnAws.setText(\"AWS\");\n\t\tsctnAws.setVisible(false);\n\t\t\n\t\tfinal Composite composite10112ce = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcomposite10112ce.setBounds(365, 0, 829, 1061);\n\t\tcomposite10112ce.setVisible(false);\n\t\t\n\t\tfinal Composite composite10112cet = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcomposite10112cet.setBounds(365, 0, 829, 1061);\n\t\tcomposite10112cet.setVisible(false);\n\t\t\n\t\tfinal Composite compositeAws = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcompositeAws.setBounds(365, 0, 829, 1061);\n\t\tcompositeAws.setVisible(false);\n\t\t\n\t\tsctnCalculator.addExpansionListener(new IExpansionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\n\t\t\t\tif (sctnCalculator.isExpanded() == false) {\n\t\t\t\t\tsctn10112ce.setVisible(true);\n\t\t\t\t\tsctn10112cet.setVisible(true);\n\t\t\t\t\tsctnAws.setVisible(true);\n\n\t\t\t\t} else {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tsctnAws.setVisible(false);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t\tsctn10112ce.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctn10112ce.isExpanded() == true) {\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t\t\tnew F10112ce(composite10112ce, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcomposite10112ce.setVisible(false);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsctn10112cet.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctn10112cet.isExpanded() == true) {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t\t\tnew F10112cet(composite10112cet, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcomposite10112ce.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tsctnAws.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctnAws.isExpanded() == true) {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tnew FAws(compositeAws, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t}\n\t\t});\n\t}", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: wtrocki@gmail.com\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "private void createContents() {\r\n\t\tshlEventBlocker = new Shell(getParent(), getStyle());\r\n\t\tshlEventBlocker.setSize(167, 135);\r\n\t\tshlEventBlocker.setText(\"Event Blocker\");\r\n\t\t\r\n\t\tLabel lblRunningEvent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblRunningEvent.setBounds(10, 10, 100, 15);\r\n\t\tlblRunningEvent.setText(\"Running Event:\");\r\n\t\t\r\n\t\tLabel lblevent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblevent.setFont(SWTResourceManager.getFont(\"Segoe UI\", 15, SWT.BOLD));\r\n\t\tlblevent.setBounds(20, 31, 129, 35);\r\n\t\tlblevent.setText(eventName);\r\n\t\t\r\n\t\tButton btnFinish = new Button(shlEventBlocker, SWT.NONE);\r\n\t\tbtnFinish.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlEventBlocker.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinish.setBounds(10, 72, 75, 25);\r\n\t\tbtnFinish.setText(\"Finish\");\r\n\r\n\t}", "protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}", "protected void createContents() throws Exception {\n\t\tshlGecco = new Shell();\n\t\tshlGecco.setImage(SWTResourceManager.getImage(jdView.class, \"/images/yc.ico\"));\n\t\tshlGecco.setSize(1366, 736);\n\t\tshlGecco.setText(\"gecco爬取京东信息\");\n\t\tshlGecco.setLocation(0, 0);\n\t\tshlGecco.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tSashForm sashForm = new SashForm(shlGecco, SWT.NONE);\n\t\tsashForm.setOrientation(SWT.VERTICAL);\n\n\t\tGroup group = new Group(sashForm, SWT.NONE);\n\t\tgroup.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 10, SWT.BOLD));\n\t\tgroup.setText(\"爬取查询条件\");\n\t\tgroup.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tSashForm sashForm_2 = new SashForm(group, SWT.NONE);\n\n\t\tGroup group_2 = new Group(sashForm_2, SWT.NONE);\n\t\tgroup_2.setText(\"爬取条件\");\n\n\t\tLabel lblip = new Label(group_2, SWT.NONE);\n\t\tlblip.setLocation(34, 27);\n\t\tlblip.setSize(113, 21);\n\t\tlblip.setText(\"输入开始爬取地址:\");\n\n\t\ttxtSearchUrl = new Text(group_2, SWT.BORDER);\n\t\ttxtSearchUrl.setLocation(153, 23);\n\t\ttxtSearchUrl.setSize(243, 23);\n\t\ttxtSearchUrl.setText(\"https://www.jd.com/allSort.aspx\");\n\n\t\tbtnSearch = new Button(group_2, SWT.NONE);\n\t\tbtnSearch.setLocation(408, 23);\n\t\tbtnSearch.setSize(82, 25);\n\n\t\tbtnSearch.setEnabled(false);\n\t\tbtnSearch.setText(\"开始爬取\");\n\n\t\tGroup group_3 = new Group(sashForm_2, SWT.NONE);\n\t\tgroup_3.setText(\"查询条件\");\n\n\t\tLabel label_2 = new Label(group_3, SWT.NONE);\n\t\tlabel_2.setLocation(77, 25);\n\t\tlabel_2.setSize(86, 25);\n\t\tlabel_2.setText(\"选择查询条件:\");\n\n\t\tcombo = new Combo(group_3, SWT.NONE);\n\t\tcombo.setLocation(169, 23);\n\t\tcombo.setSize(140, 23);\n\t\tcombo.setItems(new String[] { \"全部\", \"商品总类别\", \"子类别名\", \"类别链接\" });\n\t\t// combo.setText(\"全部\");\n\n\t\tbutton = new Button(group_3, SWT.NONE);\n\t\tbutton.setLocation(524, 23);\n\t\tbutton.setSize(80, 25);\n\t\tbutton.setText(\"点击查询\");\n\t\tbutton.setEnabled(false);\n\n\t\tcombo_1 = new Combo(group_3, SWT.NONE);\n\t\tcombo_1.setEnabled(false);\n\t\tcombo_1.setLocation(332, 23);\n\t\tcombo_1.setSize(170, 23);\n\t\t// combo_1.setItems(new String[] { \"全部\" });\n\t\t// combo_1.setText(\"全部\");\n\t\tsashForm_2.setWeights(new int[] { 562, 779 });\n\t\tGroup group_1 = new Group(sashForm, SWT.NONE);\n\t\tgroup_1.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 10, SWT.BOLD));\n\t\tgroup_1.setText(\"爬取结果\");\n\t\tgroup_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tSashForm sashForm_1 = new SashForm(group_1, SWT.NONE);\n\n\t\tGroup group_Categorys = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_Categorys.setText(\"商品分组\");\n\t\tgroup_Categorys.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tcategorys = new Table(group_Categorys, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tcategorys.setHeaderVisible(true);\n\t\tcategorys.setLinesVisible(true);\n\n\t\tTableColumn ParentName = new TableColumn(categorys, SWT.NONE);\n\t\tParentName.setWidth(87);\n\t\tParentName.setText(\"商品总类别\");\n\n\t\tTableColumn Title = new TableColumn(categorys, SWT.NONE);\n\t\tTitle.setWidth(87);\n\t\tTitle.setText(\"子类别名\");\n\n\t\tTableColumn Ip = new TableColumn(categorys, SWT.NONE);\n\t\tIp.setWidth(152);\n\t\tIp.setText(\"类别链接\");\n\n\t\tGroup group_ProductBrief = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_ProductBrief.setText(\"商品简要信息列表\");\n\t\tgroup_ProductBrief.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tproductBrief = new Table(group_ProductBrief, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tproductBrief.setLinesVisible(true);\n\t\tproductBrief.setHeaderVisible(true);\n\n\t\tTableColumn Code = new TableColumn(productBrief, SWT.NONE);\n\t\tCode.setWidth(80);\n\t\tCode.setText(\"商品编号\");\n\n\t\tTableColumn Detailurl = new TableColumn(productBrief, SWT.NONE);\n\t\tDetailurl.setWidth(162);\n\t\tDetailurl.setText(\"商品详情链接\");\n\n\t\tTableColumn Preview = new TableColumn(productBrief, SWT.NONE);\n\t\tPreview.setWidth(170);\n\t\tPreview.setText(\"商品图片链接\");\n\n\t\tTableColumn Dtitle = new TableColumn(productBrief, SWT.NONE);\n\t\tDtitle.setWidth(150);\n\t\tDtitle.setText(\"商品标题\");\n\n\t\tGroup group_ProductDetail = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_ProductDetail.setText(\"商品详细信息\");\n\t\tgroup_ProductDetail.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tComposite composite = new Composite(group_ProductDetail, SWT.NONE);\n\n\t\tPDetail = new Text(composite,\n\t\t\t\tSWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);\n\t\tPDetail.setLocation(55, 339);\n\t\tPDetail.setSize(360, 220);\n\n\t\tLabel Id = new Label(composite, SWT.NONE);\n\t\tId.setBounds(31, 28, 61, 15);\n\t\tId.setText(\"商品编号:\");\n\n\t\tLabel detail = new Label(composite, SWT.NONE);\n\t\tdetail.setText(\"商品详情:\");\n\t\tdetail.setBounds(31, 311, 61, 15);\n\n\t\tLabel title = new Label(composite, SWT.NONE);\n\t\ttitle.setText(\"商品标题:\");\n\t\ttitle.setBounds(31, 64, 61, 15);\n\n\t\tLabel jdAd = new Label(composite, SWT.NONE);\n\t\tjdAd.setText(\"商品广告:\");\n\t\tjdAd.setBounds(31, 201, 61, 15);\n\n\t\tLabel price = new Label(composite, SWT.NONE);\n\t\tprice.setBounds(31, 108, 61, 15);\n\t\tprice.setText(\"价格:\");\n\n\t\tdcode = new Text(composite, SWT.BORDER);\n\t\tdcode.setEditable(false);\n\t\tdcode.setBounds(98, 25, 217, 21);\n\n\t\tLabel jdprice = new Label(composite, SWT.NONE);\n\t\tjdprice.setBounds(75, 127, 48, 15);\n\t\tjdprice.setText(\"京东价:\");\n\n\t\tLabel srcPrice = new Label(composite, SWT.NONE);\n\t\tsrcPrice.setBounds(75, 166, 48, 15);\n\t\tsrcPrice.setText(\"原售价:\");\n\n\t\tdprice = new Text(composite, SWT.BORDER);\n\t\tdprice.setEditable(false);\n\t\tdprice.setBounds(128, 127, 187, 21);\n\n\t\tdsrcPrice = new Text(composite, SWT.BORDER);\n\t\tdsrcPrice.setEditable(false);\n\t\tdsrcPrice.setBounds(128, 166, 187, 21);\n\n\t\tdtitle = new Text(composite,\n\t\t\t\tSWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);\n\t\tdtitle.setBounds(98, 62, 217, 42);\n\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setText(\"广告标题:\");\n\t\tlabel.setBounds(62, 233, 61, 15);\n\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setText(\"广告链接:\");\n\t\tlabel_1.setBounds(62, 272, 61, 15);\n\n\t\tadtitle = new Text(composite, SWT.BORDER);\n\t\tadtitle.setEditable(false);\n\t\tadtitle.setBounds(128, 231, 187, 21);\n\n\t\tadUrl = new Text(composite, SWT.BORDER);\n\t\tadUrl.setEditable(false);\n\t\tadUrl.setBounds(128, 270, 187, 21);\n\t\tsashForm_1.setWeights(new int[] { 335, 573, 430 });\n\t\tsashForm.setWeights(new int[] { 85, 586 });\n\n\t\tdoEvent();// 组件的事件操作\n\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "private void createContents() {\r\n this.shell = new Shell(this.getParent(), this.getStyle());\r\n this.shell.setText(\"自動プロキシ構成スクリプトファイル生成\");\r\n this.shell.setLayout(new GridLayout(1, false));\r\n\r\n Composite composite = new Composite(this.shell, SWT.NONE);\r\n composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n composite.setLayout(new GridLayout(1, false));\r\n\r\n Label labelTitle = new Label(composite, SWT.NONE);\r\n labelTitle.setText(\"自動プロキシ構成スクリプトファイルを生成します\");\r\n\r\n String server = Filter.getServerName();\r\n if (server == null) {\r\n Group manualgroup = new Group(composite, SWT.NONE);\r\n manualgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n manualgroup.setLayout(new GridLayout(2, false));\r\n manualgroup.setText(\"鎮守府サーバーが未検出です。IPアドレスを入力して下さい。\");\r\n\r\n Label iplabel = new Label(manualgroup, SWT.NONE);\r\n iplabel.setText(\"IPアドレス:\");\r\n\r\n final Text text = new Text(manualgroup, SWT.BORDER);\r\n GridData gdip = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n gdip.widthHint = SwtUtils.DPIAwareWidth(150);\r\n text.setLayoutData(gdip);\r\n text.setText(\"0.0.0.0\");\r\n text.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent e) {\r\n CreatePacFileDialog.this.server = text.getText();\r\n }\r\n });\r\n\r\n this.server = \"0.0.0.0\";\r\n } else {\r\n this.server = server;\r\n }\r\n\r\n Button storeButton = new Button(composite, SWT.NONE);\r\n storeButton.setText(\"保存先を選択...\");\r\n storeButton.addSelectionListener(new FileSelectionAdapter(this));\r\n\r\n Group addrgroup = new Group(composite, SWT.NONE);\r\n addrgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n addrgroup.setLayout(new GridLayout(2, false));\r\n addrgroup.setText(\"アドレス(保存先のアドレスより生成されます)\");\r\n\r\n Label ieAddrLabel = new Label(addrgroup, SWT.NONE);\r\n ieAddrLabel.setText(\"IE用:\");\r\n\r\n this.iePath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdIePath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdIePath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.iePath.setLayoutData(gdIePath);\r\n\r\n Label fxAddrLabel = new Label(addrgroup, SWT.NONE);\r\n fxAddrLabel.setText(\"Firefox用:\");\r\n\r\n this.firefoxPath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdFxPath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdFxPath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.firefoxPath.setLayoutData(gdFxPath);\r\n\r\n this.shell.pack();\r\n }", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tGroup group_1 = new Group(shell, SWT.NONE);\n\t\tgroup_1.setText(\"\\u65B0\\u4FE1\\u606F\\u586B\\u5199\");\n\t\tgroup_1.setBounds(0, 120, 434, 102);\n\t\t\n\t\tLabel label_4 = new Label(group_1, SWT.NONE);\n\t\tlabel_4.setBounds(10, 21, 61, 17);\n\t\tlabel_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel label_5 = new Label(group_1, SWT.NONE);\n\t\tlabel_5.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\tlabel_5.setBounds(10, 46, 61, 17);\n\t\t\n\t\tLabel label_6 = new Label(group_1, SWT.NONE);\n\t\tlabel_6.setText(\"\\u5BC6\\u7801\");\n\t\tlabel_6.setBounds(10, 75, 61, 17);\n\t\t\n\t\ttext = new Text(group_1, SWT.BORDER);\n\t\ttext.setBounds(121, 21, 140, 17);\n\t\t\n\t\ttext_1 = new Text(group_1, SWT.BORDER);\n\t\ttext_1.setBounds(121, 46, 140, 17);\n\t\t\n\t\ttext_2 = new Text(group_1, SWT.BORDER);\n\t\ttext_2.setBounds(121, 75, 140, 17);\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.setBounds(31, 228, 80, 27);\n\t\tbtnNewButton.setText(\"\\u63D0\\u4EA4\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(288, 228, 80, 27);\n\t\tbtnNewButton_1.setText(\"\\u91CD\\u586B\");\n\t\t\n\t\tGroup group = new Group(shell, SWT.NONE);\n\t\tgroup.setText(\"\\u539F\\u5148\\u4FE1\\u606F\");\n\t\tgroup.setBounds(0, 10, 320, 102);\n\t\t\n\t\tLabel label = new Label(group, SWT.NONE);\n\t\tlabel.setBounds(10, 20, 61, 17);\n\t\tlabel.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel lblNewLabel = new Label(group, SWT.NONE);\n\t\tlblNewLabel.setBounds(113, 20, 61, 17);\n\t\t\n\t\tLabel label_1 = new Label(group, SWT.NONE);\n\t\tlabel_1.setBounds(10, 43, 61, 17);\n\t\tlabel_1.setText(\"\\u6027\\u522B\");\n\t\t\n\t\tButton btnRadioButton = new Button(group, SWT.RADIO);\n\t\t\n\t\tbtnRadioButton.setBounds(90, 43, 97, 17);\n\t\tbtnRadioButton.setText(\"\\u7537\");\n\t\tButton btnRadioButton_1 = new Button(group, SWT.RADIO);\n\t\tbtnRadioButton_1.setBounds(208, 43, 97, 17);\n\t\tbtnRadioButton_1.setText(\"\\u5973\");\n\t\t\n\t\tLabel label_2 = new Label(group, SWT.NONE);\n\t\tlabel_2.setBounds(10, 66, 61, 17);\n\t\tlabel_2.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(113, 66, 61, 17);\n\t\t\n\t\tLabel label_3 = new Label(group, SWT.NONE);\n\t\tlabel_3.setBounds(10, 89, 61, 17);\n\t\tlabel_3.setText(\"\\u5BC6\\u7801\");\n\t\tLabel lblNewLabel_2 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_2.setBounds(113, 89, 61, 17);\n\t\t\n\t\ttry {\n\t\t\tUserDao userDao=new UserDao();\n\t\t\tlblNewLabel_2.setText(User.getPassword());\n\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\n\t\t\t\n\n\t\t\n\t\t\ttry {\n\t\t\t\tList<User> userList=userDao.query();\n\t\t\t\tString results[][]=new String[userList.size()][5];\n\t\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\t\tlblNewLabel_1.setText(User.getSex());\n\t\t\t\tlblNewLabel_2.setText(User.getUserPhone());\n\t\t\t\tButton button = new Button(shell, SWT.NONE);\n\t\t\t\tbutton.setBounds(354, 0, 80, 27);\n\t\t\t\tbutton.setText(\"\\u8FD4\\u56DE\");\n\t\t\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tbook book=new book();\n\t\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < userList.size(); i++) {\n\t\t\t\t\t\tUser user1 = (User)userList.get(i);\t\n\t\t\t\t\tresults[i][0] = user1.getUserName();\n\t\t\t\t\tresults[i][1] = user1.getSex();\t\n\t\t\t\t\tresults[i][2] = user1.getPassword();\t\n\t\n\t\t\t\t\tif(user1.getSex().equals(\"男\"))\n\t\t\t\t\t\tbtnRadioButton.setSelection(true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbtnRadioButton_1.setSelection(true);\n\t\t\t\t\tlblNewLabel_1.setText(user1.getUserPhone());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif(!text_1.getText().equals(\"\")&&!text.getText().equals(\"\")&&!text_2.getText().equals(\"\"))\n\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\t\tif(!text_1.getText().equals(\"\")&&!text_2.getText().equals(\"\")&&!text.getText().equals(\"\"))\n\t\t\t\t\t{shell.dispose();\n\t\t\t\t\tbook book=new book();\n\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{JOptionPane.showMessageDialog(null,\"用户名或密码不能为空\",\"错误\",JOptionPane.PLAIN_MESSAGE);}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t});\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\ttext.setText(\"\");\n\t\t\t\t\ttext_1.setText(\"\");\n\t\t\t\t\ttext_2.setText(\"\");\n\t\t\t\n\t\t\t}\n\t\t});\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tfinal TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\r\n\t\ttabFolder.setToolTipText(\"\");\r\n\t\t\r\n\t\tTabItem tabItem = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem.setText(\"欢迎使用\");\r\n\t\t\r\n\t\tTabItem tabItem_1 = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem_1.setText(\"员工查询\");\r\n\t\t\r\n\t\tMenu menu = new Menu(shell, SWT.BAR);\r\n\t\tshell.setMenuBar(menu);\r\n\t\t\r\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\r\n\t\tmenuItem.setText(\"系统管理\");\r\n\t\t\r\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.CASCADE);\r\n\t\tmenuItem_1.setText(\"员工管理\");\r\n\t\t\r\n\t\tMenu menu_1 = new Menu(menuItem_1);\r\n\t\tmenuItem_1.setMenu(menu_1);\r\n\t\t\r\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\r\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tTabItem tbtmNewItem = new TabItem(tabFolder,SWT.NONE);\r\n\t\t\t\ttbtmNewItem.setText(\"员工查询\");\r\n\t\t\t\t//创建自定义组件\r\n\t\t\t\tEmpQueryCmp eqc = new EmpQueryCmp(tabFolder, SWT.NONE);\r\n\t\t\t\t//设置标签显示的自定义组件\r\n\t\t\t\ttbtmNewItem.setControl(eqc);\r\n\t\t\t\t\r\n\t\t\t\t//选中当前标签页\r\n\t\t\t\ttabFolder.setSelection(tbtmNewItem);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tmenuItem_2.setText(\"员工查询\");\r\n\r\n\t}", "protected void createContents() {\n\t\tregister Register = new register();\n\t\tRegisterDAOImpl RDI = new RegisterDAOImpl();\t\n\t\t\n\t\tload = new Shell();\n\t\tload.setSize(519, 370);\n\t\tload.setText(\"XX\\u533B\\u9662\\u6302\\u53F7\\u7CFB\\u7EDF\");\n\t\tload.setLayout(new FormLayout());\n\t\t\n\t\tLabel name = new Label(load, SWT.NONE);\n\t\tFormData fd_name = new FormData();\n\t\tfd_name.top = new FormAttachment(20);\n\t\tfd_name.left = new FormAttachment(45, -10);\n\t\tname.setLayoutData(fd_name);\n\t\tname.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tname.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel subjet = new Label(load, SWT.NONE);\n\t\tFormData fd_subjet = new FormData();\n\t\tfd_subjet.left = new FormAttachment(44);\n\t\tfd_subjet.top = new FormAttachment(50);\n\t\tsubjet.setLayoutData(fd_subjet);\n\t\tsubjet.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tsubjet.setText(\"\\u79D1\\u5BA4\");\n\t\t\n\t\tLabel doctor = new Label(load, SWT.NONE);\n\t\tFormData fd_doctor = new FormData();\n\t\tfd_doctor.top = new FormAttachment(60);\n\t\tfd_doctor.left = new FormAttachment(45, -10);\n\t\tdoctor.setLayoutData(fd_doctor);\n\t\tdoctor.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tdoctor.setText(\"\\u533B\\u751F\");\n\t\t\n\t\tnametext = new Text(load, SWT.BORDER);\n\t\tnametext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tnametext.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_nametext = new FormData();\n\t\tfd_nametext.right = new FormAttachment(50, 94);\n\t\tfd_nametext.top = new FormAttachment(20);\n\t\tfd_nametext.left = new FormAttachment(50);\n\t\tnametext.setLayoutData(fd_nametext);\n\t\t\n\t\tLabel titlelabel = new Label(load, SWT.NONE);\n\t\tFormData fd_titlelabel = new FormData();\n\t\tfd_titlelabel.right = new FormAttachment(43, 176);\n\t\tfd_titlelabel.top = new FormAttachment(10);\n\t\tfd_titlelabel.left = new FormAttachment(43);\n\t\ttitlelabel.setLayoutData(fd_titlelabel);\n\t\ttitlelabel.setFont(SWTResourceManager.getFont(\"楷体\", 18, SWT.BOLD));\n\t\ttitlelabel.setText(\"XX\\u533B\\u9662\\u95E8\\u8BCA\\u6302\\u53F7\");\n\t\t\n\t\tLabel label = new Label(load, SWT.NONE);\n\t\tFormData fd_label = new FormData();\n\t\tfd_label.top = new FormAttachment(40);\n\t\tfd_label.left = new FormAttachment(44, -10);\n\t\tlabel.setLayoutData(fd_label);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tlabel.setText(\"\\u6302\\u53F7\\u8D39\");\n\t\t\n\t\tcosttext = new Text(load, SWT.BORDER);\n\t\tcosttext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tcosttext.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_costtext = new FormData();\n\t\tfd_costtext.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_costtext.top = new FormAttachment(40);\n\t\tfd_costtext.left = new FormAttachment(50);\n\t\tcosttext.setLayoutData(fd_costtext);\n\t\t\n\t\tLabel type = new Label(load, SWT.NONE);\n\t\tFormData fd_type = new FormData();\n\t\tfd_type.top = new FormAttachment(30);\n\t\tfd_type.left = new FormAttachment(45, -10);\n\t\ttype.setLayoutData(fd_type);\n\t\ttype.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\ttype.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tCombo typecombo = new Combo(load, SWT.NONE);\n\t\ttypecombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\ttypecombo.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_typecombo = new FormData();\n\t\tfd_typecombo.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_typecombo.top = new FormAttachment(30);\n\t\tfd_typecombo.left = new FormAttachment(50);\n\t\ttypecombo.setLayoutData(fd_typecombo);\n\t\ttypecombo.setText(\"\\u95E8\\u8BCA\\u7C7B\\u578B\");\n\t\ttypecombo.add(\"普通门诊\",0);\n\t\ttypecombo.add(\"专家门诊\",1);\n\t\tMySelectionListener3 ms3 = new MySelectionListener3(typecombo,costtext);\n\t\ttypecombo.addSelectionListener(ms3);\n\t\t\n\t\tCombo doctorcombo = new Combo(load, SWT.NONE);\n\t\tdoctorcombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tdoctorcombo.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_doctorcombo = new FormData();\n\t\tfd_doctorcombo.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_doctorcombo.top = new FormAttachment(60);\n\t\tfd_doctorcombo.left = new FormAttachment(50);\n\t\tdoctorcombo.setLayoutData(fd_doctorcombo);\n\t\tdoctorcombo.setText(\"\\u9009\\u62E9\\u533B\\u751F\");\n\t\t\n\t\tCombo subject = new Combo(load, SWT.NONE);\n\t\tsubject.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tsubject.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tfd_subjet.right = new FormAttachment(subject, -6);\n\t\tfd_subjet.top = new FormAttachment(subject, -1, SWT.TOP);\n\t\tFormData fd_subject = new FormData();\n\t\tfd_subject.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_subject.top = new FormAttachment(50);\n\t\tfd_subject.left = new FormAttachment(50);\n\t\tsubject.setLayoutData(fd_subject);\n\t\tsubject.setText(\"\\u79D1\\u5BA4\\uFF1F\");\n\t\tsubject.add(\"神经内科\", 0);\n\t\tsubject.add(\"呼吸科\", 1);\n\t\tsubject.add(\"泌尿科\", 2);\n\t\tsubject.add(\"放射科\", 3);\n\t\tsubject.add(\"五官\", 4);\n\t\tMySelectionListener myselection = new MySelectionListener(i,subject,doctorcombo,pdtabledaoimpl);\n\t\tsubject.addSelectionListener(myselection);\n\t\t\n\t\tMySelectionListener2 ms2 = new MySelectionListener2(subject,doctorcombo,Register,nametext,RDI);\n\t\tdoctorcombo.addSelectionListener(ms2);\n\t\t\n\t\tButton surebutton = new Button(load, SWT.NONE);\n\t\tFormData fd_surebutton = new FormData();\n\t\tfd_surebutton.top = new FormAttachment(70);\n\t\tfd_surebutton.left = new FormAttachment(44);\n\t\tsurebutton.setLayoutData(fd_surebutton);\n\t\tsurebutton.setFont(SWTResourceManager.getFont(\"楷体\", 12, SWT.BOLD));\n\t\tsurebutton.setText(\"\\u786E\\u5B9A\");\n\t\tsurebutton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t Register register = new Register();\n\t\t\t\tPatientDAOImpl patientdaoimpl = new PatientDAOImpl();\n\n/*\t\t\t\tregisterdaoimpl.Save(Register);*/\n\t\t\t\tPatientInfo patientinfo = null;\n\t\t\t\tpatientinfo = patientdaoimpl.findByname(nametext.getText());\n\t\t\t\tif(patientinfo.getId() > 0 ){\n\t\t\t\t\tMessageBox messagebox = new MessageBox(load);\n\t\t\t\t\tmessagebox.setMessage(\"挂号成功!\");\n\t\t\t\t\tmessagebox.open();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tMessageBox messagebox = new MessageBox(load);\n\t\t\t\t\tmessagebox.setMessage(\"此用户不存在,请先注册\");\n\t\t\t\t\tmessagebox.open();\n\t\t\t\t\tload.dispose();\n\t\t\t\t\tregister.open();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton registerbutton = new Button(load, SWT.NONE);\n\t\tFormData fd_registerbutton = new FormData();\n\t\tfd_registerbutton.top = new FormAttachment(70);\n\t\tfd_registerbutton.left = new FormAttachment(53);\n\t\tregisterbutton.setLayoutData(fd_registerbutton);\n\t\tregisterbutton.setFont(SWTResourceManager.getFont(\"楷体\", 12, SWT.BOLD));\n\t\tregisterbutton.setText(\"\\u6CE8\\u518C\");\n\t\tregisterbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\t\n\t\t\t\tRegister register = new Register();\n\t\t\t\tload.close();\n\t\t\t\tregister.open();\n\t\t\t}\n\t\t});\n\t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "protected void createContents() throws Exception\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(755, 592);\n\t\tshell.setText(\"Impresor - Documentos v1.2\");\n\t\t\n\t\tthis.commClass.centrarVentana(shell);\n\t\t\n\t\tlistComandos = new List(shell, SWT.BORDER | SWT.H_SCROLL | SWT.COLOR_WHITE);\n\t\tlistComandos.setBounds(72, 22, 628, 498);\n\t\tlistComandos.setVisible(false);\n\n//Boton que carga los documentos\t\t\n\t\tButton btnLoaddocs = new Button(shell, SWT.NONE);\n\t\tbtnLoaddocs.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnLoaddocs.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tloadDocs(false, false);\n\t\t\t}\n\t\t});\n\t\tbtnLoaddocs.setBounds(10, 20, 200, 26);\n\t\tbtnLoaddocs.setText(\"Cargar documentos a imprimir\");\n\t\t\n//Browser donde se muestra el documento descargado\n\t\tbrowser = new Browser(shell, SWT.BORDER);\n\t\tbrowser.setBounds(10, 289, 726, 231);\n\t\tbrowser.addProgressListener(new ProgressListener() \n\t\t{\n\t\t\tpublic void changed(ProgressEvent event) {\n\t\t\t\t// Cuando cambia.\t\n\t\t\t}\n\t\t\tpublic void completed(ProgressEvent event) {\n\t\t\t\t/* Cuando se completo \n\t\t\t\t Se usa para parsear el documento una vez cargado, el documento\n\t\t\t\t puede ser un doc xml que contiene un mensaje de error\n\t\t\t\t o un doc html que dara error de parseo Xml,es decir,\n\t\t\t\t ante este error entendemos que se cargo bien el doc HTML.\n\t\t\t\t Paradojico verdad? */\n\t\t\t\tleerDocumentoCargado();\n\t\t\t}\n\t\t });\n\n///Boton para iniciar impresion\t\t\n\t\tButton btnIniPrintW = new Button(shell, SWT.NONE);\n\t\tbtnIniPrintW.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tiniciarImpresion(null);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnIniPrintW.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tiniciarImpresion(null);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnIniPrintW.setBounds(337, 532, 144, 26);\n\t\tbtnIniPrintW.setText(\"Iniciar impresion\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 52, 885, 2);\n\t\t\n\t\tButton btnSalir = new Button(shell, SWT.NONE);\n\t\tbtnSalir.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnSalir.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnSalir.setBounds(659, 532, 77, 26);\n\t\tbtnSalir.setText(\"Salir\");\n\t\t\n\t\tthreadLabel = new Label(shell, SWT.BORDER);\n\t\tthreadLabel.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t//mostrar / ocultar el historial de mensajes\n\t\t\t\tMOCmsgHist();\n\t\t\t}\n\t\t});\n\t\tthreadLabel.setAlignment(SWT.CENTER);\n\t\tthreadLabel.setBackground(new Color(display, 255,255,255));\n\t\tthreadLabel.setBounds(10, 0, 891, 18);\n\t\tthreadLabel.setText(\"\");\n\t\t\n\t\tLabel label_1 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel_1.setBounds(10, 281, 726, 2);\n\n\t\ttablaDocs = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttablaDocs.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t//PabloGo, 12 de julio de 2013\n\t\t\t\t//verifUltDocSelected(e);\n\t\t\t\tseleccionarItemMouse(e);\n\t\t\t}\n\t\t});\n\t\ttablaDocs.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tseleccionarItem(e);\n\t\t\t}\n\t\t});\n\t\ttablaDocs.setBounds(10, 52, 726, 215);\n\t\ttablaDocs.setHeaderVisible(true);\n\t\ttablaDocs.setLinesVisible(true);\n\t\tcrearColumnas(tablaDocs);\n\t\t\n//Label que muestra los mensajes\n\t\tmensajeTxt = new Label(shell, SWT.NONE);\n\t\tmensajeTxt.setAlignment(SWT.CENTER);\n\t\tmensajeTxt.setBounds(251, 146, 200, 26);\n\t\tmensajeTxt.setText(\"Espere...\");\n\t\t\n//Listado donde se muestran los documentos cargados\n\t\tlistaDocumentos = new List(shell, SWT.BORDER);\n\t\tlistaDocumentos.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t//PabloGo, 12 de julio de 2013\n\t\t\t\t//verifUltDocSelected(e);\n\t\t\t\tseleccionarItemMouse(e);\n\t\t\t}\n\t\t});\n\t\tlistaDocumentos.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tseleccionarItem(e);\n\t\t\t}\n\t\t});\n\t\tlistaDocumentos.setBounds(10, 82, 726, 77);\n\t\t\n\t\tButton btnShowPreview = new Button(shell, SWT.CHECK);\n\t\tbtnShowPreview.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tif (((Button)e.getSource()).getSelection()){\n\t\t\t\t\tmostrarPreview = true;\n\t\t\t\t}else{\n\t\t\t\t\tmostrarPreview = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnShowPreview.setBounds(215, 28, 118, 18);\n\t\tbtnShowPreview.setText(\"Mostrar preview\");\n\t\t\n\t\tButton btnAutoRefresh = new Button(shell, SWT.CHECK);\n\t\tbtnAutoRefresh.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tif (((Button)e.getSource()).getSelection()){\n\t\t\t\t\tautoRefresh = true;\n\t\t\t\t\tbeginTarea();\n\t\t\t\t}else{\n\t\t\t\t\tautoRefresh = false;\n\t\t\t\t\tponerMsg(\"Carga automática desactivada\");\n\t\t\t\t\tfinishTarea();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnAutoRefresh.setBounds(353, 28, 128, 18);\n\t\tbtnAutoRefresh.setText(\"Recarga Automática\");\n\t\t\n\t\ttareaBack(this, autoRefresh).start();\n\t\tloadDocs(false, false);\n\t}", "private void createContents() {\r\n shell = new Shell(getParent(), getStyle());\r\n shell.setSize(650, 300);\r\n shell.setText(getText());\r\n\r\n shell.setLayout(new FormLayout());\r\n\r\n lblSOName = new Label(shell, SWT.CENTER);\r\n lblSOName.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_lblSOName = new FormData();\r\n fd_lblSOName.bottom = new FormAttachment(0, 20);\r\n fd_lblSOName.right = new FormAttachment(100, -2);\r\n fd_lblSOName.top = new FormAttachment(0, 2);\r\n fd_lblSOName.left = new FormAttachment(0, 2);\r\n lblSOName.setLayoutData(fd_lblSOName);\r\n lblSOName.setText(soName);\r\n\r\n tableParams = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);\r\n tableParams.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_tableParams = new FormData();\r\n fd_tableParams.bottom = new FormAttachment(100, -40);\r\n fd_tableParams.right = new FormAttachment(100, -2);\r\n fd_tableParams.top = new FormAttachment(0, 22);\r\n fd_tableParams.left = new FormAttachment(0, 2);\r\n tableParams.setLayoutData(fd_tableParams);\r\n tableParams.setHeaderVisible(true);\r\n tableParams.setLinesVisible(true);\r\n fillInTable(tableParams);\r\n tableParams.addControlListener(new ControlAdapter() {\r\n\r\n @Override\r\n public void controlResized(ControlEvent e) {\r\n Table table = (Table)e.getSource();\r\n table.getColumn(0).setWidth((int)(table.getClientArea().width*nameSpace));\r\n table.getColumn(1).setWidth((int)(table.getClientArea().width*valueSpace));\r\n table.getColumn(2).setWidth((int)(table.getClientArea().width*hintSpace));\r\n }\r\n });\r\n tableParams.pack();\r\n //paramName.pack();\r\n //paramValue.pack();\r\n\r\n final TableEditor editor = new TableEditor(tableParams);\r\n //The editor must have the same size as the cell and must\r\n //not be any smaller than 50 pixels.\r\n editor.horizontalAlignment = SWT.LEFT;\r\n editor.grabHorizontal = true;\r\n editor.minimumWidth = 50;\r\n // editing the second column\r\n tableParams.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n // Identify the selected row\r\n TableItem item = (TableItem) e.item;\r\n if (item == null) {\r\n return;\r\n }\r\n\r\n // The control that will be the editor must be a child of the Table\r\n IReplaceableParam<?> editedParam = (IReplaceableParam<?>)item.getData(DATA_VALUE_PARAM);\r\n if (editedParam != null) {\r\n // Clean up any previous editor control\r\n Control oldEditor = editor.getEditor();\r\n if (oldEditor != null) {\r\n oldEditor.dispose();\r\n }\r\n\r\n Control editControl = null;\r\n String cellText = item.getText(columnValueIndex);\r\n switch (editedParam.getType()) {\r\n case BOOLEAN:\r\n Combo cmb = new Combo(tableParams, SWT.READ_ONLY);\r\n String[] booleanItems = {Boolean.toString(true), Boolean.toString(false)};\r\n cmb.setItems(booleanItems);\r\n cmb.select(1);\r\n if (Boolean.parseBoolean(cellText)) {\r\n cmb.select(0);\r\n }\r\n editControl = cmb;\r\n cmb.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n Combo text = (Combo) editor.getEditor();\r\n editor.getItem().setText(columnValueIndex, text.getText());\r\n }\r\n });\r\n break;\r\n case DATE:\r\n IReplaceableParam<LocalDateTime> calParam = (IReplaceableParam<LocalDateTime>)editedParam;\r\n LocalDateTime calToUse = calParam.getValue();\r\n Composite dateAndTime = new Composite(tableParams, SWT.NONE);\r\n RowLayout rl = new RowLayout();\r\n rl.wrap = false;\r\n dateAndTime.setLayout(rl);\r\n //Date cellDt;\r\n try {\r\n LocalDateTime locDT = LocalDateTime.parse(cellText, dtFmt);\r\n if (locDT != null) {\r\n calToUse = locDT;\r\n }\r\n /*cellDt = dateFmt.parse(cellText);\r\n if (cellDt != null) {\r\n calToUse.setTime(cellDt);\r\n }*/\r\n } catch (DateTimeParseException e1) {\r\n log.error(\"widgetSelected \", e1);\r\n }\r\n\r\n DateTime datePicker = new DateTime(dateAndTime, SWT.DATE | SWT.MEDIUM | SWT.DROP_DOWN);\r\n datePicker.setData(DATA_VALUE_PARAM, calParam);\r\n DateTime timePicker = new DateTime(dateAndTime, SWT.TIME | SWT.LONG);\r\n timePicker.setData(DATA_VALUE_PARAM, calParam);\r\n // for the date picker the months are zero-based, the first month is 0 the last is 11\r\n // for LocalDateTime the months range 1-12\r\n datePicker.setDate(calToUse.getYear(), calToUse.getMonthValue() - 1,\r\n calToUse.getDayOfMonth());\r\n timePicker.setTime(calToUse.getHour(), calToUse.getMinute(),\r\n calToUse.getSecond());\r\n\r\n datePicker.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n DateTime source = (DateTime)se.getSource();\r\n IReplaceableParam<LocalDateTime> calParam1 = (IReplaceableParam<LocalDateTime>)source.getData(DATA_VALUE_PARAM);\r\n if (calParam1 != null) {\r\n LocalDateTime currDt = calParam1.getValue();\r\n // for the date picker the months are zero-based, the first month is 0 the last is 11\r\n // for LocalDateTime the months range 1-12\r\n calParam1.setValue(currDt.withYear(source.getYear()).withMonth(source.getMonth() + 1).withDayOfMonth(source.getDay()));\r\n String resultText = dtFmt.format(calParam1.getValue());\r\n log.debug(\"Result Text \" + resultText);\r\n editor.getItem().setText(columnValueIndex, resultText);\r\n } else {\r\n log.warn(\"widgetSelected param is null\");\r\n }\r\n }\r\n\r\n });\r\n timePicker.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n DateTime source = (DateTime)se.getSource();\r\n IReplaceableParam<LocalDateTime> calParam1 = (IReplaceableParam<LocalDateTime>)source.getData(DATA_VALUE_PARAM);\r\n if (calParam1 != null) {\r\n LocalDateTime currDt = calParam1.getValue();\r\n calParam1.setValue(currDt.withHour(source.getHours()).withMinute(source.getMinutes()).withSecond(source.getSeconds()));\r\n String resultText = dtFmt.format(calParam1.getValue());\r\n log.debug(\"Result Text \" + resultText);\r\n editor.getItem().setText(columnValueIndex, resultText);\r\n } else {\r\n log.warn(\"widgetSelected param is null\");\r\n }\r\n }\r\n\r\n });\r\n dateAndTime.layout();\r\n editControl = dateAndTime;\r\n break;\r\n case INTEGER:\r\n Text intEditor = new Text(tableParams, SWT.NONE);\r\n intEditor.setText(item.getText(columnValueIndex));\r\n intEditor.selectAll();\r\n intEditor.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent se) {\r\n Text text = (Text) editor.getEditor();\r\n Integer resultInt = null;\r\n try {\r\n resultInt = Integer.parseInt(text.getText());\r\n } catch (NumberFormatException nfe) {\r\n log.error(\"NFE \", nfe);\r\n }\r\n if (resultInt != null) {\r\n editor.getItem().setText(columnValueIndex, resultInt.toString());\r\n }\r\n }\r\n });\r\n editControl = intEditor;\r\n break;\r\n case STRING:\r\n default:\r\n Text newEditor = new Text(tableParams, SWT.NONE);\r\n newEditor.setText(item.getText(columnValueIndex));\r\n newEditor.setFont(tableParams.getFont());\r\n newEditor.selectAll();\r\n newEditor.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent se) {\r\n Text text = (Text) editor.getEditor();\r\n editor.getItem().setText(columnValueIndex, text.getText());\r\n }\r\n });\r\n editControl = newEditor;\r\n break;\r\n }\r\n\r\n editControl.setFont(tableParams.getFont());\r\n editControl.setFocus();\r\n editor.setEditor(editControl, item, columnValueIndex);\r\n }\r\n }\r\n });\r\n\r\n\r\n btnOK = new Button(shell, SWT.NONE);\r\n btnOK.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_btnOK = new FormData();\r\n fd_btnOK.bottom = new FormAttachment(100, -7);\r\n fd_btnOK.right = new FormAttachment(40, 2);\r\n fd_btnOK.top = new FormAttachment(100, -35);\r\n fd_btnOK.left = new FormAttachment(15, 2);\r\n btnOK.setLayoutData(fd_btnOK);\r\n btnOK.setText(\"OK\");\r\n btnOK.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n result = new DialogResult<>(SWT.OK, getParamMap());\r\n shell.close();\r\n }\r\n\r\n });\r\n shell.setDefaultButton(btnOK);\r\n\r\n btnCancel = new Button(shell, SWT.NONE);\r\n btnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_btnCancel = new FormData();\r\n fd_btnCancel.bottom = new FormAttachment(100, -7);\r\n fd_btnCancel.left = new FormAttachment(60, -2);\r\n fd_btnCancel.top = new FormAttachment(100, -35);\r\n fd_btnCancel.right = new FormAttachment(85, -2);\r\n btnCancel.setLayoutData(fd_btnCancel);\r\n btnCancel.setText(\"Cancel\");\r\n btnCancel.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n result = new DialogResult<>(SWT.CANCEL, null);\r\n shell.close();\r\n }\r\n\r\n });\r\n tableParams.redraw();\r\n }", "public void createContents()\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"TTS - Task Tracker System\");\n\t\t\n\t\tbtnLogIn = new Button(shell, SWT.NONE);\n\t\tbtnLogIn.setBounds(349, 84, 75, 25);\n\t\tbtnLogIn.setText(\"Log In\");\n\t\tbtnLogIn.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tif (cboxUserDropDown.getText() != \"\"\n\t\t\t\t\t\t&& cboxUserDropDown.getSelectionIndex() >= 0)\n\t\t\t\t{\n\t\t\t\t\tString selectedUserName = cboxUserDropDown.getText();\n\t\t\t\t\tusers.setLoggedInUser(selectedUserName);\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\tnew TaskMainViewWindow(AccessUsers.getLoggedInUser());\n\t\t\t\t\tdisplay.wake();\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tshell.forceFocus();\n\t\t\t\t\tshell.setActive();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnQuit = new Button(shell, SWT.CENTER);\n\t\tbtnQuit.setBounds(349, 227, 75, 25);\n\t\tbtnQuit.setText(\"Quit\");\n\t\tbtnQuit.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcboxUserDropDown = new Combo(shell, SWT.READ_ONLY);\n\t\tcboxUserDropDown.setBounds(146, 86, 195, 23);\n\t\t\n\t\tinitUserDropDown();\n\t\t\n\t\tlblNewLabel = new Label(shell, SWT.CENTER);\n\t\tlblNewLabel.setBounds(197, 21, 183, 25);\n\t\tlblNewLabel.setFont(new Font(display, \"Times\", 14, SWT.BOLD));\n\t\tlblNewLabel.setForeground(new Color(display, 200, 0, 0));\n\t\tlblNewLabel.setText(\"Task Tracker System\");\n\t\t\n\t\ticon = new Label(shell, SWT.BORDER);\n\t\ticon.setLocation(0, 0);\n\t\ticon.setSize(140, 111);\n\t\ticon.setImage(new Image(null, \"images/task.png\"));\n\t\t\n\t\tbtnCreateUser = new Button(shell, SWT.NONE);\n\t\tbtnCreateUser.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tshell.setEnabled(false);\n\t\t\t\tnew CreateUserWindow(users);\n\t\t\t\tshell.setEnabled(true);\n\t\t\t\tinitUserDropDown();\n\t\t\t\tshell.forceFocus();\n\t\t\t\tshell.setActive();\n\t\t\t}\n\t\t});\n\t\tbtnCreateUser.setBounds(349, 115, 75, 25);\n\t\tbtnCreateUser.setText(\"Create User\");\n\t\t\n\t}", "protected void createContents() {\n\t\t\n\t\tshlMailview = new Shell();\n\t\tshlMailview.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellClosed(ShellEvent e) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tshlMailview.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tshlMailview.setSize(1124, 800);\n\t\tshlMailview.setText(\"MailView\");\n\t\tshlMailview.setLayout(new BorderLayout(0, 0));\t\t\n\t\t\n\t\tMenu menu = new Menu(shlMailview, SWT.BAR);\n\t\tshlMailview.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u0413\\u043B\\u0430\\u0432\\u043D\\u0430\\u044F\");\n\t\t\n\t\tMenu mainMenu = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(mainMenu);\n\t\t\n\t\tMenuItem menuItem = new MenuItem(mainMenu, SWT.NONE);\n\t\tmenuItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmyThready.stop();// interrupt();\n\t\t\t\tmyThready = new Thread(timer);\n\t\t\t\tmyThready.setDaemon(true);\n\t\t\t\tmyThready.start();\n\t\t\t}\n\t\t});\n\t\tmenuItem.setText(\"\\u041E\\u0431\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C\");\n\t\t\n\t\tMenuItem exitMenu = new MenuItem(mainMenu, SWT.NONE);\n\t\texitMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\t\t\t\t\n\t\t\t\tshlMailview.close();\n\t\t\t}\n\t\t});\n\t\texitMenu.setText(\"\\u0412\\u044B\\u0445\\u043E\\u0434\");\n\t\t\n\t\tMenuItem filtrMenu = new MenuItem(menu, SWT.NONE);\n\t\tfiltrMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfilterDialog fd = new filterDialog(shlMailview, 0);\n\t\t\t\tfd.open();\n\t\t\t}\n\t\t});\n\t\tfiltrMenu.setText(\"\\u0424\\u0438\\u043B\\u044C\\u0442\\u0440\");\n\t\t\n\t\tMenuItem settingsMenu = new MenuItem(menu, SWT.NONE);\n\t\tsettingsMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tsettingDialog sd = new settingDialog(shlMailview, 0);\n\t\t\t\tsd.open();\n\t\t\t}\n\t\t});\n\t\tsettingsMenu.setText(\"\\u041D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438\");\n\t\t\n\t\tfinal TabFolder tabFolder = new TabFolder(shlMailview, SWT.NONE);\n\t\ttabFolder.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(tabFolder.getSelectionIndex() == 1)\n\t\t\t\t{\n\t\t\t\t\tservice.RepaintAccount(accountsTable);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttabFolder.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\t\n\t\tTabItem lettersTab = new TabItem(tabFolder, SWT.NONE);\n\t\tlettersTab.setText(\"\\u041F\\u0438\\u0441\\u044C\\u043C\\u0430\");\n\t\t\n\t\tComposite composite_2 = new Composite(tabFolder, SWT.NONE);\n\t\tlettersTab.setControl(composite_2);\n\t\tcomposite_2.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite_4 = new Composite(composite_2, SWT.NONE);\n\t\tFormData fd_composite_4 = new FormData();\n\t\tfd_composite_4.bottom = new FormAttachment(0, 81);\n\t\tfd_composite_4.top = new FormAttachment(0);\n\t\tfd_composite_4.left = new FormAttachment(0);\n\t\tfd_composite_4.right = new FormAttachment(0, 1100);\n\t\tcomposite_4.setLayoutData(fd_composite_4);\n\t\t\n\t\tComposite composite_5 = new Composite(composite_2, SWT.NONE);\n\t\tcomposite_5.setLayout(new BorderLayout(0, 0));\n\t\tFormData fd_composite_5 = new FormData();\n\t\tfd_composite_5.bottom = new FormAttachment(composite_4, 281, SWT.BOTTOM);\n\t\tfd_composite_5.left = new FormAttachment(composite_4, 0, SWT.LEFT);\n\t\tfd_composite_5.right = new FormAttachment(composite_4, 0, SWT.RIGHT);\n\t\tfd_composite_5.top = new FormAttachment(composite_4, 6);\n\t\tcomposite_5.setLayoutData(fd_composite_5);\n\t\t\n\t\tComposite composite_10 = new Composite(composite_2, SWT.NONE);\n\t\tFormData fd_composite_10 = new FormData();\n\t\tfd_composite_10.top = new FormAttachment(composite_5, 6);\n\t\tfd_composite_10.bottom = new FormAttachment(100, -10);\n\t\t\n\t\tlettersTable = new Table(composite_5, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tlettersTable.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\titem.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.NONE));\n\t\t\t\t\tbox.Preview(Integer.parseInt(item.getText(0)));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tlettersTable.setLinesVisible(true);\n\t\tlettersTable.setHeaderVisible(true);\n\t\tTableColumn msgId = new TableColumn(lettersTable, SWT.NONE);\n\t\tmsgId.setResizable(false);\n\t\tmsgId.setText(\"ID\");\n\t\t\n\t\tTableColumn from = new TableColumn(lettersTable, SWT.NONE);\n\t\tfrom.setWidth(105);\n\t\tfrom.setText(\"\\u041E\\u0442\");\n\t\tfrom.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn to = new TableColumn(lettersTable, SWT.NONE);\n\t\tto.setWidth(111);\n\t\tto.setText(\"\\u041A\\u043E\\u043C\\u0443\");\n\t\tto.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn subject = new TableColumn(lettersTable, SWT.NONE);\n\t\tsubject.setWidth(406);\n\t\tsubject.setText(\"\\u0422\\u0435\\u043C\\u0430\");\n\t\tsubject.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn created = new TableColumn(lettersTable, SWT.NONE);\n\t\tcreated.setWidth(176);\n\t\tcreated.setText(\"\\u0421\\u043E\\u0437\\u0434\\u0430\\u043D\\u043E\");\n\t\tcreated.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.DATE_COMPARATOR));\n\t\t\n\t\tTableColumn received = new TableColumn(lettersTable, SWT.NONE);\n\t\treceived.setWidth(194);\n\t\treceived.setText(\"\\u041F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D\\u043E\");\n\t\treceived.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.DATE_COMPARATOR));\t\t\n\t\t\n\t\tMenu popupMenuLetter = new Menu(lettersTable);\n\t\tlettersTable.setMenu(popupMenuLetter);\n\t\t\n\t\tMenuItem miUpdate = new MenuItem(popupMenuLetter, SWT.NONE);\n\t\tmiUpdate.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmyThready.stop();// interrupt();\n\t\t\t\tmyThready = new Thread(timer);\n\t\t\t\tmyThready.setDaemon(true);\n\t\t\t\tmyThready.start();\n\t\t\t}\n\t\t});\n\t\tmiUpdate.setText(\"\\u041E\\u0431\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C\");\n\t\t\n\t\tfinal MenuItem miDelete = new MenuItem(popupMenuLetter, SWT.NONE);\n\t\tmiDelete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\tbox.deleteMessage(Integer.parseInt(item.getText(0)), lettersTable.getSelectionIndex());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmiDelete.setText(\"\\u0412 \\u043A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0443\");\n\t\tfd_composite_10.right = new FormAttachment(composite_4, 0, SWT.RIGHT);\n\t\t\n\t\tfinal Button btnInbox = new Button(composite_4, SWT.NONE);\n\t\tfinal Button btnTrash = new Button(composite_4, SWT.NONE);\n\t\t\n\t\tbtnInbox.setBounds(10, 10, 146, 39);\n\t\tbtnInbox.setEnabled(false);\n\t\tbtnInbox.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSetting.Instance().SetTab(false);\t\t\t\t\n\t\t\t\tbtnInbox.setEnabled(false);\n\t\t\t\tmiDelete.setText(\"\\u0412 \\u043A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0443\");\n\t\t\t\tbtnTrash.setEnabled(true);\n\t\t\t\tbox.rePaint();\n\t\t\t}\n\t\t});\n\t\tbtnInbox.setText(\"\\u0412\\u0445\\u043E\\u0434\\u044F\\u0449\\u0438\\u0435\");\n\t\tbtnTrash.setLocation(170, 10);\n\t\tbtnTrash.setSize(146, 39);\n\t\tbtnTrash.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSetting.Instance().SetTab(true);\n\t\t\t\tbtnInbox.setEnabled(true);\n\t\t\t\tmiDelete.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\t\tbtnTrash.setEnabled(false);\n\t\t\t\tbox.rePaint();\n\t\t\t}\n\t\t});\n\t\tbtnTrash.setText(\"\\u041A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0430\");\n\t\t\n\t\tButton deleteLetter = new Button(composite_4, SWT.NONE);\n\t\tdeleteLetter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\tbox.deleteMessage(Integer.parseInt(item.getText(0)), lettersTable.getSelectionIndex());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdeleteLetter.setLocation(327, 11);\n\t\tdeleteLetter.setSize(146, 37);\n\t\tdeleteLetter.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tdeleteLetter.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\n\t\tLabel label = new Label(composite_4, SWT.NONE);\n\t\tlabel.setLocation(501, 17);\n\t\tlabel.setSize(74, 27);\n\t\tlabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tlabel.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\t\n\t\tCombo listAccounts = new Combo(composite_4, SWT.NONE);\n\t\tlistAccounts.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlistAccounts.setLocation(583, 19);\n\t\tlistAccounts.setSize(180, 23);\n\t\tlistAccounts.setItems(new String[] {\"\\u0412\\u0441\\u0435\"});\n\t\tlistAccounts.select(0);\n\t\t\n\t\tprogressBar = new ProgressBar(composite_4, SWT.NONE);\n\t\tprogressBar.setBounds(10, 64, 263, 17);\n\t\tfd_composite_10.left = new FormAttachment(0);\n\t\tcomposite_10.setLayoutData(fd_composite_10);\n\t\t\n\t\theaderMessage = new Text(composite_10, SWT.BORDER);\n\t\theaderMessage.setFont(SWTResourceManager.getFont(\"Segoe UI\", 14, SWT.NORMAL));\n\t\theaderMessage.setBounds(0, 0, 1100, 79);\n\t\t\n\t\tsc = new ScrolledComposite(composite_10, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tsc.setBounds(0, 85, 1100, 230);\n\t\tsc.setExpandHorizontal(true);\n\t\tsc.setExpandVertical(true);\t\t\n\t\t\n\t\tTabItem accountsTab = new TabItem(tabFolder, SWT.NONE);\n\t\taccountsTab.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u044B\");\n\t\t\n\t\tComposite accountComposite = new Composite(tabFolder, SWT.NONE);\n\t\taccountsTab.setControl(accountComposite);\n\t\taccountComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\t\n\t\t\tLabel labelListAccounts = new Label(accountComposite, SWT.NONE);\n\t\t\tlabelListAccounts.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\t\tlabelListAccounts.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\tlabelListAccounts.setBounds(10, 37, 148, 31);\n\t\t\tlabelListAccounts.setText(\"\\u0421\\u043F\\u0438\\u0441\\u043E\\u043A \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u043E\\u0432\");\n\t\t\t\n\t\t\tComposite Actions = new Composite(accountComposite, SWT.NONE);\n\t\t\tActions.setBounds(412, 71, 163, 234);\n\t\t\t\n\t\t\tButton addAccount = new Button(Actions, SWT.NONE);\n\t\t\taddAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tAccountDialog ad = new AccountDialog(shlMailview, accountsTable, true);\n\t\t\t\t\tad.open();\n\t\t\t\t}\n\t\t\t});\n\t\t\taddAccount.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\t\taddAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\taddAccount.setBounds(10, 68, 141, 47);\n\t\t\taddAccount.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tButton editAccount = new Button(Actions, SWT.NONE);\n\t\t\teditAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\tAccountDialog ad = new AccountDialog(shlMailview, accountsTable, false);\n\t\t\t\t\tad.open();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\teditAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\teditAccount.setBounds(10, 121, 141, 47);\n\t\t\teditAccount.setText(\"\\u0418\\u0437\\u043C\\u0435\\u043D\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tButton deleteAccount = new Button(Actions, SWT.NONE);\n\t\t\tdeleteAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tTableItem item = accountsTable.getSelection()[0];\n\t\t\t\t\t\tif(MessageDialog.openConfirm(shlMailview, \"Удаление\", \"Вы хотите удалить учетную запись \" + item.getText(1)+\"?\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tservice.DeleteAccount(item.getText(0));\n\t\t\t\t\t\t\tservice.RepaintAccount(accountsTable);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tdeleteAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\t\t\t\n\t\t\tdeleteAccount.setBounds(10, 174, 141, 47);\n\t\t\tdeleteAccount.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tfinal Button Include = new Button(Actions, SWT.NONE);\n\t\t\tInclude.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tTableItem item = accountsTable.getSelection()[0];\n\t\t\t\t\t\tservice.toogleIncludeAccount(item.getText(0));\n\t\t\t\t\t\tservice.RepaintAccount(accountsTable);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tInclude.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\tInclude.setBounds(10, 10, 141, 47);\n\t\t\tInclude.setText(\"\\u0412\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\n\t\t\taccountsTable = new Table(accountComposite, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);\n\t\t\taccountsTable.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getSelection()[0].getText(2)==\"Включен\")\n\t\t\t\t\t{\n\t\t\t\t\t\tInclude.setText(\"\\u0412\\u044B\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tInclude.setText(\"\\u0412\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\taccountsTable.setBounds(10, 74, 396, 296);\n\t\t\taccountsTable.setHeaderVisible(true);\n\t\t\taccountsTable.setLinesVisible(true);\n\t\t\t\n\t\t\tTableColumn tblclmnId = new TableColumn(accountsTable, SWT.NONE);\n\t\t\ttblclmnId.setWidth(35);\n\t\t\ttblclmnId.setText(\"ID\");\n\t\t\t//accountsTable.setRedraw(false);\n\t\t\t\n\t\t\tTableColumn columnLogin = new TableColumn(accountsTable, SWT.LEFT);\n\t\t\tcolumnLogin.setWidth(244);\n\t\t\tcolumnLogin.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\t\t\n\t\t\tTableColumn columnState = new TableColumn(accountsTable, SWT.LEFT);\n\t\t\tcolumnState.setWidth(100);\n\t\t\tcolumnState.setText(\"\\u0421\\u043E\\u0441\\u0442\\u043E\\u044F\\u043D\\u0438\\u0435\");\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setModified(true);\n\t\tshell.setSize(512, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(null);\n\n\t\tLabel label = new Label(shell, SWT.SEPARATOR | SWT.VERTICAL);\n\t\tlabel.setBounds(253, 26, 2, 225);\n\n\t\tcomboCarBrandBuy = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarBrandBuy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tlabel_1.setText(\"Selected\");\n\t\t\t}\n\t\t});\n\t\tcomboCarBrandBuy.setItems(new String[] {\"Maruti\", \"Fiat\", \"Tata\", \"Ford\", \"Honda\", \"Hyundai\"});\n\t\tcomboCarBrandBuy.setBounds(87, 33, 123, 23);\n\t\tcomboCarBrandBuy.setText(\"--select--\");\n\n\t\tLabel lblCarBrand = new Label(shell, SWT.NONE);\n\t\tlblCarBrand.setAlignment(SWT.RIGHT);\n\t\tlblCarBrand.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblCarBrand.setBounds(12, 38, 71, 15);\n\t\tlblCarBrand.setText(\"Car Brand :\");\n\n\t\ttextCarNameBuy = new Text(shell, SWT.BORDER);\n\t\ttextCarNameBuy.setBounds(87, 67, 123, 21);\n\n\t\tLabel lblCarName = new Label(shell, SWT.NONE);\n\t\tlblCarName.setAlignment(SWT.RIGHT);\n\t\tlblCarName.setText(\"Car Name :\");\n\t\tlblCarName.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblCarName.setBounds(12, 70, 71, 15);\n\n\t\tcomboCarModelBuy = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarModelBuy.setItems(new String[] {\"2015\", \"2014\", \"2013\", \"2012\", \"2011\", \"2010\", \"2009\", \"2008\", \"2007\", \"2006\", \"2005\", \"2004\", \"2003\", \"2002\", \"2001\", \"2000\"});\n\t\tcomboCarModelBuy.setBounds(87, 99, 91, 23);\n\t\tcomboCarModelBuy.setText(\"--select--\");\n\n\t\tLabel lblModelYear = new Label(shell, SWT.NONE);\n\t\tlblModelYear.setAlignment(SWT.RIGHT);\n\t\tlblModelYear.setText(\"Model :\");\n\t\tlblModelYear.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblModelYear.setBounds(12, 105, 71, 15);\n\n\t\tButton buttonBuy = new Button(shell, SWT.NONE);\n\t\tbuttonBuy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\n\t\t\t\tString carName = textCarNameBuy.getText();\n\t\t\t\tString carModel = comboCarModelBuy.getText();\n\n\t\t\t\tif(comboCarBrandBuy.getText().equalsIgnoreCase(\"maruti\")){\n\t\t\t\t\tmarutiMap.put(carName, carModel);\n\t\t\t\t}\n\n\t\t\t\tlabel_1.setText(\"Added to Inventory\");\n\t\t\t\tSystem.out.println(marutiMap);\n\t\t\t}\n\t\t});\n\t\tbuttonBuy.setBounds(87, 138, 63, 25);\n\t\tbuttonBuy.setText(\"BUY\");\n\n\t\tlabel_1 = new Label(shell, SWT.BORDER | SWT.HORIZONTAL | SWT.CENTER);\n\t\tlabel_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\tlabel_1.setBounds(73, 198, 137, 19);\n\n\t\tLabel lblStatus = new Label(shell, SWT.NONE);\n\t\tlblStatus.setBounds(22, 198, 45, 15);\n\t\tlblStatus.setText(\"Status :\");\n\n\t\tLabel label_2 = new Label(shell, SWT.NONE);\n\t\tlabel_2.setText(\"Car Brand :\");\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_2.setAlignment(SWT.RIGHT);\n\t\tlabel_2.setBounds(280, 38, 71, 15);\n\n\t\tcomboCarBrandSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarBrandSell.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\n\t\t\t\tString carBrand = comboCarBrandSell.getText();\n\t\t\t\tcomboCarNameSell.clearSelection();\n\t\t\t\t\n\t\t\t\tif(carBrand.equalsIgnoreCase(\"maruti\")){\n\t\t\t\t\tSet<String> keyList = marutiMap.keySet();\n\t\t\t\t\tint i=0;\n\t\t\t\t\tfor(String key : keyList){\n\t\t\t\t\t\tcarNames.add(key);\n\t\t\t\t\t\t//comboCarNameSell.setItem(i, key);\n\t\t\t\t\t\t//i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tString[] strArray = (String[]) carNames.toArray(new String[0]);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcomboCarNameSell.setItems(strArray);\n\n\t\t\t}\n\t\t});\n\t\tcomboCarBrandSell.setItems(new String[] {\"Maruti\", \"Fiat\", \"Tata\", \"Ford\", \"Honda\", \"Hyundai\"});\n\t\tcomboCarBrandSell.setBounds(355, 33, 123, 23);\n\t\tcomboCarBrandSell.setText(\"--select--\");\n\n\t\tLabel label_3 = new Label(shell, SWT.NONE);\n\t\tlabel_3.setText(\"Car Name :\");\n\t\tlabel_3.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_3.setAlignment(SWT.RIGHT);\n\t\tlabel_3.setBounds(280, 70, 71, 15);\n\n\t\tLabel label_4 = new Label(shell, SWT.NONE);\n\t\tlabel_4.setText(\"Model :\");\n\t\tlabel_4.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_4.setAlignment(SWT.RIGHT);\n\t\tlabel_4.setBounds(280, 105, 71, 15);\n\n\t\tCombo comboCarModelSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarModelSell.setItems(new String[] {\"2015\", \"2014\", \"2013\", \"2012\", \"2011\", \"2010\", \"2009\", \"2008\", \"2007\", \"2006\", \"2005\", \"2004\", \"2003\", \"2002\", \"2001\", \"2000\"});\n\t\tcomboCarModelSell.setBounds(355, 99, 91, 23);\n\t\tcomboCarModelSell.setText(\"--select--\");\n\n\t\tButton buttonSell = new Button(shell, SWT.NONE);\n\t\tbuttonSell.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tlabel_5.setText(\"Sold Successfully\");\n\t\t\t}\n\t\t});\n\t\tbuttonSell.setText(\"SELL\");\n\t\tbuttonSell.setBounds(355, 138, 63, 25);\n\n\t\tlabel_5 = new Label(shell, SWT.BORDER | SWT.HORIZONTAL | SWT.CENTER);\n\t\tlabel_5.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_5.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\tlabel_5.setBounds(341, 198, 137, 19);\n\n\t\tLabel label_6 = new Label(shell, SWT.NONE);\n\t\tlabel_6.setText(\"Status :\");\n\t\tlabel_6.setBounds(290, 198, 45, 15);\n\n\t\tcomboCarNameSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarNameSell.setItems(new String[] {});\n\t\tcomboCarNameSell.setBounds(355, 65, 123, 23);\n\t\tcomboCarNameSell.setText(\"--select--\");\n\n\t}", "private void createContents() {\n\t\tshlAbout = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE);\n\t\tshlAbout.setMinimumSize(new Point(800, 600));\n\t\tshlAbout.setSize(800, 688);\n\t\tshlAbout.setText(\"About\");\n\t\t\n\t\tLabel lblKelimetrikAPsycholinguistic = new Label(shlAbout, SWT.CENTER);\n\t\tlblKelimetrikAPsycholinguistic.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tlblKelimetrikAPsycholinguistic.setBounds(0, 10, 784, 21);\n\t\tlblKelimetrikAPsycholinguistic.setText(\"KelimetriK: A psycholinguistic tool of Turkish\");\n\t\t\n\t\tScrolledComposite scrolledComposite = new ScrolledComposite(shlAbout, SWT.BORDER | SWT.V_SCROLL);\n\t\tscrolledComposite.setBounds(0, 37, 774, 602);\n\t\tscrolledComposite.setExpandHorizontal(true);\n\t\tscrolledComposite.setExpandVertical(true);\n\t\t\n\t\tComposite composite = new Composite(scrolledComposite, SWT.NONE);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setSize(107, 21);\n\t\tlabel.setText(\"Introduction\");\n\t\tlabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\n\t\tLabel label_1 = new Label(composite, SWT.WRAP);\n\t\tlabel_1.setLocation(0, 27);\n\t\tlabel_1.setSize(753, 157);\n\t\tlabel_1.setText(\"Selection of appropriate words for a fully controlled word stimuli set is an essential component for conducting an effective psycholinguistic studies (Perea, & Polatsek, 1998; Bowers, Davis, & Hanley, 2004). For example, if the word stimuli set of a visual word recognition study is full of high frequency words, this may create a bias on the behavioral scores and would lead to incorrect inferences about the hypothesis. Thus, experimenters who are intended to work with any kind of verbal stimuli should consider such linguistic variables to obtain reliable results.\\r\\n\\r\\nKelimetriK is a query-based software program designed to demonstrate several lexical variables and orthographic statistics of words. As shown in Figure X, the user-friendly interface of KelimetriK is an easy-to-use software developed to be a helpful source experimenters who are preparing verbal stimuli sets for psycholinguistic studies. KelimetriK provides information about several lexical properties of word-frequency, neighborhood size, orthographic similarity and relatedness. KelimetriK\\u2019s counterparts in other language are N-watch in English (Davis, 2005) and BuscaPalabras in Spanish (Davis, & Perea, 2005).\");\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setLocation(0, 190);\n\t\tlabel_2.setSize(753, 21);\n\t\tlabel_2.setText(\"The lexical variables in KelimetriK Software\");\n\t\tlabel_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\n\t\tLabel label_3 = new Label(composite, SWT.WRAP);\n\t\tlabel_3.setBounds(0, 228, 753, 546);\n\t\tlabel_3.setText(\"Output lexical variables (and orthographic statistics) in KelimetriK are word-frequency, bigram and tri-gram frequency and average frequency values, orthographic neighborhood size (Coltheart\\u2019s N), orthographic Levensthein distance 20 (OLD20) and transposed letter and subset/superset similarity.\\r\\n\\r\\nWord frequency is a value that describes of how many times a word occurred in a given text. Research shows that there is a consistent logarithmic relationship between reaction time and word\\u2019s frequency score; the impact of effect is higher for smaller frequencies words that the effect gets smaller on higher frequency scores (Davis, 2005).\\r\\n\\r\\nBi-grams and tri-grams are are obtained by decomposing a word (string of tokens) into sequences of two and three number of neighboring elements (Manning, & Sch\\u00FCtze, 1999). For example, the Turkish word \\u201Ckule\\u201D (tower in English) can be decomposed into three different bigram sets (\\u201Cku\\u201D, \\u201Cul\\u201D, \\u201Cle\\u201D). Bigram/trigram frequency values are obtained by counting how many same letter (four in this case) words will start with first bigram set (e.g. \\u201Cku\\u201D), how many words have second bigram set in the middle (e.g. \\u201Cul\\u201D) in the middle, and how many words will end with last bigram set (\\u201Cle\\u201D) in a given lexical word database. The trigrams for the word \\u201Ckule\\u201D are \\u201Ckul\\u201D and \\u201Cule\\u201D. Average bi-gram/tri-gram frequency is obtained by adding a word\\u2019s entire bi-gram/ tri-gram frequencies and then dividing it by number of bigrams (\\u201Ckule\\u201D consist of three bigrams).\\r\\n\\r\\nOrthographic neighborhood size (Coltheart\\u2019s N) refers to number of words that can be obtained from a given lexical database word list by substituting a single letter of a word (Coltheart et al, 1977). For example, orthographic neighborhood size of the word \\u201Ckule\\u201D is 9 if searched on KelimetriK (\\u201C\\u015Fule\\u201D, \\u201Ckula\\u201D, \\u201Ckulp\\u201D, \\u201Cfule\\u201D, \\u201Ckale\\u201D, \\u201Ck\\u00F6le\\u201D, \\u201Ckele\\u201D, \\u201Ckile\\u201D, \\u201Cku\\u015Fe\\u201D). A word\\u2019s orthographic neighborhood size could influence behavioral performance in visual word recognition tasks of lexical decision, naming, perceptual identification, and semantic categorization (Perea, & Polatsek, 1998).\\r\\n\\r\\nOrthographic Levensthein distance 20 (OLD20) of a word is the average of 20 most close words in the unit of Levensthein distance (Yarkoni, Balota, & Yap, 2008). Levensthein distance between the two strings of letters is obtained by counting the minimum number of operations (substitution, deletion or insertion) required while passing from one letter string to the other (Levenshthein, 1966). Behavioral studies show that, OLD20 is negatively correlated with orthographic neighborhood size (r=-561) and positively correlated with word-length (r=868) for English words (Yarkoni, Balota, & Yap, 2008). Moreover, OLD20 explains more variance on visual word recognition scores than orthographic neighborhood size and word length (Yarkoni, Balota, & Yap, 2008).\\r\\n\\r\\nOrthographic similarity between two words means they are the neighbors of each other like the words \\u201Cal\\u0131n\\u201D (forehead in English) and \\u201Calan\\u201D (area in English). Transposed letter (TL) and subset/superset are the two most common similarities in the existing literature (Davis, 2005). TL similiarity is the case when the two letters differ from each other based on a single pair of adjacent letters as in the Turkish words of \\u201Cesen\\u201D (blustery) and \\u201Cesne\\u201D (yawn). Studies have shown that TL similarity may facilitate detection performance on naming and lexical decision task (Andrews, 1996). Subset/Superset similarity occurs when there is an embedded word in a given input word such as \\u201Cs\\u00FCt\\u201D (subset: milk in Turkish) \\u201Cs\\u00FCtun\\u201D (superset: pillar in Turkish). Presence of a subset in a word in a stimuli set may influence the subject\\u2019s reading performance, hence may create a confounding factor on the behavioral results (Bowers, Davis, & Hanley, 2005).\");\n\t\t\n\t\tLabel lblAndrewsLexical = new Label(composite, SWT.NONE);\n\t\tlblAndrewsLexical.setLocation(0, 798);\n\t\tlblAndrewsLexical.setSize(753, 296);\n\t\tlblAndrewsLexical.setText(\"Andrews (1996). Lexical retrieval and selection processes: Effects of transposed-letter confusability, Journal of Memory and Language 35, 775\\u2013800\\r\\n\\r\\nBowers, J. S., Davis, C. J., & Hanley, D. A. (2005). References automatic semantic activation of embedded words: Is there a \\u2018\\u2018hat\\u2019\\u2019 in \\u2018\\u2018that\\u2019\\u2019? Journal of Memory and Language, 52, 131-143.\\r\\n\\r\\nColtheart, M., Davelaar, E., Jonasson, J. T., & Besner, D. (1977). Access to the internal lexicon. Attention and Performance, 6, 535-555.\\r\\n\\r\\nDavis, C. J. (2005). N-Watch: A program for deriving neighborhood size and other psycholinguistic statistics. Behavior Research Methods, 37, 65-70.\\r\\n\\r\\nDavis, C. J., & Parea, M. (2005). BuscaPalabras: A program for deriving orthographic and phonological neighborhood statistics and other psycholinguistic indices in Spanish. Behavior Research Methods, 37, 665-671.\\r\\n\\r\\nLevenshtein, V. I. (1966, February). Binary codes capable of correcting deletions, insertions and reversals. In Soviet physics doklady (Vol. 10, p. 707).\\r\\n\\r\\nManning, C. D., & Sch\\u00FCtze, H. (1999). Foundations of statistical natural language processing. MIT press.\\r\\n\\r\\nPerea, M., & Pollatsek, A. (1998). The effects of neighborhood frequency in reading and lexical decision. Journal of Experimental Psychology, 24, 767-779.\\r\\n\\r\\nYarkoni, T., Balota, D., & Yap, M. (2008). Moving beyond Coltheart\\u2019s N: A new measure of orthographic similarity. Psychonomic Bulletin & Review, 15(5), 971-979.\\r\\n\");\n\t\t\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tlabel_4.setBounds(0, 771, 753, 21);\n\t\tlabel_4.setText(\"References\");\n\t\tlabel_4.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_4.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tscrolledComposite.setContent(composite);\n\t\tscrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\n\t}", "private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setImage(SWTResourceManager.getImage(mainFrame.class, \"/imgCompand/main/logo.png\"));\r\n\t\tshell.setSize(935, 650);\r\n\t\tshell.setMinimumSize(920, 650);\r\n\t\tcenter(shell);\r\n\t\tshell.setText(\"三合一\");\r\n\t\tshell.setLayout(new GridLayout(8, false));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setText(\"面单图片:\");\r\n\t\t\r\n\t\ttext_mdtp = new Text(shell, SWT.BORDER);\r\n\t\ttext_mdtp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存面单图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString mdtp=dd.open();\r\n\t\t\t\tif(mdtp!=null){\r\n\t\t\t\t\ttext_mdtp.setText(mdtp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton.widthHint = 95;\r\n\t\tbtnNewButton.setLayoutData(gd_btnNewButton);\r\n\t\tbtnNewButton.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel = new Label(shell, SWT.NONE);\r\n\t\tGridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblNewLabel.widthHint = 87;\r\n\t\tlblNewLabel.setLayoutData(gd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"身份证图片:\");\r\n\t\t\r\n\t\ttext_sfztp = new Text(shell, SWT.BORDER);\r\n\t\ttext_sfztp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_1 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存身份证图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString sfztp=dd.open();\r\n\t\t\t\tif(sfztp!=null){\r\n\t\t\t\t\ttext_sfztp.setText(sfztp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton_1.widthHint = 95;\r\n\t\tbtnNewButton_1.setLayoutData(gd_btnNewButton_1);\r\n\t\tbtnNewButton_1.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setText(\"小票图片:\");\r\n\t\t\r\n\t\ttext_xptp = new Text(shell, SWT.BORDER);\r\n\t\ttext_xptp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton = new Button(shell, SWT.NONE);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择保存小票图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString xptp=dd.open();\r\n\t\t\t\tif(xptp!=null){\r\n\t\t\t\t\ttext_xptp.setText(xptp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_button = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_button.widthHint = 95;\r\n\t\tbutton.setLayoutData(gd_button);\r\n\t\tbutton.setText(\"浏览\");\r\n\t\t\r\n\t\tlabel_2 = new Label(shell, SWT.NONE);\r\n\t\tlabel_2.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlblNewLabel_1.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_5 = new Label(shell, SWT.NONE);\r\n\t\tlabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlabel_5.setText(\"三合一导入模板下载,请点击........\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton_1 = new Button(shell, SWT.NONE);\r\n\t\tGridData gd_button_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_button_1.widthHint = 95;\r\n\t\tbutton_1.setLayoutData(gd_button_1);\r\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\t\tdd.setText(\"请选择文件保存的位置\"); \r\n\t\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\t\tString saveFile=dd.open(); \r\n\t\t\t\t\tif(saveFile!=null){\r\n\t\t\t\t\t\tboolean flg = FileUtil.downloadLocal(saveFile, \"/template.xls\", \"三合一导入模板.xls\");\r\n\t\t\t\t\t\tif(flg){\r\n\t\t\t\t\t\t\tMessageDialog.openInformation(shell, \"系统提示\", \"模板下载成功!保存路径为:\"+saveFile+\"/三合一导入模板.xls\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tMessageDialog.openError(shell, \"系统提示\", \"模板下载失败!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t }catch(Exception ex){\r\n\t\t\t\t\t System.out.print(\"创建失败\");\r\n\t\t\t\t } \r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setText(\"导入模板\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_4 = new Label(shell, SWT.NONE);\r\n\t\tlabel_4.setText(\"合成信息:\");\r\n\t\t\r\n\t\ttext = new Text(shell, SWT.BORDER);\r\n\t\ttext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnexecl = new Button(shell, SWT.NONE);\r\n\t\tbtnexecl.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tFileDialog filedia = new FileDialog(shell, SWT.SINGLE);\r\n\t\t\t\tString filepath = filedia.open()+\"\";\r\n\t\t\t\ttext.setText(filepath.replace(\"null\",\"\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnexecl = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnexecl.widthHint = 95;\r\n\t\tbtnexecl.setLayoutData(gd_btnexecl);\r\n\t\tbtnexecl.setText(\"导入execl\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_3 = new Label(shell, SWT.NONE);\r\n\t\tlabel_3.setText(\"合成图片:\");\r\n\t\t\r\n\t\ttext_hctp = new Text(shell, SWT.BORDER);\r\n\t\ttext_hctp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_2 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择合成图片将要保存的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString hctp=dd.open();\r\n\t\t\t\tif(hctp!=null){\r\n\t\t\t\t\ttext_hctp.setText(hctp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_2 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnNewButton_2.widthHint = 95;\r\n\t\tbtnNewButton_2.setLayoutData(gd_btnNewButton_2);\r\n\t\tbtnNewButton_2.setText(\"保存位置\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_6 = new Label(shell, SWT.NONE);\r\n\t\tlabel_6.setText(\"进度:\");\r\n\t\t\r\n\t\tprogressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tGridData gd_progressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_progressBar.widthHint = 524;\r\n\t\tprogressBar.setMinimum(0);\r\n\t\tprogressBar.setMaximum(100);\r\n\t\tprogressBar.setLayoutData(gd_progressBar);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtn_doCompImg = new Button(shell, SWT.NONE);\r\n\t\tbtn_doCompImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//导入信息\r\n\t\t\t\tdrxx = text.getText();\r\n\t\t\t\t//保存路径\r\n\t\t\t\thctp = text_hctp.getText();\r\n\t\t\t\t//面单图片路径\r\n\t\t\t\tmdtp = text_mdtp.getText();\r\n\t\t\t\t//身份证图片路径\r\n\t\t\t\tsfztp = text_sfztp.getText();\r\n\t\t\t\t//小票图片路径\r\n\t\t\t\txptp = text_xptp.getText();\r\n\t\t\t\t//清空信息框\r\n\t\t\t\ttext_info.setText(\"\");\r\n\t\t\t\tif(!drxx.equals(\"\")&&!hctp.equals(\"\")&&!mdtp.equals(\"\")&&!sfztp.equals(\"\")&&!xptp.equals(\"\")){\r\n\t\t\t\t\t(new IncresingOperator()).start();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tMessageDialog.openWarning(shell, \"系统提示\",\"各路径选项不能为空!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btn_doCompImg = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btn_doCompImg.widthHint = 95;\r\n\t\tbtn_doCompImg.setLayoutData(gd_btn_doCompImg);\r\n\t\tbtn_doCompImg.setText(\"立即合成\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\ttext_info = new Text(shell, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tGridData gd_text_info = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n\t\tgd_text_info.heightHint = 217;\r\n\t\ttext_info.setLayoutData(gd_text_info);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\r\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setLayout(new GridLayout(1, false));\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t{\r\n\t\t\tfinal Button btnShowTheFake = new Button(shell, SWT.TOGGLE);\r\n\t\t\tbtnShowTheFake.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t\tif (btnShowTheFake.getSelection()) {\r\n\t\t\t\t\t\tRectangle bounds = btnShowTheFake.getBounds();\r\n\t\t\t\t\t\tPoint pos = shell.toDisplay(bounds.x + 5, bounds.y + bounds.height);\r\n\t\t\t\t\t\ttooltip = showTooltip(shell, pos.x, pos.y);\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Hide it\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (tooltip != null && !tooltip.isDisposed())\r\n\t\t\t\t\t\t\ttooltip.dispose();\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t}\r\n\t}", "protected void createContents() {\n\t\tsetText(\"Termination\");\n\t\tsetSize(340, 101);\n\n\t}", "private void createContents() {\r\n\t\tshlAboutGoko = new Shell(getParent(), getStyle());\r\n\t\tshlAboutGoko.setSize(376, 248);\r\n\t\tshlAboutGoko.setText(\"About Goko\");\r\n\t\tshlAboutGoko.setLayout(new GridLayout(1, false));\r\n\r\n\t\tComposite composite_1 = new Composite(shlAboutGoko, SWT.NONE);\r\n\t\tcomposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\r\n\t\tcomposite_1.setLayout(new GridLayout(1, false));\r\n\r\n\t\tLabel lblGokoIsA = new Label(composite_1, SWT.WRAP);\r\n\t\tGridData gd_lblGokoIsA = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblGokoIsA.widthHint = 350;\r\n\t\tlblGokoIsA.setLayoutData(gd_lblGokoIsA);\r\n\t\tlblGokoIsA.setText(\"Goko is an open source desktop application for CNC control and operation\");\r\n\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblAlphaVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblAlphaVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblAlphaVersion.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblAlphaVersion.setText(\"Version\");\r\n\r\n\t\tLabel lblVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblVersion.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(composite_1, SWT.NONE);\r\n\r\n\t\tLabel lblDate = new Label(composite_2, SWT.NONE);\r\n\t\tlblDate.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblDate.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblDate.setText(\"Build\");\r\n\t\t\r\n\t\tLabel lblBuild = new Label(composite_2, SWT.NONE);\r\n\t\tlblBuild.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\t\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader(); \r\n\t\tInputStream stream = loader.getResourceAsStream(\"/version.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(stream);\r\n\t\t\tString version = prop.getProperty(\"goko.version\");\r\n\t\t\tString build = prop.getProperty(\"goko.build.timestamp\");\r\n\t\t\tlblVersion.setText(version);\r\n\t\t\tlblBuild.setText(build);\t\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tLOG.error(e);\r\n\t\t}\r\n\t\t\r\n\t\tComposite composite = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblMoreInformationOn = new Label(composite, SWT.NONE);\r\n\t\tGridData gd_lblMoreInformationOn = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblMoreInformationOn.widthHint = 60;\r\n\t\tlblMoreInformationOn.setLayoutData(gd_lblMoreInformationOn);\r\n\t\tlblMoreInformationOn.setText(\"Website :\");\r\n\r\n\t\tLink link = new Link(composite, SWT.NONE);\r\n\t\tlink.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://www.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tlink.setText(\"<a>http://www.goko.fr</a>\");\r\n\t\t\r\n\t\tComposite composite_3 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_3.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblForum = new Label(composite_3, SWT.NONE);\r\n\t\tGridData gd_lblForum = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblForum.widthHint = 60;\r\n\t\tlblForum.setLayoutData(gd_lblForum);\r\n\t\tlblForum.setText(\"Forum :\");\r\n\t\t\r\n\t\tLink link_1 = new Link(composite_3, 0);\r\n\t\tlink_1.setText(\"<a>http://discuss.goko.fr</a>\");\r\n\t\tlink_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://discuss.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tComposite composite_4 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_4.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblContact = new Label(composite_4, SWT.NONE);\r\n\t\tGridData gd_lblContact = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblContact.widthHint = 60;\r\n\t\tlblContact.setLayoutData(gd_lblContact);\r\n\t\tlblContact.setText(\"Contact :\");\r\n\t\t\t \r\n\t\tLink link_2 = new Link(composite_4, 0);\r\n\t\tlink_2.setText(\"<a>\"+toAscii(\"636f6e7461637440676f6b6f2e6672\")+\"</a>\");\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tComposite composite = new Composite(shlFaststone, SWT.NONE);\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm = new SashForm(composite, SWT.VERTICAL);\n\t\t//\n\t\tMenu menu = new Menu(shlFaststone, SWT.BAR);\n\t\tshlFaststone.setMenuBar(menu);\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setSelection(true);\n\t\tmenuItem.setText(\"\\u6587\\u4EF6\");\n\t\t\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\t\t\n\t\tfinal Canvas down=new Canvas(shlFaststone,SWT.NONE|SWT.BORDER|SWT.DOUBLE_BUFFERED);\n\t\t\n\t\tComposite composite_4 = new Composite(sashForm, SWT.BORDER);\n\t\tcomposite_4.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_3 = new SashForm(composite_4, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_3);\n\t\tformToolkit.paintBordersFor(sashForm_3);\n\t\t\n\t\tToolBar toolBar = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.WRAP | SWT.RIGHT);\n\t\ttoolBar.setToolTipText(\"\");\n\t\t\n\t\tToolItem toolItem_6 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_6.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_2.notifyListeners(SWT.Selection,event1);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6253\\u5F00.jpg\"));\n\t\ttoolItem_6.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t\n\t\ttltmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttltmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\ttltmNewItem.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t//关闭\n\t\tToolItem tltmNewItem_4 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttltmNewItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttltmNewItem_4.setText(\"\\u5173\\u95ED\");\n\t\t\n\t\t\n\t\t\n\t\tToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//缩放\n\t\t\n\t\t\n\t\ttltmNewItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u653E\\u5927.jpg\"));\n\t\t\n\t\t//工具栏:放大\n\t\t\n\t\ttltmNewItem_1.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t//工具栏:缩小\n\t\ttltmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\ttltmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F29\\u5C0F.jpg\"));\n\t\ttltmNewItem_2.setText(\"\\u7F29\\u5C0F\");\n\t\tToolItem toolItem_5 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttoolItem_5.setText(\"\\u9000\\u51FA\");\n\t\t\n\t\tToolBar toolBar_1 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\tformToolkit.adapt(toolBar_1);\n\t\tformToolkit.paintBordersFor(toolBar_1);\n\t\t\n\t\tToolItem toolItem_7 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:标题\n\t\ttoolItem_7.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_7.setText(\"\\u6807\\u9898\");\n\t\ttoolItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6807\\u9898.jpg\"));\n\t\t\n\t\tToolItem toolItem_1 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:调整大小\n\t\ttoolItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_1.setText(\"\\u8C03\\u6574\\u5927\\u5C0F\");\n\t\ttoolItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u8C03\\u6574\\u5927\\u5C0F.jpg\"));\n\t\t\n\t\tToolBar toolBar_2 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tformToolkit.adapt(toolBar_2);\n\t\tformToolkit.paintBordersFor(toolBar_2);\n\t\t\n\t\tToolItem toolItem_2 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:裁剪\n\t\ttoolItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_2.setText(\"\\u88C1\\u526A\");\n\t\ttoolItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u88C1\\u526A.jpg\"));\n\t\t\n\t\tToolItem toolItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:剪切\n\t\ttoolItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_3.setText(\"\\u526A\\u5207\");\n\t\ttoolItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u526A\\u5207.jpg\"));\n\t\t\n\t\tToolItem toolItem_4 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\n\t\t//工具栏:粘贴\n\t\ttoolItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tcomposite_3.layout();\n\t\t\t\tFile f=new File(\"src/picture/beauty.jpg\");\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tButton lblNewLabel_3 = null;\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcomposite_3.layout();\n\t\t\t}\n\t\t});\n\t\t//omposite;\n\t\t//\n\t\t\n\t\ttoolItem_4.setText(\"\\u590D\\u5236\");\n\t\ttoolItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u590D\\u5236.jpg\"));\n\t\t\n\t\tToolItem tltmNewItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\ttltmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\ttltmNewItem_3.setText(\"\\u7C98\\u8D34\");\n\t\tsashForm_3.setWeights(new int[] {486, 165, 267});\n\t\t\n\t\tComposite composite_1 = new Composite(sashForm, SWT.NONE);\n\t\tformToolkit.adapt(composite_1);\n\t\tformToolkit.paintBordersFor(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_1 = new SashForm(composite_1, SWT.VERTICAL);\n\t\tformToolkit.adapt(sashForm_1);\n\t\tformToolkit.paintBordersFor(sashForm_1);\n\t\t\n\t\tComposite composite_2 = new Composite(sashForm_1, SWT.NONE);\n\t\tformToolkit.adapt(composite_2);\n\t\tformToolkit.paintBordersFor(composite_2);\n\t\tcomposite_2.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(composite_2, SWT.NONE);\n\t\ttabFolder.setTouchEnabled(true);\n\t\tformToolkit.adapt(tabFolder);\n\t\tformToolkit.paintBordersFor(tabFolder);\n\t\t\n\t\tTabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem.setText(\"\\u65B0\\u5EFA\\u4E00\");\n\t\t\n\t\tTabItem tbtmNewItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_1.setText(\"\\u65B0\\u5EFA\\u4E8C\");\n\t\t\n\t\tTabItem tbtmNewItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_2.setText(\"\\u65B0\\u5EFA\\u4E09\");\n\t\t\n\t\tButton button = new Button(tabFolder, SWT.CHECK);\n\t\tbutton.setText(\"Check Button\");\n\t\t\n\t\tcomposite_3 = new Composite(sashForm_1, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\n\t\tformToolkit.adapt(composite_3);\n\t\tformToolkit.paintBordersFor(composite_3);\n\t\tcomposite_3.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tLabel lblNewLabel_3 = new Label(composite_3, SWT.NONE);\n\t\tformToolkit.adapt(lblNewLabel_3, true, true);\n\t\tlblNewLabel_3.setText(\"\");\n\t\tsashForm_1.setWeights(new int[] {19, 323});\n\t\t\n\t\tComposite composite_5 = new Composite(sashForm, SWT.NONE);\n\t\tcomposite_5.setToolTipText(\"\");\n\t\tcomposite_5.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_2 = new SashForm(composite_5, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_2);\n\t\tformToolkit.paintBordersFor(sashForm_2);\n\t\t\n\t\tLabel lblNewLabel = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel, true, true);\n\t\tlblNewLabel.setText(\"1/1\");\n\t\t\n\t\tLabel lblNewLabel_2 = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_2, true, true);\n\t\tlblNewLabel_2.setText(\"\\u5927\\u5C0F\\uFF1A1366*728\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(sashForm_2, SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_1, true, true);\n\t\tlblNewLabel_1.setText(\"\\u7F29\\u653E\\uFF1A100%\");\n\t\t\n\t\tLabel label = new Label(sashForm_2, SWT.NONE);\n\t\tlabel.setAlignment(SWT.RIGHT);\n\t\tformToolkit.adapt(label, true, true);\n\t\tlabel.setText(\"\\u5494\\u5693\\u5DE5\\u4F5C\\u5BA4\\u7248\\u6743\\u6240\\u6709\");\n\t\tsashForm_2.setWeights(new int[] {127, 141, 161, 490});\n\t\tsashForm.setWeights(new int[] {50, 346, 22});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u65B0\\u5EFA.jpg\"));\n\t\tmntmNewItem.setText(\"\\u65B0\\u5EFA\");\n\t\t\n\t\tmntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\t//Label lblNewLabel_3 = new Label(composite_1, SWT.NONE);\n\t\t\t\t//Canvas c=new Canvas(shlFaststone,SWT.BALLOON);\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u6253\\u5F00.jpg\"));\n\t\tmntmNewItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_1.setText(\"\\u4ECE\\u526A\\u8D34\\u677F\\u5BFC\\u5165\");\n\t\t\n\t\tMenuItem mntmNewItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\tmntmNewItem_3.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t\n\t\t mntmNewItem_5 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t boolean result=MessageDialog.openConfirm(shlFaststone,\"退出\",\"是否确认退出\");\n\t\t\t\t if(result) {\n\t\t\t\t\t System.exit(0);\n\t\t\t\t }\n\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u4FDD\\u5B58.jpg\"));\n\t\tmntmNewItem_5.setText(\"\\u5173\\u95ED\");\n\t\tevent2=new Event();\n\t\tevent2.widget=mntmNewItem_5;\n\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u6355\\u6349\");\n\t\t\n\t\tMenu menu_2 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_2);\n\t\t\n\t\tMenuItem mntmNewItem_6 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_6.setText(\"\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_7 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6355\\u6349\\u7A97\\u53E3\\u6216\\u5BF9\\u8C61.jpg\"));\n\t\tmntmNewItem_7.setText(\"\\u6355\\u6349\\u7A97\\u53E3\\u5BF9\\u8C61\");\n\t\t\n\t\tMenuItem mntmNewItem_8 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_8.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.jpg\"));\n\t\tmntmNewItem_8.setText(\"\\u6355\\u6349\\u77E9\\u5F62\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_9 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_9.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u624B\\u7ED8\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_9.setText(\"\\u6355\\u6349\\u624B\\u7ED8\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_10 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_10.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6574\\u4E2A\\u5C4F\\u5E55.jpg\"));\n\t\tmntmNewItem_10.setText(\"\\u6355\\u6349\\u6574\\u4E2A\\u5C4F\\u5E55\");\n\t\t\n\t\tMenuItem mntmNewItem_11 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_11.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_11.setText(\"\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_12 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_12.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_12.setText(\"\\u6355\\u6349\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349.jpg\"));\n\t\tmenuItem_1.setText(\"\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349\");\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_2.setText(\"\\u7F16\\u8F91\");\n\t\t\n\t\tMenu menu_3 = new Menu(menuItem_2);\n\t\tmenuItem_2.setMenu(menu_3);\n\t\t\n\t\tMenuItem mntmNewItem_14 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_14.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_14.setText(\"\\u64A4\\u9500\");\n\t\t\n\t\tMenuItem mntmNewItem_13 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_13.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_13.setText(\"\\u91CD\\u505A\");\n\t\t\n\t\tMenuItem mntmNewItem_15 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_15.setText(\"\\u9009\\u62E9\\u5168\\u90E8\");\n\t\t\n\t\tMenuItem mntmNewItem_16 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_16.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7F16\\u8F91.\\u88C1\\u526A.jpg\"));\n\t\tmntmNewItem_16.setText(\"\\u88C1\\u526A\");\n\t\t\n\t\tMenuItem mntmNewItem_17 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_17.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u526A\\u5207.jpg\"));\n\t\tmntmNewItem_17.setText(\"\\u526A\\u5207\");\n\t\t\n\t\tMenuItem mntmNewItem_18 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_18.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u590D\\u5236.jpg\"));\n\t\tmntmNewItem_18.setText(\"\\u590D\\u5236\");\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_3, SWT.NONE);\n\t\tmenuItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\tmenuItem_4.setText(\"\\u7C98\\u8D34\");\n\t\t\n\t\tMenuItem mntmNewItem_19 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_19.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_3.setText(\"\\u7279\\u6548\");\n\t\t\n\t\tMenu menu_4 = new Menu(menuItem_3);\n\t\tmenuItem_3.setMenu(menu_4);\n\t\t\n\t\tMenuItem mntmNewItem_20 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_20.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6C34\\u5370.jpg\"));\n\t\tmntmNewItem_20.setText(\"\\u6C34\\u5370\");\n\t\t\n\t\tPanelPic ppn = new PanelPic();\n\t\tMenuItem mntmNewItem_21 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_21.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tflag[0]=true;\n\t\t\t\tflag[1]=false;\n\n\t\t\t}\n\n\t\t});\n\t\t\n\t\tdown.addMouseListener(new MouseAdapter(){\n\t\t\tpublic void mouseDown(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=true;\n\t\t\t\tpt=new Point(e.x,e.y);\n\t\t\t\tif(flag[1])\n\t\t\t\t{\n\t\t\t\t\trect=new Composite(down,SWT.BORDER);\n\t\t\t\t\trect.setLocation(e.x, e.y);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=false;\n\t\t\t\tif(flag[1]&&dirty)\n\t\t\t\t{\n\t\t\t\t\trexx[n-1]=rect.getBounds();\n\t\t\t\t\trect.dispose();\n\t\t\t\t\tdown.redraw();\n\t\t\t\t\tdirty=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdown.addMouseMoveListener(new MouseMoveListener(){\n\t\t\t@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n if(mouseDown)\n {\n \t dirty=true;\n\t\t\t\tif(flag[0])\n\t\t\t {\n \t GC gc=new GC(down);\n gc.drawLine(pt.x, pt.y, e.x, e.y);\n list.add(new int[]{pt.x,pt.y,e.x,e.y});\n pt.x=e.x;pt.y=e.y;\n\t\t\t }\n else if(flag[1])\n {\n \t if(rect!=null)\n \t rect.setSize(rect.getSize().x+e.x-pt.x, rect.getSize().y+e.y-pt.y);\n// \t down.redraw();\n \t pt.x=e.x;pt.y=e.y;\n }\n }\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdown.addPaintListener(new PaintListener(){\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t\t{\n\t\t\t\t\tint a[]=list.get(i);\n\t\t\t\t\te.gc.drawLine(a[0], a[1], a[2], a[3]);\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(rexx[i]!=null)\n\t\t\t\t\t\te.gc.drawRectangle(rexx[i]);\n\t\t\t\t}\n\t\t\t}});\n\n\t\t\n\t\tmntmNewItem_21.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6587\\u5B57.jpg\"));\n\t\tmntmNewItem_21.setText(\"\\u753B\\u7B14\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_1 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_1.setText(\"\\u67E5\\u770B\");\n\t\t\n\t\tMenu menu_5 = new Menu(mntmNewSubmenu_1);\n\t\tmntmNewSubmenu_1.setMenu(menu_5);\n\t\t\n\t\tMenuItem mntmNewItem_24 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_24.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u653E\\u5927.jpg\"));\n\t\tmntmNewItem_24.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tMenuItem mntmNewItem_25 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_25.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u7F29\\u5C0F.jpg\"));\n\t\tmntmNewItem_25.setText(\"\\u7F29\\u5C0F\");\n\t\t\n\t\tMenuItem mntmNewItem_26 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_26.setText(\"\\u5B9E\\u9645\\u5C3A\\u5BF8\\uFF08100%\\uFF09\");\n\t\t\n\t\tMenuItem mntmNewItem_27 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_27.setText(\"\\u9002\\u5408\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_28 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_28.setText(\"100%\");\n\t\t\n\t\tMenuItem mntmNewItem_29 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_29.setText(\"200%\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_2.setText(\"\\u8BBE\\u7F6E\");\n\t\t\n\t\tMenu menu_6 = new Menu(mntmNewSubmenu_2);\n\t\tmntmNewSubmenu_2.setMenu(menu_6);\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_5.setText(\"\\u5E2E\\u52A9\");\n\t\t\n\t\tMenu menu_7 = new Menu(menuItem_5);\n\t\tmenuItem_5.setMenu(menu_7);\n\t\t\n\t\tMenuItem menuItem_6 = new MenuItem(menu_7, SWT.NONE);\n\t\tmenuItem_6.setText(\"\\u7248\\u672C\");\n\t\t\n\t\tMenuItem mntmNewItem_23 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_23.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\t\n\t\tMenuItem mntmNewItem_30 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_30.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\n\t}", "protected void createContents() {\n\t\tMonitor primary = this.getDisplay().getPrimaryMonitor();\n\t\tRectangle bounds = primary.getBounds();\n\t\tRectangle rect = getBounds();\n\t\tint x = bounds.x + (bounds.width - rect.width) / 2;\n\t\tint y = bounds.y + (bounds.height - rect.height) / 2;\n\t\tsetLocation(x, y);\n\t}", "protected void createContents() {\n\t\tDelAllShell = new Shell(SWT.CLOSE | SWT.MIN);\n\t\tfinal int WIDTH=java.awt.Toolkit.getDefaultToolkit().getScreenSize().width;\n\t\tfinal int HEIGHT=java.awt.Toolkit.getDefaultToolkit().getScreenSize().height;\n\t\t\n\t\tDelAllShell.setBounds((WIDTH-441)/2,(HEIGHT-300)/2,441, 177);\n\t\tDelAllShell.setText(\"清空\");\n\t\t\n\t\tLabel messgLabel_1 = new Label(DelAllShell, SWT.CENTER);\n\t\tmessgLabel_1.setFont(SWTResourceManager.getFont(\"微软雅黑\", 13, SWT.NORMAL));\n\t\tmessgLabel_1.setBounds(10, 10, 405, 23);\n\t\tmessgLabel_1.setText(\"您所选择的分组为通讯录列表,确认删除时\");\n\t\t\n\t\tLabel messgLabel_2 = new Label(DelAllShell, SWT.CENTER);\n\t\tmessgLabel_2.setFont(SWTResourceManager.getFont(\"微软雅黑\", 13, SWT.NORMAL));\n\t\tmessgLabel_2.setBounds(62, 39, 272, 23);\n\t\tmessgLabel_2.setText(\"清空所有内容!\");\n\t\t\n\t\tButton yesButton = new Button(DelAllShell, SWT.NONE);\n\t\tyesButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry{\n\t\t\t\t\tTreeItem[] treeItem=mainTreeItem.getItems();\n\t\t\t\t\tfor(int i=0;i<treeItem.length;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttreeItem[i].dispose();\n\t\t\t\t\t}\n\t\t\t\tGroups.getGroupList().clear();\n\t\t\t\tUsers.getUserList().clear();\n\t\t\t\tGroups.updateToFile();\n\t\t\t\tUsers.updateToFile();\n\t\t\t\t}catch(Exception ex){\n\t\t\t\t\tSystem.out.println(\"清空文件失败\");\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tDelAllShell.close();\n\t\t\t\t//final Group mainTreeItem = new Group(tree, SWT.NONE);\n\t\t\t\t//mainTreeItem.setText(\"通讯录列表\");\n\t\t\t\t//mainShell.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tyesButton.setBounds(86, 102, 80, 27);\n\t\tyesButton.setText(\"确定\");\n\t\t\n\t\tButton noButton = new Button(DelAllShell, SWT.NONE);\n\t\tnoButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e)\n\t\t\t{\n\t\t\t\tDelAllShell.close();\n\t\t\t}\n\t\t});\n\t\tnoButton.setText(\"取消\");\n\t\tnoButton.setBounds(254, 102, 80, 27);\n\n\t}", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\t\tshell.setSize(250, 150);\n\t\tshell.setText(getText());\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.SOUTH);\n\t\tcomposite.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite_1.setLayout(new GridLayout(4, false));\n\t\tnew Label(composite_1, SWT.NONE);\n\t\t\n\t\tLabel lblHour = new Label(composite_1, SWT.NONE);\n\t\tlblHour.setSize(0, 0);\n\t\tlblHour.setText(\"Hour\");\n\t\t\n\t\tLabel lblMin = new Label(composite_1, SWT.NONE);\n\t\tlblMin.setSize(0, 0);\n\t\tlblMin.setText(\"Min\");\n\t\t\n\t\tButton btnAm = new Button(composite_1, SWT.RADIO);\n\t\tbtnAm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tampm=0;\n\t\t\t}\n\t\t});\n\t\tbtnAm.setSize(0, 0);\n\t\tbtnAm.setText(\"AM\");\n\t\t\n\t\tLabel lblStartTime = new Label(composite_1, SWT.NONE);\n\t\tlblStartTime.setSize(0, 0);\n\t\tlblStartTime.setText(\"Start Time:\");\n\t\t\n\t\tfinal Spinner hourSpinner = new Spinner(composite_1, SWT.BORDER);\n\t\thourSpinner.setSize(0, 0);\n\t\thourSpinner.setMaximum(12);\n\t\thourSpinner.setMinimum(1);\n\t\t\n\t\tfinal Spinner minSpinner = new Spinner(composite_1, SWT.BORDER);\n\t\tminSpinner.setSize(0, 0);\n\t\tminSpinner.setMaximum(59);\n\t\tminSpinner.setMinimum(0);\n\t\t\n\t\t\n\t\tButton btnPm = new Button(composite_1, SWT.RADIO);\n\t\tbtnPm.setSize(0, 0);\n\t\tbtnPm.setText(\"PM\");\n\t\t\n\t\tButton btnCancel = new Button(composite, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setText(\"Cancel\");\n\t\t\n\t\tButton btnOk = new Button(composite, SWT.NONE);\n\t\tbtnOk.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\thour = Integer.valueOf(hourSpinner.getText());\n\t\t\t\tminute = Integer.valueOf(minSpinner.getText());\n\t\t\t\tparent.setHour(hour);\n\t\t\t\tSystem.out.println(\"print hour-->\"+hour+\". print parent.hour-->\"+parent.hour);\n\t\t\t\tSystem.out.println(parent.hour);\n\t\t\t\tparent.setMinute(minute);\n\t\t\t\tparent.setAmpm(ampm);\n\t\t\t\tshell.close();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnOk.setText(\"OK\");\n\t\t\n\t\t\n\n\t}", "protected void createContents() {\n shell = new Shell();\n shell.setSize(1024, 650);\n shell.setText(\"GMToolsTD\");\n shell.setLayout(new GridLayout());\n\n\n /* Création du menu principal */\n Menu menuPrincipal = new Menu(shell, SWT.BAR);\n shell.setMenuBar(menuPrincipal);\n\n MenuItem mntmModule = new MenuItem(menuPrincipal, SWT.CASCADE);\n mntmModule.setText(\"Module\");\n\n Menu menuModule = new Menu(mntmModule);\n mntmModule.setMenu(menuModule);\n\n mntmSpoolUsage = new MenuItem(menuModule, SWT.NONE);\n mntmSpoolUsage.setText(\"Spool Usage\");\n\n mntmUser = new MenuItem(menuModule, SWT.NONE);\n mntmUser.setText(\"User Information\");\n\n new MenuItem(menuModule, SWT.SEPARATOR);\n\n mntmConfig = new MenuItem(menuModule, SWT.NONE);\n mntmConfig.setText(\"Configuration\");\n\n new MenuItem(menuModule, SWT.SEPARATOR);\n\n mntmExit = new MenuItem(menuModule, SWT.NONE);\n mntmExit.setText(\"Exit\");\n\n MenuItem mntmHelp = new MenuItem(menuPrincipal, SWT.CASCADE);\n mntmHelp.setText(\"Help\");\n\n Menu menuAbout = new Menu(mntmHelp);\n mntmHelp.setMenu(menuAbout);\n\n mntmAbout = new MenuItem(menuAbout, SWT.NONE);\n mntmAbout.setText(\"About\");\n\n\n /* Creation main screen elements */\n pageComposite = new Composite(shell, SWT.NONE);\n pageComposite.setLayout(new GridLayout(2,false));\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.verticalAlignment = SWT.FILL;\n gridData.grabExcessVerticalSpace = true;\n pageComposite.setLayoutData(gridData);\n\n\n grpConnexion = new Group(pageComposite, SWT.NONE );\n grpConnexion.setText(\"Connection\");\n grpConnexion.setLayout(new GridLayout(2,false));\n gridData = new GridData();\n gridData.heightHint = 110;\n grpConnexion.setLayoutData(gridData);\n\n\n Label lblServer = new Label(grpConnexion, SWT.NONE);\n lblServer.setText(\"Server :\");\n\n textServer = new Text(grpConnexion, SWT.NONE);\n textServer.setLayoutData(new GridData(110,20));\n\n Label lblUsername = new Label(grpConnexion, SWT.NONE);\n lblUsername.setSize(65, 20);\n lblUsername.setText(\"Username :\");\n\n textUsername = new Text(grpConnexion,SWT.NONE);\n textUsername.setLayoutData(new GridData(110,20));\n\n Label lblPassword = new Label(grpConnexion, SWT.NONE);\n lblPassword.setSize(65, 20);\n lblPassword.setText(\"Password :\");\n\n textPassword = new Text(grpConnexion, SWT.PASSWORD);\n textPassword.setLayoutData(new GridData(110,20));\n\n btnConnect = new Button(grpConnexion, SWT.NONE);\n btnConnect.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER, false, false));\n btnConnect.setText(\"Connect\");\n\n btnDisconnect = new Button(grpConnexion, SWT.NONE);\n btnDisconnect.setEnabled(false);\n btnDisconnect.setText(\"Disconnect\");\n\n\n\n groupInfo = new Group(pageComposite, SWT.NONE);\n groupInfo.setText(\"Information\");\n groupInfo.setLayout(new GridLayout(1, false));\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.heightHint = 110;\n groupInfo.setLayoutData(gridData);\n\n textInformation = new Text(groupInfo, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.verticalAlignment = SWT.FILL;\n gridData.grabExcessVerticalSpace = true;\n textInformation.setLayoutData(gridData);\n\n\n // renseignement des informations provenant de config\n textServer.setText(conf.getValueConf(conf.SERVER_TD));\n textUsername.setText(conf.getValueConf(conf.USERNAME_TD));\n textPassword.setText(\"\");\n\n\n mntmSpoolUsage.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n majAffichage(AFFICHE_SPOOL);\n }\n });\n\n\n mntmUser.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n majAffichage(AFFICHE_USER);\n }\n });\n\n mntmConfig.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n majAffichage(AFFICHE_CONFIG);\n }\n });\n\n mntmAbout.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n MessageBox messageBox = new MessageBox(shell, SWT.ICON_INFORMATION);\n messageBox.setText(\"About...\");\n messageBox.setMessage(\"Not implemented yet ...\");\n messageBox.open();\n }\n });\n\n mntmExit.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n // afficher un message box avec du blabla\n shell.close();\n\n }\n });\n\n btnConnect.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n // connexion Teradata\n btnConnect.setEnabled(false);\n entryServer = textServer.getText();\n entryUsername = textUsername.getText();\n entryPassword = textPassword.getText();\n\n new Thread(new Runnable() {\n public void run() {\n try {\n\n tdConnect = new TDConnexion(entryServer, entryUsername, entryPassword, conf);\n majInformation(MESSAGE_INFORMATION,nomModuleConnexion,\"Connexion OK\");\n connexionStatut = true;\n } catch ( SQLException err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Connexion KO : \"+err.getMessage());\n connexionStatut = false;\n } catch (ClassNotFoundException err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Error ClassNotFoundException : \"+err.getMessage());\n connexionStatut = false;\n }\n if (connexionStatut) {\n try {\n nbrAMP = tdConnect.requestNumberAMP();\n } catch (Exception err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Calculation of AMPs KO : \"+err.getMessage());\n connexionStatut = false;\n tdConnect.deconnexion();\n }\n }\n\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n\n if (connexionStatut) {\n activationON();\n\n textServer.setEnabled(false);\n textUsername.setEnabled(false);\n textPassword.setEnabled(false);\n\n btnConnect.setEnabled(false);\n btnDisconnect.setEnabled(true);\n } else {\n btnConnect.setEnabled(true);\n }\n }\n });\n }\n }).start();\n\n\n\n\n }\n });\n\n\n btnDisconnect.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n manageDisconnection();\n }\n });\n\n\n //creating secondary screen\n ecranUser = new EcranUser(this);\n ecranSpool = new EcranSpool(this);\n ecranConfig = new EcranConfig(this);\n\n\n // update of the information message (log)\n new Thread(new Runnable() {\n public void run() {\n try {\n while (true) {\n if (!listMessageInfo.isEmpty()) {\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n refreshInformation();\n }\n });\n }\n try {\n Thread.sleep(500);\n } catch (Exception e) {\n //nothing to do\n }\n }\n } catch (Exception e) {\n //What to do when the while send an error ?\n }\n }\n }).start();\n\n }", "private void createContents() {\n shell = new Shell(getParent(), getStyle());\n shell.setSize(540, 297);\n shell.setLayout(new GridLayout(1, false));\n\n Composite cmpTop = new Composite(shell, SWT.NONE);\n cmpTop.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n GridLayout gl_cmpTop = new GridLayout(4, false);\n gl_cmpTop.verticalSpacing = 0;\n cmpTop.setLayout(gl_cmpTop);\n\n Label lblBankAccountNumber = new Label(cmpTop, SWT.CENTER);\n lblBankAccountNumber.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBankAccountNumber.setBounds(0, 0, 59, 14);\n lblBankAccountNumber.setText(\"Bank Account\");\n Label lblBranch = new Label(cmpTop, SWT.CENTER);\n lblBranch.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBranch.setBounds(0, 0, 59, 14);\n lblBranch.setText(\"Branch\");\n\n Label lblBank = new Label(cmpTop, SWT.CENTER);\n lblBank.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBank.setText(\"Bank\");\n new Label(cmpTop, SWT.NONE);\n\n txtBankAccountNumber = new Text(cmpTop, SWT.BORDER);\n txtBankAccountNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n txtBankAccountNumber.setBounds(0, 0, 64, 19);\n\n txtBranch = new Text(cmpTop, SWT.BORDER);\n GridData gd_txtBranch = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\n gd_txtBranch.widthHint = 50;\n txtBranch.setLayoutData(gd_txtBranch);\n txtBranch.setBounds(0, 0, 64, 19);\n\n txtBank = new Text(cmpTop, SWT.BORDER);\n GridData gd_txtBank = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\n gd_txtBank.widthHint = 50;\n txtBank.setLayoutData(gd_txtBank);\n btnSearch = new Button(cmpTop, SWT.NONE);\n btnSearch.setAlignment(SWT.RIGHT);\n btnSearch.setText(\"Search\");\n btnSearch.setEnabled(false);\n\n Composite cmpResults = new Composite(shell, SWT.NONE);\n cmpResults.setLayout(new GridLayout(1, false));\n GridData gd_cmpResults = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n gd_cmpResults.heightHint = 129;\n cmpResults.setLayoutData(gd_cmpResults);\n\n tblAccounts = new Table(cmpResults, SWT.BORDER);\n GridData gd_tblAccounts = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n gd_tblAccounts.heightHint = 71;\n tblAccounts.setLayoutData(gd_tblAccounts);\n tblAccounts.setHeaderVisible(true);\n tblAccounts.setLinesVisible(true);\n\n TableColumn tblclmnAccountNumber = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnAccountNumber.setWidth(120);\n tblclmnAccountNumber.setText(\"Player Account\");\n\n TableColumn tblclmsFirstName = new TableColumn(tblAccounts, SWT.NONE);\n tblclmsFirstName.setWidth(100);\n tblclmsFirstName.setText(\"First Name\");\n\n TableColumn tblclmnLastName = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnLastName.setWidth(100);\n tblclmnLastName.setText(\"Last Name\");\n\n TableColumn tblclmnActivated = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnActivated.setWidth(95);\n tblclmnActivated.setText(\"From\");\n\n TableColumn tblclmnDeactivated = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnDeactivated.setWidth(100);\n tblclmnDeactivated.setText(\"To\");\n\n Composite cmpFooter = new Composite(shell, SWT.NONE);\n cmpFooter.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n cmpFooter.setLayout(new GridLayout(2, false));\n\n lblResultsMessage = new Label(cmpFooter, SWT.NONE);\n lblResultsMessage.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\n Composite cmpButtons = new Composite(cmpFooter, SWT.NONE);\n cmpButtons.setLayout(new GridLayout(3, false));\n cmpButtons.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false, 1, 1));\n\n btnLoad = new Button(cmpButtons, SWT.NONE);\n btnLoad.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n btnLoad.setText(\"Load Account\");\n btnLoad.setEnabled(false);\n\n btnCancel = new Button(cmpButtons, SWT.NONE);\n btnCancel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n btnCancel.setText(\"Cancel\");\n new Label(cmpButtons, SWT.NONE);\n }", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tLabel lblUsername = new Label(shell, SWT.NONE);\n\t\tlblUsername.setBounds(73, 30, 55, 15);\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\tLabel lblPassword = new Label(shell, SWT.NONE);\n\t\tlblPassword.setText(\"Password\");\n\t\tlblPassword.setBounds(73, 78, 55, 15);\n\t\t\n\t\ttxtUsername = new Text(shell, SWT.BORDER);\n\t\ttxtUsername.setText(\"lisa\");\n\t\ttxtUsername.setBounds(139, 24, 209, 21);\n\t\t\n\t\ttxtPassword = new Text(shell, SWT.BORDER);\n\t\ttxtPassword.setText(\"password1\");\n\t\ttxtPassword.setBounds(139, 72, 209, 21);\n\t\t\n\t\tButton btnLogin = new Button(shell, SWT.NONE);\n\t\tbtnLogin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnLogin.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tString usrname = txtUsername.getText();\n\t\t\t\tString usrpass = txtPassword.getText();\n\t\t\t\t\n\t\t\t\t// Call authenticate user credentials through authentication RMI server\n\t\t\t\tLoginInterface login;\n\t\t\t\ttry{\n\t\t\t\t\tlogin = (LoginInterface)Naming.lookup(\"rmi://localhost/login\");\n\t\t\t\t\t\n\t\t\t\t\tboolean authenticated = login.authenticate(usrname, usrpass);\n\t\t\t\t\tif(authenticated){\n\t\t\t\t\t\tSystem.out.println(\"User authenticated.\");\n\t\t\t\t\t\tclose();\n\n\t\t\t\t\t\tevaluator.EvaluatorClient.main(null);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tSystem.out.println(\"Username or password was incorrect. Please try again.\");\n\t\t\t\t\t\tlblMsgOut.setText(\"Username or password was incorrect. Please try again.\");\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}catch(Exception e2){\n\t\t\t\t\tSystem.out.println(\"LoginClient authentication exception: \" + e2);\n\t\t\t\t\tlblMsgOut.setText(\"LoginClient authentication exception: \" + e2);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLogin.setBounds(272, 118, 75, 25);\n\t\tbtnLogin.setText(\"Login\");\n\t\t\n\t\tlblMsgOut = new Label(shell, SWT.BORDER | SWT.WRAP);\n\t\tlblMsgOut.setBounds(10, 174, 414, 77);\n\t\tlblMsgOut.setText(\"Output:\");\n\n\t}", "protected void createContents() throws UnknownHostException, IOException, InterruptedException {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tshlUser = new Shell();\r\n\t\tshlUser.setSize(450, 464);\r\n\t\tshlUser.setText(\"QQ聊天室\\r\\n\");\r\n\t\t\r\n\t\ttext = new Text(shlUser, SWT.BORDER);\r\n\t\ttext.setEnabled(false);\r\n\t\ttext.setBounds(0, 52, 424, 187);\r\n\t\t\r\n\t\t\r\n\t\ttext_1 = new Text(shlUser, SWT.BORDER);\t\t\r\n\t\ttext_1.setBounds(23, 263, 274, 23);\r\n\t\t\r\n\t\tButton button = new Button(shlUser, SWT.CENTER);\r\n\t\tbutton.setText(\"发送\");\r\n\t\tbutton.setBounds(321, 257, 80, 27);\r\n\t\t\r\n\t\ttext_2 = new Text(shlUser, SWT.BORDER);\r\n\t\ttext_2.setText(\"abc\");\r\n\t\ttext_2.setBounds(61, 7, 91, 23);\r\n\t\t\r\n\t\tLabel lblNewLabel = new Label(shlUser, SWT.NONE);\r\n\t\tlblNewLabel.setBounds(0, 10, 51, 17);\r\n\t\tlblNewLabel.setText(\"昵称:\");\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shlUser, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tnew Thread() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t// 连接服务器\r\n\t\t\t\t\t\t\t\tsocket = new Socket(\"127.0.0.1\", 8888);\r\n\t\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t\t// 如果连不上服务器,说明服务器未启动,则启动服务器\r\n\t\t\t\t\t\t\t\tserver = new ServerSocket(8888);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"服务器启动完成,监听端口:8888\");\r\n\t\t\t\t\t\t\t\tsocket = server.accept();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t * 注意:所有在自定义线程中修改图形控件属性,\r\n\t\t\t\t\t\t\t * 都必须使用 shell.getDisplay().asyncExec() 方法\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tMessageBox mb = new MessageBox(shlUser,SWT.OK);\r\n\t\t\t\t\t\t\t\t\tmb.setText(\"系统提示\");\r\n\t\t\t\t\t\t\t\t\tmb.setMessage(\"连接成功!现在你可以开始聊天了!\");\r\n\t\t\t\t\t\t\t\t\tmb.open();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\ttalker = new Talker(socket, new MsgListener() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onMessage(String msg) {\r\n\t\t\t\t\t\t\t\t\t// 收到消息时,将消息更新到多行文本框\r\n\t\t\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\ttext.setText(text.getText() + msg + \"\\r\\n\");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onConnect(InetAddress addr) {\r\n\t\t\t\t\t\t\t\t\t// 连接成功时,显示对方IP\r\n\t\t\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tlblNewLabel.setText(\"好友IP:\" + addr.getHostAddress());\r\n\t\t\t\t\t\t\t\t\t\t\ttext.setEnabled(true);\r\n\t\t\t\t\t\t\t\t\t\t\tbutton.setEnabled(true);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\tthrow new RuntimeException(e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}.start();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttMsg = new Text(shlUser, SWT.BORDER);\r\n\t\ttMsg.setEnabled(false);\r\n\t\ttMsg.setBounds(10, 364, 414, 26);\r\n\r\n\t\t\r\n\t\tbtnNewButton.setBounds(324, 7, 80, 27);\r\n\t\tbtnNewButton.setText(\"连接服务器\");\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (tMsg.getText().trim().isEmpty() == false) {\r\n\t\t\t\t\t\tString msg = talker.send(text_2.getText(), tMsg.getText());\r\n\t\t\t\t\t\ttext.setText(text.getText() + msg + \"\\r\\n\");\r\n\t\t\t\t\t\ttMsg.setText(\"\");\r\n\t\t\t\t\t\t// 设置焦点\r\n\t\t\t\t\t\ttMsg.setFocus();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(new Point(500, 360));\n\t\tshell.setMinimumSize(new Point(500, 360));\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setText(\"欢迎 \"+user.getName()+\" 同学使用学生成绩管理系统\");\n\t\tnew Label(shell, SWT.NONE);\n\t\t\n\t\tComposite compositeStdData = new Composite(shell, SWT.NONE);\n\t\tcompositeStdData.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\tGridLayout gl_compositeStdData = new GridLayout(2, false);\n\t\tgl_compositeStdData.verticalSpacing = 15;\n\t\tcompositeStdData.setLayout(gl_compositeStdData);\n\t\t\n\t\tLabel labelStdData = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdData.setAlignment(SWT.CENTER);\n\t\tlabelStdData.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));\n\t\tlabelStdData.setText(\"成绩数据\");\n\t\t\n\t\tLabel labelStdDataNum = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataNum.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelStdDataNum.setText(\"学号:\");\n\t\t\n\t\ttextStdDataNum = new Text(compositeStdData, SWT.BORDER);\n\t\ttextStdDataNum.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataName = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelStdDataName.setText(\"姓名:\");\n\t\t\n\t\ttextStdDataName = new Text(compositeStdData, SWT.BORDER);\n\t\ttextStdDataName.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataLine = new Label(compositeStdData, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabelStdDataLine.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));\n\t\tlabelStdDataLine.setText(\"New Label\");\n\t\t\n\t\tLabel labelCourseName = new Label(compositeStdData, SWT.NONE);\n\t\tlabelCourseName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelCourseName.setText(\"课程名\");\n\t\t\n\t\tLabel labelScore = new Label(compositeStdData, SWT.NONE);\n\t\tlabelScore.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelScore.setText(\"成绩\");\n\t\t\n\t\ttextCourseName = new Text(compositeStdData, SWT.BORDER);\n\t\ttextCourseName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\t\n\t\ttextScore = new Text(compositeStdData, SWT.BORDER);\n\t\ttextScore.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataFill = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataFill.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));\n\t\tnew Label(compositeStdData, SWT.NONE);\n\t\t\n\t\tComposite compositeStdOp = new Composite(shell, SWT.NONE);\n\t\tcompositeStdOp.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));\n\t\tGridLayout gl_compositeStdOp = new GridLayout(1, false);\n\t\tgl_compositeStdOp.verticalSpacing = 15;\n\t\tcompositeStdOp.setLayout(gl_compositeStdOp);\n\t\t\n\t\tLabel labelStdOP = new Label(compositeStdOp, SWT.NONE);\n\t\tlabelStdOP.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));\n\t\tlabelStdOP.setAlignment(SWT.CENTER);\n\t\tlabelStdOP.setText(\"操作菜单\");\n\t\t\n\t\tButton buttonStdOPFirst = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPFirst.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPFirst.setText(\"第一门课程\");\n\t\t\n\t\tButton buttonStdOPNext = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPNext.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPNext.setText(\"下一门课程\");\n\t\t\n\t\tButton buttonStdOPPrev = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPPrev.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPPrev.setText(\"上一门课程\");\n\t\t\n\t\tButton buttonStdOPLast = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPLast.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPLast.setText(\"最后一门课程\");\n\t\t\n\t\tCombo comboStdOPSele = new Combo(compositeStdOp, SWT.NONE);\n\t\tcomboStdOPSele.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\t\tcomboStdOPSele.setText(\"课程名?\");\n\t\t\n\t\tLabel labelStdOPFill = new Label(compositeStdOp, SWT.NONE);\n\t\tlabelStdOPFill.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t}", "protected Control createContents(Composite parent) {\n\t\tgetOverlayStore().load();\r\n\t\tgetOverlayStore().start();\r\n Composite composite = createContainer(parent);\r\n \r\n // The layout info for the preference page\r\n GridLayout gridLayout = new GridLayout();\r\n gridLayout.marginHeight = 0;\r\n gridLayout.marginWidth = 0;\r\n composite.setLayout(gridLayout);\r\n \r\n // A panel for the preference page\r\n Composite defPanel = new Composite(composite, SWT.NONE);\r\n GridLayout layout = new GridLayout();\r\n int numColumns = 2;\r\n layout.numColumns = numColumns;\r\n defPanel.setLayout(layout);\r\n GridData gridData =\r\n new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);\r\n defPanel.setLayoutData(gridData);\r\n \r\n\r\n // Browser options\r\n\t\tGroup wrappingGroup= createGroup(numColumns, defPanel, \"Web Browser\");\r\n\t\tString labelText= \"Use tabbed browsing\";\r\n\t\tlabelText= \"Used tabbed browsing\";\r\n\t\taddCheckBox(wrappingGroup, labelText, CFMLPreferenceConstants.P_TABBED_BROWSER, 1);\r\n \r\n // File paths\r\n createFilePathGroup(defPanel);\r\n \r\n // Images tooltips\r\n\t\tGroup imageGroup= createGroup(numColumns, defPanel, \"Images\");\r\n\t\tlabelText= \"Show Image Tooltips (restart required)\";\r\n\t\taddCheckBox(imageGroup, labelText, CFMLPreferenceConstants.P_IMAGE_TOOLTIPS, 1);\r\n \t\t\r\n\t\t// default help url\r\n\t\tGroup helpGroup= createGroup(numColumns, defPanel, \"External Help Documentation\");\r\n\t\tlabelText= \"Default URL:\";\r\n\t\taddTextField(helpGroup, labelText, CFMLPreferenceConstants.P_DEFAULT_HELP_URL, 50, 0, null);\r\n\t\tlabelText= \"Use external broswer\";\r\n\t\taddCheckBox(helpGroup, labelText, CFMLPreferenceConstants.P_HELP_URL_USE_EXTERNAL_BROWSER, 1);\r\n \r\n // Template Sites\r\n \r\n // createTemplateSitesPathGroup(defPanel);\r\n\r\n\t\tinitializeFields();\r\n\t\tapplyDialogFont(defPanel);\r\n\r\n\t\treturn composite;\r\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(447, 310);\n\t\tshell.setText(\"Verisure ASCII Node\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n\t\t\n\t\tTabItem basicItem = new TabItem(tabFolder, SWT.NONE);\n\t\tbasicItem.setText(\"Basic\");\n\t\t\n\t\tComposite basicComposite = new Composite(tabFolder, SWT.NONE);\n\t\tbasicItem.setControl(basicComposite);\n\t\tbasicComposite.setLayout(null);\n\t\t\n\t\tButton btnDelMeasurments = new Button(basicComposite, SWT.NONE);\n\t\t\n\t\tbtnDelMeasurments.setToolTipText(\"Delete the measurements from the device.\");\n\t\tbtnDelMeasurments.setBounds(269, 192, 159, 33);\n\t\tbtnDelMeasurments.setText(\"Delete measurements\");\n\t\t\n\t\tButton btnGetMeasurement = new Button(basicComposite, SWT.NONE);\n\t\tbtnGetMeasurement.setToolTipText(\"Get the latest measurement from the device.\");\n\t\t\n\t\tbtnGetMeasurement.setBounds(0, 36, 159, 33);\n\t\tbtnGetMeasurement.setText(\"Get new bloodvalue\");\n\t\t\n\t\tfinal StyledText receiveArea = new StyledText(basicComposite, SWT.BORDER | SWT.WRAP);\n\t\treceiveArea.setLocation(167, 30);\n\t\treceiveArea.setSize(259, 92);\n\t\treceiveArea.setToolTipText(\"This is where the measurement will be displayd.\");\n\t\t\n\t\tButton btnBase64 = new Button(basicComposite, SWT.RADIO);\n\t\tbtnBase64.setToolTipText(\"Show the latest blood value (base64 encoded).\");\n\t\tbtnBase64.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\t\n\t\tbtnDelMeasurments.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0){\n\t\t\t\treceiveArea.setText(\"Deleting measurements, please wait...\");\n\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tString theText = \"DEL\";\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//System.out.println(\"Hej\");\n\n\t\t\t\t\t\t//rest.doPut(\"lol\");\n\t\t\t\t\t\trest.doPut(theText);\n\t\t\t\t\t\tSystem.out.println(\"Sov i tre sekunder.\");\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (!db.getAck(theText, rest));\n\t\t\t\treceiveArea.setText(\"Deleted measurements from device.\");\n\t\t\t}\n\t\t});\n\t\tbtnBase64.setSelection(true);\n\t\tbtnBase64.setBounds(137, 130, 74, 25);\n\t\tbtnBase64.setText(\"base64\");\n\t\t\n\t\tButton btnHex = new Button(basicComposite, SWT.RADIO);\n\t\tbtnHex.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\n\t\t\t\ttype = 2;\n\t\t\t\tSystem.out.println(\"Bytte type till: \"+type);\n\n\t\t\t}\n\t\t});\n\t\tbtnHex.setToolTipText(\"Show the measurement in hex.\");\n\t\tbtnHex.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tbtnHex.setBounds(217, 130, 50, 25);\n\t\tbtnHex.setText(\"hex\");\n\t\t\n\t\tButton btnAscii = new Button(basicComposite, SWT.RADIO);\n\t\t\n\t\tbtnAscii.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\ttype = 1;\n\t\t\t\tSystem.out.println(\"Bytte type till: \"+type);\n\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\t * Return that the value should be represented as base64.\n\t\t * \n\t\t */\n\t\t\n\t\tbtnBase64.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\ttype = 0;\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnAscii.setToolTipText(\"Show the measurement in ascii.\");\n\t\tbtnAscii.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tbtnAscii.setBounds(269, 130, 53, 25);\n\t\tbtnAscii.setText(\"ascii\");\n\t\t\n\t\tLabel label = new Label(basicComposite, SWT.NONE);\n\t\tlabel.setText(\"A master thesis project by Pétur and David\");\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Cantarell\", 7, SWT.NORMAL));\n\t\tlabel.setBounds(10, 204, 192, 21);\n\t\t\n\t\tButton btnGetDbValue = new Button(basicComposite, SWT.NONE);\n\t\tbtnGetDbValue.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\treceiveArea.setText(db.getNodeFaults(type));\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\treceiveArea.setText(\"Getting latest measurements from db, please wait...\");\n\t\t\t}\n\t\t});\n\t\tbtnGetDbValue.setBounds(0, 71, 159, 33);\n\t\tbtnGetDbValue.setText(\"Get latest bloodvalue\");\n\t\t\n\t\t/*\n\t\t *Get measurement from device event handler \n\t\t *\n\t\t *@param The Mouse Adapter\n\t\t * \n\t\t */\n\t\t\n\t\t\n\t\tbtnGetMeasurement.addMouseListener(new MouseAdapter() {\n\t\t\t\n\t\t\tpublic void MouseDown(MouseEvent arg0){\n\t\t\t\treceiveArea.setText(\"Getting measurement from device, please wait...\");\n\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tString theText = \"LOG\";\n\t\t\t\t\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//System.out.println(\"Hej\");\n\n\t\t\t\t\t\t//rest.doPut(\"lol\");\n\t\t\t\t\t\trest.doPut(theText);\n\t\t\t\t\t\t\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (!db.getAck(theText, rest));\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(2000);\n\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t\treceiveArea.setText(db.getNodeFaults(type));\n\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\treceiveArea.setText(\"Getting measurements from device, please wait...\");\n\t\t\t}\n\t\t});\n\n\t\t\n\t\t/*\n\t\t * The advanced tab section\n\t\t */\n\t\t\n\t\tTabItem advancedItem = new TabItem(tabFolder, SWT.NONE);\n\t\tadvancedItem.setText(\"Advanced\");\n\t\t\n\t\tComposite advComposite = new Composite(tabFolder, SWT.NONE);\n\t\tadvancedItem.setControl(advComposite);\n\t\tadvComposite.setLayout(null);\n\t\t\n\t\tButton advSendButton = new Button(advComposite, SWT.NONE);\n\t\t\n\t\n\t\tadvSendButton.setToolTipText(\"Send arbitary data to the device.\");\n\t\n\t\tadvSendButton.setBounds(307, 31, 121, 33);\n\t\tadvSendButton.setText(\"Send Data\");\n\t\t\n\t\tLabel lblNewLabel = new Label(advComposite, SWT.NONE);\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"Cantarell\", 7, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(10, 204, 192, 21);\n\t\tlblNewLabel.setText(\"A master thesis project by Pétur and David\");\n\t\t\n\t\tfinal StyledText advSendArea = new StyledText(advComposite, SWT.BORDER | SWT.WRAP);\n\t\tadvSendArea.setToolTipText(\"This is where you type your arbitary data to send to the device.\");\n\t\tadvSendArea.setBounds(10, 31, 291, 33);\n\t\t\n\t\tButton advReceiveButton = new Button(advComposite, SWT.NONE);\n\t\t\n\n\t\t\n\t\tadvReceiveButton.setToolTipText(\"Receive data from the database.\");\n\t\tadvReceiveButton.setBounds(10, 70, 99, 33);\n\t\tadvReceiveButton.setText(\"Receive Data\");\n\t\t\n\t\tfinal StyledText advReceiveArea = new StyledText(advComposite, SWT.BORDER | SWT.WRAP);\n\t\tadvReceiveArea.setToolTipText(\"This is where the receive data will be presented.\");\n\t\tadvReceiveArea.setBounds(115, 67, 313, 70);\n\t\t\n\t\tButton advAscii = new Button(advComposite, SWT.RADIO);\n\t\tadvAscii.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvType = 1;\n\t\t\t}\n\t\t});\n\t\t\n\t\tadvReceiveButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tadvReceiveArea.setText(\"Receiving the data, please wait...\");\n\t\t\t\tXBNConnection xbn = new XBNConnection();\n\t\t\t\tString text = xbn.getNodeFaults(advType);\n\t\t\t\tadvReceiveArea.setText(text);\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvReceiveArea.setText(\"Receivng data from device, please wait\");\n\t\t\t}\n\t\t});\n\t\tadvAscii.setSelection(true);\n\t\tadvAscii.setToolTipText(\"Show the database results as ascii.\");\n\t\tadvAscii.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tadvAscii.setBounds(10, 109, 54, 25);\n\t\tadvAscii.setText(\"ascii\");\n\t\t\n\t\tButton advHex = new Button(advComposite, SWT.RADIO);\n\t\tadvHex.setToolTipText(\"Show the database results as hex.\");\n\t\tadvHex.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tadvHex.setBounds(66, 109, 43, 25);\n\t\tadvHex.setText(\"hex\");\n\t\tadvHex.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvType = 2;\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnDeleteDatabase = new Button(advComposite, SWT.NONE);\n\t\tbtnDeleteDatabase.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tdb.deleteMessages();\n\t\t\t\tadvReceiveArea.setText(\"Deleted data from database\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnDeleteDatabase.setToolTipText(\"Delete entries in the database.\");\n\t\tbtnDeleteDatabase.setText(\"Delete database\");\n\t\tbtnDeleteDatabase.setBounds(269, 192, 159, 33);\n\t\t\n\t\n\t\t\n\n\t\t/*\n\t\t * This is the advanced send button. Can send arbitary text to the device.\n\t\t */\n\t\t\n\t\tadvSendButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\t//advSendArea.setText(\"Sending: '\"+advSendArea.getText()+\"' to the device, please wait...\");\n\t\t\t\tString theText = advSendArea.getText();\n\t\t\t\tSystem.out.println(\"Texten som ska skickas är: \" + theText);\n\t\t\t\t\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tString chunkText = \"\";\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tStringBuilder sb = new StringBuilder(theText);\n\t\t\t\t// Add and @ to be sure that there will never be two strings that are\n\t\t\t\t// the same in a row.\n\t\t\t\t// for (int i = 3; i < sb.toString().length(); i += 6) {\n\t\t\t\t// sb.insert(i, \"@\");\n\t\t\t\t// }\n\t\t\t\t// theText = sb.toString();\n\t\t\t\tSystem.out.println(theText);\n\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\tif (theText.length() < 3) {\n\t\t\t\t\t\tchunkText = theText.substring(0, theText.length());\n\t\t\t\t\t\tint pad = theText.length() % 3;\n\t\t\t\t\t\tif (pad == 1) {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunkText = theText.substring(0, 3);\n\t\t\t\t\t}\n\n\t\t\t\t\ttheText = theText.substring(3);\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\trest.doPut(chunkText);\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile (theText.length() > 0 && db.getAck(chunkText, rest));\n\t\t\t\tadvSendArea.setText(\"Data sent to the device.\");\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\t});\n\n\t}", "protected void createContents() {\n\n\t\tfinal FileServeApplicationWindow appWindow = this;\n\n\t\tthis.shlFileServe = new Shell();\n\t\tthis.shlFileServe.setSize(450, 300);\n\t\tthis.shlFileServe.setText(\"File Serve - Server\");\n\t\tthis.shlFileServe.setLayout(new BorderLayout(0, 0));\n\n\t\tthis.composite = new Composite(this.shlFileServe, SWT.NONE);\n\t\tthis.composite.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tthis.composite.setLayoutData(BorderLayout.CENTER);\n\t\tthis.composite.setLayout(new FormLayout());\n\n\t\tthis.lblServerTcpPort = new Label(this.composite, SWT.NONE);\n\t\tFormData fd_lblServerTcpPort = new FormData();\n\t\tfd_lblServerTcpPort.top = new FormAttachment(0, 10);\n\t\tfd_lblServerTcpPort.left = new FormAttachment(0, 10);\n\t\tthis.lblServerTcpPort.setLayoutData(fd_lblServerTcpPort);\n\t\tthis.lblServerTcpPort.setText(\"Server TCP Port:\");\n\n\t\tthis.serverTCPPortField = new Text(this.composite, SWT.BORDER);\n\t\tthis.serverTCPPortField.setTextLimit(5);\n\t\tthis.serverTCPPortField.addVerifyListener(new VerifyListener() {\n\t\t\t@Override\n\t\t\tpublic void verifyText(VerifyEvent e) {\n\t\t\t\te.doit = true;\n\t\t\t\tfor(int i = 0; i < e.text.length(); i++) {\n\n\t\t\t\t\tchar c = e.text.charAt(i);\n\n\t\t\t\t\tboolean b = false;\n\n\t\t\t\t\tif(c >= '0' && c <= '9') {b = true;}\n\t\t\t\t\telse if(c == SWT.BS) {b = true;}\n\t\t\t\t\telse if(c == SWT.DEL) {b = true;}\n\n\t\t\t\t\tif(b == false) {\n\t\t\t\t\t\te.doit = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tFormData fd_serverTCPPortField = new FormData();\n\t\tfd_serverTCPPortField.top = new FormAttachment(0, 7);\n\t\tfd_serverTCPPortField.right = new FormAttachment(100, -54);\n\t\tfd_serverTCPPortField.left = new FormAttachment(this.lblServerTcpPort, 12);\n\t\tthis.serverTCPPortField.setLayoutData(fd_serverTCPPortField);\n\n\t\tthis.btnStartServer = new Button(this.composite, SWT.NONE);\n\t\tFormData fd_btnStartServer = new FormData();\n\t\tfd_btnStartServer.bottom = new FormAttachment(100, -10);\n\t\tfd_btnStartServer.right = new FormAttachment(100, -10);\n\t\tthis.btnStartServer.setLayoutData(fd_btnStartServer);\n\t\tthis.btnStartServer.setText(\"Start Server\");\n\n\t\tthis.lblServerStatus = new Label(this.composite, SWT.NONE);\n\t\tFormData fd_lblServerStatus = new FormData();\n\t\tfd_lblServerStatus.right = new FormAttachment(this.btnStartServer, -6);\n\t\tfd_lblServerStatus.top = new FormAttachment(this.btnStartServer, 5, SWT.TOP);\n\t\tfd_lblServerStatus.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.lblServerStatus.setLayoutData(fd_lblServerStatus);\n\t\tthis.lblServerStatus.setText(\"Server Status: Stopped\");\n\n\t\tthis.text = new Text(this.composite, SWT.BORDER);\n\t\tFormData fd_text = new FormData();\n\t\tfd_text.top = new FormAttachment(this.serverTCPPortField, 6);\n\t\tthis.text.setLayoutData(fd_text);\n\n\t\tthis.lblHighestDirectory = new Label(this.composite, SWT.NONE);\n\t\tfd_text.left = new FormAttachment(this.lblHighestDirectory, 6);\n\t\tFormData fd_lblHighestDirectory = new FormData();\n\t\tfd_lblHighestDirectory.top = new FormAttachment(this.lblServerTcpPort, 12);\n\t\tfd_lblHighestDirectory.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.lblHighestDirectory.setLayoutData(fd_lblHighestDirectory);\n\t\tthis.lblHighestDirectory.setText(\"Highest Directory:\");\n\n\t\tthis.button = new Button(this.composite, SWT.NONE);\n\n\t\tfd_text.right = new FormAttachment(100, -54);\n\t\tFormData fd_button = new FormData();\n\t\tfd_button.left = new FormAttachment(this.text, 6);\n\t\tthis.button.setLayoutData(fd_button);\n\t\tthis.button.setText(\"...\");\n\n\t\tthis.grpConnectionInformation = new Group(this.composite, SWT.NONE);\n\t\tfd_button.bottom = new FormAttachment(this.grpConnectionInformation, -1);\n\t\tthis.grpConnectionInformation.setText(\"Connection Information:\");\n\t\tthis.grpConnectionInformation.setLayout(new BorderLayout(0, 0));\n\t\tFormData fd_grpConnectionInformation = new FormData();\n\t\tfd_grpConnectionInformation.bottom = new FormAttachment(this.btnStartServer, -6);\n\t\tfd_grpConnectionInformation.right = new FormAttachment(this.btnStartServer, 0, SWT.RIGHT);\n\t\tfd_grpConnectionInformation.top = new FormAttachment(this.lblHighestDirectory, 6);\n\t\tfd_grpConnectionInformation.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.grpConnectionInformation.setLayoutData(fd_grpConnectionInformation);\n\n\t\tthis.scrolledComposite = new ScrolledComposite(this.grpConnectionInformation, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tthis.scrolledComposite.setLayoutData(BorderLayout.CENTER);\n\t\tthis.scrolledComposite.setExpandHorizontal(true);\n\t\tthis.scrolledComposite.setExpandVertical(true);\n\n\t\tthis.table = new Table(this.scrolledComposite, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tthis.table.setLinesVisible(true);\n\t\tthis.table.setHeaderVisible(true);\n\t\tthis.scrolledComposite.setContent(this.table);\n\t\tthis.scrolledComposite.setMinSize(this.table.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\n\t}", "protected void createContents() {\n cmd.setBean(nodeProperties);\n cmd.setNode(node);\n shell = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);\n shell.setLayout(new FormLayout());\n shell.setSize(800, 500);\n shell.setText(\"详细信息属性\");\n\n final Composite composite_3 = new Composite(shell, SWT.NONE);\n final FormData fd_composite_3 = new FormData();\n fd_composite_3.top = new FormAttachment(0, 1);\n fd_composite_3.left = new FormAttachment(0, 5);\n fd_composite_3.height = 100;\n fd_composite_3.right = new FormAttachment(100, -5);\n composite_3.setLayoutData(fd_composite_3);\n composite_3.setLayout(new FormLayout());\n\n final Group basicGroup = new Group(composite_3, SWT.NONE);\n basicGroup.setLayout(new FormLayout());\n final FormData fd_basicGroup = new FormData();\n fd_basicGroup.bottom = new FormAttachment(100, -1);\n fd_basicGroup.top = new FormAttachment(0, -6);\n fd_basicGroup.right = new FormAttachment(100, 0);\n fd_basicGroup.left = new FormAttachment(0, 0);\n basicGroup.setLayoutData(fd_basicGroup);\n\n final Label label = new Label(basicGroup, SWT.RIGHT);\n final FormData fd_label = new FormData();\n fd_label.top = new FormAttachment(0, 0);\n fd_label.right = new FormAttachment(15, 0);\n fd_label.left = new FormAttachment(0, 0);\n label.setLayoutData(fd_label);\n label.setText(\"节点名称:\");\n\n txtName = new Text(basicGroup, SWT.BORDER);\n final FormData fd_txtName = new FormData();\n fd_txtName.top = new FormAttachment(0, 0);\n fd_txtName.right = new FormAttachment(40, 0);\n fd_txtName.left = new FormAttachment(label, 0);\n txtName.setLayoutData(fd_txtName);\n txtName.setEditable(true);\n\n final Label label_1 = new Label(basicGroup, SWT.RIGHT);\n final FormData fd_label_1 = new FormData();\n fd_label_1.top = new FormAttachment(0, 0);\n fd_label_1.right = new FormAttachment(55, 0);\n fd_label_1.left = new FormAttachment(txtName, 0);\n label_1.setLayoutData(fd_label_1);\n label_1.setText(\"数据表名:\");\n\n txtTableName = new Text(basicGroup, SWT.BORDER);\n txtTableName.setEditable(false);\n final FormData fd_txtTableName = new FormData();\n fd_txtTableName.top = new FormAttachment(0, 0);\n fd_txtTableName.right = new FormAttachment(90, 0);\n fd_txtTableName.left = new FormAttachment(label_1, 0);\n txtTableName.setLayoutData(fd_txtTableName);\n\n final Button btnSelectTable = new Button(basicGroup, SWT.NONE);\n final FormData fd_btnSelectTable = new FormData();\n fd_btnSelectTable.top = new FormAttachment(0, 0);\n fd_btnSelectTable.right = new FormAttachment(100, -1);\n fd_btnSelectTable.left = new FormAttachment(txtTableName, 0);\n fd_btnSelectTable.height = 23;\n btnSelectTable.setLayoutData(fd_btnSelectTable);\n btnSelectTable.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(final SelectionEvent e) {\n DataTableDialog dataSoruceDlg = new DataTableDialog(shell);\n DataTable dt = dataSoruceDlg.open();\n if (dt != null) {\n txtTableName.setText(dt.getCnName());\n nodeProperties.setTableName(dt.getCnName());\n nodeProperties.setName(dt.getName());\n loadFieldsInfo(dt);\n nodeProperties.setDataTable(dt);\n int res = MessageUtil.comfirm(shell, \"导入\", \"是否导入字段信息?\\r\\n注意:已有字段信息将被覆盖!\");\n if (res == SWT.YES) {\n dataFieldList.clear();\n for (DataField df : dt.getFields()) {\n dataFieldList.add(df);\n }\n tvDataField.refresh();\n }\n }\n }\n });\n btnSelectTable.setText(\"选择表\");\n\n final Label lblDescription = new Label(basicGroup, SWT.RIGHT);\n final FormData fd_lblDescription = new FormData();\n fd_lblDescription.top = new FormAttachment(label, 10);\n fd_lblDescription.bottom = new FormAttachment(100, -2);\n fd_lblDescription.left = new FormAttachment(0, 0);\n fd_lblDescription.right = new FormAttachment(15, 0);\n lblDescription.setLayoutData(fd_lblDescription);\n lblDescription.setText(\"说明:\");\n\n txtDes = new StyledText(basicGroup, SWT.BORDER);\n final FormData fd_txtDes = new FormData();\n fd_txtDes.top = new FormAttachment(txtName, 5);\n fd_txtDes.left = new FormAttachment(15, 0);\n fd_txtDes.right = new FormAttachment(100, -2);\n fd_txtDes.bottom = new FormAttachment(100, -2);\n txtDes.setLayoutData(fd_txtDes);\n\n final Button btnOk = new Button(shell, SWT.NONE);\n btnOk.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/tick.png\"));\n final FormData fd_btnOk = new FormData();\n fd_btnOk.height = 28;\n fd_btnOk.width = 80;\n fd_btnOk.bottom = new FormAttachment(100, -5);\n fd_btnOk.right = new FormAttachment(50, -10);\n btnOk.setLayoutData(fd_btnOk);\n btnOk.setText(\"确定(&O)\");\n btnOk.addListener(SWT.Selection, new Listener() {\n public void handleEvent(Event e) {\n save();\n result = 1;\n close();\n }\n });\n\n final Button btnCancel = new Button(shell, SWT.NONE);\n btnCancel.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/cross.png\"));\n final FormData fd_btnCancel = new FormData();\n fd_btnCancel.height = 28;\n fd_btnCancel.width = 80;\n fd_btnCancel.bottom = new FormAttachment(100, -5);\n fd_btnCancel.left = new FormAttachment(50, 10);\n btnCancel.setLayoutData(fd_btnCancel);\n btnCancel.setText(\"取消(&C)\");\n btnCancel.addListener(SWT.Selection, new Listener() {\n public void handleEvent(Event e) {\n close();\n }\n });\n\n final TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(final SelectionEvent e) {\n TabItem ti = (TabItem) e.item;\n if (ti.getText().startsWith(\"SQL\")) {\n DataNodeProperties d = new DataNodeProperties();\n d.setAdditionSql(txtOtherCondition.getText());\n // d.setTableName(nodeProperties.getTableName());\n d.setName(nodeProperties.getName());\n d.setFields(dataFieldList);\n d.setFilters(filterList);\n txtSQL.setText(d.getSQL(null));\n }\n else if (ti.getText().startsWith(\"过滤\")) {\n String[] fNames = null;\n if (dataFieldList != null && dataFieldList.size() > 0) {\n fNames = new String[dataFieldList.size()];\n for (int i = 0; i < dataFieldList.size(); i++) {\n fNames[i] = dataFieldList.get(i).getAliasName();\n }\n }\n else fNames = new String[] { \"\" };\n // filtersCellModifier.setAliasNames(fNames);\n tvFilter.setCellModifier(new FiltersCellModifier(tvFilter, fNames));\n tvFilter.getCellEditors()[0] = new ComboBoxCellEditor(tblFilter, fNames, SWT.READ_ONLY);\n }\n else if (ti.getText().startsWith(\"列表配置\")) {\n \tif (dataFieldList.size() > configList.size()) {\n \t\tint configLength = configList.size();\n \t\t//添加\n \tfor (int i = 0 ;i<dataFieldList.size();i++ ) {\n \t\tDataField dataField = dataFieldList.get(i);\n \t\tString cnName = dataField.getCnName();\n String aliasName = dataField.getAliasName();\n if (!\"\".equals(cnName) && !\"\".equals(aliasName)) {\n \tboolean haveFlg = false;\n \tfor (int j = 0 ;j< configLength;j++) {\n \t\tFieldConfig filedCfig = configList.get(j);\n \t\tif (!(filedCfig.getCnName().equals(cnName) &&filedCfig.getName().equals(aliasName))) {\n \t\t\tcontinue;\n \t\t} else {\n \t\t\thaveFlg = true;\n \t\t\tbreak;\n \t\t}\n \t}\n \tif (!haveFlg) {//原列表不存在此记录\n FieldConfig newFieldCfig = new FieldConfig();\n \t\t\tnewFieldCfig.setCnName(cnName);\n \t\t\tnewFieldCfig.setName(aliasName);\n \t\t\tconfigList.add(newFieldCfig);\n \t}\n }\n \t}\n \t//\n// \tfor (int k = 0;k< configLength;k++) {\n// \t\tFieldConfig filedCfig = configList.get(k);\n// \t\tString cnName = filedCfig.getCnName();\n// String aliasName = filedCfig.getName();\n// boolean haveFiledFlg = false;\n// for (int i = 0 ;i<dataFieldList.size();i++ ) {\n// \tDataField dataField = dataFieldList.get(i);\n// \tif (!(dataField.getAliasName().equals(aliasName) && dataField.getCnName().equals(cnName))) {\n// \t\tcontinue;\n// \t} else {\n// \t\thaveFiledFlg = true;\n// \t\tbreak;\n// \t}\n// }\n// if (!haveFiledFlg) {\n// \tconfigList.remove(k);\n// }\n// \n// \t}\n \t//刷新列表\n \ttvShowConfig.refresh();\n \t}\n }\n }\n });\n final FormData fd_tabFolder = new FormData();\n fd_tabFolder.bottom = new FormAttachment(100, -40);\n fd_tabFolder.top = new FormAttachment(composite_3, 3, SWT.BOTTOM);\n fd_tabFolder.right = new FormAttachment(100, -5);\n fd_tabFolder.left = new FormAttachment(0, 5);\n tabFolder.setLayoutData(fd_tabFolder);\n\n final TabItem tabFields = new TabItem(tabFolder, SWT.NONE);\n tabFields.setText(\"查询字段\");\n\n final Composite composite_1 = new Composite(tabFolder, SWT.NONE);\n composite_1.setLayout(new FormLayout());\n tabFields.setControl(composite_1);\n\n final Group group_1 = new Group(composite_1, SWT.NONE);\n final FormData fd_group_1 = new FormData();\n fd_group_1.left = new FormAttachment(0, 0);\n fd_group_1.bottom = new FormAttachment(100, 0);\n fd_group_1.right = new FormAttachment(100, 0);\n fd_group_1.top = new FormAttachment(0, -6);\n group_1.setLayoutData(fd_group_1);\n group_1.setLayout(new FormLayout());\n // tabFields.setControl(group_1);\n\n tvDataField = new TableViewer(group_1, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);\n tvDataField.setContentProvider(new ViewContentProvider());\n tvDataField.setLabelProvider(new DataFieldsLabelProvider0());\n tvDataField.setColumnProperties(DATAFIELDS0);\n tblDataField = tvDataField.getTable();\n\n CellEditor[] cellEditor = new CellEditor[7];\n cellEditor[0] = new TextCellEditor(tblDataField);\n cellEditor[1] = new TextCellEditor(tblDataField);\n cellEditor[2] = new TextCellEditor(tblDataField);\n cellEditor[3] = new ComboBoxCellEditor(tblDataField, Consts.DATATYPE_LABEL, SWT.READ_ONLY);\n cellEditor[4] = new TextCellEditor(tblDataField);\n cellEditor[5] = new ComboBoxCellEditor(tblDataField, Consts.SORTDIRECT_LABEL, SWT.READ_ONLY);\n// cellEditor[6] = new ComboBoxCellEditor(tblDataField, Consts.AGGREGATE_LABEL, SWT.READ_ONLY);\n// cellEditor[7] = new TextCellEditor(tblDataField);\n cellEditor[6] = new ComboBoxCellEditor(tblDataField, Consts.YESNO_LABEL, SWT.READ_ONLY);\n Text text1 = (Text) cellEditor[4].getControl();\n text1.addVerifyListener(new VerifyListener() {\n public void verifyText(VerifyEvent e) {\n String str = e.text;\n if (str != null && str.length() > 0) e.doit = StringUtil.isInteger(str);\n }\n });\n// Text text2 = (Text) cellEditor[7].getControl();\n// text2.addVerifyListener(new VerifyListener() {\n// public void verifyText(VerifyEvent e) {\n// String str = e.text;\n// if (str != null && str.length() > 0) e.doit = StringUtil.isInteger(str);\n// }\n// });\n\n tvDataField.setCellEditors(cellEditor);\n tvDataField.setCellModifier(new DataFieldsCellModifier2(tvDataField));\n\n final FormData fd_table_1 = new FormData();\n fd_table_1.bottom = new FormAttachment(100, -22);\n fd_table_1.top = new FormAttachment(0, -6);\n fd_table_1.right = new FormAttachment(100, 0);\n fd_table_1.left = new FormAttachment(0, 0);\n tblDataField.setLayoutData(fd_table_1);\n tblDataField.setLinesVisible(true);\n tblDataField.setHeaderVisible(true);\n\n final TableColumn colCnName = new TableColumn(tblDataField, SWT.NONE);\n colCnName.setWidth(100);\n colCnName.setText(\"中文名\");\n\n final TableColumn colFieldName = new TableColumn(tblDataField, SWT.NONE);\n colFieldName.setWidth(100);\n colFieldName.setText(\"字段名\");\n\n final TableColumn colAliasName = new TableColumn(tblDataField, SWT.NONE);\n colAliasName.setWidth(100);\n colAliasName.setText(\"别名\");\n\n final TableColumn colDataType = new TableColumn(tblDataField, SWT.NONE);\n colDataType.setWidth(80);\n colDataType.setText(\"数据类型\");\n\n final TableColumn colSortNo = new TableColumn(tblDataField, SWT.NONE);\n colSortNo.setWidth(60);\n colSortNo.setText(\"排序顺序\");\n\n final TableColumn colSortDirect = new TableColumn(tblDataField, SWT.NONE);\n colSortDirect.setWidth(80);\n colSortDirect.setText(\"排序方向\");\n\n final TableColumn colOutput = new TableColumn(tblDataField, SWT.NONE);\n colOutput.setWidth(80);\n colOutput.setText(\"是否输出\");\n\n final TabItem tabFilter = new TabItem(tabFolder, SWT.NONE);\n tabFilter.setText(\"过滤条件\");\n\n final Composite composite = new Composite(tabFolder, SWT.NONE);\n composite.setLayout(new FormLayout());\n tabFilter.setControl(composite);\n\n final Group group_2 = new Group(composite, SWT.NO_RADIO_GROUP);\n final FormData fd_group_2 = new FormData();\n fd_group_2.left = new FormAttachment(0, 0);\n fd_group_2.right = new FormAttachment(100, 0);\n fd_group_2.top = new FormAttachment(0, -6);\n fd_group_2.bottom = new FormAttachment(100, -80);\n group_2.setLayoutData(fd_group_2);\n group_2.setLayout(new FormLayout());\n\n tvFilter = new TableViewer(group_2, SWT.FULL_SELECTION | SWT.BORDER);\n tvFilter.setLabelProvider(new FiltersLabelProvider());\n tvFilter.setContentProvider(new ViewContentProvider());\n tvFilter.setColumnProperties(FiltersLabelProvider.DATAFIELDS);\n tblFilter = tvFilter.getTable();\n CellEditor[] cellEditor1 = new CellEditor[3];\n cellEditor1[0] = new TextCellEditor(tblFilter);\n String[] aliasNames = new String[] { \"\" };\n cellEditor1[0] = new ComboBoxCellEditor(tblFilter, aliasNames, SWT.READ_ONLY);\n cellEditor1[1] = new ComboBoxCellEditor(tblFilter, Consts.OPERATOR_LABEL, SWT.READ_ONLY);\n cellEditor1[2] = new TextCellEditor(tblFilter);\n tvFilter.setCellEditors(cellEditor1);\n // filtersCellModifier = new FiltersCellModifier(tvFilter, aliasNames);\n tvFilter.setCellModifier(new FiltersCellModifier(tvFilter, aliasNames));\n\n final FormData fd_table_2 = new FormData();\n fd_table_2.bottom = new FormAttachment(100, -21);\n fd_table_2.top = new FormAttachment(0, -5);\n fd_table_2.right = new FormAttachment(100, -1);\n fd_table_2.left = new FormAttachment(0, 1);\n tblFilter.setLayoutData(fd_table_2);\n tblFilter.setLinesVisible(true);\n tblFilter.setHeaderVisible(true);\n\n final TableColumn colFilterFieldName = new TableColumn(tblFilter, SWT.NONE);\n colFilterFieldName.setWidth(120);\n colFilterFieldName.setText(\"字段名称\");\n\n final TableColumn colOper = new TableColumn(tblFilter, SWT.NONE);\n colOper.setWidth(120);\n colOper.setText(\"操作符\");\n\n final TableColumn colFilterData = new TableColumn(tblFilter, SWT.NONE);\n colFilterData.setWidth(500);\n colFilterData.setText(\"操作数据\");\n\n final Button btnFilterAdd = new Button(group_2, SWT.NONE);\n btnFilterAdd.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(final SelectionEvent e) {\n Filter df = new Filter();\n df.setField(\"\");\n df.setOperator(\"=\");\n df.setExpression(\"\");\n filterList.add(df);\n tvFilter.refresh();\n }\n });\n btnFilterAdd.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/plus.png\"));\n final FormData fd_btnFilterAdd = new FormData();\n fd_btnFilterAdd.bottom = new FormAttachment(100, -1);\n fd_btnFilterAdd.left = new FormAttachment(0, 1);\n fd_btnFilterAdd.height = 20;\n fd_btnFilterAdd.width = 20;\n btnFilterAdd.setLayoutData(fd_btnFilterAdd);\n\n final Button btnFilterDel = new Button(group_2, SWT.NONE);\n btnFilterDel.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(final SelectionEvent e) {\n TableItem[] selectItems = tblFilter.getSelection();\n if (selectItems != null && selectItems.length > 0) {\n for (TableItem ti : selectItems) {\n Filter o = (Filter) ti.getData();\n filterList.remove(o);\n }\n tvFilter.refresh();\n }\n }\n });\n btnFilterDel.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/minus.png\"));\n final FormData fd_btnFilterDel = new FormData();\n fd_btnFilterDel.bottom = new FormAttachment(100, -1);\n fd_btnFilterDel.left = new FormAttachment(btnFilterAdd, 1, SWT.DEFAULT);\n fd_btnFilterDel.height = 20;\n fd_btnFilterDel.width = 20;\n btnFilterDel.setLayoutData(fd_btnFilterDel);\n\n final Button btnFilterUp = new Button(group_2, SWT.NONE);\n btnFilterUp.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/arrow-090.png\"));\n final FormData fd_btnFilterUp = new FormData();\n fd_btnFilterUp.bottom = new FormAttachment(100, -1);\n fd_btnFilterUp.left = new FormAttachment(btnFilterDel, 1, SWT.DEFAULT);\n fd_btnFilterUp.height = 20;\n fd_btnFilterUp.width = 20;\n btnFilterUp.setLayoutData(fd_btnFilterUp);\n btnFilterUp.setVisible(false);\n\n final Button btnFilterDown = new Button(group_2, SWT.NONE);\n btnFilterDown.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/arrow-270.png\"));\n final FormData fd_btnFilterDown = new FormData();\n fd_btnFilterDown.bottom = new FormAttachment(100, -1);\n fd_btnFilterDown.left = new FormAttachment(btnFilterUp, 1, SWT.DEFAULT);\n fd_btnFilterDown.height = 20;\n fd_btnFilterDown.width = 20;\n btnFilterDown.setLayoutData(fd_btnFilterDown);\n btnFilterDown.setVisible(false);\n\n final Label label_2 = new Label(composite, SWT.NONE);\n final FormData fd_label_2 = new FormData();\n fd_label_2.bottom = new FormAttachment(100, -60);\n fd_label_2.top = new FormAttachment(group_2, 1);\n fd_label_2.width = 70;\n fd_label_2.left = new FormAttachment(0, 0);\n label_2.setLayoutData(fd_label_2);\n label_2.setText(\"其他条件:\");\n\n txtOtherCondition = new StyledText(composite, SWT.BORDER);\n final FormData fd_txtOtherCondition = new FormData();\n fd_txtOtherCondition.bottom = new FormAttachment(100, -1);\n fd_txtOtherCondition.top = new FormAttachment(label_2, 1);\n fd_txtOtherCondition.right = new FormAttachment(100, -1);\n fd_txtOtherCondition.left = new FormAttachment(0, 1);\n txtOtherCondition.setLayoutData(fd_txtOtherCondition);\n\n final Button btnFieldAdd = new Button(group_1, SWT.NONE);\n btnFieldAdd.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(final SelectionEvent e) {\n DataField df = new DataField();\n df.setOutput(Consts.YES);\n df.setSortDirect(\"\");\n df.setSortNo(\"\");\n df.setAggregate(\"\");\n dataFieldList.add(df);\n tvDataField.refresh();\n }\n });\n btnFieldAdd.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/plus.png\"));\n final FormData fd_btnFieldAdd = new FormData();\n fd_btnFieldAdd.bottom = new FormAttachment(100, 0);\n fd_btnFieldAdd.left = new FormAttachment(0, 0);\n fd_btnFieldAdd.height = 20;\n fd_btnFieldAdd.width = 20;\n btnFieldAdd.setLayoutData(fd_btnFieldAdd);\n\n final Button btnFieldDel = new Button(group_1, SWT.NONE);\n btnFieldDel.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(final SelectionEvent e) {\n TableItem[] selectItems = tblDataField.getSelection();\n if (selectItems != null && selectItems.length > 0) {\n for (TableItem ti : selectItems) {\n DataField o = (DataField) ti.getData();\n //\n String cnName = o.getCnName();\n String aliasName = o.getAliasName();\n for (int i = 0;i< configList.size();i++) {\n \tFieldConfig cfig = configList.get(i);\n \tif (cnName.equals(cfig.getCnName()) && aliasName.equals(cfig.getName())) {\n \t\tconfigList.remove(i);\n \t\tbreak;\n \t}\n }\n \n dataFieldList.remove(o);\n }\n tvDataField.refresh();\n tvShowConfig.refresh();\n }\n }\n });\n btnFieldDel.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/minus.png\"));\n final FormData fd_btnFieldDel = new FormData();\n fd_btnFieldDel.bottom = new FormAttachment(100, 0);\n fd_btnFieldDel.left = new FormAttachment(0, 21);\n fd_btnFieldDel.height = 20;\n fd_btnFieldDel.width = 20;\n btnFieldDel.setLayoutData(fd_btnFieldDel);\n\n final TabItem tabSQL = new TabItem(tabFolder, SWT.NONE);\n tabSQL.setText(\"SQL语句\");\n\n final Composite composite_2 = new Composite(tabFolder, SWT.NONE);\n composite_2.setLayout(new FormLayout());\n tabSQL.setControl(composite_2);\n\n final Group group = new Group(composite_2, SWT.NONE);\n final FormData fd_group = new FormData();\n fd_group.top = new FormAttachment(0, -6);\n fd_group.right = new FormAttachment(100, 0);\n fd_group.left = new FormAttachment(0, 0);\n fd_group.bottom = new FormAttachment(100, 0);\n group.setLayoutData(fd_group);\n group.setLayout(new FormLayout());\n\n txtSQL = new StyledText(group, SWT.BORDER|SWT.WRAP|SWT.MULTI|SWT.V_SCROLL|SWT.H_SCROLL);\n final FormData fd_txtSQL = new FormData();\n fd_txtSQL.bottom = new FormAttachment(100, 0);\n fd_txtSQL.top = new FormAttachment(0, -6);\n fd_txtSQL.right = new FormAttachment(100, 0);\n fd_txtSQL.left = new FormAttachment(0, 0);\n txtSQL.setLayoutData(fd_txtSQL);\n txtSQL.setWordWrap(true);\n txtSQL.setFont(SWTResourceManager.getFont(\"Fixedsys\", 10, SWT.NONE));\n txtSQL.setEditable(false);\n\n final TabItem tabItem = new TabItem(tabFolder, SWT.NONE);\n tabItem.setText(\"列表配置\");\n\n final Composite composite_1_1 = new Composite(tabFolder, SWT.NONE);\n composite_1_1.setLayout(new FormLayout());\n tabItem.setControl(composite_1_1);\n\n final Group group_3 = new Group(composite_1_1, SWT.NONE);\n group_3.setLayout(new FormLayout());\n final FormData fd_group_3 = new FormData();\n fd_group_3.left = new FormAttachment(0, 0);\n fd_group_3.bottom = new FormAttachment(100, 0);\n fd_group_3.right = new FormAttachment(100, 0);\n fd_group_3.top = new FormAttachment(0, -6);\n group_3.setLayoutData(fd_group_3);\n\n tvShowConfig = new TableViewer(group_3, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);\n tvShowConfig.setContentProvider(new ViewContentProvider());\n tvShowConfig.setLabelProvider(new ShowConfigLabelProvider());\n tvShowConfig.setColumnProperties(DATAFIELDS);\n tblShowConfig = tvShowConfig.getTable();\n\n CellEditor[] cfigCellEditor = new CellEditor[8];\n cfigCellEditor[0] = new TextCellEditor(tblShowConfig);\n cfigCellEditor[1] = new TextCellEditor(tblShowConfig);\n cfigCellEditor[2] = new TextCellEditor(tblShowConfig);\n cfigCellEditor[3] = new ComboBoxCellEditor(tblShowConfig, Consts.ALIGN_LABEL, SWT.READ_ONLY);\n cfigCellEditor[4] = new TextCellEditor(tblShowConfig);\n cfigCellEditor[5] = new ComboBoxCellEditor(tblShowConfig, Consts.YESNO_LABEL, SWT.READ_ONLY);\n cfigCellEditor[6] = new ComboBoxCellEditor(tblShowConfig, codeSetNames, SWT.READ_ONLY);\n// cellEditor[7] = new DetailLinkCellEditor(tblShowConfig, configList, diagram.getNodes());\n Text text10 = (Text) cfigCellEditor[4].getControl();\n text10.addVerifyListener(new NumberVerifier());\n\n tvShowConfig.setCellEditors(cfigCellEditor);\n tvShowConfig.setCellModifier(new ShowConfigCellModifier(tvShowConfig));\n \n final FormData fd_table_1_1 = new FormData();\n fd_table_1_1.bottom = new FormAttachment(100, -21);\n fd_table_1_1.top = new FormAttachment(0, 1);\n fd_table_1_1.right = new FormAttachment(100, -1);\n fd_table_1_1.left = new FormAttachment(0, 0);\n tblShowConfig.setLayoutData(fd_table_1_1);\n tblShowConfig.setLinesVisible(true);\n tblShowConfig.setHeaderVisible(true);\n\n final TableColumn colCnName_1 = new TableColumn(tblShowConfig, SWT.NONE);\n colCnName_1.setWidth(120);\n colCnName_1.setText(\"中文名\");\n\n final TableColumn colFieldName_1 = new TableColumn(tblShowConfig, SWT.NONE);\n colFieldName_1.setWidth(120);\n colFieldName_1.setText(\"列名\");\n\n final TableColumn colDataType_1 = new TableColumn(tblShowConfig, SWT.NONE);\n colDataType_1.setWidth(60);\n colDataType_1.setText(\"数据格式\");\n\n final TableColumn colAlign = new TableColumn(tblShowConfig, SWT.NONE);\n colAlign.setWidth(70);\n colAlign.setText(\"对齐方式\");\n\n final TableColumn colWidth = new TableColumn(tblShowConfig, SWT.NONE);\n colWidth.setWidth(40);\n colWidth.setText(\"宽度\");\n\n final TableColumn colVisible = new TableColumn(tblShowConfig, SWT.NONE);\n colVisible.setWidth(70);\n colVisible.setText(\"是否显示\");\n\n final TableColumn colCodeSet = new TableColumn(tblShowConfig, SWT.NONE);\n colCodeSet.setWidth(100);\n colCodeSet.setText(\"代码集\");\n\n final Button btnUp = new Button(group_3, SWT.NONE);\n btnUp.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(final SelectionEvent e) {\n if (tblShowConfig.getSelectionCount() == 1) {\n int idx = tblShowConfig.getSelectionIndex();\n if (idx > 0) {\n FieldConfig o = (FieldConfig) tblShowConfig.getSelection()[0].getData();\n configList.remove(o);\n configList.add(idx - 1, o);\n tvShowConfig.refresh();\n }\n }\n }\n });\n btnUp.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/arrow-090.png\"));\n final FormData fd_btnUp = new FormData();\n fd_btnUp.left = new FormAttachment(0,1);\n fd_btnUp.top = new FormAttachment(tblShowConfig, 1);\n fd_btnUp.width = 20;\n fd_btnUp.height = 20;\n btnUp.setLayoutData(fd_btnUp);\n btnUp.setText(\"button\");\n\n final Button btnDown = new Button(group_3, SWT.NONE);\n btnDown.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(final SelectionEvent e) {\n if (tblShowConfig.getSelectionCount() == 1) {\n int idx = tblShowConfig.getSelectionIndex();\n if (idx < tblShowConfig.getItemCount()) {\n FieldConfig o = (FieldConfig) tblShowConfig.getSelection()[0].getData();\n configList.remove(o);\n configList.add(idx + 1, o);\n tvShowConfig.refresh();\n }\n }\n }\n });\n btnDown.setImage(ResourceManager.getPluginImage(Activator.getDefault(), \"icons/arrow-270.png\"));\n final FormData fd_btnDown = new FormData();\n fd_btnDown.top = new FormAttachment(tblShowConfig, 1);\n fd_btnDown.width = 20;\n fd_btnDown.height = 20;\n fd_btnDown.left = new FormAttachment(btnUp, 1);\n btnDown.setLayoutData(fd_btnDown);\n btnDown.setText(\"button\");\n\n //\n init();\n }", "protected Control createContents(Composite parent) {\r\n noDefaultAndApplyButton();\r\n\r\n // The main composite\r\n Composite composite = new Composite(parent, SWT.NONE);\r\n GridLayout layout = new GridLayout(1, false);\r\n layout.marginWidth = 0;\r\n layout.marginHeight = 0;\r\n composite.setLayout(layout);\r\n\r\n // TODO change these labels later\r\n new Label(composite, SWT.NONE)\r\n .setText(\"Provided by Duke University Computer Science Department\");\r\n new Label(composite, SWT.NONE).setText(\"http://www.cs.duke.edu\");\r\n new Label(composite, SWT.NONE)\r\n .setText(\"Questions? Go to our website at http://www.cs.duke.edu/csed/ambient\");\r\n return composite;\r\n }", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE);\n\t\tshell.setSize(750, 450);\n\t\tshell.setText(\"Sensitivity Analysis for: \" + parentNode.getName());\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tsashForm = new SashForm(shell, SWT.NONE);\n\n\t\tscrolledComposite = new ScrolledComposite(sashForm, SWT.BORDER\n\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tscrolledComposite.setExpandHorizontal(true);\n\t\tscrolledComposite.setExpandVertical(true);\n\n\t\tSaCriterionListComp = new Composite(scrolledComposite, SWT.NONE);\n\t\tSaCriterionListComp.setLayout(new RowLayout(SWT.VERTICAL));\n\n\t\t// Create a criterion weighting SaCriterionListComp for every criterion\n\t\tweightingSelectComponents = new SaCriterionWeightingSelectComp[c.length];\n\n\t\tArrayList<Criterion> criteria = parentNode.getCriteria();\n\t\tfor (int i = 0; i < c.length; i++) {\n\n\t\t\tSaCriterionWeightingSelectComp scwsc = new SaCriterionWeightingSelectComp(\n\t\t\t\t\tSaCriterionListComp, SWT.None, criteria.get(i), c[i], i);\n\n\t\t\tscwsc.addWeightingChangedListener(new SaCriterionWeightingChangedListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void doCriterionWeightingChanged(\n\t\t\t\t\t\tSaCriterionWeightingChangedEvent e) {\n\t\t\t\t\tupdateCriteriaWeightings(e.getCriterionIndex(),\n\t\t\t\t\t\t\te.getNewValue());\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tweightingSelectComponents[i] = scwsc;\n\t\t}\n\n\t\tscrolledComposite.setContent(SaCriterionListComp);\n\t\tscrolledComposite.setMinSize(SaCriterionListComp.computeSize(\n\t\t\t\tSWT.DEFAULT, SWT.DEFAULT));\n\n\t\tscrolledComposite_1 = new ScrolledComposite(sashForm, SWT.BORDER\n\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tscrolledComposite_1.setExpandHorizontal(true);\n\t\tscrolledComposite_1.setExpandVertical(true);\n\n\t\tSaAlternativeWeighingComp = new Composite(scrolledComposite_1, SWT.NONE);\n\t\tSaAlternativeWeighingComp.setLayout(new RowLayout(SWT.VERTICAL));\n\n\t\t// Create a bar component for every alternative\n\t\talternativeBarComponents = new SaAlternativeWeightingBarComp[a.length];\n\n\t\tfor (int i = 0; i < alternatives.size(); i++) {\n\t\t\tSaAlternativeWeightingBarComp sawc = new SaAlternativeWeightingBarComp(\n\t\t\t\t\tSaAlternativeWeighingComp, SWT.NONE, alternatives.get(i)\n\t\t\t\t\t\t\t.getName(), a[i]);\n\n\t\t\talternativeBarComponents[i] = sawc;\n\t\t}\n\n\t\tscrolledComposite_1.setContent(SaAlternativeWeighingComp);\n\t\tscrolledComposite_1.setMinSize(SaAlternativeWeighingComp.computeSize(\n\t\t\t\tSWT.DEFAULT, SWT.DEFAULT));\n\n\t\tsashForm.setWeights(new int[] { 1, 1 });\n\n\t\tsetBarValues();\n\t}", "@Override\n public Control createDialogArea(Composite parent) {\n Composite top = (Composite) super.createDialogArea(parent);\n\n /*\n * Create the main layout for the shell.\n */\n GridLayout mainLayout = new GridLayout(1, false);\n mainLayout.verticalSpacing = 15;\n top.setLayout(mainLayout);\n GridData mainLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);\n top.setLayoutData(mainLayoutData);\n\n createStormTypeArea(top);\n createViewerArea(top);\n createTransmitArea(top);\n\n /*\n * Sets dialog title\n */\n getShell().setText(\"View/Send PSH\");\n\n // Update GUI from PshData.\n updateGui(pshData);\n\n return top;\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "private void setup(){\n\t\t\n\t\t//set the dialog title\n\t\tsetText(LocaleText.get(\"createSPSSFileDialog\"));\n\t\t//create the status text\n\t\tstatusLabel = new Label();\n\t\t\n\t\t//create the buttons\n\t\tButton btnCancel = new Button(LocaleText.get(\"close\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnCreate = new Button(LocaleText.get(\"createSPSSFileDialog\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcreateSPSSFile();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnSave = new Button(LocaleText.get(\"save\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tsave();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t\t//update the languages in the form.\n\t\tFormHandler.updateLanguage(Context.getLocale(), Context.getLocale(), form);\n\t\t//add the languages to the language drop down\n\t\tfor(Locale l : form.getLocales())\n\t\t{\n\t\t\tlistBoxLanguages.addItem(l.getName());\n\t\t}\n\t\t\n\t\t//setup the text area\n\t\tspssText.setCharacterWidth(30);\n\t\tspssText.setPixelSize(300, 300);\n\t\t\n\t\t\n\t\tFlexCellFormatter formatter = table.getFlexCellFormatter();\n\t\t\n\t\t//now add stuff to the UI\n\t\tint row = 0;\n\t\ttable.setWidget(row, 0, new Label(LocaleText.get(\"language\")));\n\t\ttable.setWidget(row, 1, listBoxLanguages);\n\t\trow++;\n\t\ttable.setWidget(row, 0, spssText);\n\t\tformatter.setColSpan(row, 0, 2);\n\t\tformatter.setHeight(row, 0, \"300px\");\n\t\tformatter.setWidth(row, 0, \"300px\");\n\t\trow++;\n\t\ttable.setWidget(row, 0, statusLabel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnCreate);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnSave);\n\t\ttable.setWidget(row, 1, btnCancel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, appletHtml);\n\t\t\n\t\t\t\t\t\t\n\t\t//some random UI stuff to make everything nice and neat\n\t\tVerticalPanel panel = new VerticalPanel();\n\t\tFormUtil.maximizeWidget(panel);\n\t\tpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\n\t\tpanel.add(table);\n\t\t\n\t\tsetWidget(panel);\n\t\t\n\t\tsetWidth(\"200px\");\t\t\n\t}", "protected Control createDialogArea(Composite parent) {\n\t\t\ttext = new Text(parent, SWT.READ_ONLY | SWT.NO_FOCUS);\n\n\t\t\t// Use the compact margins employed by PopupDialog.\n\t\t\tGridData gd = new GridData(GridData.BEGINNING | GridData.FILL_BOTH);\n\t\t\tgd.horizontalIndent = 5;\n\t\t\tgd.verticalAlignment = SWT.CENTER;\n\t\t\ttext.setLayoutData(gd);\n\t\t\ttext.setText(contents);\n\n\t\t\t// since SWT.NO_FOCUS is only a hint...\n\t\t\ttext.addFocusListener(new FocusAdapter() {\n\t\t\t\tpublic void focusGained(FocusEvent event) {\n\t\t\t\t\tContentProposalPopup.this.close();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn text;\n\t\t}", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "protected void createContents(Display display) {\n\t\tshell = new Shell(display, SWT.CLOSE | SWT.TITLE | SWT.MIN);\n\t\tshell.setSize(539, 648);\n\t\tshell.setText(\"SiSi - Security-aware Event Log Generator\");\n\t\tshell.setImage(new Image(shell.getDisplay(), \"imgs/shell.png\"));\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"File\");\n\t\t\n\t\tMenu menu_1 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_1);\n\t\t\n\t\tMenuItem mntmOpenFile = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmOpenFile.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tFileDialog dialog = new FileDialog(shell, SWT.OPEN);\n\n\t\t\t\tString[] filterNames = new String[] { \"PNML\", \"All Files (*)\" };\n\t\t\t\tString[] filterExtensions = new String[] { \"*.pnml\", \"*\" };\n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user.dir\"));\n\n\t\t\t\tdialog.setFilterNames(filterNames);\n\t\t\t\tdialog.setFilterExtensions(filterExtensions);\n\n\t\t\t\tString path = dialog.open();\n\t\t\t\tif( path != null ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgenerateConfigCompositeFor(path);\n\t\t\t\t\t} catch (ParserConfigurationException | SAXException | IOException exception) {\n\t\t\t\t\t\terrorMessageBox(\"Could not load File.\", exception);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmOpenFile.setImage(new Image(shell.getDisplay(), \"imgs/open.png\"));\n\t\tmntmOpenFile.setText(\"Open File...\");\n\t\t\n\t\tMenuItem mntmOpenExample = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmOpenExample.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgenerateConfigCompositeFor(\"examples/kbv.pnml\");\n\t\t\t\t\t} catch (ParserConfigurationException | SAXException | IOException exception) {\n\t\t\t\t\t\terrorMessageBox(\"Could not load Example.\", exception);\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmntmOpenExample.setImage(new Image(shell.getDisplay(), \"imgs/example.png\"));\n\t\tmntmOpenExample.setText(\"Open Example\");\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.SEPARATOR);\n\t\tmntmNewItem.setText(\"Separator1\");\n\t\t\n\t\tMenuItem mntmExit = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmExit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.getDisplay().dispose();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tmntmExit.setImage(new Image(shell.getDisplay(), \"imgs/exit.png\"));\n\t\tmntmExit.setText(\"Exit\");\n\t\t\n\t\tmainComposite = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tmainComposite.setExpandHorizontal(true);\n\t\tmainComposite.setExpandVertical(true);\n\t\t\n\t\tactiveComposite = new Composite(mainComposite, SWT.NONE);\n\t\tGridLayout gl_activeComposite = new GridLayout(1, true);\n\t\tgl_activeComposite.marginWidth = 10;\n\t\tgl_activeComposite.marginHeight = 10;\n\t\tactiveComposite.setLayout(gl_activeComposite);\n\t\t\n\t\tLabel lblWelcomeToSisi = new Label(activeComposite, SWT.NONE);\n\t\tlblWelcomeToSisi.setFont(SWTResourceManager.getFont(\"Segoe UI\", 30, SWT.BOLD));\n\t\tGridData gd_lblWelcomeToSisi = new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1);\n\t\tgd_lblWelcomeToSisi.verticalIndent = 50;\n\t\tlblWelcomeToSisi.setLayoutData(gd_lblWelcomeToSisi);\n\t\tlblWelcomeToSisi.setText(\"Welcome to SiSi!\");\n\t\t\n\t\tLabel lblSecurityawareEvent = new Label(activeComposite, SWT.NONE);\n\t\tlblSecurityawareEvent.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\t\tlblSecurityawareEvent.setText(\"- A security-aware Event Log Generator -\");\n\t\t\n\t\tLabel lblToGetStarted = new Label(activeComposite, SWT.NONE);\n\t\tlblToGetStarted.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.ITALIC));\n\t\tGridData gd_lblToGetStarted = new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1);\n\t\tgd_lblToGetStarted.verticalIndent = 150;\n\t\tlblToGetStarted.setLayoutData(gd_lblToGetStarted);\n\t\tlblToGetStarted.setText(\"To get started load a file or an example\");\n\t\t\n\t\tmainComposite.setContent(activeComposite);\n\t\tmainComposite.setMinSize(activeComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\t}", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "private HorizontalPanel createContent() {\n\t\tfinal HorizontalPanel panel = new HorizontalPanel();\n\t\tfinal VerticalPanel form = new VerticalPanel();\n\t\tpanel.add(form);\n\t\t\n\t\tfinal Label titleLabel = new Label(CONSTANTS.actorLabel());\n\t\ttitleLabel.addStyleName(AbstractField.CSS.cbtAbstractPopupLabel());\n\t\tform.add(titleLabel);\n\t\t\n\t\tfinal Label closeButton = new Label();\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tActorPopup.this.hide();\n\t\t\t}\n\t\t});\n\t\tcloseButton.addStyleName(AbstractField.CSS.cbtAbstractPopupClose());\n\t\tform.add(closeButton);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Party field\n\t\t//-----------------------------------------------\n\t\tpartyField = new SuggestField(this, null,\n\t\t\t\tnew NameIdAction(Service.PARTY),\n\t\t\t\tCONSTANTS.partynameLabel(),\n\t\t\t\t20,\n\t\t\t\ttab++);\n\t\tpartyField.setReadOption(Party.CREATED, true);\n\t\tpartyField.setDoubleclickable(true);\n\t\tpartyField.setHelpText(CONSTANTS.partynameHelp());\n\t\tform.add(partyField);\n\n\t\t//-----------------------------------------------\n\t\t// Email Address field\n\t\t//-----------------------------------------------\n\t\temailaddressField = new TextField(this, null,\n\t\t\t\tCONSTANTS.emailaddressLabel(),\n\t\t\t\ttab++);\n\t\temailaddressField.setMaxLength(100);\n\t\temailaddressField.setHelpText(CONSTANTS.emailaddressHelp());\n\t\tform.add(emailaddressField);\n\n\t\t//-----------------------------------------------\n\t\t// Password field\n\t\t//-----------------------------------------------\n\t\tpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.passwordLabel(),\n\t\t\t\ttab++);\n\t\tpasswordField.setSecure(true);\n\t\tpasswordField.setHelpText(CONSTANTS.passwordHelp());\n\t\tform.add(passwordField);\n\n\t\t//-----------------------------------------------\n\t\t// Check Password field\n\t\t//-----------------------------------------------\n\t\tcheckpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.checkpasswordLabel(),\n\t\t\t\ttab++);\n\t\tcheckpasswordField.setSecure(true);\n\t\tcheckpasswordField.setHelpText(CONSTANTS.checkpasswordHelp());\n\t\tform.add(checkpasswordField);\n\n\t\t//-----------------------------------------------\n\t\t// Date Format field\n\t\t//-----------------------------------------------\n\t\tformatdateField = new ListField(this, null,\n\t\t\t\tNameId.getList(Party.DATE_FORMATS, Party.DATE_FORMATS),\n\t\t\t\tCONSTANTS.formatdateLabel(),\n\t\t\t\tfalse,\n\t\t\t\ttab++);\n\t\tformatdateField.setDefaultValue(Party.MM_DD_YYYY);\n\t\tformatdateField.setFieldHalf();\n\t\tformatdateField.setHelpText(CONSTANTS.formatdateHelp());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Phone Format field\n\t\t//-----------------------------------------------\n\t\tformatphoneField = new TextField(this, null,\n\t\t\t\tCONSTANTS.formatphoneLabel(),\n\t\t\t\ttab++);\n\t\tformatphoneField.setMaxLength(25);\n\t\tformatphoneField.setFieldHalf();\n\t\tformatphoneField.setHelpText(CONSTANTS.formatphoneHelp());\n\n\t\tHorizontalPanel ff = new HorizontalPanel();\n\t\tff.add(formatdateField);\n\t\tff.add(formatphoneField);\n\t\tform.add(ff);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Roles option selector\n\t\t//-----------------------------------------------\n\t\trolesField = new OptionField(this, null,\n\t\t\t\tAbstractRoot.hasPermission(AccessControl.AGENCY) ? getAgentroles() : getOrganizationroles(),\n\t\t\t\tCONSTANTS.roleLabel(),\n\t\t\t\ttab++);\n\t\trolesField.setHelpText(CONSTANTS.roleHelp());\n\t\tform.add(rolesField);\n\n\t\tform.add(createCommands());\n\t\t\n\t\tonRefresh();\n\t\tonReset(Party.CREATED);\n\t\treturn panel;\n\t}", "protected abstract JDialog createDialog();", "private final void createContents() {\n\t\tthis.shell = new Shell(this.getParent(), getStyle());\n\t\tthis.shell.setSize(450, 140);\n\t\tthis.shell.addTraverseListener(new TraverseListener() {\n\t\t\t@Override\n\t\t\tpublic void keyTraversed(TraverseEvent e) {\n\t\t\t\tif(e.character == SWT.ESC) {\n\t\t\t\t\te.doit = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.shell.setText(\"Rename file - \" + this.getParent().getText());\n\t\tthis.shell.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellClosed(ShellEvent e) {\n\t\t\t\te.doit = false;\n\t\t\t\tRenameFileDialog.this.result = Response.CLOSE;\n\t\t\t}\n\t\t});\n\t\tFunctions.centerShell2OnShell1(getParent(), this.shell);\n\t\tthis.shell.setImages(Main.getShellImages());\n\t\t\n\t\tLabel lblPleaseChooseA = new Label(this.shell, SWT.BORDER | SWT.WRAP);\n\t\tlblPleaseChooseA.setBounds(10, 10, 424, 40);\n\t\tlblPleaseChooseA.setText(\"Please choose a new name for the file \\\"\" + this.originalName + \"\\\":\");\n\t\t\n\t\tButton btnDone = new Button(this.shell, SWT.NONE);\n\t\tbtnDone.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRenameFileDialog.this.renameTo = RenameFileDialog.this.text.getText();\n\t\t\t\tRenameFileDialog.this.result = Response.DONE;\n\t\t\t}\n\t\t});\n\t\tbtnDone.setBounds(10, 81, 209, 23);\n\t\tbtnDone.setText(\"Done\");\n\t\t\n\t\tButton btnCancel = new Button(this.shell, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRenameFileDialog.this.renameTo = RenameFileDialog.this.originalName;\n\t\t\t\tRenameFileDialog.this.result = Response.CANCEL;\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setBounds(225, 81, 209, 23);\n\t\tbtnCancel.setText(\"Cancel\");\n\t\t\n\t\tthis.text = new Text(this.shell, SWT.BORDER);\n\t\tthis.text.setBounds(10, 56, 424, 19);\n\t\tthis.text.setText(this.originalName);\n\t\tthis.text.selectAll();\n\t}", "public void createContents(Composite parent) {\n\t\tparent.setLayout(new FillLayout());\n\t\tfMainSection = fToolkit.createSection(parent, Section.TITLE_BAR);\n\n\t\tComposite mainComposite = fToolkit.createComposite(fMainSection, SWT.NONE);\n\t\tfToolkit.paintBordersFor(mainComposite);\n\t\tfMainSection.setClient(mainComposite);\n\t\tmainComposite.setLayout(new GridLayout(1, true));\n\t\t\n\t\tcreateClassListViewer(mainComposite);\n\t\tcreateBottomButtons(mainComposite);\n\t\tcreateTextClientComposite(fMainSection);\n\t}", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "protected void createContents() {\n\t\tmainShell = new Shell();\n\t\tmainShell.addDisposeListener(new DisposeListener() {\n\t\t\tpublic void widgetDisposed(DisposeEvent arg0) {\n\t\t\t\tLastValueManager manager = LastValueManager.getInstance();\n\t\t\t\tmanager.setLastAppEngineDirectory(mGAELocation.getText());\n\t\t\t\tmanager.setLastProjectDirectory(mAppRootDir.getText());\n\t\t\t\tmanager.setLastPythonBinDirectory(txtPythonLocation.getText());\n\t\t\t\tmanager.save();\n\t\t\t}\n\t\t});\n\t\tmainShell.setSize(460, 397);\n\t\tmainShell.setText(\"Google App Engine Launcher\");\n\t\tmainShell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tComposite mainComposite = new Composite(mainShell, SWT.NONE);\n\t\tmainComposite.setLayout(new GridLayout(1, false));\n\t\t\n\t\tComposite northComposite = new Composite(mainComposite, SWT.NONE);\n\t\tnorthComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));\n\t\tGridLayout gl_northComposite = new GridLayout(1, false);\n\t\tgl_northComposite.verticalSpacing = 1;\n\t\tnorthComposite.setLayout(gl_northComposite);\n\t\t\n\t\tComposite pythonComposite = new Composite(northComposite, SWT.NONE);\n\t\tpythonComposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblPython = new Label(pythonComposite, SWT.NONE);\n\t\tlblPython.setText(\"Python : \");\n\t\t\n\t\ttxtPythonLocation = new Text(pythonComposite, SWT.BORDER);\n\t\ttxtPythonLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\ttxtPythonLocation.setText(\"/usr/bin/python2.7\");\n\t\t\n\t\tLabel lblGaeLocation = new Label(pythonComposite, SWT.NONE);\n\t\tlblGaeLocation.setText(\"GAE Location :\");\n\t\t\n\t\tmGAELocation = new Text(pythonComposite, SWT.BORDER);\n\t\tmGAELocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tmGAELocation.setText(\"/home/zelon/Programs/google_appengine\");\n\t\t\n\t\tLabel lblProject = new Label(pythonComposite, SWT.NONE);\n\t\tlblProject.setText(\"Project : \");\n\t\t\n\t\tmAppRootDir = new Text(pythonComposite, SWT.BORDER);\n\t\tmAppRootDir.setSize(322, 27);\n\t\tmAppRootDir.setText(\"/home/zelon/workspaceIndigo/box.wimy.com\");\n\t\t\n\t\tComposite ActionComposite = new Composite(northComposite, SWT.NONE);\n\t\tActionComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tActionComposite.setLayout(new GridLayout(2, true));\n\t\t\n\t\tButton btnTestServer = new Button(ActionComposite, SWT.NONE);\n\t\tGridData gd_btnTestServer = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnTestServer.widthHint = 100;\n\t\tbtnTestServer.setLayoutData(gd_btnTestServer);\n\t\tbtnTestServer.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmExecuter.startTestServer(getPythonLocation(), mGAELocation.getText(), mAppRootDir.getText(), 8080);\n\t\t\t}\n\t\t});\n\t\tbtnTestServer.setText(\"Test Server\");\n\t\t\n\t\tButton btnDeploy = new Button(ActionComposite, SWT.NONE);\n\t\tGridData gd_btnDeploy = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDeploy.widthHint = 100;\n\t\tbtnDeploy.setLayoutData(gd_btnDeploy);\n\t\tbtnDeploy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmExecuter.deploy(getPythonLocation(), mGAELocation.getText(), mAppRootDir.getText());\n\t\t\t}\n\t\t});\n\t\tbtnDeploy.setText(\"Deploy\");\n\t\tActionComposite.setTabList(new Control[]{btnTestServer, btnDeploy});\n\t\tnorthComposite.setTabList(new Control[]{ActionComposite, pythonComposite});\n\t\t\n\t\tComposite centerComposite = new Composite(mainComposite, SWT.NONE);\n\t\tGridData gd_centerComposite = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);\n\t\tgd_centerComposite.heightHint = 200;\n\t\tcenterComposite.setLayoutData(gd_centerComposite);\n\t\tcenterComposite.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tlog = new StyledText(centerComposite, SWT.BORDER | SWT.V_SCROLL);\n\t\tlog.setAlignment(SWT.CENTER);\n\t}", "public abstract void createContents(Panel mainPanel);", "protected void createContents(String value) {\n\t\tshlResult = new Shell(SWT.CLOSE | SWT.MIN | SWT.TITLE);\n\t\tshlResult.setSize(762, 532);\n\t\tshlResult.setText(title);\n\t\t\n\t\tComposite composite = new Composite(shlResult, SWT.NONE);\n\t\tcomposite.setBounds(0, 0, 746, 494);\n\t\t\n\t\ttext = new StyledText(composite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);\n\t\ttext.setBounds(0, 0, 750, 500);\n\t\ttext.setText(value);\n\t\ttext.setKeyBinding('A'| SWT.CONTROL, ST.SELECT_ALL);\n\t\ttext.setKeyBinding('C' | SWT.CONTROL, ST.COPY);\n\t\ttext.setKeyBinding('V' | SWT.CONTROL, ST.PASTE);\n\t\ttext.setKeyBinding('X' | SWT.CONTROL, ST.CUT);\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell(SWT.APPLICATION_MODAL|SWT.CLOSE);\r\n\t\tshell.setSize(800, 600);\r\n\t\tshell.setText(\"租借/归还车辆\");\r\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\r\n\r\n\t\t/**换肤功能已经实现*/\r\n\t\tString bgpath = ChangeSkin.getCurrSkin();\r\n\t\tInputStream bg = this.getClass().getResourceAsStream(bgpath);\r\n\t\t\r\n\t\tInputStream reimg = this.getClass().getResourceAsStream(\"/Img/icon1.png\");\r\n\t\tshell.setBackgroundImage(new Image(display,bg));\r\n\t\tshell.setImage(new Image(display, reimg));\r\n\t\t\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(52, 48, 168, 20);\r\n\t\tlabel.setText(\"\\u8BF7\\u60A8\\u8BA4\\u771F\\u586B\\u5199\\u79DF\\u8D41\\u4FE1\\u606F:\");\r\n\t\t\r\n\t\tLabel lblid = new Label(shell, SWT.NONE);\r\n\t\tlblid.setBounds(158, 180, 61, 20);\r\n\t\tlblid.setText(\"\\u8F66\\u8F86ID\");\r\n\t\t\r\n\t\tui_car_id = new Text(shell, SWT.BORDER);\r\n\t\tui_car_id.setBounds(225, 177, 129, 26);\r\n\t\t\r\n\t\tui_renter = new Text(shell, SWT.BORDER);\r\n\t\tui_renter.setBounds(225, 228, 129, 26);\r\n\t\t\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(159, 231, 61, 20);\r\n\t\tlabel_1.setText(\"\\u79DF\\u8D41\\u4EBA\");\r\n\t\t\r\n\t\tDateTime ui_start = new DateTime(shell, SWT.BORDER);\r\n\t\tui_start.setBounds(225, 271, 129, 28);\r\n\t\t\r\n\t\tLabel label_2 = new Label(shell, SWT.NONE);\r\n\t\tlabel_2.setBounds(144, 271, 76, 20);\r\n\t\tlabel_2.setText(\"\\u5F00\\u59CB\\u65F6\\u95F4\");\r\n\t\t\r\n\t\tLabel label_3 = new Label(shell, SWT.NONE);\r\n\t\tlabel_3.setBounds(144, 326, 76, 20);\r\n\t\tlabel_3.setText(\"\\u7ED3\\u675F\\u65F6\\u95F4\");\r\n\t\t\r\n\t\tLabel label_4 = new Label(shell, SWT.NONE);\r\n\t\tlabel_4.setBounds(559, 97, 76, 20);\r\n\t\tlabel_4.setText(\"\\u5F53\\u524D\\u8D39\\u7528:\");\r\n\t\t\r\n\t\tLabel ui_count_price = new Label(shell, SWT.BORDER | SWT.CENTER);\r\n\t\tui_count_price.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 16, SWT.NORMAL));\r\n\t\tui_count_price.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\r\n\t\tui_count_price.setBounds(539, 205, 156, 77);\r\n\t\tui_count_price.setText(\"0.00\");\r\n\t\t\r\n\t\tDateTime ui_end = new DateTime(shell, SWT.BORDER);\r\n\t\tui_end.setBounds(225, 318, 129, 28);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tRentService rentser = new RentService();\r\n\t\t\t\tdouble day_pri = rentser.rentPrice(ui_car_id.getText());\r\n\t\t\t\t/*当前仅能计算一个月以内的租用情况\r\n\t\t\t\t * @Time 10/09/15.03\r\n\t\t\t\t * \r\n\t\t\t\t * **/\r\n\t\t\t\t//不管当月几天,都按照30天计算\r\n\t\t\t\tint month = ui_end.getMonth()-ui_start.getMonth();\r\n\t\t\t\tint day = (ui_end.getDay() - ui_start.getDay()) +\r\n\t\t\t\t\t\tmonth * 30\r\n\t\t\t\t\t\t;\r\n\t\t\t\tif(day_pri > 0) {\r\n\t\t\t\t\tui_count_price.setText(String.valueOf(day*day_pri));\r\n\t\t\t\t}else {\r\n\t\t\t\t\tui_count_price.setText(\"数据非法\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(122, 393, 141, 30);\r\n\t\tbutton.setText(\"\\u4F30\\u7B97\\u5F53\\u524D\\u79DF\\u8D41\\u4EF7\\u683C\");\r\n\t\t\r\n\t\tButton button_1 = new Button(shell, SWT.NONE);\r\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tRentService rentService = new RentService();\r\n\t\t\t\tString sdate = ui_start.getDay()+\"-\"+ui_start.getMonth()+\"月-\"+ui_start.getYear();\r\n\t\t\t\tString edate = ui_end.getDay()+\"-\"+ui_end.getMonth()+\"月-\"+ui_end.getYear();\r\n\t\t\t\t/**这个地方可能有问题*/\r\n\t\t\t\tboolean rentCar = rentService.rentCar(ui_car_id.getText(),sdate , edate, ui_count_price.getText());\r\n\t\t\t\tif(rentCar) {\r\n\t\t\t\t\tui_count_price.setText(\"租借成功!\");\r\n\t\t\t\t\t/**租借成功,就该让信息表中的数据减1**/\r\n\t\t\t\t\tCarService cars = new CarService();\r\n\t\t\t\t\tcars.minusCar(ui_car_id.getText());\r\n\t\t\t\t}else {\r\n\t\t\t\t\tui_count_price.setText(\"租借失败!\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setBounds(292, 393, 98, 30);\r\n\t\tbutton_1.setText(\"\\u79DF\\u501F\");\r\n\t\t\r\n\t\r\n\r\n\t}", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity ());\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "public JComponent createContentPanel() {\n\t\tFormLayout layout = new FormLayout(\"p,3dlu,p,3dlu\", // cols //$NON-NLS-1$\n\t\t\t\t\"p,10dlu,p,10dlu\"); // rows //$NON-NLS-1$\n\n\t\t// Create a builder that assists in adding components to the container.\n\t\t// Wrap the panel with a standardized border.\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\n\t\tCellConstraints cc = new CellConstraints();\n\t\tJEditorPane l=new JEditorPane(\"text/html\",Messages.getString(\"LicenseDialog.Email\"));\n\t\tl.setEditable(false);\n\t\tl.setOpaque(false);\n\t\tl.setFont(l.getFont().deriveFont(Font.PLAIN));\n\t\tJLabel emailLabel=new JLabel(Messages.getString(\"LicenseDialog.EmailLabel\")+\":\");\n\t\t//emailLabel.setFont(emailLabel.getFont().deriveFont(Font.PLAIN));\n\t\tbuilder.add(l,cc.xyw(1,1, 4));\n\t\tbuilder.nextLine(2);\n\t\tbuilder.append(emailLabel,email);\n\t\tbuilder.nextLine(2);\n\n\t\tJComponent result = builder.getPanel();\n\t\treturn result;\n\t}", "public JComponent createContentPanel() {\n\t\t// Separating the component initialization and configuration\n\t\t// from the layout code makes both parts easier to read.\n\t\tinitControls();\n\t\t//TODO set minimum size\n\t\tFormLayout layout = new FormLayout(\"default, 3dlu, default\", // cols\n\t\t\t\t\"p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu\"); // rows\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\t\tCellConstraints cc = new CellConstraints();\n\t\t\n\t\tIterator l=labels.iterator();\n\t\tIterator c=valueComponents.iterator();\n\t\twhile (l.hasNext()){\n\t\t String name=(String)l.next();\n\t\t JComponent comp=(JComponent)c.next();\n\t\t builder.append(name,comp);\n\t\t builder.nextLine(2);\n\t\t}\n\t\treturn builder.getPanel();\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"带进度条的表\");\r\n\t\tshell.setLayout(new FillLayout());\r\n\r\n\t\tTable table = new Table(shell, SWT.BORDER);\r\n\t\ttable.setHeaderVisible(true);\r\n\t\ttable.setLinesVisible(true);\r\n\r\n//\t\t两列\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tnew TableColumn(table, SWT.NONE);\r\n\t\t}\r\n\t\ttable.getColumn(0).setText(\"Task\");\r\n\t\ttable.getColumn(1).setText(\"Progress\");\r\n\r\n//\t\t四十行\r\n\t\tfor (int i = 0; i < 40; i++) {\r\n\t\t\tTableItem item = new TableItem(table, SWT.NONE);\r\n\t\t\titem.setText(\"Task \" + i);\r\n//\t\t\t行数为5的倍数时添加进度条\r\n\t\t\tif (i % 5 == 0) {\r\n\t\t\t\tProgressBar bar = new ProgressBar(table, SWT.NONE);\r\n\t\t\t\tbar.setSelection(i); // 进度条显示的百分比\r\n\t\t\t\tTableEditor editor = new TableEditor(table);\r\n\t\t\t\teditor.grabHorizontal = editor.grabVertical = true; // 宽度高度同表格\r\n\t\t\t\teditor.setEditor(bar, item, 1); // 在表格上方显示进度条\r\n\t\t\t}\r\n\t\t}\r\n\t\ttable.getColumn(0).pack();\r\n\t\ttable.getColumn(1).setWidth(128);\r\n\r\n\t\tshell.pack();\r\n\t}", "protected Control createDialogArea(Composite parent) {\n\t\t//Composite composite = (Composite) super.createDialogArea(parent);\n\t\tComposite composite = new Composite(parent, SWT.NULL);\n\t\t\n\t\tGridLayout layout = new GridLayout(5, false);\n\t\tlayout.marginWidth = 15;\n\t\tlayout.marginHeight = 10;\n\t\tlayout.verticalSpacing = 8;\n\t\tcomposite.setLayout(layout);\n\t\t\n\t\tLabel l;\n\t\tGridData gridData;\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Fecha:\");\n\t\ttxtFecha = new Text(composite, SWT.BORDER);\n\t\tgridData = new GridData(60,15);\n\t\ttxtFecha.setLayoutData(gridData);\n\t\t//txtFecha.addKeyListener(this.crearKeyAdapter(txtFecha)); // calendar ya incluye esto\n\t\t\n\t\tbFecha = new Button(composite, SWT.NONE);\n\t\tgridData = new GridData(16,16);\n\t\t//gridData.horizontalSpan = 2;\n\t\tbFecha.setLayoutData(gridData);\n\t\timage = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, IImageKeys.CALENDARIO);\n\t\tbFecha.setImage(image.createImage());\n\t\tbFecha.addSelectionListener(this.crearCalendario(shell, txtFecha));\n\n\t\tfinal Label labelNoches = new Label(composite, SWT.NONE);\n\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\n\t\tComposite compQty = new Composite(composite, SWT.NONE);\n\t\tlayout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 0;\n\t\tcompQty.setLayout(layout);\n\t\t\n\t\ttxtCantidad = new Text(compQty, SWT.BORDER);\n\t\tgridData = new GridData(25,15);\n\t\ttxtCantidad.setLayoutData(gridData);\n\t\t\n\t\tfinal Label labelEspacios = new Label(compQty, SWT.NONE);\n\t\tlabelEspacios.setText(\"PAX(s):\");\n\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\tgridData = new GridData(45, 15);\n\t\tgridData.horizontalIndent = 10;\n\t\tlabelEspacios.setLayoutData(gridData);\n\t\ttxtEspacios = new Text(compQty, SWT.BORDER);\n\t\ttxtEspacios.setLayoutData(new GridData(25,15));\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Tipo:\");\n\t\tcomboTipo = new Combo(composite, SWT.READ_ONLY);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 120;\n\t\tgridData.horizontalSpan = 2;\n\t\tcomboTipo.setLayoutData(gridData);\n\t\tcdTipoProductos = cdController.getComboDataTipoProductos();\n\t\tcomboTipo.setItems(cdTipoProductos.getTexto());\n\t\tcomboTipo.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint indice = comboTipo.getSelectionIndex();\n\t\t\t\tif (indice != -1) {\n\t\t\t\t\tLong seleccionado = cdTipoProductos.getKeyAsLongByIndex(indice);\n\t\t\t\t\tproductos.filtrarByTipo(seleccionado, true); // eliminamos cualquier filtro previo\n\t\t\t\t}\n\t\t\t\tcomboProducto.setItems(productos.getTexto());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Actividad:\");\n\t\tcomboProducto = new Combo(composite, SWT.READ_ONLY);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 150;\n\t\tcomboProducto.setLayoutData(gridData);\n\t\t/*\n\t\tcomboProducto.addSelectionListener(new SelectionListener() {\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"widgetDefSel: \" + comboProducto.getText());\n\t\t\t}\n\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"widgetSelected: \" + comboProducto.getText());\t\n\t\t\t}\n\t\t});\n\t\tcomboProducto.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tSystem.out.println(\"modifyText: \" + comboProducto.getText());\t\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t\n\t\tcomboProducto.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tif (!comboProducto.getText().equals(\"\")) {\n\t\t\t\t\tLong idProducto = productos.getIdProductoByName(comboProducto.getText());\n\t\t\t\t\tProducto p = productos.getProductoByIdProducto(idProducto);\n\t\t\t\t\tString tipoReserva = p.getTipoReserva();\n\t\t\t\t\tisRecursoAEP = p.isHotelAEP();\n\t\t\t\t\tisModificable = p.isModificable();\n\t\t\t\t\tprecioMinimo = p.getPrecioMinimo();\n\t\t\t\t\tSystem.out.println(\"Minimo: \" + precioMinimo);\n\t\t\t\t\tif (tipoReserva.equals(\"Hotel\") || tipoReserva.equals(\"Hospedaje\")) {\n\t\t\t\t\t\tlabelNoches.setText(\"Noche(s):\");\n\t\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\t\tlabelEspacios.setText(\"Room(s):\");\n\t\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\t\tlabelEspacios.setText(\"PAX(s):\");\n\t\t\t\t\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t\t}\n\t\t\t\t\tlistaTipoPrecio.setEnabled(true);\n\t\t\t\t\tlistaTipoPrecio.deselectAll();\n\t\t\t\t\ttxtPrecio.setText(\"\");\n\t\t\t\t\ttxtPrecio.setEditable(isModificable == null ? false : isModificable.booleanValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\tcomboProducto.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint idProducto = productos.getIdProductoByName(comboProducto.getText());\n\t\t\t\tProducto p = productos.getProductoByIdProducto(idProducto);\n\t\t\t\tString tipoReserva = p.getTipoReserva();\n\t\t\t\tif (tipoReserva.equals(\"Hotel\") || tipoReserva.equals(\"Hospedaje\")) {\n\t\t\t\t\tlabelNoches.setText(\"Noche(s):\");\n\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\tlabelEspacios.setText(\"Room(s):\");\n\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t} else {\n\t\t\t\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\tlabelEspacios.setText(\"PAXs:\");\n\t\t\t\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t}\n\t\t\t\tlistaTipoPrecio.setEnabled(true);\n\t\t\t\tlistaTipoPrecio.deselectAll();\n\t\t\t\ttxtPrecio.setText(\"\");\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Tipo de precio:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 75;\n\t\tgridData.horizontalSpan = 2;\n\n\t\tlistaTipoPrecio = new List(composite, SWT.SINGLE | SWT.BORDER);\n\t\tlistaTipoPrecio.setLayoutData(gridData);\n\t\tlistaTipoPrecio.setItems(new String[] {\"Comisionable\", \"Operador\", \"Público\"});\n\t\tlistaTipoPrecio.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tobtenerPrecio(listaTipoPrecio.getSelection()[0]);\n\t\t\t}\n\t\t});\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Precio:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\t\n\t\tComposite compPrecio = new Composite(composite, SWT.NONE);\n\t\tlayout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 0;\n\t\tlayout.marginHeight = 0;\n\t\tcompPrecio.setLayout(layout);\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tcompPrecio.setLayoutData(gridData);\n\t\t\n\t\ttxtPrecio = new Text(compPrecio, SWT.BORDER);\n\t\ttxtPrecio.setEditable(false);\n\t\tgridData = new GridData(50,15);\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\ttxtPrecio.setLayoutData(gridData);\n\n\t\tButton bCuadrar = new Button(compPrecio, SWT.PUSH);\n\t\tgridData = new GridData(12,16);\n\t\tbCuadrar.setLayoutData(gridData);\n\t\timage = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, \"icons/cuadrar.gif\");\n\t\tbCuadrar.setImage(image.createImage());\n\t\tbCuadrar.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"Botón de cuadrar...\");\n\t\t\t\tcuadrarCotizacion();\n\t\t\t}\n\t\t});\t\n\t\t\n\t\tbVisible = new Button(compPrecio, SWT.CHECK);\n\t\tbVisible.setText(\"Visible\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalIndent = 15;\n\t\tbVisible.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Comentarios:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\ttxtComentario = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);\n\t\tgridData = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgridData.horizontalSpan = 4;\n\t\tgridData.heightHint = 40;\n\t\ttxtComentario.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Un \\\"*\\\" al inicio del comentario mostrará el mismo en el PDF de la cotización.\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalSpan = 4;\n\t\tl.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\t\n\t\tl = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t gridData = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgridData.heightHint = 10;\n\t\tgridData.horizontalSpan = 5;\n\t\tl.setLayoutData(gridData);\n\n\t\tllenarCampos();\n\t\t\n\t\treturn composite;\n\t}", "public void addContent() {\n ScrollPane mySP = new ScrollPane();\n myContent = new SaveForm(myManager);\n mySP.setContent(myContent);\n mySP.setPrefSize(size, size);\n myRoot.getChildren().add(mySP);\n }", "@Override\r\n\tprotected Control createDialogArea(Composite parent) {\n\t\tComposite container = (Composite) super.createDialogArea(parent);\r\n\t\tGridData dGrid = new GridData();\r\n\t\tdGrid.horizontalSpan = 180;\r\n\t\tdGrid.horizontalAlignment = GridData.FILL;\r\n\t\tcontainer.setLayoutData(dGrid);\r\n\t\t\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tString labelText = \"Most of the features for SimplifIDE require knowledge of the project structure.\\r\\n\";\r\n\t\tlabelText += \"Currently you are editting a file outside of the project where many features will not work properly.\\r\\n\";\r\n\t\tlabelText += \"Instructions for setting up your project can be found at http://simplifide.com/html2/project_structure/simplifide_structure.htm, or\\r\\n\";\r\n\t\tlabelText += \"for a simple project only containing rtl files at http://simplifide.com/html2/getting_started/simple_suite.htm.\\r\\n\";\r\n\t\tnameLabel.setText(labelText);\r\n\t\t\r\n\t\tthis.ONESHOT = true;\r\n\t\t\r\n\t\treturn container;\r\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.RESIZE | SWT.TITLE);\r\n\t\tshell.setSize(690, 436);\r\n\t\t\r\n\t\tDimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tint w = 690;\r\n\t\tint h = 436;\r\n\t\tshell.setBounds((int)(scrSize.width-w)/2,(int)(scrSize.height-h)/2,w, h);\r\n\t\tshell.setText(getText());\r\n\r\n\t\t\r\n\t\tloadData();\r\n\t\t\r\n\t\tviewer = new TableViewer(shell,SWT.FULL_SELECTION |SWT.MULTI |SWT.BORDER);\r\n\t\t\r\n\t\tfinal Table table = viewer.getTable();\r\n\t\ttable.setBounds(23, 53, 638, 285);\r\n\t\ttable.setLinesVisible(true);\r\n\t\ttable.setHeaderVisible(true);\r\n\t\ttable.setRedraw(true);\r\n\t\t\r\n\t\tTableColumn tbCol_Time = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Time.setWidth(69);\r\n\t\ttbCol_Time.setText(\"序号\");\t\t\r\n\t\t\r\n\t\tTableColumn tbCol_Path = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Path.setWidth(127);\r\n\t\ttbCol_Path.setText(\"进程\");\t\r\n\t\t\r\n\t\tTableColumn tbCol_Info = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Info.setWidth(123);\r\n\t\ttbCol_Info.setText(\"Hash值\");\r\n\t\t\r\n\t\tTableColumn tbCol_Type = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Type.setWidth(92);\r\n\t\ttbCol_Type.setText(\"类型\");\r\n\t\t\r\n\t\tTableColumn tbCol_Hash = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Hash.setWidth(196);\r\n\t\ttbCol_Hash.setText(\"描述信息\");\r\n\t\t\r\n\t\tviewer.setContentProvider(new TableViewerContentProvider());\r\n\t\tviewer.setLabelProvider(new TableViewerLabelProvider());\r\n\t\tviewer.setInput(white_list);\t\t\t\t//===== 设置数据源 ======\r\n\t\t\r\n\t\trefresh();\r\n\t\t\r\n\t\tlbl_ItemCount = new Label(shell, SWT.NONE);\r\n\t\tlbl_ItemCount.setBounds(43, 355, 194, 21);\r\n\t\tlbl_ItemCount.setText(\"未通过验证进程: \"+ table.getItemCount() +\"个\");\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(309, 344, 88, 25);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tcount--;\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"楷体_GB2312\", 16, SWT.BOLD));\r\n\t\tlabel.setBounds(301, 10, 118, 21);\r\n\t\tlabel.setText(\"详细信息\");\r\n\t\t\r\n\t\tLabel label_1 = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\r\n\t\tlabel_1.setBounds(10, 45, 664, 2);\r\n\r\n\t\t\r\n\t\t//添加窗体鼠标事件\r\n\t\tshell.addMouseListener(new MouseListener(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDown(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\t\t\t\t\r\n\t\t\t\tx=e.x;\r\n\t\t\t\ty=e.y;\t\t\t\t\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tx=y=-1;\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t//鼠标移动事件\r\n\t\tshell.addMouseMoveListener(new MouseMoveListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseMove(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif(x>0)\r\n\t\t\t\t{\r\n\t\t\t\t\tshell.setLocation(e.x-x + shell.getLocation().x,\r\n\t\t\t\t\t\te.y-y + shell.getLocation().y);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}", "@Override\n protected Control createDialogArea(Composite parent) {\n Composite container = (Composite) super.createDialogArea(parent);\n container.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n final SashForm hsashForm = new SashForm(container, SWT.HORIZONTAL);\n hsashForm.SASH_WIDTH = 1;\n\n hsashForm.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_GREEN));\n\n // Create the buttons and their event handlers\n tree = new Tree(hsashForm, SWT.V_SCROLL);\n tree.setLinesVisible(true);\n tree.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n AddDetailedInfo2Tables();\n }\n });\n tree.setLayout(new FillLayout());\n\n final Composite tabledock = new Composite(hsashForm, SWT.PUSH);\n tabledock.setLayout(new FillLayout(SWT.VERTICAL));\n\n final SashForm vsashForm = new SashForm(tabledock, SWT.VERTICAL);\n vsashForm.SASH_WIDTH = 1;\n vsashForm.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_GREEN));\n\n ruletable = new Table(vsashForm, SWT.BORDER | SWT.FULL_SELECTION);\n ruletable.setHeaderVisible(true);\n ruletable.setLinesVisible(true);\n\n TableColumn col_entitysubject = new TableColumn(ruletable, SWT.CENTER);\n col_entitysubject.setWidth(87);\n col_entitysubject.setText(Messages.BaselineShowDialog_1);\n\n TableColumn col_relation = new TableColumn(ruletable, SWT.CENTER);\n col_relation.setWidth(88);\n col_relation.setText(Messages.BaselineShowDialog_2);\n\n TableColumn col_quantifier = new TableColumn(ruletable, SWT.CENTER);\n col_quantifier.setWidth(79);\n col_quantifier.setText(Messages.BaselineShowDialog_3);\n\n TableColumn col_number = new TableColumn(ruletable, SWT.CENTER);\n col_number.setWidth(80);\n col_number.setText(Messages.BaselineShowDialog_4);\n\n TableColumn col_entityguest = new TableColumn(ruletable, SWT.CENTER);\n col_entityguest.setWidth(88);\n col_entityguest.setText(Messages.BaselineShowDialog_5);\n\n requirementtable = new Table(vsashForm, SWT.BORDER | SWT.FULL_SELECTION);\n requirementtable.setHeaderVisible(true);\n requirementtable.setLinesVisible(true);\n\n TableColumn tblclmnFormaldesc = new TableColumn(requirementtable, SWT.CENTER);\n tblclmnFormaldesc.setWidth(234);\n tblclmnFormaldesc.setText(Messages.BaselineShowDialog_6);\n\n TableColumn tblclmnRelatedentity = new TableColumn(requirementtable, SWT.CENTER);\n tblclmnRelatedentity.setWidth(195);\n tblclmnRelatedentity.setText(Messages.BaselineShowDialog_7);\n\n\n hsashForm.setWeights(new int[] {2, 2});\n\n if (AddBaseline2Tree(tree, filepath)) {\n if (tree.getItemCount() > 0) {\n tree.getItem(0).setExpanded(true);\n }\n\n tree.pack();\n }\n\n return container;\n }", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\t\tshell.setSize(720, 480);\n\t\tshell.setText(\"1FN Normalization\");\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\tcomposite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n\t\tcomposite.setLayout(new GridLayout(5, false));\n\t\tlblSeparators = new Label(composite, SWT.NONE);\n\t\tlblSeparators.setText(\"Separators:\");\n\t\tcomposite_1 = new Composite(composite, SWT.NONE);\n\t\tcomposite_1.setLayout(new GridLayout(5, false));\n\t\tcomposite_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));\n\t\tchk1 = new Button(composite_1, SWT.CHECK);\n\t\tchk1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk1widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk1.setSelection(true);\n\t\tchk1.setText(\";\");\n\t\tchk2 = new Button(composite_1, SWT.CHECK);\n\t\tchk2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk2widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk2.setSelection(true);\n\t\tchk2.setText(\"cr\");\n\t\tchk3 = new Button(composite_1, SWT.CHECK);\n\t\tchk3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk3widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk3.setText(\",\");\n\t\tchk4 = new Button(composite_1, SWT.CHECK);\n\t\tchk4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk4widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk4.setText(\"space\");\n\t\tchk5 = new Button(composite_1, SWT.CHECK);\n\t\tchk5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk5widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk5.setText(\".\");\n\t\tnew Label(composite, SWT.NONE);\n\t\tnew Label(composite, SWT.NONE);\n\t\tlblColumn = new Label(composite, SWT.NONE);\n\t\tlblColumn.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));\n\t\tlblColumn.setText(\"Column:\");\n\t\tlstColumn = new List(composite, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);\n\t\tlstColumn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdolstColumnwidgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tGridData gd_lstColumn = new GridData(SWT.LEFT, SWT.FILL, false, true, 4, 1);\n\t\tgd_lstColumn.widthHint = 150;\n\t\tgd_lstColumn.heightHint = 80;\n\t\tlstColumn.setLayoutData(gd_lstColumn);\n\t\tlblMethod = new Label(composite, SWT.NONE);\n\t\tlblMethod.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tlblMethod.setText(\"Method:\");\n\t\tcheckSingle = new Button(composite, SWT.RADIO);\n\t\tcheckSingle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdocheckSinglewidgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tcheckSingle.setText(\"Single Table (Recommended)\");\n\t\tchkMulti = new Button(composite, SWT.RADIO);\n\t\tchkMulti.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochkMultiwidgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchkMulti.setText(\"Multi table\");\n\t\tlblNewTableName = new Label(composite, SWT.NONE);\n\t\tlblNewTableName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tlblNewTableName.setText(\"New table name: \");\n\t\ttxtNewTableName = new Text(composite, SWT.BORDER);\n\t\ttxtNewTableName.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent arg0) {\n\t\t\t\tdotxtNewTableNamemodifyText(arg0);\n\t\t\t}\n\t\t});\n\t\ttxtNewTableName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tlblActual = new Label(shell, SWT.NONE);\n\t\tlblActual.setText(\"Actual\");\n\t\tlblRefatored = new Label(shell, SWT.NONE);\n\t\tlblRefatored.setText(\"Refator\");\n\t\tmodelEditor1 = new CompModelEditorController(shell, SWT.BORDER, SWT.V_SCROLL | SWT.H_SCROLL);\n\t\tGridData gd_modelEditor1 = new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1);\n\t\tgd_modelEditor1.widthHint = 250;\n\t\tmodelEditor1.setLayoutData(gd_modelEditor1);\n\t\tmodelEditor2 = new CompModelEditorController(shell, SWT.BORDER, SWT.V_SCROLL | SWT.H_SCROLL);\n\t\tmodelEditor2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\tbtnConfirm = new Button(shell, SWT.NONE);\n\t\tbtnConfirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdobtnConfirmwidgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tbtnConfirm.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1));\n\t\tbtnConfirm.setText(\"Confirm\");\n\t\ttxtNewTableName.setEnabled(false);\n\t}", "private void createPageContent() \n\t{\n\t\tGridLayout gl = new GridLayout(4, true);\n gl.verticalSpacing = 10;\n\t\t\n\t\tGridData gd;\n\t\tfinal Label wiz1Label = new Label(shell, SWT.NONE);\n\t\twiz1Label.setText(\"Enter Fields\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\twiz1Label.setLayoutData(gd);\n\t\twiz1Label.pack();\n\t\tText nameInput = new Text(shell, SWT.BORDER);\n\t\tnameInput.setMessage(\"Name\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tnameInput.setLayoutData(gd);\n\t\tnameInput.pack();\n\t\t//Component\n\t\tText componentInput = new Text(shell, SWT.BORDER);\n\t\tcomponentInput.setMessage(\"Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcomponentInput.setLayoutData(gd);\n\t\tcomponentInput.pack();\n\t\t//school\n\t\tText schoolInput = new Text(shell, SWT.BORDER);\n\t\tschoolInput.setMessage(\"School\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tschoolInput.setLayoutData(gd);\n\t\tschoolInput.pack();\n\t\t//range\n\t\tText rangeInput = new Text(shell, SWT.BORDER);\n\t\trangeInput.setMessage(\"Range\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\trangeInput.setLayoutData(gd);\n\t\trangeInput.pack();\n\t\t//Effect\n\t\tText effectInput = new Text(shell, SWT.BORDER);\n\t\teffectInput.setMessage(\"Effect\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\teffectInput.setLayoutData(gd);\n\t\teffectInput.pack();\n\t\t//castingtime\n\t\tText castimeInput = new Text(shell, SWT.BORDER);\n\t\tcastimeInput.setMessage(\"Casting Time\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcastimeInput.setLayoutData(gd);\n\t\tcastimeInput.pack();\n\t\t//materialcomponent\n\t\tText materialInput = new Text(shell, SWT.BORDER);\n\t\tmaterialInput.setMessage(\"Material Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tmaterialInput.setLayoutData(gd);\n\t\tmaterialInput.pack();\n\t\t//Savingthrow\n\t\tText savthrowInput = new Text(shell, SWT.BORDER);\n\t\tsavthrowInput.setMessage(\"Saving Throw\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tsavthrowInput.setLayoutData(gd);\n\t\tsavthrowInput.pack();\n\t\t//Focus\n\t\tText focusInput = new Text(shell, SWT.BORDER);\n\t\tfocusInput.setMessage(\"Focus\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tfocusInput.setLayoutData(gd);\n\t\tfocusInput.pack();\n\t\t//Duration\n\t\tText durationInput = new Text(shell, SWT.BORDER);\n\t\tdurationInput.setMessage(\"Duration\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdurationInput.setLayoutData(gd);\n\t\tdurationInput.pack();\n\t\t//spellresistance\n\t\tLabel resistanceLabel = new Label(shell, SWT.NONE);\n\t\tresistanceLabel.setText(\"Can Spell Be Resisted\");\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceLabel.setLayoutData(gd);\n\t\tresistanceLabel.pack();\n\t\tButton resistanceInput = new Button(shell, SWT.CHECK);\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceInput.setLayoutData(gd);\n\t\tresistanceInput.pack();\n\t\t//level\n\t\tText levelInput = new Text(shell, SWT.BORDER);\n\t\tlevelInput.setMessage(\"Level\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tlevelInput.setLayoutData(gd);\n\t\tlevelInput.pack();\n\t\t//Damage\n\t\tText damageInput = new Text(shell, SWT.BORDER);\n\t\tdamageInput.setMessage(\"Damage\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 1;\n\t\tdamageInput.setLayoutData(gd);\n\t\tdamageInput.pack();\n\t\t//DamageAlternative\n\t\tText damagealterInput = new Text(shell, SWT.BORDER);\n\t\tdamagealterInput.setMessage(\"Damage Alternative\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdamagealterInput.setLayoutData(gd);\n\t\tdamagealterInput.pack();\n\t\n\t\t//description\n\t\t\n\t\tText descriptionInput = new Text(shell, SWT.WRAP | SWT.V_SCROLL);\n\t\tdescriptionInput.setText(\"Description (Optional)\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\tgd.verticalSpan = 15;\n\t\tdescriptionInput.setLayoutData(gd);\n\t\tdescriptionInput.pack();\n\t\tLabel blank = new Label(shell, SWT.NONE);\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, true);\n\t\tgd.horizontalSpan = 4;\n\t\tblank.setLayoutData(gd);\n\t\tblank.pack();\n\t\tButton save = new Button(shell, SWT.PUSH);\n\n\t\tsave.setText(\"Save\");\n\t\tsave.addListener(SWT.Selection, new Listener()\n\t\t{\n\t\t\tpublic void handleEvent(Event event)\n\t\t\t{\n\t\t\t\tBoolean checkfault = false;\n\t\t\t\tLinkedHashMap<String, String> a = new LinkedHashMap<String, String>();\n\t\t\t\tif(nameInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tnameInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(componentInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcomponentInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(schoolInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tschoolInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(castimeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcastimeInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(levelInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tlevelInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(checkfault)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ta.put(\"NAME\", nameInput.getText());\n\t\t\t\ta.put(\"COMPONENTS\", componentInput.getText());\n\t\t\t\ta.put(\"SCHOOL\", schoolInput.getText());\n\t\t\t\ta.put(\"CASTINGTIME\", castimeInput.getText());\n\t\t\t\ta.put(\"LEVEL\", levelInput.getText());\n\t\t\t\tif(resistanceInput.getSelection())\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"YES\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"NO\");\n\t\t\t\t}\n\t\t\t\tif(!materialInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"MATERIALCOMPONENT\", materialInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!savthrowInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SAVINGTHROW\", savthrowInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!focusInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"FOCUS\", focusInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!durationInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DURATION\", durationInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damageInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGE\", damageInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damagealterInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGEALTERNATE\", damagealterInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!rangeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"RANGE\", rangeInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!effectInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"EFFECT\", effectInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ta.put(\"DESCRIPTION\", descriptionInput.getText());\n\t\t\t\tnewspell = new SpellEntity(a);\n\t\t\t\tMain.gameState.abilities.put(newspell.getName(), newspell);\n\t\t\t\tMain.gameState.customContent.put(newspell.getName(), newspell);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t}\n\t\t);\n\t\tgd = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tsave.setLayoutData(gd);\n\t\tsave.pack();\n\t\tshell.setLayout(gl);\n\t\tshell.layout();\n\t\tshell.pack();\n//\t\t//wizard\n//\t\t\t\tfinal Composite wizPanel = new Composite(shell, SWT.BORDER);\n//\t\t\t\twizPanel.setBounds(0,0,WIDTH, HEIGHT);\n//\t\t\t\tfinal StackLayout wizLayout = new StackLayout();\n//\t\t\t\twizPanel.setLayout(wizLayout);\n//\t\t\t\t\n//\t\t\t\t//Page1 -- Name\n//\t\t\t\tfinal Composite wizpage1 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\twizpage1.setBounds(0,0,WIDTH,HEIGHT);\n//\t\t\t\t\n//\t\t\t\tfinal Label wiz1Label = new Label(wizpage1, SWT.NONE);\n//\t\t\t\twiz1Label.setText(\"Enter Name (required)\");\n//\t\t\t\twiz1Label.pack();\n//\t\t\t\tfinal Text wizpage1text = new Text(wizpage1, SWT.BORDER);\n//\t\t\t\twizpage1text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage1text.setText(\"FireBall\");\n//\t\t\t\tButton next1 = createNextButton(wizpage1);//TODO cancel and previous button\n//\t\t\t\tcreateBackButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tnext1.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage1text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellname = wizpage1text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tSystem.out.println(\"PANIC: ITEM WIZARD PAGE 1 OUT\");\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz1Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\t);\n//\t\t\t\t\n//\t\t\t\twizPages.add(wizpage1);\n//\t\t\t\t//Page2 -- component\n//\t\t\t\tfinal Composite wizpage2 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz2Label = new Label(wizpage2, SWT.NONE);\n//\t\t\t\twiz2Label.setText(\"Enter Component: (required)\");\n//\t\t\t\twiz2Label.pack();\n//\t\t\t\tfinal Text wizpage2text = new Text(wizpage2, SWT.BORDER);\n//\t\t\t\twizpage2text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage2text.setText(\"Fire\");\n//\t\t\t\tButton next2 = createNextButton(wizpage2);\n//\t\t\t\tcreateBackButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tnext2.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage2text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellcomp = wizpage2text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz2Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage2);\n//\t\t\t\t//Page3 -- School\n//\t\t\t\tfinal Composite wizpage3 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz3Label = new Label(wizpage3, SWT.NONE);\n//\t\t\t\twiz3Label.setText(\"Enter School: (required)\");\n//\t\t\t\twiz3Label.pack();\n//\t\t\t\tfinal Text wizpage3text = new Text(wizpage3, SWT.BORDER);\n//\t\t\t\twizpage3text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage3text.setText(\"Descruction\");\n//\t\t\t\tButton next3 = createNextButton(wizpage3);\n//\t\t\t\tcreateBackButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tnext3.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage3text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellschool = wizpage3text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz3Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage3);\n//\t\t\t\t//Page4 -- Range\n//\t\t\t\tfinal Composite wizpage4 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz4Label = new Label(wizpage4, SWT.NONE);\n//\t\t\t\twiz4Label.setText(\"Enter Range: (required)\");\n//\t\t\t\twiz4Label.pack();\n//\t\t\t\tfinal Text wizpage4text = new Text(wizpage4, SWT.BORDER);\n//\t\t\t\twizpage4text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage4text.setText(\"50 feet\");\n//\t\t\t\tButton next4 = createNextButton(wizpage4);\n//\t\t\t\tcreateBackButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tnext4.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage4text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellrange = wizpage4text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz4Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage4);\n//\t\t\t\t//Page5 -- effect\n//\t\t\t\tfinal Composite wizpage5 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz5Label = new Label(wizpage5, SWT.NONE);\n//\t\t\t\twiz5Label.setText(\"Enter Effect: (required)\");\n//\t\t\t\twiz5Label.pack();\n//\t\t\t\tfinal Text wizpage5text = new Text(wizpage5, SWT.BORDER);\n//\t\t\t\twizpage5text.setBounds(50, 50, 250, 150);\n//\t\t\t\twizpage5text.setText(\"No effect\");\n//\t\t\t\tButton next5 = createNextButton(wizpage5);\n//\t\t\t\tcreateBackButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tnext5.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelleffect = wizpage5text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz5Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage5);\n//\t\t\t\t//Page6 -- casting time\n//\t\t\t\tfinal Composite wizpage6 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz6Label = new Label(wizpage6, SWT.NONE);\n//\t\t\t\twiz6Label.setText(\"Enter Casting Time: (required)\");\n//\t\t\t\twiz6Label.pack();\n//\t\t\t\tfinal Text wizpage6text = new Text(wizpage6, SWT.BORDER);\n//\t\t\t\twizpage6text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage6text.setText(\"1 turn\");\n//\t\t\t\tButton next6 = createNextButton(wizpage6);\n//\t\t\t\tcreateBackButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tnext6.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellcastime = wizpage6text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz6Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage6);\n//\t\t\t\t//Page7 -- Material Component\n//\t\t\t\tfinal Composite wizpage7 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz7Label = new Label(wizpage7, SWT.NONE);\n//\t\t\t\twiz7Label.setText(\"Enter Material Component: (required)\");\n//\t\t\t\twiz7Label.pack();\n//\t\t\t\tfinal Text wizpage7text = new Text(wizpage7, SWT.BORDER);\n//\t\t\t\twizpage7text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage7text.setText(\"None\");\n//\t\t\t\tButton next7 = createNextButton(wizpage7);\n//\t\t\t\tcreateBackButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tnext7.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage7text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellmaterial = wizpage7text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz7Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage7);\n//\t\t\t\t//Page8 -- saving throw\n//\t\t\t\tfinal Composite wizpage8 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz8Label = new Label(wizpage8, SWT.NONE);\n//\t\t\t\twiz8Label.setText(\"Enter Saving Throw: (required)\");\n//\t\t\t\twiz8Label.pack();\n//\t\t\t\tfinal Text wizpage8text = new Text(wizpage8, SWT.BORDER);\n//\t\t\t\twizpage8text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage8text.setText(\"Will negate XX\");\n//\t\t\t\tButton next8 = createNextButton(wizpage8);\n//\t\t\t\tcreateBackButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tnext8.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage8text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellsaving = wizpage8text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz8Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage8);\n//\t\t\t\t//Page9 -- Focus\n//\t\t\t\tfinal Composite wizpage9 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz9Label = new Label(wizpage9, SWT.NONE);\n//\t\t\t\twiz9Label.setText(\"Enter Focus: (required)\");\n//\t\t\t\twiz9Label.pack();\n//\t\t\t\tfinal Text wizpage9text = new Text(wizpage9, SWT.BORDER);\n//\t\t\t\twizpage9text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage9text.setText(\"A dart\");\n//\t\t\t\tButton next9 = createNextButton(wizpage9);\n//\t\t\t\tcreateBackButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tnext9.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage9text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellfocus = wizpage9text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz9Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage9);\n//\t\t\t\t//Page10 -- Duration\n//\t\t\t\tfinal Composite wizpage10 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz10Label = new Label(wizpage10, SWT.NONE);\n//\t\t\t\twiz10Label.setText(\"Enter Duration: (required)\");\n//\t\t\t\twiz10Label.pack();\n//\t\t\t\tfinal Text wizpage10text = new Text(wizpage10, SWT.BORDER);\n//\t\t\t\twizpage10text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage10text.setText(\"5 Turns\");\n//\t\t\t\tButton next10 = createNextButton(wizpage10);\n//\t\t\t\tcreateBackButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tnext10.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage10text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellduration = wizpage10text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz10Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage10);\n//\t\t\t\t//Page11 -- Level\n//\t\t\t\tfinal Composite wizpage11 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz11Label = new Label(wizpage11, SWT.NONE);\n//\t\t\t\twiz11Label.setText(\"Enter Level (required)\");\n//\t\t\t\twiz11Label.pack();\n//\t\t\t\tfinal Text wizpage11text = new Text(wizpage11, SWT.BORDER);\n//\t\t\t\twizpage11text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage11text.setText(\"1\");\n//\t\t\t\tButton next11 = createNextButton(wizpage11);\n//\t\t\t\tcreateBackButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tnext11.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage11text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\ttry\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tif(Integer.parseInt(wizpage11text.getText()) >= 0)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelllevel = String.valueOf(Integer.parseInt(wizpage11text.getText()));\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tcatch(NumberFormatException a)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage11);\n//\t\t\t\t//Page12 -- resistance\n//\t\t\t\tfinal Composite wizpage12 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz12Label = new Label(wizpage12, SWT.NONE);\n//\t\t\t\twiz12Label.setText(\"Enter Spell resistance: (Yes/No)\");\n//\t\t\t\twiz12Label.pack();\n//\t\t\t\tfinal Text wizpage12text = new Text(wizpage12, SWT.BORDER);\n//\t\t\t\twizpage12text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage12text.setText(\"Yes\");\n//\t\t\t\tButton next12 = createNextButton(wizpage12);\n//\t\t\t\tcreateBackButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tnext12.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage12text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellresistance = wizpage12text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz12Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage12);\n//\t\t\t\t//Page13 - Description\n//\t\t\t\tfinal Composite wizpage13 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tLabel wiz13Label = new Label(wizpage13, SWT.NONE);\n//\t\t\t\twiz13Label.setText(\"Enter Description (Optional)\");\n//\t\t\t\twiz13Label.pack(); \n//\t\t\t\tfinal Text wizpage13text = new Text(wizpage13, SWT.BORDER);\n//\t\t\t\twizpage13text.setBounds(50, 50, 300, 200);\n//\t\t\t\twizpage13text.setText(\"Description here\");\n//\t\t\t\tButton next13 = createNextButton(wizpage13);\n//\t\t\t\tcreateBackButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tnext13.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage13text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = wizpage13text.getText();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = \"<empty>\";\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tCreateVerificationPage(wizPanel, wizLayout);\n//\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage13);\n//\t\t\t\t\n//\t\t\t\twizLayout.topControl = wizpage1;\n//\t\t\t\twizPanel.layout();\n\t}" ]
[ "0.7465564", "0.71213424", "0.70750844", "0.7056892", "0.7035284", "0.6982003", "0.6966167", "0.6853646", "0.68448454", "0.6811343", "0.68096405", "0.6801873", "0.67985934", "0.6798088", "0.679386", "0.6789257", "0.67799765", "0.6769032", "0.6748607", "0.67194223", "0.6717503", "0.67035323", "0.66828877", "0.6678451", "0.66759765", "0.6675277", "0.6666175", "0.6662871", "0.66587853", "0.665795", "0.66506565", "0.6635104", "0.65900564", "0.6588636", "0.6583689", "0.6574754", "0.65720886", "0.656907", "0.65508175", "0.65392804", "0.6516047", "0.6515943", "0.65151596", "0.651121", "0.6509662", "0.65088314", "0.65046996", "0.64980966", "0.6456817", "0.64314914", "0.6408048", "0.63942474", "0.634836", "0.6324647", "0.63166547", "0.6313728", "0.6288747", "0.6273535", "0.62523174", "0.62443435", "0.62409055", "0.6212926", "0.6212883", "0.62055504", "0.61921424", "0.61892045", "0.6176031", "0.6169341", "0.6168304", "0.60950315", "0.6090538", "0.60902613", "0.60856974", "0.60703", "0.60696167", "0.6065619", "0.6064933", "0.60549086", "0.60484904", "0.60410786", "0.60372114", "0.60363436", "0.60327744", "0.6002712", "0.59914464", "0.5956609", "0.5956531", "0.59552765", "0.59287804", "0.5926907", "0.59196913", "0.5904495", "0.5904013", "0.5893288", "0.58899236", "0.58865124", "0.5883632", "0.5872325", "0.58696645", "0.58542544" ]
0.6452968
49
Create contents of the button bar.
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createContents() {\r\n\t\tshell = new Shell(getParent(), getStyle());\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(getText());\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite = new Composite(shell, SWT.NONE);\r\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(composite, SWT.NONE);\r\n\t\tRowLayout rl_composite_1 = new RowLayout(SWT.VERTICAL);\r\n\t\trl_composite_1.center = true;\r\n\t\trl_composite_1.fill = true;\r\n\t\tcomposite_1.setLayout(rl_composite_1);\r\n\t\t\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\t\r\n\t\tButton btnNewButton = new Button(composite_2, SWT.NONE);\r\n\t\tbtnNewButton.setText(\"New Button\");\r\n\t\t\r\n\t\tButton btnRadioButton = new Button(composite_2, SWT.RADIO);\r\n\t\tbtnRadioButton.setText(\"Radio Button\");\r\n\t\t\r\n\t\tButton btnCheckButton = new Button(composite_2, SWT.CHECK);\r\n\t\tbtnCheckButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCheckButton.setText(\"Check Button\");\r\n\r\n\t}", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "protected void createButtons(Composite parent) {\n\t\tcomRoot = new Composite(parent, SWT.BORDER);\n\t\tcomRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));\n\t\tcomRoot.setLayout(new GridLayout(2, false));\n\n\t\ttbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT);\n\t\ttbTools.setLayout(new GridLayout());\n\t\ttbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));\n\n\t\tfinal ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnSettings.setText(Messages.btnAdvancedSettings);\n\t\tbtnSettings.setToolTipText(Messages.tipAdvancedSettings);\n\t\tbtnSettings.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tPerformanceSettingsDialog dialog = new PerformanceSettingsDialog(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig());\n\t\t\t\tdialog.open();\n\t\t\t}\n\t\t});\n\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tbtnPreviewDDL = new ToolItem(tbTools, SWT.CHECK);\n\t\tbtnPreviewDDL.setSelection(false);\n\t\tbtnPreviewDDL.setText(Messages.btnPreviewDDL);\n\t\tbtnPreviewDDL.setToolTipText(Messages.tipPreviewDDL);\n\t\tbtnPreviewDDL.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tboolean flag = btnPreviewDDL.getSelection();\n\t\t\t\tswitchText(flag);\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\n\t\tfinal ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnExportScript.setText(Messages.btnExportScript);\n\t\tbtnExportScript.setToolTipText(Messages.tipSaveScript);\n\t\tbtnExportScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\texportScriptToFile();\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnUpdateScript.setText(Messages.btnUpdateScript);\n\t\tbtnUpdateScript.setToolTipText(Messages.tipUpdateScript);\n\t\tbtnUpdateScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tgetMigrationWizard().saveMigrationScript(false, isSaveSchema());\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t\tbtnUpdateScript\n\t\t\t\t.setEnabled(getMigrationWizard().getMigrationScript() != null);\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnNewScript.setText(Messages.btnCreateNewScript);\n\t\tbtnNewScript.setToolTipText(Messages.tipCreateNewScript);\n\t\tbtnNewScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tString name = EditScriptDialog.getMigrationScriptName(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig()\n\t\t\t\t\t\t\t\t.getName());\n\t\t\t\tif (StringUtils.isBlank(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetMigrationWizard().getMigrationConfig().setName(name);\n\t\t\t\tgetMigrationWizard().saveMigrationScript(true, isSaveSchema());\n\t\t\t\tbtnUpdateScript.setEnabled(getMigrationWizard()\n\t\t\t\t\t\t.getMigrationScript() != null);\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t}", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "private void createContents() {\r\n\t\tshlEventBlocker = new Shell(getParent(), getStyle());\r\n\t\tshlEventBlocker.setSize(167, 135);\r\n\t\tshlEventBlocker.setText(\"Event Blocker\");\r\n\t\t\r\n\t\tLabel lblRunningEvent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblRunningEvent.setBounds(10, 10, 100, 15);\r\n\t\tlblRunningEvent.setText(\"Running Event:\");\r\n\t\t\r\n\t\tLabel lblevent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblevent.setFont(SWTResourceManager.getFont(\"Segoe UI\", 15, SWT.BOLD));\r\n\t\tlblevent.setBounds(20, 31, 129, 35);\r\n\t\tlblevent.setText(eventName);\r\n\t\t\r\n\t\tButton btnFinish = new Button(shlEventBlocker, SWT.NONE);\r\n\t\tbtnFinish.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlEventBlocker.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinish.setBounds(10, 72, 75, 25);\r\n\t\tbtnFinish.setText(\"Finish\");\r\n\r\n\t}", "private void createButton(){\n addButton();\n addStartButton();\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}", "private HorizontalPanel createCommands() {\n\t\tfinal HorizontalPanel bar = new HorizontalPanel();\n\t\tbar.addStyleName(AbstractField.CSS.cbtAbstractCommand());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Save button\n\t\t//-----------------------------------------------\n\t\tfinal CommandButton saveButton = new CommandButton(this, AbstractField.CONSTANTS.allSave(), actorUpdate, tab++);\n\t\tsaveButton.addStyleName(AbstractField.CSS.cbtCommandButtonTwo());\n\t\tsaveButton.addStyleName(AbstractField.CSS.cbtGradientBlue());\n\t\tsaveButton.setTitle(AbstractField.CONSTANTS.helpSave());\n\t\tbar.add(saveButton);\n\n\t\t//-----------------------------------------------\n\t\t// Delete button\n\t\t//-----------------------------------------------\n\t\tfinal CommandButton deleteButton = new CommandButton(this, AccessControl.DELETE_PERMISSION, AbstractField.CONSTANTS.allDelete(), actorDelete, tab++);\n\t\tdeleteButton.addStyleName(AbstractField.CSS.cbtCommandButtonTwo());\n\t\tdeleteButton.addStyleName(AbstractField.CSS.cbtGradientRed());\n\t\tdeleteButton.setTitle(AbstractField.CONSTANTS.helpDelete());\n\t\tbar.add(deleteButton);\n\n\t\t//-----------------------------------------------\n\t\t// Transition array that defines the finite state machine\n\t\t//-----------------------------------------------\n\t\tfsm = new ArrayList<Transition>();\n\t\tfsm.add(new Transition(Party.CREATED, saveButton, Party.CREATED));\n\t\tfsm.add(new Transition(Party.CREATED, deleteButton, Party.FINAL));\n\n\t\treturn bar;\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setLayout(new GridLayout(1, false));\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t{\r\n\t\t\tfinal Button btnShowTheFake = new Button(shell, SWT.TOGGLE);\r\n\t\t\tbtnShowTheFake.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t\tif (btnShowTheFake.getSelection()) {\r\n\t\t\t\t\t\tRectangle bounds = btnShowTheFake.getBounds();\r\n\t\t\t\t\t\tPoint pos = shell.toDisplay(bounds.x + 5, bounds.y + bounds.height);\r\n\t\t\t\t\t\ttooltip = showTooltip(shell, pos.x, pos.y);\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Hide it\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (tooltip != null && !tooltip.isDisposed())\r\n\t\t\t\t\t\t\ttooltip.dispose();\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t}\r\n\t}", "private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "private void createYourMusicContent() {\n\t\t/**Creates all images we will use for the buttons*/\n\t\tImageIcon image1 = new ImageIcon(sURLFB1);\n\t\tImageIcon image2 = new ImageIcon(sURLFB2);\n\t\tImageIcon image3 = new ImageIcon(sURLFB3);\n\t\tImageIcon image4 = new ImageIcon(sURLFBS1);\n\t\tImageIcon image5 = new ImageIcon(sURLFBS2);\n\t\tImageIcon image6 = new ImageIcon(sURLFBS3);\n\t\tImageIcon image7 = new ImageIcon(sURLFBPL1);\n\t\tImageIcon image8 = new ImageIcon(sURLFBPL2);\n\t\tImageIcon image9 = new ImageIcon(sURLFBPL3);\n\t\n\t\t/**Creates the button of Favourites and configures it*/\n\t\tjbFavorites = new JButton(\"Favorites\");\n\t\tjbFavorites.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbFavorites.setForeground(new Color(150,100,100));\n\t\tjbFavorites.setIcon(image1);\n\t\tjbFavorites.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setRolloverIcon(image2);\n\t\tjbFavorites.setSelectedIcon(image3);\n\t\tjbFavorites.setContentAreaFilled(false);\n\t\tjbFavorites.setFocusable(false);\n\t\tjbFavorites.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of Songs and configures it*/\n\t\tjbSongs = new JButton(\"Songs\");\n\t\tjbSongs.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbSongs.setForeground(new Color(150,100,100));\n\t\tjbSongs.setIcon(image4);\n\t\tjbSongs.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setRolloverIcon(image5);\n\t\tjbSongs.setSelectedIcon(image6);\n\t\tjbSongs.setContentAreaFilled(false);\n\t\tjbSongs.setFocusable(false);\n\t\tjbSongs.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of PartyList and configures it*/\n\t\tjbPartyList = new JButton(\"PartyList\");\n\t\tjbPartyList.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbPartyList.setForeground(new Color(150,100,100));\n\t\tjbPartyList.setIcon(image7);\n\t\tjbPartyList.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setRolloverIcon(image8);\n\t\tjbPartyList.setSelectedIcon(image9);\t\n\t\tjbPartyList.setContentAreaFilled(false);\n\t\tjbPartyList.setFocusable(false);\n\t\tjbPartyList.setBorderPainted(false);\n\t\t\n\t\t/**Creates the panel where we will put all buttons*/\n\t\tjpPreLists = new JPanel(new BorderLayout());\n jpPreLists.setOpaque(false);\n\t\tjpPreLists.add(jbFavorites,BorderLayout.NORTH);\n\t\tjpPreLists.add(jbSongs,BorderLayout.CENTER);\n\t\tjpPreLists.add(jbPartyList,BorderLayout.SOUTH);\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, Messages.BTN_ADD,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tMessages.BTN_FINISH, false);\r\n\t\tinitDataBindings();\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}", "private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Add\",\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: wtrocki@gmail.com\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}", "protected void createContents() {\r\n\t\tsetText(\"SWT Application\");\r\n\t\tsetSize(450, 300);\r\n\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID,\n\t\t\t\tIDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(\"关闭\");\n\t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "private void createAboutButton(final ToolBar bar) {\r\n // image's source:\r\n // http://commons.wikimedia.org/wiki/File:Information.png\r\n createButton(bar, \"images/Information.png\", \"About\",\r\n new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(final SelectionEvent arg0) {\r\n displayInfo(\"The parity game played is a max priority parity game.\\n\"\r\n + \"Player 0 has round vertices, player 1 has square vertices.\\n\"\r\n + \"Player 0 wins even priorities and player 1 wins odd priorities.\\n\"\r\n + \"Once solved, the winning region of player 0 is displayed in green.\\n\"\r\n + \"The winning region of player 1 is displayed in blue.\");\r\n // TODO: display this in a read-only text-box such that links can easily be copied\r\n displayInfo(\"The images for loading, generating and solving arenas are public domain and were retrieved from:\\n\"\r\n + \"https://openclipart.org/detail/119905/load-cedric-bosdonnat-01-by-anonymous\\n\"\r\n + \"http://pixabay.com/de/w%C3%BCrfel-sechs-gesichter-rollen-35637/\\n\"\r\n + \"and\\n\"\r\n + \"http://pixabay.com/de/puzzle-st%C3%BCck-stichs%C3%A4ge-konzept-308908/\\n\"\r\n + \"respecitvely.\\n\"\r\n + \"The image for saving arenas is under creative commons attribution license, created by VistaICO.com and was retrieved from:\\n\"\r\n + \"https://www.iconfinder.com/icons/49256/disk_save_icon\\n\"\r\n + \"Furthermore, the libraries SWT and Zest under the EPL\\n\"\r\n + \"and the libraries Apache Commons and Google Guava under the Apache license have been used.\\n\");\r\n }\r\n });\r\n }", "public void createButtons() {\n\t\tbutton1 = new JButton(\"Button1\");\n\t\tbutton2 = new JButton(\"Button2\");\n\t\tbutton3 = new JButton(\"Button3\");\n\t\tbutton4 = new JButton(\"Button4\");\n\t\tbutton5 = new JButton(\"Button5\");\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Rechercher\", true);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, \"Annuler\", false);\r\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "protected void createContents() {\n\t\tsetText(\"Termination\");\n\t\tsetSize(340, 101);\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDiagnosticChain diagnosticChain = new BasicDiagnostic();\n\t if (isValid(diagnosticChain)) {\n\t \t okFlag = true;\n\t\t okPressed();\n\t\t }else{\n\t\t \t Message messageDialog = new Message(EditTask.this.getShell());\n\t\t \t messageDialog.setMessage(Util.getErrorMessage(diagnosticChain));\n\t\t \t messageDialog.open();\n\t\t }\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "public ButtonBar() {\n scrollPane = new JScrollPane();\n scrollPane.setBorder(null);\n scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants\n .HORIZONTAL_SCROLLBAR_NEVER);\n scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants\n .VERTICAL_SCROLLBAR_AS_NEEDED);\n scrollPane.setMinimumSize(new Dimension(0,buttonHeight\n + ((int) PlatformDefaults.getUnitValueX(\"related\").getValue()) * 2));\n \n buttons = Collections.synchronizedMap(new TreeMap<FrameContainer<?>,\n JToggleButton>(new FrameContainerComparator()));\n position = FramemanagerPosition.getPosition(\n IdentityManager.getGlobalConfig().getOption(\"ui\",\n \"framemanagerPosition\"));\n \n if (position.isHorizontal()) {\n buttonPanel = new ButtonPanel(new MigLayout(\"ins rel, fill, flowx\"),\n this);\n } else {\n buttonPanel = new ButtonPanel(new MigLayout(\"ins rel, fill, flowy\"),\n this);\n }\n scrollPane.getViewport().add(buttonPanel);\n }", "@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n }", "protected void createContents() {\n\t\tshlCarbAndRemainder = new Shell(Display.getDefault(), SWT.TITLE|SWT.CLOSE|SWT.BORDER);\n\t\tshlCarbAndRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tshlCarbAndRemainder.setSize(323, 262);\n\t\tshlCarbAndRemainder.setText(\"CARB and Remainder\");\n\t\t\n\t\tGroup grpCarbSetting = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpCarbSetting.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpCarbSetting.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpCarbSetting.setText(\"CARB Setting\");\n\t\t\n\t\tgrpCarbSetting.setBounds(10, 0, 295, 106);\n\t\t\n\t\tLabel lblCARBValue = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblCARBValue.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblCARBValue.setBounds(10, 32, 149, 22);\n\t\tlblCARBValue.setText(\"CARB Value\");\n\t\t\n\t\tLabel lblAuthenticationPIN = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblAuthenticationPIN.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblAuthenticationPIN.setBounds(10, 68, 149, 22);\n\t\tlblAuthenticationPIN.setText(\"Authentication PIN\");\n\t\t\n\t\tSpinner spinnerCARBValue = new Spinner(grpCarbSetting, SWT.BORDER);\n\t\tspinnerCARBValue.setBounds(206, 29, 72, 22);\n\t\t\n\t\ttextAuthenticationPIN = new Text(grpCarbSetting, SWT.BORDER|SWT.PASSWORD);\n\t\ttextAuthenticationPIN.setBounds(206, 65, 72, 21);\n\t\t\t\t\n\t\tGroup grpRemainder = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpRemainder.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpRemainder.setText(\"Remainder\");\n\t\tgrpRemainder.setBounds(10, 112, 296, 106);\n\t\t\n\t\tButton btnInjectBolus = new Button(grpRemainder, SWT.NONE);\n\t\tbtnInjectBolus.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnInjectBolus.setBounds(183, 38, 103, 41);\n\t\tbtnInjectBolus.setText(\"INJECT BOLUS\");\n\t\t\n\t\tButton btnCancel = new Button(grpRemainder, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshlCarbAndRemainder.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setBounds(10, 38, 80, 41);\n\t\tbtnCancel.setText(\"Cancel\");\n\t\t\n\t\tButton btnSnooze = new Button(grpRemainder, SWT.NONE);\n\t\tbtnSnooze.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnSnooze.setBounds(96, 38, 81, 41);\n\t\tbtnSnooze.setText(\"Snooze\");\n\n\t}", "private HBox createButtons() {\n\t\tButton solve = new Button(\"Solve\");\n\t\tButton clear = new Button(\"Clear\");\n\t\tButton quit = new Button(\"Quit\");\n\t\t\n\t\tsolve.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tclear.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tquit.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\t\n\t\tsolve.setOnAction(e -> solve());\n\t\tclear.setOnAction(e -> clear());\n\t\tquit.setOnAction(e -> quit());\n\t\t\n\t\tHBox buttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setPadding(new Insets(20,20,20,20));\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(solve, clear, quit);\n\t\tbuttons.setStyle(\"-fx-background-color: #DCDCDC;\");\n\t\t\n\t\treturn buttons;\n\t}", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(barComp, BUTTON_ADD_ID, Messages.btnAddParameter, true);\n\t\tcreateButton(barComp, BUTTON_EDIT_ID, Messages.btnEditParameter, true);\n\t\tcreateButton(barComp, BUTTON_DROP_ID, Messages.btnDropParameter, true);\n\t\tcreateButton(barComp, BUTTON_UP_ID, Messages.btnUpParameter, true);\n\t\tcreateButton(barComp, BUTTON_DOWN_ID, Messages.btnDownParameter, true);\n\t\tcreateButton(parent, IDialogConstants.OK_ID, com.cubrid.common.ui.common.Messages.btnOK, true);\n\n\t\tgetButton(BUTTON_EDIT_ID).setEnabled(false);\n\t\tgetButton(BUTTON_UP_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DOWN_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DROP_ID).setEnabled(false);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, com.cubrid.common.ui.common.Messages.btnCancel, false);\n\t}", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}", "private static void createAndShowGUI() {\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"ButtonDemo\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n ButtonDemo newContentPane = new ButtonDemo();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button_1 = createButton(parent, CustomNo, \"No\", false);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"No\" clicked\n\t\t\t\tclose();\n\t\t\t}\n\t\t});\n\t\tButton button = createButton(parent, CustomYes, \"Yes\",\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"Yes\" clicked\n\t\t\t\t\n\t\t FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);\n\t\t dlg.setFilterNames(new String[]{\"All Files (*.*)\"});\n\t\t dlg.setFilterExtensions(new String[]{\"*.*\"});\n\t\t dlg.setOverwrite(true);\n\t\t dlg.setFileName(filename);\n\t\t String path = dlg.open();\n\t\t //Activator.getDefault().showDialogAsync(\"Filepath chosen\", path);\n\t\t filepath = path;\n\t\t if (path != null)\n\t\t \tclose();\n\t\t\t}\n\t\t});\n\t\tbutton.setSelection(true);\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tGroup group_1 = new Group(shell, SWT.NONE);\n\t\tgroup_1.setText(\"\\u65B0\\u4FE1\\u606F\\u586B\\u5199\");\n\t\tgroup_1.setBounds(0, 120, 434, 102);\n\t\t\n\t\tLabel label_4 = new Label(group_1, SWT.NONE);\n\t\tlabel_4.setBounds(10, 21, 61, 17);\n\t\tlabel_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel label_5 = new Label(group_1, SWT.NONE);\n\t\tlabel_5.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\tlabel_5.setBounds(10, 46, 61, 17);\n\t\t\n\t\tLabel label_6 = new Label(group_1, SWT.NONE);\n\t\tlabel_6.setText(\"\\u5BC6\\u7801\");\n\t\tlabel_6.setBounds(10, 75, 61, 17);\n\t\t\n\t\ttext = new Text(group_1, SWT.BORDER);\n\t\ttext.setBounds(121, 21, 140, 17);\n\t\t\n\t\ttext_1 = new Text(group_1, SWT.BORDER);\n\t\ttext_1.setBounds(121, 46, 140, 17);\n\t\t\n\t\ttext_2 = new Text(group_1, SWT.BORDER);\n\t\ttext_2.setBounds(121, 75, 140, 17);\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.setBounds(31, 228, 80, 27);\n\t\tbtnNewButton.setText(\"\\u63D0\\u4EA4\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(288, 228, 80, 27);\n\t\tbtnNewButton_1.setText(\"\\u91CD\\u586B\");\n\t\t\n\t\tGroup group = new Group(shell, SWT.NONE);\n\t\tgroup.setText(\"\\u539F\\u5148\\u4FE1\\u606F\");\n\t\tgroup.setBounds(0, 10, 320, 102);\n\t\t\n\t\tLabel label = new Label(group, SWT.NONE);\n\t\tlabel.setBounds(10, 20, 61, 17);\n\t\tlabel.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel lblNewLabel = new Label(group, SWT.NONE);\n\t\tlblNewLabel.setBounds(113, 20, 61, 17);\n\t\t\n\t\tLabel label_1 = new Label(group, SWT.NONE);\n\t\tlabel_1.setBounds(10, 43, 61, 17);\n\t\tlabel_1.setText(\"\\u6027\\u522B\");\n\t\t\n\t\tButton btnRadioButton = new Button(group, SWT.RADIO);\n\t\t\n\t\tbtnRadioButton.setBounds(90, 43, 97, 17);\n\t\tbtnRadioButton.setText(\"\\u7537\");\n\t\tButton btnRadioButton_1 = new Button(group, SWT.RADIO);\n\t\tbtnRadioButton_1.setBounds(208, 43, 97, 17);\n\t\tbtnRadioButton_1.setText(\"\\u5973\");\n\t\t\n\t\tLabel label_2 = new Label(group, SWT.NONE);\n\t\tlabel_2.setBounds(10, 66, 61, 17);\n\t\tlabel_2.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(113, 66, 61, 17);\n\t\t\n\t\tLabel label_3 = new Label(group, SWT.NONE);\n\t\tlabel_3.setBounds(10, 89, 61, 17);\n\t\tlabel_3.setText(\"\\u5BC6\\u7801\");\n\t\tLabel lblNewLabel_2 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_2.setBounds(113, 89, 61, 17);\n\t\t\n\t\ttry {\n\t\t\tUserDao userDao=new UserDao();\n\t\t\tlblNewLabel_2.setText(User.getPassword());\n\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\n\t\t\t\n\n\t\t\n\t\t\ttry {\n\t\t\t\tList<User> userList=userDao.query();\n\t\t\t\tString results[][]=new String[userList.size()][5];\n\t\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\t\tlblNewLabel_1.setText(User.getSex());\n\t\t\t\tlblNewLabel_2.setText(User.getUserPhone());\n\t\t\t\tButton button = new Button(shell, SWT.NONE);\n\t\t\t\tbutton.setBounds(354, 0, 80, 27);\n\t\t\t\tbutton.setText(\"\\u8FD4\\u56DE\");\n\t\t\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tbook book=new book();\n\t\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < userList.size(); i++) {\n\t\t\t\t\t\tUser user1 = (User)userList.get(i);\t\n\t\t\t\t\tresults[i][0] = user1.getUserName();\n\t\t\t\t\tresults[i][1] = user1.getSex();\t\n\t\t\t\t\tresults[i][2] = user1.getPassword();\t\n\t\n\t\t\t\t\tif(user1.getSex().equals(\"男\"))\n\t\t\t\t\t\tbtnRadioButton.setSelection(true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbtnRadioButton_1.setSelection(true);\n\t\t\t\t\tlblNewLabel_1.setText(user1.getUserPhone());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif(!text_1.getText().equals(\"\")&&!text.getText().equals(\"\")&&!text_2.getText().equals(\"\"))\n\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\t\tif(!text_1.getText().equals(\"\")&&!text_2.getText().equals(\"\")&&!text.getText().equals(\"\"))\n\t\t\t\t\t{shell.dispose();\n\t\t\t\t\tbook book=new book();\n\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{JOptionPane.showMessageDialog(null,\"用户名或密码不能为空\",\"错误\",JOptionPane.PLAIN_MESSAGE);}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t});\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\ttext.setText(\"\");\n\t\t\t\t\ttext_1.setText(\"\");\n\t\t\t\t\ttext_2.setText(\"\");\n\t\t\t\n\t\t\t}\n\t\t});\n\t}", "protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "private JPanel createButtonPanel(){\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));\n buttonPanel.setBorder(BorderFactory.createEmptyBorder(VERTICAL_BUFFER,HORIZONTAL_BUFFER,0,HORIZONTAL_BUFFER));\n\n export = new JButton(\"Export\");\n cancel = new JButton(\"Cancel\");\n\n buttonPanel.add(Box.createHorizontalGlue());\n buttonPanel.add(export);\n buttonPanel.add(Box.createHorizontalStrut(HORIZONTAL_BUFFER));\n buttonPanel.add(cancel);\n buttonPanel.add(Box.createHorizontalGlue());\n\n return buttonPanel;\n }", "private void generateButtonPanel() {\n buttonsPanel = new JPanel();\n playPauseButton = addButton(\"Play/Pause\");\n restartButton = addButton(\"Restart\");\n speedUpButton = addButton(\"Speed Up\");\n slowDownButton = addButton(\"Slow Down\");\n loopbackButton = addButton(\"Loopback\");\n keyCommandsButton = addButton(\"Key Commands\");\n textViewButton = addButton(\"Animation Text\");\n\n addShapeButton = addButton(\"Add Shape\");\n removeShapeButton = addButton(\"Remove Shape\");\n addKeyframeButton = addButton(\"Add Keyframe\");\n removeKeyframeButton = addButton(\"Remove Keyframe\");\n editKeyframeButton = addButton(\"Edit Keyframe\");\n clearAnimationButton = addButton(\"Clear Animation\");\n clearShapeButton = addButton(\"Clear Shape\");\n buttonsPanel.setLayout(new FlowLayout());\n\n mainPanel.add(buttonsPanel);\n }", "public Box getButtonPanel() {\n\t\tBox buttonsPanel = new Box(BoxLayout.Y_AXIS);\n\t\tbuttonsPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\t\tBox treeBox = new Box(BoxLayout.Y_AXIS);\n\t\ttreeBox.setBorder(new TitledBorder(\"Schema\"));\n\n\t\tBox associationBox = new Box(BoxLayout.Y_AXIS);\n\t\tassociationBox.setBorder(new TitledBorder(\"Association\"));\n\n\t\tBox outputBox = new Box(BoxLayout.Y_AXIS);\n\t\toutputBox.setBorder(new TitledBorder(\"Output\"));\n\n\t\tBox numerotationBox = new Box(BoxLayout.X_AXIS);\n\t\tnumerotationBox.setBorder(new TitledBorder(\"Numerotation\"));\n\t\t/* add a button for loading a XML Schema */\n\t\tJButton loadFileb = new JButton(\"Open schema\");\n\t\tUtils.setDefaultSize(loadFileb);\n\t\tloadFileb.addActionListener(new LoadSchemaListener());\n\n\t\t/*\n\t\t * add a button for associating the content of a node to a line in the\n\t\t * flat file\n\t\t */\n\t\tJButton selectLineNodeb = new JButton(\"Main node\");\n\t\tUtils.setDefaultSize(selectLineNodeb);\n\t\tselectLineNodeb.addActionListener(new SelectLineNodeListener());\n\n\t\tJButton selectNodeb = new JButton(\"Select\");\n\t\tUtils.setDefaultSize(selectNodeb);\n\t\tselectNodeb.addActionListener(new SelectNodeListener());\n\n\t\tJButton unselectNodeb = new JButton(\"Unselect\");\n\t\tUtils.setDefaultSize(unselectNodeb);\n\t\tunselectNodeb.addActionListener(new UnselectNodeListener());\n\n\t\tJButton nameb = new JButton(\"Name\");\n\t\tUtils.setDefaultSize(nameb);\n\t\tnameb.addActionListener(new associateNameListener());\n\n\t\tJButton filterb = new JButton(\"Filter\");\n\t\tUtils.setDefaultSize(filterb);\n\t\tfilterb.addActionListener(new AssociateFilterListener());\n\n\t\tJButton infosb = new JButton(\"About\");\n\t\tUtils.setDefaultSize(infosb);\n\t\tinfosb.addActionListener(new InfosListener());\n\n\t\tassociationBox.add(selectNodeb);\n\t\tassociationBox.add(unselectNodeb);\n\t\tassociationBox.add(nameb);\n\t\tassociationBox.add(filterb);\n\t\tfilter = new JLabel(\"no filter\");\n\t\tassociationBox.add(filter);\n\n\t\ttreeBox.add(loadFileb);\n\n\t\tassociationBox.add(infosb);\n\n\t\tJButton loadXmlFileb = new JButton(\"Open document (XML)\");\n\t\tUtils.setDefaultSize(loadXmlFileb);\n\t\tloadXmlFileb.addActionListener(new LoadDocumentListener());\n\n\t\tJButton setSeparatorb = new JButton(\"Separator\");\n\t\tUtils.setDefaultSize(setSeparatorb);\n\t\tsetSeparatorb.addActionListener(new SetSeparatorListener());\n\n\t\tJButton printTabFileb = new JButton(\"Print\");\n\t\tUtils.setDefaultSize(printTabFileb);\n\t\tprintTabFileb.addActionListener(new PrintFlatFileListener());\n\n\t\ttreeBox.add(loadXmlFileb);\n\t\ttreeBox.add(selectLineNodeb);\n\n\t\toutputBox.add(setSeparatorb);\n\t\toutputBox.add(printTabFileb);\n\n\t\tnumerotationButtons = new ButtonGroup();\n\n\t\tnumericb = new JRadioButton(\"1\");\n\t\thighAlphabeticb = new JRadioButton(\"A\");\n\t\tlowAlphabeticb = new JRadioButton(\"a\");\n\t\tnoneb = new JRadioButton(\"none\");\n\n\t\tnumericb.addActionListener(new NumerotationListener());\n\t\thighAlphabeticb.addActionListener(new NumerotationListener());\n\t\tlowAlphabeticb.addActionListener(new NumerotationListener());\n\t\tnumerotationBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tnumerotationButtons.add(numericb);\n\t\tnumerotationButtons.add(highAlphabeticb);\n\t\tnumerotationButtons.add(lowAlphabeticb);\n\t\tnumerotationButtons.add(noneb);\n\n\t\tswitch (((XsdTreeStructImpl) xsdTree).numerotation_type) {\n\t\tcase XsdTreeStructImpl.HIGH_ALPHABETIC_NUMEROTATION:\n\t\t\thighAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.LOW_ALPHABETIC_NUMEROTATION:\n\t\t\tlowAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.NUMERIC_NUMEROTATION:\n\t\t\tnumericb.setSelected(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnoneb.setSelected(true);\n\t\t\tbreak;\n\t\t}\n\n\t\tnumerotationBox.add(numericb);\n\t\tnumerotationBox.add(highAlphabeticb);\n\t\tnumerotationBox.add(lowAlphabeticb);\n\t\tnumerotationBox.add(noneb);\n\n\t\tbuttonsPanel.add(treeBox);\n\t\tbuttonsPanel.add(associationBox);\n\t\tbuttonsPanel.add(outputBox);\n\t\tbuttonsPanel.add(numerotationBox);\n\n\t\tdisplayExample = new JCheckBox(\"preview\");\n\t\tbuttonsPanel.add(displayExample);\n\t\tdisplayExample.addActionListener(new PreviewListener());\n\t\t\n\t\treturn buttonsPanel;\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "private void createContents()\n\t{\n\t\tGridLayout clayout = new GridLayout();\n\t\tclayout.marginHeight = 2;\n\t\tclayout.marginWidth = 2;\n\t\tclayout.marginTop = 2;\n\t\tclayout.marginBottom = 2;\n\t\tclayout.marginLeft = 2;\n\t\tclayout.marginRight = 2;\n\t\tclayout.numColumns = 1;\n\t\tsetLayout(clayout);\n\t\t\n\t\t\n\t\tm_executorsTable = new ExecutorsTable(this);\n\t\tGridData tableLayoutData = new GridData(GridData.FILL_BOTH);\n\t\ttableLayoutData.grabExcessHorizontalSpace = true;\n\t\ttableLayoutData.widthHint = 700;\n\t\ttableLayoutData.heightHint = 200;\n\t\tm_executorsTable.getGrid().setLayoutData(tableLayoutData);\n\t\tm_executorsTable.addDoubleClickListener(this);\n\t\tm_executorsTable.addSelectionChangedListener( new ISelectionChangedListener(){\n\n\t\t\t@Override\n public void selectionChanged(SelectionChangedEvent arg0)\n {\n\t\t\t\tupdateButtons();\n }\n\t\t\t\n\t\t});\n\n\t\tComposite buttonBar = new Composite(this, SWT.BORDER);\n\t\tbuttonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tbuttonBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\n\t\tm_btnTakeControl = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnTakeControl.setText(BTN_TAKE_CONTROL);\n\t\tm_btnTakeControl.addSelectionListener(this);\n\t\t\n\t\tm_btnReleaseControl = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnReleaseControl.setText(BTN_RELEASE_CONTROL);\n\t\tm_btnReleaseControl.addSelectionListener(this);\n\t\t\n\t\tm_btnBackground = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnBackground.setText(BTN_BACKGROUND);\n\t\tm_btnBackground.addSelectionListener(this);\n\n\t\tm_btnStartMonitor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStartMonitor.setText(BTN_START_MONITOR);\n\t\tm_btnStartMonitor.addSelectionListener(this);\n\t\t\n\t\tm_btnStopMonitor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStopMonitor.setText(BTN_STOP_MONITOR);\n\t\tm_btnStopMonitor.addSelectionListener(this);\n\t\t\n\t\tm_btnStopExecutor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStopExecutor.setText(BTN_STOP_EXECUTOR);\n\t\tm_btnStopExecutor.addSelectionListener(this);\n\n\t\tm_btnKillExecutor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnKillExecutor.setText(BTN_KILL_EXECUTOR);\n\t\tm_btnKillExecutor.addSelectionListener(this);\n\t\t\n\t\tm_btnRefresh = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnRefresh.setText(BTN_REFRESH);\n\t\tm_btnRefresh.addSelectionListener(this);\n\t\t\n\t\tapplyFonts();\n\t\tdisableButtons();\n\t}", "public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }", "private void createToolbars() {\n\t\tJToolBar toolBar = new JToolBar(\"Tools\");\n\t\ttoolBar.setFloatable(true);\n\n\t\ttoolBar.add(new JButton(new ActionNewDocument(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionOpen(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSave(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSaveAs(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionCut(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionCopy(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionPaste(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionStatistics(flp, this)));\n\n\t\tthis.getContentPane().add(toolBar, BorderLayout.PAGE_START);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(DialogStrings.RemoveUserDialog_RemoveButton);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t}", "private void createUIComponents() {\n bt1 = new JButton(\"Hola\");\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(1200, 1100);\n\t\tshell.setText(\"Zagreb Montaža d.o.o\");\n\n\t\tfinal Composite cmpMenu = new Composite(shell, SWT.NONE);\n\t\tcmpMenu.setBackground(SWTResourceManager.getColor(119, 136, 153));\n\t\tcmpMenu.setBounds(0, 0, 359, 1061);\n\t\t\n\t\tFormToolkit formToolkit = new FormToolkit(Display.getDefault());\n\t\tfinal Section sctnCalculator = formToolkit.createSection(cmpMenu, Section.TWISTIE | Section.TITLE_BAR);\n\t\tsctnCalculator.setExpanded(false);\n\t\tsctnCalculator.setBounds(10, 160, 339, 23);\n\t\tformToolkit.paintBordersFor(sctnCalculator);\n\t\tsctnCalculator.setText(\"Kalkulator temperature preddgrijavanja\");\n\n\t\tfinal Section sctn10112ce = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctn10112ce.setBounds(45, 189, 304, 23);\n\t\tformToolkit.paintBordersFor(sctn10112ce);\n\t\tsctn10112ce.setText(\"1011-2 CE\");\n\t\tsctn10112ce.setVisible(false);\n\n\t\tfinal Section sctn10112cet = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctn10112cet.setBounds(45, 218, 304, 23);\n\t\tformToolkit.paintBordersFor(sctn10112cet);\n\t\tsctn10112cet.setText(\"1011-2 CET\");\n\t\tsctn10112cet.setVisible(false);\n\n\t\tfinal Section sctnAws = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctnAws.setBounds(45, 247, 304, 23);\n\t\tformToolkit.paintBordersFor(sctnAws);\n\t\tsctnAws.setText(\"AWS\");\n\t\tsctnAws.setVisible(false);\n\t\t\n\t\tfinal Composite composite10112ce = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcomposite10112ce.setBounds(365, 0, 829, 1061);\n\t\tcomposite10112ce.setVisible(false);\n\t\t\n\t\tfinal Composite composite10112cet = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcomposite10112cet.setBounds(365, 0, 829, 1061);\n\t\tcomposite10112cet.setVisible(false);\n\t\t\n\t\tfinal Composite compositeAws = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcompositeAws.setBounds(365, 0, 829, 1061);\n\t\tcompositeAws.setVisible(false);\n\t\t\n\t\tsctnCalculator.addExpansionListener(new IExpansionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\n\t\t\t\tif (sctnCalculator.isExpanded() == false) {\n\t\t\t\t\tsctn10112ce.setVisible(true);\n\t\t\t\t\tsctn10112cet.setVisible(true);\n\t\t\t\t\tsctnAws.setVisible(true);\n\n\t\t\t\t} else {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tsctnAws.setVisible(false);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t\tsctn10112ce.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctn10112ce.isExpanded() == true) {\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t\t\tnew F10112ce(composite10112ce, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcomposite10112ce.setVisible(false);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsctn10112cet.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctn10112cet.isExpanded() == true) {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t\t\tnew F10112cet(composite10112cet, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcomposite10112ce.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tsctnAws.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctnAws.isExpanded() == true) {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tnew FAws(compositeAws, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t}\n\t\t});\n\t}", "private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }", "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "private void createGenerateButton(final ToolBar bar) {\r\n // image's source:\r\n // http://pixabay.com/de/w%C3%BCrfel-sechs-gesichter-rollen-35637/\r\n createButton(bar, \"images/dice-35637_640.png\", \"Generate\",\r\n new GenerateButtonListener(this));\r\n }", "private void createButtons() {\n Button helpSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -5797923866320649518L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToHelp();\n }\n });\n\n// Button skillSettingsButton = new Button(\"\",\n// new Button.ClickListener() {\n// private static final long serialVersionUID = 7147554466396214893L;\n//\n// @Override\n// public void buttonClick(ClickEvent event) {\n// settingsPresenter.navigateToSkills();\n// }\n// });\n// skillSettingsButton.addStyleName(\"icon-cog\");\n\n Button medicSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = 7147554466396214893L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToMedic();\n }\n });\n\n\n Button logoutButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -1096188732209266611L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateBack();\n }\n });\n logoutButton.addStyleName(\"default\");\n\n // Adding and aligning the 3 Buttons.\n //Setting a Description for the buttons which is displayed when flying over the button\n super.verticalNavigation.addComponent(helpSettingsButton);\n super.verticalNavigation.setComponentAlignment(helpSettingsButton, Alignment.MIDDLE_CENTER);\n helpSettingsButton.setDescription(\"Set the Help options for the Patient\");\n helpSettingsButton.setIcon(new ThemeResource(\"img/contacgg.png\"), BUTTON_HELP_SETTINGS);\n helpSettingsButton.setWidth(BUTTON_WIDTH);\n helpSettingsButton.setHeight(BUTTON_HEIGHT);\n\n super.verticalNavigation.addComponent(medicSettingsButton);\n super.verticalNavigation.setComponentAlignment(medicSettingsButton, Alignment.MIDDLE_CENTER);\n medicSettingsButton.setDescription(\"Set the Medication options for the Patient\");\n medicSettingsButton.setIcon(new ThemeResource(\"img/medicine-icon-cog.png\"),BUTTON_MEDIC_SETTINGS);\n medicSettingsButton.setWidth(BUTTON_WIDTH);\n medicSettingsButton.setHeight(BUTTON_HEIGHT);\n\n// addComponent(skillSettingsButton);\n// setComponentAlignment(skillSettingsButton, Alignment.MIDDLE_CENTER);\n// skillSettingsButton.setDescription(\"Set the Skill options for the Patient\");\n// skillSettingsButton.setIcon(new ThemeResource(\"img/skill2-icon-cog.png\"), BUTTON_SKILL_SETTINGS);\n// skillSettingsButton.setWidth(BUTTON_WIDTH);\n// skillSettingsButton.setHeight(BUTTON_HEIGHT);\n\n logoutButton.setWidth(BUTTON_WIDTH);\n super.verticalNavigation.addComponent(logoutButton);\n super.verticalNavigation.setComponentAlignment(logoutButton, Alignment.MIDDLE_CENTER);\n logoutButton.setDescription(\"You will be logged out\");\n logoutButton.setIcon(new ThemeResource(\"img/logout.png\"), BUTTON_LOGOUT);\n logoutButton.setWidth(BUTTON_WIDTH);\n logoutButton.setHeight(BUTTON_HEIGHT);\n\n }", "private void createToolbars() {\r\n\t\tJToolBar toolBar = new JToolBar(\"Tool bar\");\r\n\t\ttoolBar.add(createBlankDocument);\r\n\t\ttoolBar.add(openDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAsAction);\r\n\t\ttoolBar.add(closeCurrentTabAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(copyAction);\r\n\t\ttoolBar.add(cutAction);\r\n\t\ttoolBar.add(pasteAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(getStatsAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(exitAction);\r\n\t\t\r\n\t\tgetContentPane().add(toolBar, BorderLayout.PAGE_START);\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell(shell,SWT.SHELL_TRIM|SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\chaogushenqi.png\"));\n\t\tshell.setSize(467, 398);\n\t\tshell.setText(\"\\u5356\\u7A7A\");\n\t\t\n\t\ttext_code = new Text(shell, SWT.BORDER);\n\t\ttext_code.setBounds(225, 88, 73, 23);\n\t\t\n\t\ttext_uprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_uprice.setBounds(225, 117, 73, 23);\n\t\t\n\t\ttext_downprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_downprice.setBounds(225, 146, 73, 23);\n\t\t\n\t\ttext_price = new Text(shell, SWT.BORDER);\n\t\ttext_price.setBounds(225, 178, 73, 23);\n\t\t\n\t\ttext_num = new Text(shell, SWT.BORDER);\n\t\ttext_num.setBounds(225, 207, 73, 23);\n\t\t\n\t\t//下单,取消按钮\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tpaceoder();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(116, 284, 58, 27);\n\t\tbtnNewButton.setText(\"\\u4E0B\\u5355\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(225, 284, 58, 27);\n\t\tbtnNewButton_1.setText(\"\\u53D6\\u6D88\");\n\t\t\n\t\tLabel lbl_code = new Label(shell, SWT.NONE);\n\t\tlbl_code.setBounds(116, 91, 60, 17);\n\t\tlbl_code.setText(\"股票代码:\");\n\t\t\n\t\tLabel lbl_upprice = new Label(shell, SWT.NONE);\n\t\tlbl_upprice.setBounds(116, 120, 60, 17);\n\t\tlbl_upprice.setText(\"涨停价格:\");\n\t\t\n\t\tLabel lbl_downprice = new Label(shell, SWT.NONE);\n\t\tlbl_downprice.setBounds(116, 152, 60, 17);\n\t\tlbl_downprice.setText(\"跌停价格:\");\n\t\t\n\t\tLabel lbl_price = new Label(shell, SWT.NONE);\n\t\tlbl_price.setBounds(116, 181, 60, 17);\n\t\tlbl_price.setText(\"委托价格:\");\n\t\t\n\t\tLabel lbl_num = new Label(shell, SWT.NONE);\n\t\tlbl_num.setBounds(116, 210, 60, 17);\n\t\tlbl_num.setText(\"委托数量:\");\n\t\t\n\t\tLabel lbl_date = new Label(shell, SWT.NONE);\n\t\tlbl_date.setBounds(116, 243, 61, 17);\n\t\tlbl_date.setText(\"日 期:\");\n\t\t\n\t\ttext_dateTime = new DateTime(shell, SWT.BORDER);\n\t\ttext_dateTime.setBounds(225, 237, 88, 24);\n\t\t\n\t\tlbl_notice = new Label(shell, SWT.BORDER);\n\t\tlbl_notice.setBounds(316, 333, 125, 17);\n\t\t\n\t\tif (information == null) {\n\n\t\t\tfinal Label lbl_search = new Label(shell, SWT.NONE);\n\t\t\tlbl_search.addMouseListener(new MouseAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t\t\tlbl_searchEvent();\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search.addMouseTrackListener(new MouseTrackAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseEnter(MouseEvent e) {\n\t\t\t\t\tlbl_search.setBackground(Display.getCurrent()\n\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_GREEN));\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseExit(MouseEvent e) {\n\t\t\t\t\tlbl_search\n\t\t\t\t\t\t\t.setBackground(Display\n\t\t\t\t\t\t\t\t\t.getCurrent()\n\t\t\t\t\t\t\t\t\t.getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search\n\t\t\t\t\t.setImage(SWTResourceManager\n\t\t\t\t\t\t\t.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\检查.png\"));\n\t\t\tlbl_search.setBounds(354, 91, 18, 18);\n\n\t\t\ttext_place = new Text(shell, SWT.BORDER);\n\t\t\ttext_place.setBounds(304, 88, 32, 23);\n\n\t\t} else {\n\t\t\ttrade_shortsell();// 显示文本框内容\n\t\t}\n\t\t\n\t}", "private void createToolbar() {\r\n // the visible toolbar is actually a toolbar next to a combobox.\r\n // That is why we need this extra composite, layout and numColums = 2.\r\n final Composite parent = new Composite(SHELL, SWT.FILL);\r\n final GridLayout layout = new GridLayout();\r\n layout.numColumns = 2;\r\n parent.setLayout(layout);\r\n\r\n final ToolBar bar = new ToolBar(parent, SWT.NONE);\r\n final GridData data = new GridData();\r\n data.heightHint = 55;\r\n data.grabExcessVerticalSpace = false;\r\n bar.setLayoutData(data);\r\n bar.setLayout(new GridLayout());\r\n\r\n createOpenButton(bar);\r\n\r\n createGenerateButton(bar);\r\n\r\n createSaveButton(bar);\r\n\r\n createSolveButton(bar);\r\n\r\n createAboutButton(bar);\r\n\r\n algorithmCombo = new AlgorithmCombo(parent);\r\n }", "@Override\n protected void createButtonsForButtonBar(final Composite parent) {\n\n GridLayout layout = (GridLayout) parent.getLayout();\n layout.marginHeight = 0;\n }", "@Override\n public Button createButton() {\n return new WindowsButton();\n }", "private void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tshell.setSize(500, 400);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FormLayout());\r\n\t\t\r\n\t\tSERVER_COUNTRY locale = SERVER_COUNTRY.DE;\r\n\t\tString username = JOptionPane.showInputDialog(\"Username\");\r\n\t\tString password = JOptionPane.showInputDialog(\"Password\");\r\n\t\tBot bot = new Bot(username, password, locale);\r\n\t\t\r\n\t\tGroup grpActions = new Group(shell, SWT.NONE);\r\n\t\tgrpActions.setText(\"Actions\");\r\n\t\tgrpActions.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\r\n\t\tgrpActions.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setLayout(new GridLayout(5, false));\r\n\t\tFormData fd_grpActions = new FormData();\r\n\t\tfd_grpActions.left = new FormAttachment(0, 203);\r\n\t\tfd_grpActions.right = new FormAttachment(100, -10);\r\n\t\tfd_grpActions.top = new FormAttachment(0, 10);\r\n\t\tfd_grpActions.bottom = new FormAttachment(0, 152);\r\n\t\tgrpActions.setLayoutData(fd_grpActions);\r\n\t\t\r\n\t\tConsole = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tFormData fd_Console = new FormData();\r\n\t\tfd_Console.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tfd_Console.right = new FormAttachment(100, -10);\r\n\t\tConsole.setLayoutData(fd_Console);\r\n\r\n\t\t\r\n\t\tButton Feed = new Button(grpActions, SWT.CHECK);\r\n\t\tFeed.setSelection(true);\r\n\t\tFeed.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tfeed = !feed;\r\n\t\t\t\tConsole.append(\"\\nTest\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tFeed.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tFeed.setText(\"Feed\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Drink = new Button(grpActions, SWT.CHECK);\r\n\t\tDrink.setSelection(true);\r\n\t\tDrink.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tdrink = !drink;\r\n\t\t\t}\r\n\t\t});\r\n\t\tDrink.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tDrink.setText(\"Drink\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Stroke = new Button(grpActions, SWT.CHECK);\r\n\t\tStroke.setSelection(true);\r\n\t\tStroke.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tstroke = !stroke;\r\n\t\t\t}\r\n\t\t});\r\n\t\tStroke.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tStroke.setText(\"Stroke\");\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_0 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_0.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tlblNewLabel_0.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/feed.png\"));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_1 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/drink.png\"));\r\n\t\tlblNewLabel_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\t\r\n\t\tGroup grpBreeds = new Group(shell, SWT.NONE);\r\n\t\tgrpBreeds.setText(\"Breeds\");\r\n\t\tgrpBreeds.setLayout(new GridLayout(1, false));\r\n\t\t\r\n\t\tFormData fd_grpBreeds = new FormData();\r\n\t\tfd_grpBreeds.top = new FormAttachment(0, 10);\r\n\t\tfd_grpBreeds.bottom = new FormAttachment(100, -10);\r\n\t\tfd_grpBreeds.right = new FormAttachment(0, 180);\r\n\t\tfd_grpBreeds.left = new FormAttachment(0, 10);\r\n\t\tgrpBreeds.setLayoutData(fd_grpBreeds);\r\n\t\t\r\n\t\tButton Defaults = new Button(grpBreeds, SWT.RADIO);\r\n\t\tDefaults.setText(\"Defaults\");\r\n\t\t//END STATIC\r\n\t\t\r\n\t\tbot.account.api.requests.setTimeout(200);\r\n\t\tbot.logger.printlevel = 1;\t\r\n\t\t\r\n\t\tReturn<HashMap<Integer,Breed>> b = bot.getBreeds();\t\t\r\n\t\tif(!b.sucess) {\r\n\t\t\tConsole.append(\"\\nERROR!\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tIterator<Breed> iterator = b.data.values().iterator();\r\n\t\tHashMap<String, java.awt.Button> buttons = new HashMap<String, Button>();\r\n\t\t\r\n\t\twhile(iterator.hasNext()) {\r\n\t\t\tBreed breed = iterator.next();\r\n\t\t\t\r\n\t\t\tString name = breed.name;\r\n\t\t\t\r\n\t\t\tButton btn = new Button(grpBreeds, SWT.RADIO);\r\n\t\t\tbtn.setText(name);\r\n\t\t\t\r\n\t\t\tbuttons.put(name, btn);\r\n\t\t\t\r\n\t\t\t//\tTODO - Für jeden Breed wird ein Button erstellt:\r\n\t\t\t//\tButton [HIER DER BREED NAME] = new Button(grpBreeds, SWT.RADIO); <-- Dass geht nicht so wirklich so\r\n\t\t\t//\tDefaults.setText(\"[BREED NAME]\");\r\n\t\t}\r\n\t\t\r\n\t\t// um ein button mit name <name> zu bekommen: Button whatever = buttons.get(<name>);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tButton btnStartBot = new Button(shell, SWT.NONE);\r\n\t\tfd_Console.top = new FormAttachment(0, 221);\r\n\t\tbtnStartBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.setText(\"Starting bot... \");\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t/*TODO\r\n\t\t\t\tBreed[] breeds = new Breed[b.data.size()];\r\n\t\t\t\t\r\n\t\t\t\tIterator<Breed> br = b.data.values().iterator();\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < b.data.size(); i++) {\r\n\t\t\t\t\tbreeds[i] = br.next();\r\n\t\t\t\t};\r\n\t\t\t\tBreed s = (Breed) JOptionPane.showInputDialog(null, \"Choose breed\", \"breed selector\", JOptionPane.PLAIN_MESSAGE, null, breeds, \"default\");\r\n\t\t\t\tEND TODO*/\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Breed breed, boolean drink, boolean stroke, boolean groom, boolean carrot, boolean mash, boolean suckle, boolean feed, boolean sleep, boolean centreMission, long timeout, Bot bot, Runnable onEnd\r\n\t\t\t\tReturn<BasicBreedTasksAsync> ret = bot.basicBreedTasks(0, drink, stroke, groom, carrot, mash, suckle, feed, sleep, mission, 500, new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"FINISHED!\", \"Bot\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tbot.logout();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(!ret.sucess) {\r\n\t\t\t\t\tConsole.append(\"ERROR\");\r\n\t\t\t\t\tSystem.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tret.data.start();\r\n\t\t\t\t\r\n\t\t\t\t//TODO\r\n\t\t\t\twhile(ret.data.running()) {\r\n\t\t\t\t\tSleeper.sleep(5000);\r\n\t\t\t\t\tif(ret.data.getProgress() == 1)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tConsole.append(\"progress: \" + (ret.data.getProgress() * 100) + \"%\");\r\n\t\t\t\t\tConsole.append(\"ETA: \" + (ret.data.getEta() / 1000) + \"sec.\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStartBot = new FormData();\r\n\t\tfd_btnStartBot.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tbtnStartBot.setLayoutData(fd_btnStartBot);\r\n\t\tbtnStartBot.setText(\"Start Bot\");\r\n\t\t\r\n\t\tButton btnStopBot = new Button(shell, SWT.NONE);\r\n\t\tfd_btnStartBot.top = new FormAttachment(btnStopBot, 0, SWT.TOP);\r\n\t\tbtnStopBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.append(\"Stopping bot...\");\r\n\t\t\t\tbot.logout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStopBot = new FormData();\r\n\t\tfd_btnStopBot.right = new FormAttachment(grpActions, 0, SWT.RIGHT);\r\n\t\tbtnStopBot.setLayoutData(fd_btnStopBot);\r\n\t\tbtnStopBot.setText(\"Stop Bot\");\r\n\t\t\t\r\n\t\t\r\n\t\tProgressBar progressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tfd_Console.bottom = new FormAttachment(progressBar, -6);\r\n\t\tfd_btnStopBot.bottom = new FormAttachment(progressBar, -119);\r\n\t\t\r\n\t\tFormData fd_progressBar = new FormData();\r\n\t\tfd_progressBar.left = new FormAttachment(grpBreeds, 23);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_2 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_2.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/stroke.png\"));\r\n\t\tlblNewLabel_2.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton Groom = new Button(grpActions, SWT.CHECK);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tgroom = !groom;\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroom.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tGroom.setText(\"Groom\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Treat = new Button(grpActions, SWT.CHECK);\r\n\t\tTreat.setSelection(true);\r\n\t\tTreat.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tcarrot = !carrot;\r\n\t\t\t}\r\n\t\t});\r\n\t\tTreat.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tTreat.setText(\"Treat\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Mash = new Button(grpActions, SWT.CHECK);\r\n\t\tMash.setSelection(true);\r\n\t\tMash.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmash = !mash;\r\n\t\t\t}\r\n\t\t});\r\n\t\tMash.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tMash.setText(\"Mash\");\r\n\t\t\r\n\t\tLabel lblNewLabel_3 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_3.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/groom.png\"));\r\n\t\tlblNewLabel_3.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_4 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_4.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/carotte.png\"));\r\n\t\tlblNewLabel_4.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_5 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_5.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/mash.png\"));\r\n\t\tlblNewLabel_5.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton btnSleep = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnSleep.setSelection(true);\r\n\t\tbtnSleep.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tsleep = !sleep;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSleep.setText(\"Sleep\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton btnMission = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnMission.setSelection(true);\r\n\t\tbtnMission.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmission = !mission;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnMission.setText(\"Mission\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\r\n\t}", "Button createButton();", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tnum1 = new Text(shell, SWT.BORDER);\n\t\tnum1.setBounds(32, 51, 112, 19);\n\t\t\n\t\tnum2 = new Text(shell, SWT.BORDER);\n\t\tnum2.setBounds(32, 120, 112, 19);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setBounds(32, 31, 92, 14);\n\t\tlblNewLabel.setText(\"First Number:\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(32, 100, 112, 14);\n\t\tlblNewLabel_1.setText(\"Second Number: \");\n\t\t\n\t\tfinal Label answer = new Label(shell, SWT.NONE);\n\t\tanswer.setBounds(35, 204, 60, 14);\n\t\tanswer.setText(\"Answer:\");\n\t\t\n\t\tButton plusButton = new Button(shell, SWT.NONE);\n\t\tplusButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint number1, number2;\n\t\t\t\ttry {\n\t\t\t\t\tnumber1 = Integer.parseInt(num1.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnumber2 = Integer.parseInt(num2.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint ans = number1 + number2;\n\t\t\t\tanswer.setText(\"Answer: \" + ans);\n\t\t\t}\n\t\t});\n\t\tplusButton.setBounds(29, 158, 56, 28);\n\t\tplusButton.setText(\"+\");\n\t\t\n\t\t\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(538, 450);\n\t\tshell.setText(\"SWT Application\");\n\n\t\tfinal DateTime dateTime = new DateTime(shell, SWT.BORDER | SWT.CALENDAR);\n\t\tdateTime.setBounds(10, 10, 514, 290);\n\n\t\tfinal DateTime dateTime_1 = new DateTime(shell, SWT.BORDER | SWT.TIME);\n\t\tdateTime_1.setBounds(10, 306, 135, 29);\n\t\tvideoPath = new Text(shell, SWT.BORDER);\n\t\tvideoPath.setBounds(220, 306, 207, 27);\n\n\t\tButton btnBrowseVideo = new Button(shell, SWT.NONE);\n\t\tbtnBrowseVideo.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\tvideoPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.setBounds(433, 306, 91, 29);\n\t\tbtnBrowseVideo.setText(\"browse\");\n\t\ttorrentPath = new Text(shell, SWT.BORDER);\n\t\ttorrentPath.setBounds(220, 341, 207, 27);\n\t\tButton btnBrowseTorrent = new Button(shell, SWT.NONE);\n\t\tbtnBrowseTorrent.setText(\"browse\");\n\t\tbtnBrowseTorrent.setBounds(433, 339, 91, 29);\n\t\tbtnBrowseTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\ttorrentPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tButton btnGenerateTorrent = new Button(shell, SWT.NONE);\n\t\tbtnGenerateTorrent.setBounds(10, 374, 516, 29);\n\t\tbtnGenerateTorrent.setText(\"Generate Torrent\");\n\n\t\tvideoLength = new Text(shell, SWT.BORDER);\n\t\tvideoLength.setBounds(10, 341, 135, 27);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.RIGHT);\n\t\tlblNewLabel.setAlignment(SWT.LEFT);\n\t\tlblNewLabel.setBounds(157, 315, 48, 18);\n\t\tlblNewLabel.setText(\"Video\");\n\t\t\n\t\tLabel lblTorrent = new Label(shell, SWT.RIGHT);\n\t\tlblTorrent.setText(\"Torrent\");\n\t\tlblTorrent.setBounds(157, 341, 48, 18);\n\t\tbtnGenerateTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFile video = new File(videoPath.getText());\n\t\t\t\ttry {\n\t\t\t\t\tif (video.exists() && torrentPath.getText() != \"\") {\n\t\t\t\t\t\tMap parameters = new HashMap();\n\t\t\t\t\t\tparameters.put(\"start\", dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds());\n\t\t\t\t\t\tparameters.put(\"target\", torrentPath.getText());\n\t\t\t\t\t\tparameters.put(\"length\", videoLength.getText());\n\t\t\t\t\t\tSystem.out.println(\"start generating \"+parameters.get(\"length\"));\n\t\t\t\t\t\tnew MakeTorrent(videoPath.getText(), new URL(\"https://jomican.csie.org/~jimmy/tracker/announce.php\"), parameters);\n\t\t\t\t\t\tSystem.out.println(\"end generating\");\n\t\t\t\t\t\tFile var = new File(\"var.js\");\n\t\t\t\t\t\tPrintStream stream=new PrintStream(new FileOutputStream(var,false));\n\t\t\t\t\t\tstream.println(\"start_time = \"+(new SimpleDateFormat(\"yyyy/MM/dd-HH:mm:ss\").parse(dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds()).getTime() / 1000)+\";\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"jizz\");\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tm_bindingContext = initDataBindings();\n\t}", "private void createPanel() {\n JPanel panel = new JPanel();\n \n for(int i = 0; i < button.size(); i++){\n panel.add(button.get(i));\n }\n panel.add(label);\n \n add(panel);\n }", "protected Panel createButtonPanel() {\n Panel panel = new Panel();\n panel.setLayout(new PaletteLayout(2, new Point(2,2), false));\n return panel;\n }", "private void createContents() {\r\n\t\tshlAboutGoko = new Shell(getParent(), getStyle());\r\n\t\tshlAboutGoko.setSize(376, 248);\r\n\t\tshlAboutGoko.setText(\"About Goko\");\r\n\t\tshlAboutGoko.setLayout(new GridLayout(1, false));\r\n\r\n\t\tComposite composite_1 = new Composite(shlAboutGoko, SWT.NONE);\r\n\t\tcomposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\r\n\t\tcomposite_1.setLayout(new GridLayout(1, false));\r\n\r\n\t\tLabel lblGokoIsA = new Label(composite_1, SWT.WRAP);\r\n\t\tGridData gd_lblGokoIsA = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblGokoIsA.widthHint = 350;\r\n\t\tlblGokoIsA.setLayoutData(gd_lblGokoIsA);\r\n\t\tlblGokoIsA.setText(\"Goko is an open source desktop application for CNC control and operation\");\r\n\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblAlphaVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblAlphaVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblAlphaVersion.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblAlphaVersion.setText(\"Version\");\r\n\r\n\t\tLabel lblVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblVersion.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(composite_1, SWT.NONE);\r\n\r\n\t\tLabel lblDate = new Label(composite_2, SWT.NONE);\r\n\t\tlblDate.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblDate.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblDate.setText(\"Build\");\r\n\t\t\r\n\t\tLabel lblBuild = new Label(composite_2, SWT.NONE);\r\n\t\tlblBuild.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\t\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader(); \r\n\t\tInputStream stream = loader.getResourceAsStream(\"/version.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(stream);\r\n\t\t\tString version = prop.getProperty(\"goko.version\");\r\n\t\t\tString build = prop.getProperty(\"goko.build.timestamp\");\r\n\t\t\tlblVersion.setText(version);\r\n\t\t\tlblBuild.setText(build);\t\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tLOG.error(e);\r\n\t\t}\r\n\t\t\r\n\t\tComposite composite = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblMoreInformationOn = new Label(composite, SWT.NONE);\r\n\t\tGridData gd_lblMoreInformationOn = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblMoreInformationOn.widthHint = 60;\r\n\t\tlblMoreInformationOn.setLayoutData(gd_lblMoreInformationOn);\r\n\t\tlblMoreInformationOn.setText(\"Website :\");\r\n\r\n\t\tLink link = new Link(composite, SWT.NONE);\r\n\t\tlink.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://www.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tlink.setText(\"<a>http://www.goko.fr</a>\");\r\n\t\t\r\n\t\tComposite composite_3 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_3.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblForum = new Label(composite_3, SWT.NONE);\r\n\t\tGridData gd_lblForum = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblForum.widthHint = 60;\r\n\t\tlblForum.setLayoutData(gd_lblForum);\r\n\t\tlblForum.setText(\"Forum :\");\r\n\t\t\r\n\t\tLink link_1 = new Link(composite_3, 0);\r\n\t\tlink_1.setText(\"<a>http://discuss.goko.fr</a>\");\r\n\t\tlink_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://discuss.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tComposite composite_4 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_4.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblContact = new Label(composite_4, SWT.NONE);\r\n\t\tGridData gd_lblContact = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblContact.widthHint = 60;\r\n\t\tlblContact.setLayoutData(gd_lblContact);\r\n\t\tlblContact.setText(\"Contact :\");\r\n\t\t\t \r\n\t\tLink link_2 = new Link(composite_4, 0);\r\n\t\tlink_2.setText(\"<a>\"+toAscii(\"636f6e7461637440676f6b6f2e6672\")+\"</a>\");\r\n\r\n\t}", "private void setupToolBar() {\n\t\tJPanel buttons = new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\ttoolBar = new JToolBar(\"Buttons\");\n\t\ttoolBar.setFloatable(false);\n\t\ttoolBar.setOrientation(SwingConstants.VERTICAL);\n\t\tbuttons.add(toolBar, c);\n\t\tadd(buttons, BorderLayout.EAST);\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}", "private void createButtonsPane(VBox labelsPane){\n\t\tHBox buttonsPane = new HBox();\n\t\tButton easy = new Button(\"EASY\");\n\t\teasy.setFont(new Font(\"Arial Black\", 12));\n\t\teasy.setTextFill(Color.BLUE);\n\t\teasy.setFocusTraversable(false);\n\t\tButton medium = new Button(\"MEDIUM\");\n\t\tmedium.setFont(new Font(\"Arial Black\", 12));\n\t\tmedium.setTextFill(Color.BLUE);\n\t\tmedium.setFocusTraversable(false);\n\t\tButton hard = new Button(\"HARD\");\n\t\thard.setFont(new Font(\"Arial Black\", 12));\n\t\thard.setTextFill(Color.BLUE);\n\t\thard.setFocusTraversable(false);\n\t\tbuttonsPane.getChildren().addAll(easy, medium, hard);\n\t\tbuttonsPane.setMargin(easy, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(medium, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(hard, new Insets(10,5,5,5));\n\t\tbuttonsPane.setSpacing(20);\n\t\tbuttonsPane.setAlignment(Pos.CENTER);\n\t\tbuttonsPane.setStyle(\"-fx-background-color: gray;\");\n\t\teasy.setOnAction(new EasyHandler());\n\t\tmedium.setOnAction(new MediumHandler());\n\t\thard.setOnAction(new HardHandler());\n\t\tlabelsPane.getChildren().add(buttonsPane);\n\t}", "public HBox hbButtons() {\r\n\r\n HBox hbBottom = new HBox(10); //HBox for buttons at the bottom\r\n\r\n hbBottom.setAlignment(Pos.CENTER); //Set Buttoms to center\r\n hbBottom.setPadding(new Insets(10, 1, 1, 1)); //Padd it\r\n\r\n //SetId\r\n btnConfirm.setId(\"btn\");\r\n btnEdit.setId(\"btn\");\r\n\r\n //Add buttons to the bottom HBox\r\n hbBottom.getChildren().addAll(btnConfirm, btnEdit);\r\n\r\n //Handlers\r\n btnConfirm.setOnAction(new ConfirmHandler()); //Handler for confirm\r\n btnEdit.setOnAction(new EditHandler()); //Handler for edit\r\n\r\n return hbBottom;\r\n\r\n }", "@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.CANCEL_ID, Messages.BaselineShowDialog_8, false);\n }", "private void createToolbar() {\n\t\ttoolbarPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\n\t\tString iconsDir = \"icons/\";\n\n\t\tfileToolbar = new JToolBar();\n\t\tfileToolbar.setName(\"File\");\n\n\t\t// Componentes da barra de ferramentas de arquivo\n\t\tIcon newFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"new.png\"));\n\t\tnewFileButton = new JButton(newFileIcon);\n\t\tnewFileButton.setToolTipText(\"Novo arquivo\");\n\n\t\tIcon openFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"open.png\"));\n\t\topenFileButton = new JButton(openFileIcon);\n\t\topenFileButton.setToolTipText(\"Abrir arquivo\");\n\t\topenFileButton.addActionListener(new OpenFileHandler());\n\n\t\tIcon saveFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"save.png\"));\n\t\tsaveFileButton = new JButton(saveFileIcon);\n\t\tsaveFileButton.setToolTipText(\"Salvar arquivo\");\n\n\t\t// fileToolbar.add(newFileButton);\n\t\tfileToolbar.add(openFileButton);\n\t\t// fileToolbar.add(saveFileButton);\n\n\t\t// Componentes da barra de ferramentas de rede\n\t\tnetworkComponentsToolbar = new JToolBar();\n\t\tnetworkComponentsToolbar.setName(\"Network components\");\n\n\t\tIcon newPlaceIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"circle_stroked.png\"));\n\t\taddPlaceButton = new JButton(newPlaceIcon);\n\t\taddPlaceButton.setToolTipText(\"Adicionar lugar\");\n\n\t\tIcon newTransitionIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"pipe.png\"));\n\t\taddTransitionButton = new JButton(newTransitionIcon);\n\t\taddTransitionButton.setToolTipText(\"Adicionar transição\");\n\n\t\tIcon newEdgeIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"arrow_alt_right.png\"));\n\t\taddEdgeButton = new JButton(newEdgeIcon);\n\t\taddEdgeButton.setToolTipText(\"Adicionar aresta\");\n\n\t\tnetworkComponentsToolbar.add(addPlaceButton);\n\t\tnetworkComponentsToolbar.add(addTransitionButton);\n\t\tnetworkComponentsToolbar.add(addEdgeButton);\n\n\t\ttoolbarPanel.add(fileToolbar);\n\t\t// toolbarPanel.add(networkComponentsToolbar);\n\n\t\tthis.add(toolbarPanel, BorderLayout.NORTH);\n\t}", "private void generateButtons(){\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t//Button button = new Button(coordX, coordY);\n\t\t//buttons.put(0, button);\n\t}", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t\tvalidate();\n\t}", "private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }" ]
[ "0.6913502", "0.6871041", "0.68701905", "0.686933", "0.68208027", "0.68044573", "0.6800045", "0.67828447", "0.6762876", "0.6758984", "0.67203665", "0.6683782", "0.6627532", "0.6588972", "0.65856755", "0.657202", "0.657155", "0.65673095", "0.6549483", "0.6549218", "0.65480584", "0.6547981", "0.65427613", "0.65409267", "0.653926", "0.65374666", "0.6528052", "0.65151", "0.6506185", "0.64961076", "0.64837235", "0.6473792", "0.64705265", "0.6462337", "0.64598674", "0.64486223", "0.6439501", "0.6439501", "0.6437252", "0.64288354", "0.6423869", "0.6422705", "0.6414423", "0.64119625", "0.6407322", "0.6404173", "0.6403533", "0.640106", "0.6393706", "0.63865423", "0.6376219", "0.63750714", "0.63744515", "0.6368464", "0.6367777", "0.63609976", "0.63598186", "0.6356191", "0.63553923", "0.635145", "0.63469887", "0.634541", "0.6339891", "0.63323045", "0.63321376", "0.6322705", "0.63205427", "0.6318282", "0.63133967", "0.6311088", "0.629661", "0.62766075", "0.62745786", "0.62740505", "0.62738585", "0.62699586", "0.6265781", "0.6254504", "0.6252575", "0.62513196", "0.6242933", "0.62304986", "0.6218093", "0.6201057", "0.61865246", "0.618261", "0.6177595", "0.61746836", "0.6170499", "0.6168402", "0.6167287", "0.6166503", "0.6160837", "0.61586106", "0.6158232", "0.6157931", "0.6146009" ]
0.63546586
62
Return the initial size of the dialog.
@Override protected Point getInitialSize() { return new Point(800, 600); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(DIALOG_DEFAULT_WIDHT, DIALOG_DEFAULT_HEIGHT);\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(450, 300);\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(450, 300);\n\t}", "protected Point getInitialSize() {\n\t\t return new Point(700, 500);\n\t }", "@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(450, 300);\r\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(450, 270);\n\t}", "protected void createDialogSize ()\n {\n }", "@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(320, 204);\r\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(600, 500);\n\t}", "@Override\n protected Point getInitialSize() {\n return new Point(450, 504);\n }", "@Override\n protected Point getInitialSize() {\n return new Point(930, 614);\n }", "public Point getMinimumSize() {\n checkWidget();\n return parent.fixPoint( minimumWidth, minimumHeight );\n }", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(590, 459);\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(640, 600);\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(645, 393);\n\t}", "public Dimension getDefaultSize() {\n\t\tint width = Integer.parseInt(FileDataPersister.getInstance().get(\"gui.configuration\", \"defaultWidth\", \"600\"));\n\t\tint height = Integer.parseInt(FileDataPersister.getInstance().get(\"gui.configuration\", \"defaultHeight\", \"600\"));\n\t\treturn new Dimension(width, height);\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(757, 552);\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(801, 664);\n\t}", "public Dimension getMinimumSize() {\r\n\t\treturn (this.getPreferredSize());\r\n\t}", "@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(706, 307);\r\n\t}", "public Dimension getMinimumSize() {\n Dimension size = super.getMinimumSize();\n size.height = super.getPreferredSize().height;\n return size;\n }", "String getPreviewSizePref();", "protected final Dimension windowSizeControl () {\n\t\tif (!this.isMaximum && !this.isIcon && !this.isClosed) {\n\t\t\tint height = size.height;\n\t\t\tint width = size.height;\n\t\t\t\n\t\t\t// Gets the current size\n\t\t\tint currentHeight = this.getHeight();\n\t\t\tint currentWidth = this.getWidth();\n\t\t\t\n\t\t\t// Makes a pack() to get the minimum required size\n\t\t\tthis.pack();\n\t\t\t\n\t\t\t// Gets the pack size\n\t\t\tint packHeight = this.getHeight();\n\t\t\tint packWidth = this.getWidth();\n\t\t\t\n\t\t\t// Calculates the ideal height\n\t\t\tif (packHeight > currentHeight) {\n\t\t\t\theight = packHeight;\n\t\t\t} else {\n\t\t\t\theight = currentHeight;\n\t\t\t}\n\t\t\t// Calculates the ideal width\n\t\t\tif (packWidth > currentWidth) {\n\t\t\t\twidth = packWidth;\n\t\t\t} else {\n\t\t\t\twidth = currentWidth;\n\t\t\t}\n\t\t\t\n\t\t\t// It must not be greater than the desktop size\n\t\t\tint desktopHeight = parent.getDesktopPane().getHeight();\n\t\t\tint desktopWidth = parent.getDesktopPane().getWidth();\n\t\t\t\n\t\t\tif (width > desktopWidth){\n\t\t\t\twidth = desktopWidth;\n\t\t\t}\n\t\t\tif (packWidth > desktopWidth){\n\t\t\t\tpackWidth = desktopWidth;\n\t\t\t}\n\t\t\tif (height > desktopHeight){\n\t\t\t\theight = desktopHeight;\n\t\t\t}\n\t\t\tif (packHeight > desktopHeight){\n\t\t\t\tpackHeight = desktopHeight;\n\t\t\t}\n\t\t\t\n\t\t\t// Resizes the window and sets the minimum allowed size\n\t\t\tsize = new Dimension(width, height);\n\t\t\tsetSize(size);\n\t\t\tsetMinimumSize(new Dimension(packWidth, packHeight));\n\t\t}\n\t\treturn size;\n\t}", "public Dimension getMinimumSize()\n\t\t{\n\t\t\treturn getPreferredSize(); // return preferred size\n\t\t}", "public Point getSize() {\n checkWidget();\n return parent.fixPoint( itemBounds.width, itemBounds.height );\n }", "@Override\n public Dimension getMinimumSize() {\n final Dimension size;\n synchronized (getDelegateLock()) {\n size = getDelegate().getMinimumSize();\n }\n return validateSize(size);\n }", "public Dimension getMinimumSize()\r\n {\r\n return getPreferredSize();\r\n }", "Point showDialog()\n\t{\n\t\tsize = new Point(0, 0);\t//returned if user exits the dialog vice clicking \"Play\"\n\t\tthis.setVisible(true);\n\t\treturn size;\n\t}", "@Override\n\tprotected Point getInitialSize()\n\t{\n\t\treturn new Point(373, 481);\n\t}", "public Dimension getMinimumSize()\n {\n return getPreferredSize();\n }", "public void requestLargeLayout() {\n Dialog dialog = getDialog();\n if (dialog == null) {\n Log.w(getClass().getSimpleName(), \"requestLargeLayout dialog has not init yet!\");\n return;\n }\n Window window = dialog.getWindow();\n if (window == null) {\n Log.w(getClass().getSimpleName(), \"requestLargeLayout window has not init yet!\");\n return;\n }\n FragmentActivity activity = getActivity();\n if (activity != null) {\n float displayWidthInDip = UIUtil.getDisplayWidthInDip(activity);\n float displayHeightInDip = UIUtil.getDisplayHeightInDip(activity);\n int dimensionPixelSize = getResources().getDimensionPixelSize(C4558R.dimen.annotate_dialog_min_width);\n if (displayWidthInDip < displayHeightInDip) {\n displayHeightInDip = displayWidthInDip;\n }\n if (displayHeightInDip < ((float) dimensionPixelSize)) {\n window.setLayout(dimensionPixelSize, -1);\n }\n }\n }", "public Dimension getSize() { return new Dimension(width,height); }", "public SetImageSizeDialog(int[] oldSize) {\n setTitle(I18n.tr(\"imagesizedialog.title\")); \n if (oldSize == null)\n oldSize = new int[] { 800, 600 };\n widthInput = new TextField(\"\" + oldSize[0]);\n widthInput.setPrefColumnCount(5);\n heightInput = new TextField(\"\" + oldSize[1]);\n heightInput.setPrefColumnCount(5);\n trackWindowSize = new CheckBox(I18n.tr(\"imagesizedialog.trackWindowSize\"));\n trackWindowSize.setSelected(false);\n\n HBox input = new HBox( 8,\n new Label(I18n.tr(\"imagesizedialog.widthequals\")),\n widthInput,\n new Rectangle(20,0), // acts as a horizontal strut\n new Label(I18n.tr(\"imagesizedialog.heightequals\")),\n heightInput );\n input.setAlignment(Pos.CENTER);\n input.disableProperty().bind(trackWindowSize.selectedProperty());\n\n VBox content = new VBox(15,\n new Label(I18n.tr(\"imagesizedialog.question\")),\n trackWindowSize,\n input);\n content.setPadding(new Insets(15));\n getDialogPane().setContent(content);\n\n getDialogPane().getButtonTypes().addAll(ButtonType.CANCEL, ButtonType.OK);\n Button okButton = (Button)getDialogPane().lookupButton(ButtonType.OK);\n Button cancelButton = (Button)getDialogPane().lookupButton(ButtonType.CANCEL);\n okButton.setText(I18n.tr(\"button.ok\"));\n cancelButton.setText(I18n.tr(\"button.cancel\"));\n okButton.addEventFilter( ActionEvent.ACTION, e -> {\n if ( checkInput() == false ) {\n e.consume();\n }\n } );\n }", "public Point getPreferredSize() {\n checkWidget();\n return parent.fixPoint( preferredWidth, preferredHeight );\n }", "public Dimension getPreferredSize() {\n\t\tDimension size = super.getPreferredSize();\n\t\treturn new Dimension(Math.max(MINIMUM_WIDTH, size.width),\n\t\t Math.max(MINIMUM_HEIGHT, size.height));\n\t}", "public Dimension getSize()\n {\n return new Dimension(300, 150);\n }", "public int getSetSize(){ return Integer.parseInt(setSize.getText()); }", "int getCurrentSize();", "@Override\n\tprotected Point getInitialLocation(Point initialSize)\n\t{\n\t\tShell shell = this.getShell();\n Monitor primary = shell.getMonitor();\n Rectangle bounds = primary.getBounds ();\n int x = bounds.x + (bounds.width - initialSize.x) / 2;\n int y = bounds.y + (bounds.height - initialSize.y) / 2;\n\t\treturn new Point(x, y);\n\t}", "public int getMinSize() {\n return minSize;\n }", "protected IDialogSettings getDialogBoundsSettings() {\n\t\t\t\treturn JavaPlugin.getDefault().getDialogSettingsSection(\"JavadocWizardDialog\"); //$NON-NLS-1$\n\t\t\t}", "public Dimension getMinimumSize() {\n\t\treturn new Dimension(10, 10);\n\t}", "@Implementation(minSdk = O_MR1)\n public Point getStableDisplaySize() throws RemoteException {\n DisplayInfo defaultDisplayInfo = mDm.getDisplayInfo(Display.DEFAULT_DISPLAY);\n return new Point(defaultDisplayInfo.getNaturalWidth(), defaultDisplayInfo.getNaturalHeight());\n }", "public Dimension getMinimumSize(JComponent c) {\n Document doc = editor.getDocument();\n Insets i = c.getInsets();\n Dimension d = new Dimension();\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readLock();\n }\n try {\n d.width = (int) rootView.getMinimumSpan(View.X_AXIS) + i.left + i.right + caretMargin;\n d.height = (int) rootView.getMinimumSpan(View.Y_AXIS) + i.top + i.bottom;\n } finally {\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readUnlock();\n }\n }\n return d;\n }", "public static void resizeDialog(Activity c){\n WindowManager wm = (WindowManager) c.getSystemService(Context.WINDOW_SERVICE);\n Display display = wm.getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n int width = size.x;\n int height = size.y;\n\n //kai ftiaxnoume ton dialogo ligo mikrotero\n WindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n lp.copyFrom(alert.getWindow().getAttributes());\n\n int margin =(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\n c.getResources().getDimension(R.dimen.activity_horizontal_margin),\n c.getResources().getDisplayMetrics());\n lp.height=height;\n lp.width=width-2*margin;\n alert.getWindow().setAttributes(lp);\n }", "Integer getDefaultHeight();", "public void setMinimumSize( int width, int height ) {\n checkWidget();\n Point point = parent.fixPoint( width, height );\n minimumWidth = point.x;\n minimumHeight = point.y;\n }", "public Dimension getMaximumSize() {\n Dimension size = super.getMaximumSize();\n size.height = super.getPreferredSize().height;\n return size;\n }", "public final Point getSize() {\r\n return new Point(config.width, config.height);\r\n }", "public static int[] showDialog(int[] oldSize) {\n SetImageSizeDialog dialog = new SetImageSizeDialog(oldSize);\n Optional<ButtonType> response = dialog.showAndWait();\n if (response.isPresent() && dialog.inputSize != null &&\n (dialog.inputSize[0] != oldSize[0] || dialog.inputSize[1] != oldSize[1]) ) {\n return dialog.inputSize;\n }\n else {\n return null;\n }\n }", "public Size getPreviewSize() {\n String pair = get(\"preview-size\");\n if (pair == null)\n return null;\n String[] dims = pair.split(\"x\");\n if (dims.length != 2)\n return null;\n\n return new Size(Integer.parseInt(dims[0]),\n Integer.parseInt(dims[1]));\n\n }", "public RMSize getSize() { return new RMSize(getWidth(), getHeight()); }", "@Override\n public Position getSize() {\n return new Position(this.w, this.h);\n }", "public int winSize() { return winSize; }", "public int promptSIZE(){\n\t\tString strlen = JOptionPane.showInputDialog(frame, \"Input the integral size of the board (5~19)\", \"Message Board\", JOptionPane.QUESTION_MESSAGE);\n\t\tint intLen = 0;\n\t\t\n\t\ttry{\n\t\t\tintLen = Integer.parseInt(strlen);\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showMessageDialog(frame, \"Input should be in integral format\");\n\t\t\treturn promptSIZE();\n\t\t}\n\t\t\n\t\tif(intLen<5 || intLen>19){\n\t\t\tJOptionPane.showMessageDialog(frame, \"Input should be 5~19\");\n\t\t\treturn promptSIZE();\n\t\t}\n\t\t\n\t\treturn intLen;\n\t}", "@Override\r\n public Dimension getMinimumSize() {\r\n return getPreferredSize();\r\n }", "public void onResume() {\n Window window = Objects.requireNonNull(getDialog()).getWindow();\n Point size = new Point();\n if (window != null) {\n Display display = window.getWindowManager().getDefaultDisplay();\n display.getSize(size);\n // Set the width of the dialog proportional to 75% of the screen width\n window.setLayout((size.x), WindowManager.LayoutParams.WRAP_CONTENT);\n window.setGravity(Gravity.CENTER);\n super.onResume();\n }\n }", "@Override\n public Dimension getMinimumSize()\n {\n return getPreferredSize();\n }", "public Point computeSize( int wHint, int hHint ) {\n checkWidget();\n int width = wHint, height = hHint;\n if ( wHint == SWT.DEFAULT )\n width = 32;\n if ( hHint == SWT.DEFAULT )\n height = 32;\n if ( (parent.style & SWT.VERTICAL) != 0 ) {\n height += MINIMUM_WIDTH;\n } else {\n width += MINIMUM_WIDTH;\n }\n return new Point( width, height );\n }", "public int getMinHeight() {\n checkWidget();\n return minHeight;\n }", "Integer getDefaultWidth();", "public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}", "@Override\n public void onResume() {\n Window window = getDialog().getWindow();\n Point size = new Point();\n // Store dimensions of the screen in `size`\n Display display = window.getWindowManager().getDefaultDisplay();\n display.getSize(size);\n window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n // Set the width of the dialog proportional to 75% of the screen width\n window.setLayout((int) (size.x * 0.75), WindowManager.LayoutParams.WRAP_CONTENT);\n window.setGravity(Gravity.CENTER);\n // Call super onResume after sizing\n super.onResume();\n }", "public float getRelativeSize() {\n\t\treturn relativeSize;\n\t}", "private void setWindowDefaultSize(UserPrefs prefs) {\n primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"165\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"166\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n if (prefs.getGuiSettings().getWindowCoordinates() != null) {\n primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());\n\t\t\tTemplateClass.instrum(\"LineNumber: \",\"168\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());\n\t\t\tTemplateClass.instrum(\"LineNumber: \",\"169\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n }\n\t\tTemplateClass.instrum(\"LineNumber: \",\"167\", \"Type: \",\"org.eclipse.jdt.core.dom.IfStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n }", "public CommonPopWindow setSize(int width, int height) {\n/* 140 */ this.mWidth = width;\n/* 141 */ this.mHeight = height;\n/* 142 */ return this;\n/* */ }", "public int getWidth() {\n return mySize.getWidth();\n }", "private int getInsertSize() {\r\n\t\tfinal int DEFAULT = 0;\r\n\r\n\t\ttry {\r\n\t\t\treturn Integer.valueOf(txtInsertSize.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\ttxtInsertSize.setText(String.valueOf(DEFAULT));\r\n\t\t\treturn DEFAULT;\r\n\t\t}\r\n\t}", "public Point getSize() {\n\t\treturn p_screenSize;\n\t}", "public int getSize()\n\t{\n\t\treturn setSize;\n\t}", "private void setDialog()\n {\n //this.setSize(350,500);\n this.setTitle(Constant.getTextBundle(\"ปฏิกิริยาต่อกัน\"));\n Toolkit thekit = this.getToolkit(); \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation((screenSize.width-this.getSize().width)/2, (screenSize.height-this.getSize().height)/2);\n }", "private void adjustDialogSize(Dialog dialog, MainPanel panel, float scaleFactor) {\n if (!SystemUtils.isHoneycombOrNever()) {\n DisplayMetrics metrics = new DisplayMetrics();\n panel.getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);\n\n WindowManager.LayoutParams params = new WindowManager.LayoutParams();\n params.copyFrom(dialog.getWindow().getAttributes());\n params.width = (int) (metrics.widthPixels * scaleFactor);\n params.height = (int) (metrics.heightPixels * scaleFactor);\n\n dialog.getWindow().setAttributes(params);\n }\n }", "private void basicSize(){\n setSize(375,400);\n }", "@objid (\"1b87bc2e-5e33-11e2-b81d-002564c97630\")\n private Point getViewAreaSize() {\n final Point controlSize = new Point(0, 0);\n // this has to be done in the display thread to avoid\n // InvalidThreadAccessException.\n getViewer().getControl().getDisplay().syncExec(new Runnable() {\n @Override\n public void run() {\n final Control control = BackgroundEditPart.this.getViewer().getControl();\n Point p = control.getSize();\n controlSize.x = p.x;\n controlSize.y = p.y;\n \n if (control instanceof Scrollable) {\n Scrollable c = (Scrollable) control;\n ScrollBar b = c.getHorizontalBar();\n if (b != null /* && b.isVisible() */) {\n controlSize.y -= b.getSize().y;\n }\n b = c.getVerticalBar();\n if (b != null /* && b.isVisible() */) {\n controlSize.x -= b.getSize().x;\n }\n }\n }\n });\n return controlSize;\n }", "public int getMinWidth() {\n checkWidget();\n return minWidth;\n }", "@Override\n\tpublic Dimension getSize() \n\t{\n\t\treturn panel.getSize();\n\t}", "public int getWidth() {\r\n\t\treturn defaultWidth;\r\n\t}", "public static int getSIZE() {\n return SIZE;\n }", "public Dimension getSize() {\n if (size.height < 0 && size.width < 0 && nodeFigure != null) {\n return nodeFigure.getSize().getCopy();\n }\n return size.getCopy();\n }", "public Size getSize() {\n return size;\n }", "Dimension getSize();", "Dimension getSize();", "public void setSize();", "public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}", "public MediaSize getMediaSizeDefault() {\n\t\tMediaSize retValue = Language.getLoginLanguage().getMediaSize();\n\t\tif (retValue == null)\n\t\t\tretValue = MediaSize.ISO.A4;\n\t\tlog.fine(retValue.toString());\n\t\treturn retValue;\n\t}", "@Override\r\n\tpublic int getGameInitialWidth() {\n\t\treturn 320;\r\n\t}", "public int getSelectionSize();", "public int getPreferredSize()\n {\n return preferredSize;\n }", "@Override\n public Dimension getPreferredSize() {\n final Dimension size;\n synchronized (getDelegateLock()) {\n size = getDelegate().getPreferredSize();\n }\n return validateSize(size);\n }", "public float getSize() {\n return size;\n }", "@Override\r\n public Dimension getMaximumSize() {\r\n \t// get current preferred size\r\n \tDimension d = isMaximumSizeSet() ? super.getMaximumSize() : new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);\r\n // forward\r\n return isExpanded() ? d : (isMaximumSizeSet() ?\r\n \t\tnew Dimension(d.width,minimumCollapsedHeight) :\r\n \t\tnew Dimension(Integer.MAX_VALUE,minimumCollapsedHeight));\r\n }", "public Dimension getSize()\n\t{\n\t\treturn rect.getSize();\n\t}", "public Dimension getSize() {\n\t\treturn size.getCopy();\n\t}", "public int[] getSuggestedScreenSize();", "public int getDefaultFacetWidth() {\r\n return getAttributeAsInt(\"defaultFacetWidth\");\r\n }", "public Dimension getSize ( )\r\n\t{\r\n\t\treturn new Dimension ( BORDER_X*2 + SQUARE_SIZE*size, BORDER_Y*2 + SQUARE_SIZE*size );\r\n\t}", "public Point computeSize(int wHint, int hHint, boolean changed) {\n\t\treturn new Point(PREF_WIDTH, PREF_HEIGHT);\r\n\t}", "@Override\n\tpublic float getPrefWidth() {\n\t\treturn windowSize * 1.2f;\n\t}", "public Dimension getSize() {\n\t\treturn null;\n\t}", "public Dimension getPreferredSize() {\n Dimension size = super.getPreferredSize();\n size.width += extraWindowWidth;\n return size;\n }" ]
[ "0.8592345", "0.7131785", "0.7131785", "0.712595", "0.71170855", "0.71056765", "0.70509076", "0.69424766", "0.69388163", "0.6861726", "0.6860475", "0.6848287", "0.6833306", "0.6828415", "0.67471266", "0.66642594", "0.66574764", "0.6591664", "0.64632785", "0.64603144", "0.64235944", "0.64109075", "0.62484527", "0.62397194", "0.6130985", "0.6112329", "0.6100076", "0.6087913", "0.608302", "0.60736334", "0.6027439", "0.5962368", "0.59462374", "0.5916314", "0.5888539", "0.586217", "0.5859908", "0.58439523", "0.5836029", "0.5808474", "0.5804628", "0.5792651", "0.5771014", "0.5766986", "0.5751559", "0.5746699", "0.5728166", "0.572763", "0.56818634", "0.5678341", "0.5671663", "0.5666946", "0.5665332", "0.5659003", "0.56513715", "0.56400347", "0.56312734", "0.56295496", "0.5619739", "0.5613383", "0.56016785", "0.5589286", "0.55773765", "0.5562196", "0.5556013", "0.5519519", "0.5514476", "0.5510614", "0.5492241", "0.5488808", "0.54675806", "0.54592234", "0.54524064", "0.54451483", "0.5442427", "0.5438038", "0.5434656", "0.54225105", "0.54195964", "0.54160744", "0.54143196", "0.54143196", "0.54108673", "0.54057336", "0.54028624", "0.5398932", "0.537933", "0.53672653", "0.5365369", "0.5358535", "0.535553", "0.5352948", "0.5349818", "0.53457904", "0.53412527", "0.53396577", "0.5338469", "0.53259504", "0.5319312", "0.5316424" ]
0.7033358
7
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { WebDriverManager.chromedriver().setup(); ChromeDriver driver = new ChromeDriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10)); driver.get("http://leafground.com/pages/frame.html"); WebElement iframe = driver.findElement(By.xpath("//iframe[contains(text(),'supported ')][1]")); driver.switchTo().frame(iframe); WebElement clickMe = driver.findElement(By.id("Click")); File screenshot = clickMe.getScreenshotAs(OutputType.FILE); File destination = new File("./snaps/sort.png"); FileUtils.copyFile(screenshot, destination); List<WebElement> tagName = driver.findElements(By.tagName("iframe")); int size = tagName.size(); System.out.println("Count of iframes: "+size); System.out.println(tagName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Constructs a new SquareImageViewByWidth instance.
public SquareImageView(final Context context) { super(context); init(null, 0, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Square(int w)\n {\n width = w;\n }", "public SquareGrid(int width, int height) {\n this.width = width;\n this.height = height;\n }", "public SquareImageView(final Context context, final AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit(attrs, 0, 0);\n\t}", "private int squareWidth() {\n return (int) getSize().getWidth() / BOARD_WIDTH;\n }", "TwoDShape5(double x) {\n width = height = x;\n }", "public Square () {\r\n super();\r\n \r\n }", "public Square() {\n this(\"x\", false, false);\n }", "public void setWidth(int w){ widthRadius = w; }", "public Square(String name) {\r\n this(name.charAt(0), name.charAt(1));\r\n }", "private BufferedImage makeSquare(BufferedImage photo) {\n int width = photo.getWidth();\n int height = photo.getHeight();\n int size = Math.min(width, height);\n\n return photo.getSubimage((width/2) - (size/2), (height/2) - (size/2), size, size);\n }", "private static int getSquareOfRoom(int length, int width) {\n return length * width;\n }", "public AStar2D(int width, int height) {\n super( new Grid2D(width, height) );\n }", "private static StructureElement createCenteredSquare(int size) {\r\n\t\treturn new StructureElement(createSquareMask(size), size / 2, size / 2);\r\n\t}", "public Square() {\r\n\r\n }", "private void createSquare(int x, int y, int row, int column) {\r\n grid[row][column] = new JLabel();\r\n grid[row][column].setOpaque(true);\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n grid[row][column].setBorder(SQUARE_BORDER);\r\n this.getContentPane().add(grid[row][column]);\r\n grid[row][column].setBounds(x,y,SQUARE_SIZE,SQUARE_SIZE);\r\n }", "public Square(int i1, int j1)\n {\n i = i1;\n j = j1;\n\n x = squareSize + squareSize*i;\n y = squareSize + squareSize*j;\n\n mark = ' ';\n }", "public void createSquares() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n playingBoard[row][col] = new Square();\n }\n }\n }", "public Image( int x, int y, int w, int h )\r\n {\r\n super();\r\n setBounds( x, y, w, h );\r\n }", "public Square()\r\n {\r\n super();\r\n }", "public Builder setWidth(int value) {\n bitField0_ |= 0x00000004;\n width_ = value;\n onChanged();\n return this;\n }", "public int getWidth(){ return widthRadius; }", "public Builder setWidth(int value) {\n \n width_ = value;\n onChanged();\n return this;\n }", "public Player(int width, int height)\n {\n this.width = width;\n this.height = height;\n createImage();\n }", "public Grid() {\n setPreferredSize(new Dimension(960, 640));\n setBounds(0, 0, 960, 640);\n setLayout(null);\n setBackground(Color.black);\n this.size = 30;\n squares = new Square[size][20];\n }", "public DynamicCuboid setTextureWidth(float width) {\n this.textureWidth = width;\n return this;\n }", "public SpriteBuilder(ImageView imageView) {\r\n if (imageView == null) {\r\n throw new IllegalArgumentException(\"The image view can't be null!!\");\r\n }\r\n this.imageView = imageView;\r\n this.widthFrame = this.imageView.getImage().getWidth();\r\n this.heightFrame = this.imageView.getImage().getHeight();\r\n }", "public Image getScaledCopy(float w, float h) {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, w, h);\r\n\t}", "public abstract float getSquareSize();", "@Test\n public void testWidth() {\n BetterImageSpan span = new BetterImageSpan(mDrawable, mAlignment);\n int size = span.getSize(null, null, 0, 0, null);\n assertThat(size).isEqualTo(mDrawableWidth);\n }", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "public S<T> width(int width){\n\t\t((View)t).getLayoutParams().width = width;\n\t\treturn this;\n\t}", "public void setWidth(int w) {\n this.width = w;\n }", "public Bitmap(int w, int h)\n {\n width = w;\n height = h;\n m_components = new byte[width * height * 4];\n }", "@MavlinkFieldInfo(\n position = 3,\n unitSize = 2,\n description = \"Width of a matrix or image.\"\n )\n public final Builder width(int width) {\n this.width = width;\n return this;\n }", "public Square4(int s)\n {\n // call superclass\n super(s, s);\n }", "public Skull() {\n\t\tsuper();\n\t\tsuper.setWidth(width);\n\t\tsuper.setheight(height);\n\t\tloadPattern();\n\t\tcurrentPattern = walkPattern;\n\t}", "public static synchronized void createPatternImage(int width) {\n if(width < 0) {\n width = 600;\n }\n\n int[][] intensityData = new int[width][width];\n for(int i=0; i<width; i++) {\n for(int j=0; j<width; j++) {\n intensityData[i][j] = i + j;\n }\n }\n\n reset();\n currentPattern = new Pattern(intensityData, \"\", false);\n createPatternImage(currentPattern, null);\n }", "public void setWidth(int w) {\n this.W = w;\n }", "@Override\n\tpublic String getName() {\n\t\treturn \"Square\";\n\t}", "public abstract int getWidth();", "public void setWidth(int w)\n {\n width = w;\n }", "public Square(Point center, double sideLength) {\n super(center, sideLength);\n }", "@Override\r\n public Sprite build() {\r\n return new Sprite(imageView, totalNbrFrames, columns, offsetX, offsetY, widthFrame, heightFrame);\r\n }", "public boolean isSquare()\n {\n return width == height;\n }", "public void size(final int theWidth, final int theHeight);", "public Square(int side) {\n super(side, side);\n }", "public Image( int x, int y, int w, int h, String s )\r\n {\r\n super();\r\n setBounds( x, y, w, h );\r\n setImage( s );\r\n }", "public City(int width, int height) {\r\n\t\tthis.size_w = width;\r\n\t\tthis.size_h = height;\r\n\t\tcity_squares = new Gridpanel[getSize_h()][getSize_w()];\r\n\t}", "@Override\r\n\tpublic SurpriseBox createSurpriseBox(int weight)\r\n\t{\r\n\t\treturn new SurpriseBox(weight);\r\n\t}", "public Plain(int width) {\n this.width = width;\n }", "double getNewWidth();", "public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }", "public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }", "TwoDShape5() {\n width = height = 0.0;\n }", "public int getWidth();", "public int getWidth();", "public int getWidth();", "public Size(int w, int h) {\n width = w;\n height = h;\n }", "public Rectangle(int length, int width) {\n }", "public void setWidth(int n){ // Setter method\n \n width = n; // set the class attribute (variable) radius equal to num\n }", "public Thumbnail() {\n this(100, 100);\n }", "@Override\n public Piece getNext(int width)\n {\n return new SamplePiece(new Position(-1, width / 2));\n }", "public Square(int x, int y){\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}", "private static Square createSquare(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer.parseInt(input[3]);\r\n int vy = Integer.parseInt(input[4]);\r\n boolean isFilled = Boolean.parseBoolean(input[5]);\r\n int side = Integer.parseInt(input[6]);\r\n float r = (float) Integer.parseInt(input[7]) / 255.0f;\r\n float g = (float) Integer.parseInt(input[8]) / 255.0f;\r\n float b = (float) Integer.parseInt(input[9]) / 255.0f;\r\n int insertionTime = Integer.parseInt(input[10]);\r\n boolean isFlashing = Boolean.parseBoolean(input[11]);\r\n float r1 = (float) Integer.parseInt(input[12]) / 255.0f;\r\n float g1 = (float) Integer.parseInt(input[13]) / 255.0f;\r\n float b1 = (float) Integer.parseInt(input[14]) / 255.0f;\r\n return new Square(insertionTime, px, py, vx, vy, side, new Color(r, g, b, 1), isFilled,\r\n isFlashing, new Color(r1, g1, b1, 1));\r\n }", "public boolean isSquare() {\r\n \tif (getLength() == getWidth()) {\r\n \t\treturn(true);\r\n \t} else {\r\n \t\treturn(false);\r\n \t}\r\n }", "public ImageView makePic(Image pic,int hNw){\n ImageView v = new ImageView(pic);\n v.setFitHeight(hNw);\n v.setFitWidth(hNw);\n v.setPreserveRatio(true);\n return v;\n }", "public final int getWidth(){\n return width_;\n }", "Square getSquare(int x, int y);", "public StarScore(int numberOfStars)\n {\n switch (numberOfStars)\n {\n case 1:\n image = new ImageIcon(\"src/view/images/1star.png\"); \n break;\n case 2:\n image = new ImageIcon(\"src/view/images/2stars.png\"); \n break;\n case 3:\n image = new ImageIcon(\"src/view/images/3stars.png\"); \n break;\n case 4:\n image = new ImageIcon(\"src/view/images/4stars.png\"); \n break; \n case 5:\n image = new ImageIcon(\"src/view/images/5stars.png\");\n break;\n default:\n image = new ImageIcon(\"src/view/images/1star.png\"); \n }\n }", "public SpriteSheetSplitter setWidth(int width) {\n if (width <= 0) {\n throw new IllegalStateException(\"invalid width\");\n }\n this.width = width;\n return this;\n }", "int getWidth() {return width;}", "@Override\n\tpublic ViewHolder onCreateViewHolder(ViewGroup vg, int position) {\n\t\tSquareLayout layout = new SquareLayout(mContext);\n\n\t\tViewHolder holder = new ViewHolder(layout);\n\t\treturn holder;\n\t}", "public int getWidth()\n {return width;}", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tint[] viewLocation = new int[2];\n\t\tthis.getLocationOnScreen(viewLocation);\n\n\t\tif (h > w) {\n\t\t\tsquareRealSize = w / 5;\n\t\t} else {\n\t\t\tsquareRealSize = h / 5;\n\t\t}\n\n\t\t// 小方块的大小\n\t\tsquareDisplaySize = squareRealSize * 9 / 10;\n\n\t\tsquareOffsetX = 0;\n\t\tsquareOffsetY = 0;\n\t\t\n\t\tthis.w = getWidth();\n\t\tthis.h = getHeight();\n\t}", "default int getSquareSize() {\n return java.awt.Toolkit.getDefaultToolkit().getScreenSize().width / 20;\n }", "public SquareBoard(Coordinates C, double hw, Color v)\r\n {\r\n r = new Rectangle(C.X(), C.Y(), hw, hw);\r\n r.setStroke(Color.BLACK);\r\n r.setFill(v);\r\n BoardPane.getPane().getChildren().add(r);\r\n }", "public void setWidth(int w){\n \twidth = w;\n }", "private View crearImageView(Drawable d, int w, int h) {\n Drawable clone = d.getConstantState().newDrawable();\n clone.setBounds(0, 0, w, h);\n\n ImageView imBkg = new ImageView(getApplicationContext());\n imBkg.setBackground(clone);\n\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(w, h);\n imBkg.setLayoutParams(layoutParams);\n\n imBkg.setBackground(clone);\n\n imBkg.setOnTouchListener(crearListener());\n//\n// imBkg.setMaxWidth(,fotoBase.getWidth(),fotoBase.getHeight()));\n return imBkg;\n\n }", "public void setWidth(int w) {\n\t\twidth = w;\n\t}", "public Square getSquare() {\n\t\treturn new Square(y, x);\n\t}", "public Builder clearWidth() {\n bitField0_ = (bitField0_ & ~0x00000004);\n width_ = 0;\n onChanged();\n return this;\n }", "@Test\n\tpublic void testGetWidth() {\n\t\tip = new ImagePlus();\n\t\tip.getWidth();\n\t}", "public Square(float fsidelength) {\n setSide(fsidelength);\n }", "public double squareArea(double width)\n\t{\n\t\treturn (width*width);\n\t}", "public void setW(int i) {\n\t\tthis.width=i;\n\t\t\n\t}", "public GameBoard (int height, int width)\n {\n mHeight = height;\n mWidth = width;\n }", "public static ResizableIcon of(int width, int height) {\n ext_xspf base = new ext_xspf();\n base.width = width;\n base.height = height;\n return base;\n }", "public double getWidth() {\n return this.size * 2.0; \n }", "public abstract void init(int w, int h);", "private Image blackSquare() {\n\t\tWritableImage wImage = new WritableImage(40, 40);\n\t\tPixelWriter writer = wImage.getPixelWriter();\n\t\tfor (int i = 0; i < 30; i++) {\n\t\t\tfor (int j = 0; j < 30; j++) {\n\t\t\t\twriter.setColor(i, j, Color.BLACK);\n\t\t\t}\n\t\t}\n\t\treturn wImage;\n\t}", "public Tesseract4(int l, int w, int h, int wDim)\n {\n // call superclass\n super(l, w, h);\n\n //Init instance vars\n wDimension = wDim;\n\n }", "public FloatImage(int cWidth, int cHeight) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n }", "void setWidth(int width);", "void setWidth(int width);", "public abstract double getBaseWidth();", "public int getWidth(){\n return width;\n }", "public MovingSquare(int w, int h) // Constructor is passed the size of the parent frame\n {\n // Start the timer\n shapeTimer.start();\n\n addKeyListener(this);\n setFocusable(true);\n setFocusTraversalKeysEnabled(false);\n\n windowWidth = w;\n windowHeight = h;\n\n xBound = (windowWidth - squareSize);\n yBound = (windowHeight - squareSize);\n }", "public void resize(int w, int h) {}", "public MatteIcon(int width, int height) {\r\n this(width, height, null);\r\n }" ]
[ "0.68181586", "0.5650464", "0.528297", "0.5261584", "0.52608675", "0.5105165", "0.50989425", "0.50097084", "0.4993217", "0.49876744", "0.49857593", "0.49600026", "0.4950033", "0.4942438", "0.49399564", "0.49322358", "0.49193355", "0.4915937", "0.49090442", "0.48855367", "0.48840666", "0.48664606", "0.48453295", "0.48311394", "0.4821465", "0.48210815", "0.481598", "0.47989362", "0.47958562", "0.47837272", "0.47837272", "0.47828513", "0.47752258", "0.4774872", "0.47746012", "0.47652754", "0.47649524", "0.47595057", "0.47522426", "0.4752237", "0.47517443", "0.47306746", "0.47250354", "0.47226948", "0.4702405", "0.46985033", "0.4693286", "0.46901223", "0.4689947", "0.46762133", "0.46741474", "0.46641165", "0.46638587", "0.46638587", "0.46565884", "0.46440497", "0.46440497", "0.46440497", "0.46399772", "0.4638213", "0.4633615", "0.46219772", "0.46093836", "0.46038234", "0.4595662", "0.4592663", "0.4591149", "0.45870417", "0.4584265", "0.45815125", "0.45680624", "0.45666814", "0.4562693", "0.45614514", "0.4558533", "0.453681", "0.45324737", "0.45231217", "0.45161265", "0.45129725", "0.45128855", "0.450864", "0.45081457", "0.4501934", "0.44936454", "0.44923756", "0.4492367", "0.44915876", "0.4489029", "0.44836703", "0.44777432", "0.4476018", "0.44754502", "0.44623065", "0.44623065", "0.44561514", "0.445497", "0.44544512", "0.4451391", "0.44495937" ]
0.57537663
1
Constructs a new SquareImageViewByWidth instance.
public SquareImageView(final Context context, final AttributeSet attrs) { super(context, attrs); init(attrs, 0, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Square(int w)\n {\n width = w;\n }", "public SquareImageView(final Context context) {\n\t\tsuper(context);\n\t\tinit(null, 0, 0);\n\t}", "public SquareGrid(int width, int height) {\n this.width = width;\n this.height = height;\n }", "private int squareWidth() {\n return (int) getSize().getWidth() / BOARD_WIDTH;\n }", "TwoDShape5(double x) {\n width = height = x;\n }", "public Square () {\r\n super();\r\n \r\n }", "public Square() {\n this(\"x\", false, false);\n }", "public void setWidth(int w){ widthRadius = w; }", "public Square(String name) {\r\n this(name.charAt(0), name.charAt(1));\r\n }", "private BufferedImage makeSquare(BufferedImage photo) {\n int width = photo.getWidth();\n int height = photo.getHeight();\n int size = Math.min(width, height);\n\n return photo.getSubimage((width/2) - (size/2), (height/2) - (size/2), size, size);\n }", "private static int getSquareOfRoom(int length, int width) {\n return length * width;\n }", "public AStar2D(int width, int height) {\n super( new Grid2D(width, height) );\n }", "private static StructureElement createCenteredSquare(int size) {\r\n\t\treturn new StructureElement(createSquareMask(size), size / 2, size / 2);\r\n\t}", "public Square() {\r\n\r\n }", "private void createSquare(int x, int y, int row, int column) {\r\n grid[row][column] = new JLabel();\r\n grid[row][column].setOpaque(true);\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n grid[row][column].setBorder(SQUARE_BORDER);\r\n this.getContentPane().add(grid[row][column]);\r\n grid[row][column].setBounds(x,y,SQUARE_SIZE,SQUARE_SIZE);\r\n }", "public Square(int i1, int j1)\n {\n i = i1;\n j = j1;\n\n x = squareSize + squareSize*i;\n y = squareSize + squareSize*j;\n\n mark = ' ';\n }", "public void createSquares() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n playingBoard[row][col] = new Square();\n }\n }\n }", "public Image( int x, int y, int w, int h )\r\n {\r\n super();\r\n setBounds( x, y, w, h );\r\n }", "public Square()\r\n {\r\n super();\r\n }", "public Builder setWidth(int value) {\n bitField0_ |= 0x00000004;\n width_ = value;\n onChanged();\n return this;\n }", "public int getWidth(){ return widthRadius; }", "public Builder setWidth(int value) {\n \n width_ = value;\n onChanged();\n return this;\n }", "public Player(int width, int height)\n {\n this.width = width;\n this.height = height;\n createImage();\n }", "public Grid() {\n setPreferredSize(new Dimension(960, 640));\n setBounds(0, 0, 960, 640);\n setLayout(null);\n setBackground(Color.black);\n this.size = 30;\n squares = new Square[size][20];\n }", "public DynamicCuboid setTextureWidth(float width) {\n this.textureWidth = width;\n return this;\n }", "public SpriteBuilder(ImageView imageView) {\r\n if (imageView == null) {\r\n throw new IllegalArgumentException(\"The image view can't be null!!\");\r\n }\r\n this.imageView = imageView;\r\n this.widthFrame = this.imageView.getImage().getWidth();\r\n this.heightFrame = this.imageView.getImage().getHeight();\r\n }", "public Image getScaledCopy(float w, float h) {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, w, h);\r\n\t}", "public abstract float getSquareSize();", "@Test\n public void testWidth() {\n BetterImageSpan span = new BetterImageSpan(mDrawable, mAlignment);\n int size = span.getSize(null, null, 0, 0, null);\n assertThat(size).isEqualTo(mDrawableWidth);\n }", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "public S<T> width(int width){\n\t\t((View)t).getLayoutParams().width = width;\n\t\treturn this;\n\t}", "public void setWidth(int w) {\n this.width = w;\n }", "public Bitmap(int w, int h)\n {\n width = w;\n height = h;\n m_components = new byte[width * height * 4];\n }", "@MavlinkFieldInfo(\n position = 3,\n unitSize = 2,\n description = \"Width of a matrix or image.\"\n )\n public final Builder width(int width) {\n this.width = width;\n return this;\n }", "public Square4(int s)\n {\n // call superclass\n super(s, s);\n }", "public Skull() {\n\t\tsuper();\n\t\tsuper.setWidth(width);\n\t\tsuper.setheight(height);\n\t\tloadPattern();\n\t\tcurrentPattern = walkPattern;\n\t}", "public static synchronized void createPatternImage(int width) {\n if(width < 0) {\n width = 600;\n }\n\n int[][] intensityData = new int[width][width];\n for(int i=0; i<width; i++) {\n for(int j=0; j<width; j++) {\n intensityData[i][j] = i + j;\n }\n }\n\n reset();\n currentPattern = new Pattern(intensityData, \"\", false);\n createPatternImage(currentPattern, null);\n }", "public void setWidth(int w) {\n this.W = w;\n }", "@Override\n\tpublic String getName() {\n\t\treturn \"Square\";\n\t}", "public abstract int getWidth();", "public void setWidth(int w)\n {\n width = w;\n }", "public Square(Point center, double sideLength) {\n super(center, sideLength);\n }", "@Override\r\n public Sprite build() {\r\n return new Sprite(imageView, totalNbrFrames, columns, offsetX, offsetY, widthFrame, heightFrame);\r\n }", "public boolean isSquare()\n {\n return width == height;\n }", "public void size(final int theWidth, final int theHeight);", "public Square(int side) {\n super(side, side);\n }", "public Image( int x, int y, int w, int h, String s )\r\n {\r\n super();\r\n setBounds( x, y, w, h );\r\n setImage( s );\r\n }", "public City(int width, int height) {\r\n\t\tthis.size_w = width;\r\n\t\tthis.size_h = height;\r\n\t\tcity_squares = new Gridpanel[getSize_h()][getSize_w()];\r\n\t}", "@Override\r\n\tpublic SurpriseBox createSurpriseBox(int weight)\r\n\t{\r\n\t\treturn new SurpriseBox(weight);\r\n\t}", "public Plain(int width) {\n this.width = width;\n }", "double getNewWidth();", "public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }", "public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }", "TwoDShape5() {\n width = height = 0.0;\n }", "public int getWidth();", "public int getWidth();", "public int getWidth();", "public Size(int w, int h) {\n width = w;\n height = h;\n }", "public Rectangle(int length, int width) {\n }", "public void setWidth(int n){ // Setter method\n \n width = n; // set the class attribute (variable) radius equal to num\n }", "public Thumbnail() {\n this(100, 100);\n }", "@Override\n public Piece getNext(int width)\n {\n return new SamplePiece(new Position(-1, width / 2));\n }", "public Square(int x, int y){\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}", "private static Square createSquare(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer.parseInt(input[3]);\r\n int vy = Integer.parseInt(input[4]);\r\n boolean isFilled = Boolean.parseBoolean(input[5]);\r\n int side = Integer.parseInt(input[6]);\r\n float r = (float) Integer.parseInt(input[7]) / 255.0f;\r\n float g = (float) Integer.parseInt(input[8]) / 255.0f;\r\n float b = (float) Integer.parseInt(input[9]) / 255.0f;\r\n int insertionTime = Integer.parseInt(input[10]);\r\n boolean isFlashing = Boolean.parseBoolean(input[11]);\r\n float r1 = (float) Integer.parseInt(input[12]) / 255.0f;\r\n float g1 = (float) Integer.parseInt(input[13]) / 255.0f;\r\n float b1 = (float) Integer.parseInt(input[14]) / 255.0f;\r\n return new Square(insertionTime, px, py, vx, vy, side, new Color(r, g, b, 1), isFilled,\r\n isFlashing, new Color(r1, g1, b1, 1));\r\n }", "public boolean isSquare() {\r\n \tif (getLength() == getWidth()) {\r\n \t\treturn(true);\r\n \t} else {\r\n \t\treturn(false);\r\n \t}\r\n }", "public ImageView makePic(Image pic,int hNw){\n ImageView v = new ImageView(pic);\n v.setFitHeight(hNw);\n v.setFitWidth(hNw);\n v.setPreserveRatio(true);\n return v;\n }", "public final int getWidth(){\n return width_;\n }", "Square getSquare(int x, int y);", "public StarScore(int numberOfStars)\n {\n switch (numberOfStars)\n {\n case 1:\n image = new ImageIcon(\"src/view/images/1star.png\"); \n break;\n case 2:\n image = new ImageIcon(\"src/view/images/2stars.png\"); \n break;\n case 3:\n image = new ImageIcon(\"src/view/images/3stars.png\"); \n break;\n case 4:\n image = new ImageIcon(\"src/view/images/4stars.png\"); \n break; \n case 5:\n image = new ImageIcon(\"src/view/images/5stars.png\");\n break;\n default:\n image = new ImageIcon(\"src/view/images/1star.png\"); \n }\n }", "public SpriteSheetSplitter setWidth(int width) {\n if (width <= 0) {\n throw new IllegalStateException(\"invalid width\");\n }\n this.width = width;\n return this;\n }", "int getWidth() {return width;}", "@Override\n\tpublic ViewHolder onCreateViewHolder(ViewGroup vg, int position) {\n\t\tSquareLayout layout = new SquareLayout(mContext);\n\n\t\tViewHolder holder = new ViewHolder(layout);\n\t\treturn holder;\n\t}", "public int getWidth()\n {return width;}", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tint[] viewLocation = new int[2];\n\t\tthis.getLocationOnScreen(viewLocation);\n\n\t\tif (h > w) {\n\t\t\tsquareRealSize = w / 5;\n\t\t} else {\n\t\t\tsquareRealSize = h / 5;\n\t\t}\n\n\t\t// 小方块的大小\n\t\tsquareDisplaySize = squareRealSize * 9 / 10;\n\n\t\tsquareOffsetX = 0;\n\t\tsquareOffsetY = 0;\n\t\t\n\t\tthis.w = getWidth();\n\t\tthis.h = getHeight();\n\t}", "default int getSquareSize() {\n return java.awt.Toolkit.getDefaultToolkit().getScreenSize().width / 20;\n }", "public SquareBoard(Coordinates C, double hw, Color v)\r\n {\r\n r = new Rectangle(C.X(), C.Y(), hw, hw);\r\n r.setStroke(Color.BLACK);\r\n r.setFill(v);\r\n BoardPane.getPane().getChildren().add(r);\r\n }", "public void setWidth(int w){\n \twidth = w;\n }", "private View crearImageView(Drawable d, int w, int h) {\n Drawable clone = d.getConstantState().newDrawable();\n clone.setBounds(0, 0, w, h);\n\n ImageView imBkg = new ImageView(getApplicationContext());\n imBkg.setBackground(clone);\n\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(w, h);\n imBkg.setLayoutParams(layoutParams);\n\n imBkg.setBackground(clone);\n\n imBkg.setOnTouchListener(crearListener());\n//\n// imBkg.setMaxWidth(,fotoBase.getWidth(),fotoBase.getHeight()));\n return imBkg;\n\n }", "public void setWidth(int w) {\n\t\twidth = w;\n\t}", "public Square getSquare() {\n\t\treturn new Square(y, x);\n\t}", "public Builder clearWidth() {\n bitField0_ = (bitField0_ & ~0x00000004);\n width_ = 0;\n onChanged();\n return this;\n }", "@Test\n\tpublic void testGetWidth() {\n\t\tip = new ImagePlus();\n\t\tip.getWidth();\n\t}", "public Square(float fsidelength) {\n setSide(fsidelength);\n }", "public double squareArea(double width)\n\t{\n\t\treturn (width*width);\n\t}", "public void setW(int i) {\n\t\tthis.width=i;\n\t\t\n\t}", "public GameBoard (int height, int width)\n {\n mHeight = height;\n mWidth = width;\n }", "public static ResizableIcon of(int width, int height) {\n ext_xspf base = new ext_xspf();\n base.width = width;\n base.height = height;\n return base;\n }", "public double getWidth() {\n return this.size * 2.0; \n }", "public abstract void init(int w, int h);", "private Image blackSquare() {\n\t\tWritableImage wImage = new WritableImage(40, 40);\n\t\tPixelWriter writer = wImage.getPixelWriter();\n\t\tfor (int i = 0; i < 30; i++) {\n\t\t\tfor (int j = 0; j < 30; j++) {\n\t\t\t\twriter.setColor(i, j, Color.BLACK);\n\t\t\t}\n\t\t}\n\t\treturn wImage;\n\t}", "public Tesseract4(int l, int w, int h, int wDim)\n {\n // call superclass\n super(l, w, h);\n\n //Init instance vars\n wDimension = wDim;\n\n }", "public FloatImage(int cWidth, int cHeight) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n }", "void setWidth(int width);", "void setWidth(int width);", "public abstract double getBaseWidth();", "public int getWidth(){\n return width;\n }", "public MovingSquare(int w, int h) // Constructor is passed the size of the parent frame\n {\n // Start the timer\n shapeTimer.start();\n\n addKeyListener(this);\n setFocusable(true);\n setFocusTraversalKeysEnabled(false);\n\n windowWidth = w;\n windowHeight = h;\n\n xBound = (windowWidth - squareSize);\n yBound = (windowHeight - squareSize);\n }", "public void resize(int w, int h) {}", "public MatteIcon(int width, int height) {\r\n this(width, height, null);\r\n }" ]
[ "0.68181586", "0.57537663", "0.5650464", "0.5261584", "0.52608675", "0.5105165", "0.50989425", "0.50097084", "0.4993217", "0.49876744", "0.49857593", "0.49600026", "0.4950033", "0.4942438", "0.49399564", "0.49322358", "0.49193355", "0.4915937", "0.49090442", "0.48855367", "0.48840666", "0.48664606", "0.48453295", "0.48311394", "0.4821465", "0.48210815", "0.481598", "0.47989362", "0.47958562", "0.47837272", "0.47837272", "0.47828513", "0.47752258", "0.4774872", "0.47746012", "0.47652754", "0.47649524", "0.47595057", "0.47522426", "0.4752237", "0.47517443", "0.47306746", "0.47250354", "0.47226948", "0.4702405", "0.46985033", "0.4693286", "0.46901223", "0.4689947", "0.46762133", "0.46741474", "0.46641165", "0.46638587", "0.46638587", "0.46565884", "0.46440497", "0.46440497", "0.46440497", "0.46399772", "0.4638213", "0.4633615", "0.46219772", "0.46093836", "0.46038234", "0.4595662", "0.4592663", "0.4591149", "0.45870417", "0.4584265", "0.45815125", "0.45680624", "0.45666814", "0.4562693", "0.45614514", "0.4558533", "0.453681", "0.45324737", "0.45231217", "0.45161265", "0.45129725", "0.45128855", "0.450864", "0.45081457", "0.4501934", "0.44936454", "0.44923756", "0.4492367", "0.44915876", "0.4489029", "0.44836703", "0.44777432", "0.4476018", "0.44754502", "0.44623065", "0.44623065", "0.44561514", "0.445497", "0.44544512", "0.4451391", "0.44495937" ]
0.528297
3
Constructs a new SquareImageViewByWidth instance.
public SquareImageView(final Context context, final AttributeSet attrs, final int defStyleAttr) { super(context, attrs, defStyleAttr); init(attrs, defStyleAttr, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Square(int w)\n {\n width = w;\n }", "public SquareImageView(final Context context) {\n\t\tsuper(context);\n\t\tinit(null, 0, 0);\n\t}", "public SquareGrid(int width, int height) {\n this.width = width;\n this.height = height;\n }", "public SquareImageView(final Context context, final AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit(attrs, 0, 0);\n\t}", "private int squareWidth() {\n return (int) getSize().getWidth() / BOARD_WIDTH;\n }", "TwoDShape5(double x) {\n width = height = x;\n }", "public Square () {\r\n super();\r\n \r\n }", "public Square() {\n this(\"x\", false, false);\n }", "public void setWidth(int w){ widthRadius = w; }", "public Square(String name) {\r\n this(name.charAt(0), name.charAt(1));\r\n }", "private BufferedImage makeSquare(BufferedImage photo) {\n int width = photo.getWidth();\n int height = photo.getHeight();\n int size = Math.min(width, height);\n\n return photo.getSubimage((width/2) - (size/2), (height/2) - (size/2), size, size);\n }", "private static int getSquareOfRoom(int length, int width) {\n return length * width;\n }", "public AStar2D(int width, int height) {\n super( new Grid2D(width, height) );\n }", "private static StructureElement createCenteredSquare(int size) {\r\n\t\treturn new StructureElement(createSquareMask(size), size / 2, size / 2);\r\n\t}", "public Square() {\r\n\r\n }", "private void createSquare(int x, int y, int row, int column) {\r\n grid[row][column] = new JLabel();\r\n grid[row][column].setOpaque(true);\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n grid[row][column].setBorder(SQUARE_BORDER);\r\n this.getContentPane().add(grid[row][column]);\r\n grid[row][column].setBounds(x,y,SQUARE_SIZE,SQUARE_SIZE);\r\n }", "public Square(int i1, int j1)\n {\n i = i1;\n j = j1;\n\n x = squareSize + squareSize*i;\n y = squareSize + squareSize*j;\n\n mark = ' ';\n }", "public void createSquares() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n playingBoard[row][col] = new Square();\n }\n }\n }", "public Image( int x, int y, int w, int h )\r\n {\r\n super();\r\n setBounds( x, y, w, h );\r\n }", "public Square()\r\n {\r\n super();\r\n }", "public Builder setWidth(int value) {\n bitField0_ |= 0x00000004;\n width_ = value;\n onChanged();\n return this;\n }", "public int getWidth(){ return widthRadius; }", "public Builder setWidth(int value) {\n \n width_ = value;\n onChanged();\n return this;\n }", "public Player(int width, int height)\n {\n this.width = width;\n this.height = height;\n createImage();\n }", "public Grid() {\n setPreferredSize(new Dimension(960, 640));\n setBounds(0, 0, 960, 640);\n setLayout(null);\n setBackground(Color.black);\n this.size = 30;\n squares = new Square[size][20];\n }", "public DynamicCuboid setTextureWidth(float width) {\n this.textureWidth = width;\n return this;\n }", "public SpriteBuilder(ImageView imageView) {\r\n if (imageView == null) {\r\n throw new IllegalArgumentException(\"The image view can't be null!!\");\r\n }\r\n this.imageView = imageView;\r\n this.widthFrame = this.imageView.getImage().getWidth();\r\n this.heightFrame = this.imageView.getImage().getHeight();\r\n }", "public Image getScaledCopy(float w, float h) {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, w, h);\r\n\t}", "public abstract float getSquareSize();", "@Test\n public void testWidth() {\n BetterImageSpan span = new BetterImageSpan(mDrawable, mAlignment);\n int size = span.getSize(null, null, 0, 0, null);\n assertThat(size).isEqualTo(mDrawableWidth);\n }", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "public S<T> width(int width){\n\t\t((View)t).getLayoutParams().width = width;\n\t\treturn this;\n\t}", "public void setWidth(int w) {\n this.width = w;\n }", "public Bitmap(int w, int h)\n {\n width = w;\n height = h;\n m_components = new byte[width * height * 4];\n }", "@MavlinkFieldInfo(\n position = 3,\n unitSize = 2,\n description = \"Width of a matrix or image.\"\n )\n public final Builder width(int width) {\n this.width = width;\n return this;\n }", "public Square4(int s)\n {\n // call superclass\n super(s, s);\n }", "public Skull() {\n\t\tsuper();\n\t\tsuper.setWidth(width);\n\t\tsuper.setheight(height);\n\t\tloadPattern();\n\t\tcurrentPattern = walkPattern;\n\t}", "public static synchronized void createPatternImage(int width) {\n if(width < 0) {\n width = 600;\n }\n\n int[][] intensityData = new int[width][width];\n for(int i=0; i<width; i++) {\n for(int j=0; j<width; j++) {\n intensityData[i][j] = i + j;\n }\n }\n\n reset();\n currentPattern = new Pattern(intensityData, \"\", false);\n createPatternImage(currentPattern, null);\n }", "public void setWidth(int w) {\n this.W = w;\n }", "@Override\n\tpublic String getName() {\n\t\treturn \"Square\";\n\t}", "public abstract int getWidth();", "public void setWidth(int w)\n {\n width = w;\n }", "public Square(Point center, double sideLength) {\n super(center, sideLength);\n }", "@Override\r\n public Sprite build() {\r\n return new Sprite(imageView, totalNbrFrames, columns, offsetX, offsetY, widthFrame, heightFrame);\r\n }", "public boolean isSquare()\n {\n return width == height;\n }", "public void size(final int theWidth, final int theHeight);", "public Square(int side) {\n super(side, side);\n }", "public Image( int x, int y, int w, int h, String s )\r\n {\r\n super();\r\n setBounds( x, y, w, h );\r\n setImage( s );\r\n }", "public City(int width, int height) {\r\n\t\tthis.size_w = width;\r\n\t\tthis.size_h = height;\r\n\t\tcity_squares = new Gridpanel[getSize_h()][getSize_w()];\r\n\t}", "@Override\r\n\tpublic SurpriseBox createSurpriseBox(int weight)\r\n\t{\r\n\t\treturn new SurpriseBox(weight);\r\n\t}", "public Plain(int width) {\n this.width = width;\n }", "double getNewWidth();", "public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }", "public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }", "TwoDShape5() {\n width = height = 0.0;\n }", "public int getWidth();", "public int getWidth();", "public int getWidth();", "public Size(int w, int h) {\n width = w;\n height = h;\n }", "public Rectangle(int length, int width) {\n }", "public void setWidth(int n){ // Setter method\n \n width = n; // set the class attribute (variable) radius equal to num\n }", "public Thumbnail() {\n this(100, 100);\n }", "@Override\n public Piece getNext(int width)\n {\n return new SamplePiece(new Position(-1, width / 2));\n }", "public Square(int x, int y){\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}", "private static Square createSquare(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer.parseInt(input[3]);\r\n int vy = Integer.parseInt(input[4]);\r\n boolean isFilled = Boolean.parseBoolean(input[5]);\r\n int side = Integer.parseInt(input[6]);\r\n float r = (float) Integer.parseInt(input[7]) / 255.0f;\r\n float g = (float) Integer.parseInt(input[8]) / 255.0f;\r\n float b = (float) Integer.parseInt(input[9]) / 255.0f;\r\n int insertionTime = Integer.parseInt(input[10]);\r\n boolean isFlashing = Boolean.parseBoolean(input[11]);\r\n float r1 = (float) Integer.parseInt(input[12]) / 255.0f;\r\n float g1 = (float) Integer.parseInt(input[13]) / 255.0f;\r\n float b1 = (float) Integer.parseInt(input[14]) / 255.0f;\r\n return new Square(insertionTime, px, py, vx, vy, side, new Color(r, g, b, 1), isFilled,\r\n isFlashing, new Color(r1, g1, b1, 1));\r\n }", "public boolean isSquare() {\r\n \tif (getLength() == getWidth()) {\r\n \t\treturn(true);\r\n \t} else {\r\n \t\treturn(false);\r\n \t}\r\n }", "public ImageView makePic(Image pic,int hNw){\n ImageView v = new ImageView(pic);\n v.setFitHeight(hNw);\n v.setFitWidth(hNw);\n v.setPreserveRatio(true);\n return v;\n }", "public final int getWidth(){\n return width_;\n }", "Square getSquare(int x, int y);", "public StarScore(int numberOfStars)\n {\n switch (numberOfStars)\n {\n case 1:\n image = new ImageIcon(\"src/view/images/1star.png\"); \n break;\n case 2:\n image = new ImageIcon(\"src/view/images/2stars.png\"); \n break;\n case 3:\n image = new ImageIcon(\"src/view/images/3stars.png\"); \n break;\n case 4:\n image = new ImageIcon(\"src/view/images/4stars.png\"); \n break; \n case 5:\n image = new ImageIcon(\"src/view/images/5stars.png\");\n break;\n default:\n image = new ImageIcon(\"src/view/images/1star.png\"); \n }\n }", "public SpriteSheetSplitter setWidth(int width) {\n if (width <= 0) {\n throw new IllegalStateException(\"invalid width\");\n }\n this.width = width;\n return this;\n }", "int getWidth() {return width;}", "@Override\n\tpublic ViewHolder onCreateViewHolder(ViewGroup vg, int position) {\n\t\tSquareLayout layout = new SquareLayout(mContext);\n\n\t\tViewHolder holder = new ViewHolder(layout);\n\t\treturn holder;\n\t}", "public int getWidth()\n {return width;}", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tint[] viewLocation = new int[2];\n\t\tthis.getLocationOnScreen(viewLocation);\n\n\t\tif (h > w) {\n\t\t\tsquareRealSize = w / 5;\n\t\t} else {\n\t\t\tsquareRealSize = h / 5;\n\t\t}\n\n\t\t// 小方块的大小\n\t\tsquareDisplaySize = squareRealSize * 9 / 10;\n\n\t\tsquareOffsetX = 0;\n\t\tsquareOffsetY = 0;\n\t\t\n\t\tthis.w = getWidth();\n\t\tthis.h = getHeight();\n\t}", "default int getSquareSize() {\n return java.awt.Toolkit.getDefaultToolkit().getScreenSize().width / 20;\n }", "public SquareBoard(Coordinates C, double hw, Color v)\r\n {\r\n r = new Rectangle(C.X(), C.Y(), hw, hw);\r\n r.setStroke(Color.BLACK);\r\n r.setFill(v);\r\n BoardPane.getPane().getChildren().add(r);\r\n }", "public void setWidth(int w){\n \twidth = w;\n }", "private View crearImageView(Drawable d, int w, int h) {\n Drawable clone = d.getConstantState().newDrawable();\n clone.setBounds(0, 0, w, h);\n\n ImageView imBkg = new ImageView(getApplicationContext());\n imBkg.setBackground(clone);\n\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(w, h);\n imBkg.setLayoutParams(layoutParams);\n\n imBkg.setBackground(clone);\n\n imBkg.setOnTouchListener(crearListener());\n//\n// imBkg.setMaxWidth(,fotoBase.getWidth(),fotoBase.getHeight()));\n return imBkg;\n\n }", "public void setWidth(int w) {\n\t\twidth = w;\n\t}", "public Square getSquare() {\n\t\treturn new Square(y, x);\n\t}", "public Builder clearWidth() {\n bitField0_ = (bitField0_ & ~0x00000004);\n width_ = 0;\n onChanged();\n return this;\n }", "@Test\n\tpublic void testGetWidth() {\n\t\tip = new ImagePlus();\n\t\tip.getWidth();\n\t}", "public Square(float fsidelength) {\n setSide(fsidelength);\n }", "public double squareArea(double width)\n\t{\n\t\treturn (width*width);\n\t}", "public void setW(int i) {\n\t\tthis.width=i;\n\t\t\n\t}", "public GameBoard (int height, int width)\n {\n mHeight = height;\n mWidth = width;\n }", "public static ResizableIcon of(int width, int height) {\n ext_xspf base = new ext_xspf();\n base.width = width;\n base.height = height;\n return base;\n }", "public double getWidth() {\n return this.size * 2.0; \n }", "public abstract void init(int w, int h);", "private Image blackSquare() {\n\t\tWritableImage wImage = new WritableImage(40, 40);\n\t\tPixelWriter writer = wImage.getPixelWriter();\n\t\tfor (int i = 0; i < 30; i++) {\n\t\t\tfor (int j = 0; j < 30; j++) {\n\t\t\t\twriter.setColor(i, j, Color.BLACK);\n\t\t\t}\n\t\t}\n\t\treturn wImage;\n\t}", "public Tesseract4(int l, int w, int h, int wDim)\n {\n // call superclass\n super(l, w, h);\n\n //Init instance vars\n wDimension = wDim;\n\n }", "public FloatImage(int cWidth, int cHeight) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n }", "void setWidth(int width);", "void setWidth(int width);", "public abstract double getBaseWidth();", "public int getWidth(){\n return width;\n }", "public MovingSquare(int w, int h) // Constructor is passed the size of the parent frame\n {\n // Start the timer\n shapeTimer.start();\n\n addKeyListener(this);\n setFocusable(true);\n setFocusTraversalKeysEnabled(false);\n\n windowWidth = w;\n windowHeight = h;\n\n xBound = (windowWidth - squareSize);\n yBound = (windowHeight - squareSize);\n }", "public void resize(int w, int h) {}", "public MatteIcon(int width, int height) {\r\n this(width, height, null);\r\n }" ]
[ "0.68181586", "0.57537663", "0.5650464", "0.528297", "0.5261584", "0.52608675", "0.5105165", "0.50989425", "0.50097084", "0.4993217", "0.49876744", "0.49857593", "0.49600026", "0.4950033", "0.4942438", "0.49399564", "0.49322358", "0.49193355", "0.4915937", "0.49090442", "0.48855367", "0.48840666", "0.48664606", "0.48453295", "0.48311394", "0.4821465", "0.48210815", "0.481598", "0.47989362", "0.47958562", "0.47837272", "0.47837272", "0.47828513", "0.47752258", "0.4774872", "0.47746012", "0.47652754", "0.47649524", "0.47595057", "0.47522426", "0.4752237", "0.47517443", "0.47306746", "0.47250354", "0.47226948", "0.4702405", "0.46985033", "0.4693286", "0.46901223", "0.4689947", "0.46762133", "0.46741474", "0.46641165", "0.46638587", "0.46638587", "0.46565884", "0.46440497", "0.46440497", "0.46440497", "0.46399772", "0.4638213", "0.4633615", "0.46219772", "0.46093836", "0.46038234", "0.4595662", "0.4592663", "0.4591149", "0.45870417", "0.4584265", "0.45815125", "0.45680624", "0.45666814", "0.4562693", "0.45614514", "0.4558533", "0.453681", "0.45324737", "0.45231217", "0.45161265", "0.45129725", "0.45128855", "0.450864", "0.45081457", "0.4501934", "0.44936454", "0.44923756", "0.4492367", "0.44915876", "0.4489029", "0.44836703", "0.44777432", "0.4476018", "0.44754502", "0.44623065", "0.44623065", "0.44561514", "0.445497", "0.44544512", "0.4451391", "0.44495937" ]
0.0
-1
Generated constructor for generic creation.
public PromotionOrderEntryAdjustActionDTO() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Generic(){\n\t\tthis(null);\n\t}", "public GenericElement() {\n\t}", "public ClassTemplate() {\n\t}", "private Instantiation(){}", "defaultConstructor(){}", "protected abstract void construct();", "private void __sep__Constructors__() {}", "public GenericResource() {\r\n }", "public GenericResource()\r\n {\r\n }", "public Constructor(){\n\t\t\n\t}", "public GenericResource() {\n }", "public GenericResource()\n {\n }", "public GenericTest()\n {\n }", "void DefaultConstructor(){}", "private Template() {\r\n\r\n }", "Constructor<T> newConstructor();", "T create();", "T create();", "public AbstractT602()\n {\n }", "public GenericContainer(T t){\n obj = t;\n }", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "public AbstractT153()\n {\n }", "Reproducible newInstance();", "Constructor() {\r\n\t\t \r\n\t }", "public abstract DataType<T> newInstance();", "public GenericDomainObject() {\n\tkeys = new LinkedHashMap<String, Object>();\n\tattributes = new LinkedHashMap<String, Object>();\n }", "void create(T t);", "public GenericHandler() {\n\n }", "public Basic() {}", "public Identity()\n {\n super( Fields.ARGS );\n }", "@NotNull\n protected Supplier<AbstractReadablePacket> createConstructor() {\n final Constructor<AbstractReadablePacket> constructor = requireNonNull(ClassUtils.getConstructor(getClass()));\n return () -> ClassUtils.newInstance(constructor);\n }", "public Pleasure() {\r\n\t\t}", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "public GenericDynamicArray() {this(11);}", "Type() {\n }", "HxMethod createConstructor(final String... parameterTypes);", "public TemplateFactoryImpl()\n {\n super();\n }", "public abstract void create(T t);", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public TypeUtils() {\n\t}", "public Generador(Generic generic) {\r\n this.generic = generic;\r\n this.Num_Atributes = this.generic.getClass().getDeclaredFields().length;\r\n this.SuperDeclaredFields = this.generic.getClass().getSuperclass().getDeclaredFields();\r\n this.DeclaredFields = this.generic.getClass().getDeclaredFields();\r\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}", "public SimpleGeneric(T param) {\n this.objRef = param;\n }", "public T newInstance();", "private Tuples() {\n // prevent instantiation.\n }", "private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }", "T newInstance(Object... args);", "public native void constructor();", "public TTau() {}", "public Type() {\n super();\n }", "@DISPID(-2147417603)\n @PropGet\n com4j.Com4jObject constructor();", "public BaseElement() {\n }", "public BaseTypeIdImpl() {}", "public ListTemplate() {\n }", "public InsulinType(){\n super();\n }", "public MyGeneric(A a, B b) { // TODO: check parameter type\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t}", "private SingleObject(){}", "public ObjectFactory() {\n super(grammarInfo);\n }", "public TLongArray() {\n\t}", "public BaseParameters(){\r\n\t}", "public ObjectFactory() {\n\t}", "private SingleObject()\r\n {\r\n }", "DefaultConstructor(int a){}", "private TemplateReader() {\n }", "MyEncodeableWithoutPublicNoArgConstructor() {}", "public org.python.types.Type __new__(org.python.types.Type cls);", "private Converter()\n\t{\n\t\tsuper();\n\t}", "private TemplateFactory(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "public Spec__1() {\n }", "HxMethod createConstructor(final HxType... parameterTypes);", "protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Converter() {\n\t\tClass<?>[] generics = ClassUtil.getGenericArguments(Converter.class, getClass());\n\t\t\n\t\ttargetClass = (Class<T>) generics[0];\n\t\tformatType = (Class<F>) generics[1];\n\t}", "public Dynamic() {\n }", "public ObjectFactory() {\r\n\t}", "public Parameters() {\n\t}", "public TemplateHelper() {\r\t\tsuper();\r\t}", "public TParametrosVOImpl() {\r\n }", "public tn(String paramString, ho paramho)\r\n/* 12: */ {\r\n/* 13:11 */ super(paramString, paramho);\r\n/* 14: */ }", "public Tag() {\n\t}", "public Tag() {\n\t}", "private Tuples() {}", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "@Override\n\tpublic void create () {\n\n\t}", "public CreateStatus()\n {\n super(new DataMap(), null);\n }", "protected ChildType() {/* intentionally empty block */}", "private Composite() {\n }", "public Pojo1110110(){\r\n\t}", "O() { super(null); }", "public GenericTcalRecord() {\n this(-1);\n }", "public Tags() {\n\t\t\n\t}", "public CustomerNew () {\n\t\tsuper();\n\t}", "@Override\n public void construct() throws IOException {\n \n }", "private PSUniqueObjectGenerator()\n {\n }", "public Value() {\n }", "public Value() {}", "public D() {}", "public Tuple() {\n this(new ArrayList<Object>());\n }", "public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}", "private Item(){}" ]
[ "0.77128696", "0.70610905", "0.68515724", "0.6749374", "0.67444015", "0.6730233", "0.67222315", "0.6588787", "0.65825444", "0.65451485", "0.6535722", "0.6505163", "0.6497192", "0.64636093", "0.6463281", "0.6444393", "0.64120984", "0.64120984", "0.6391172", "0.6379156", "0.63500494", "0.63497025", "0.6348289", "0.63328785", "0.62909406", "0.6237479", "0.6219265", "0.62073296", "0.62002814", "0.6193648", "0.6184338", "0.61788785", "0.61716235", "0.61644864", "0.61572224", "0.61558", "0.614123", "0.6138548", "0.61339134", "0.6126525", "0.6117402", "0.611555", "0.61054885", "0.61020124", "0.60476243", "0.60439956", "0.60268307", "0.6021211", "0.60211945", "0.6016398", "0.6013473", "0.60047734", "0.59964865", "0.5988846", "0.5982617", "0.59817165", "0.5981247", "0.59807074", "0.5976234", "0.595978", "0.5957649", "0.5947434", "0.5945703", "0.5942092", "0.5941409", "0.59409547", "0.594053", "0.593097", "0.5929973", "0.5925374", "0.5915878", "0.59118986", "0.5910312", "0.59054095", "0.5903644", "0.59028804", "0.5897492", "0.5892682", "0.588243", "0.5878773", "0.5874916", "0.5874916", "0.5868643", "0.58671546", "0.5858411", "0.585763", "0.58564615", "0.5854916", "0.5850862", "0.5847602", "0.5846013", "0.58414465", "0.58390117", "0.5834912", "0.58276224", "0.5817379", "0.58098346", "0.5809283", "0.58075964", "0.5802843", "0.5797581" ]
0.0
-1
An interface describing stack
public interface IStack { /**A method returns top element and removes it from the stack*/ int pop(); /**A method adds received element to the top of the stack*/ void push(int value); /**A method returns true if stack is empty and false in otherwise*/ boolean isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IStack {\n\n /**\n * Adds the given item to the top of the stack.\n */\n void push(Object item);\n\n /**\n * Removes the top item from the stack and returns it.\n * @exception java.util.NoSuchElementException if the stack is empty.\n */\n Object pop();\n \n /**\n * Sees what is at the top of the stack.\n */\n Object peekABoo();\n \n /**\n * Returns whether the stack is empty or not.\n */\n boolean isEmpty();\n}", "public StackInterface Stack() { return mStack; }", "public interface Stack<T> {\n boolean isEmpty();\n T pop();\n void push(T t);\n T getTop();\n void clear();\n int size();\n}", "public interface Stack {\n//\tpublic static final Object[] contents = new Object[100]; \n\tpublic void push(Object anElement);\n\tpublic Object pop();\n\n}", "public interface Stack<E> {\r\n \r\n /** \r\n * Pre: Se ingresa el dato\r\n * @param data se ingresa un dato para agregar al Vector\r\n * Post: Se guarda el dato en Stack\r\n */\r\n public void push(E data);\r\n\r\n /** \r\n * Pre: Estan todos los datos en el Stack\r\n * @return E se regresa un item.\r\n * Post: Se regresa y elimina un dato del Stack\r\n */\r\n public E pop();\r\n\r\n /** \r\n * Pre: Se encuentra el Stack con sus datos\r\n * @return E se regresa cualquier tipo de dato\r\n * @throws EmptyStackException regresa un error\r\n * Post: Se regresa el dato sobre la lista\r\n */\r\n public E peek();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack\r\n * @return boolean se regresa un valor True o False\r\n * Post: Si el Stack se encuentra vacio este regresa True\r\n */\r\n public boolean empty();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack \r\n * @return int se regrea cualquier numero\r\n * Post: Se devuelve el numero de objetos que tiene el Stack\r\n */\r\n public int size();\r\n\r\n}", "public interface Stack<T>\n{\n\t/**\n\t * This method initializes an empty stack with a max size of n.\n\t *\n\t * @param n The maximum capacity of the stack.\n\t */\n\tvoid init(int n);\n\n\t/**\n\t * This method pushes the specified element onto the stack.\n\t *\n\t * @param x The element to be pushed.\n\t */\n\tvoid push(T x);\n\n\t/**\n\t * This method pops the top LIFO element off the stack.\n\t *\n\t * @return The top element removed from the stack.\n\t */\n\tT pop();\n\n\t/**\n\t * This method returns the element on the top of the stack.\n\t *\n\t * @return The top element removed from the stack.\n\t */\n\tT peek();\n\n\t/**\n\t * This method returns the current depth of the stack.\n\t *\n\t * @return |this| - count(empty, this);\n\t */\n\tint depth();\n\n\t/**\n\t * This method returns the maximum capacity of the stack.\n\t *\n\t * @return |this|;\n\t */\n\tint maxDepth();\n\n\t/**\n\t * This method returns the empty status of the stack.\n\t *\n\t * @return true if |this| = 0, otherwise false;\n\t */\n\tboolean isEmpty();\n\n\t/**\n\t * This method clears the stack.\n\t */\n\tvoid clear();\n\n\t/**\n\t * This method prints the contents of the stack.\n\t */\n\tvoid print();\n}", "public interface Stack<E> {\n\n /**\n * Insert an element at the top of the Stack.\n *\n * @param e the element to be inserted\n */\n void push(E e);\n\n /**\n * Returns the element at the top of the Stack.\n *\n * @return element at the top of the Stack\n * @throws EmptyStackException if the Stack is empty\n */\n E peek() throws EmptyStackException;\n\n /**\n * Removes and returns the top element from the Stack.\n *\n * @return element at the top of the Stack\n * @throws EmptyStackException if the Stack is empty\n */\n E pop() throws EmptyStackException;\n\n /**\n * Returns the number of elements in the Stack.\n *\n * @return number of elements in the Stack\n */\n int size();\n\n /**\n * Checks whether the Stack is empty.\n *\n * @return true if the Stack is empty, false otherwise\n */\n boolean isEmpty();\n}", "public interface StackADT<T> {\n /**\n * Adds a element to the top of the stack\n *\n * @param element to be added\n */\n public void push(T element);\n\n /**\n * Removes a element from the top of the stack\n *\n * @return element removed\n * @throws EmptyCollectionException in case stack is empty\n */\n public T pop() throws EmptyQueueException, EmptyCollectionException;\n\n /**\n * Returns the top element of the stack\n *\n * @return top element\n * @throws EmptyCollectionException\n */\n public T peek() throws EmptyCollectionException;\n\n /**\n * Verifies if stack is empty\n *\n * @return true if empty, false if not\n */\n public boolean isEmpty();\n\n /**\n * Returns the size of the stack\n *\n * @return size of the stack\n */\n public int size();\n\n /**\n * Returns a string representation of the stack\n *\n * @return elements in a string\n */\n public String toString();\n\n}", "public String getStack();", "public interface StackFrame {\n\t/**\n\t * Indicator for a Stack that grows negatively.\n\t */\n\tpublic final static int GROWS_NEGATIVE = -1;\n\t/**\n\t * Indicator for a Stack that grows positively.\n\t */\n\tpublic final static int GROWS_POSITIVE = 1;\n\t/**\n\t * Indicator for a unknown stack parameter offset\n\t */\n\tpublic static final int UNKNOWN_PARAM_OFFSET = (128 * 1024);\n\n\t/**\n\t * Get the function that this stack belongs to.\n\t * This could return null if the stack frame isn't part of a function.\n\t *\n\t * @return the function\n\t */\n\tpublic Function getFunction();\n\n\t/**\n\t * Get the size of this stack frame in bytes.\n\t *\n\t * @return stack frame size\n\t */\n\tpublic int getFrameSize();\n\n\t/**\n\t * Get the local portion of the stack frame in bytes.\n\t *\n\t * @return local frame size\n\t */\n\tpublic int getLocalSize();\n\n\t/**\n\t * Get the parameter portion of the stack frame in bytes.\n\t *\n\t * @return parameter frame size\n\t */\n\tpublic int getParameterSize();\n\n\t/**\n\t * Get the offset to the start of the parameters.\n\t *\n\t * @return offset\n\t */\n\tpublic int getParameterOffset();\n\n//\t/**\n//\t * Set the offset on the stack of the parameters.\n//\t *\n//\t * @param offset the start offset of parameters on the stack\n//\t */\n//\tpublic void setParameterOffset(int offset) throws InvalidInputException;\n\n\t/**\n\t * Returns true if specified offset could correspond to a parameter\n\t * @param offset\n\t */\n\tpublic boolean isParameterOffset(int offset);\n\n\t/**\n\t * Set the size of the local stack in bytes.\n\t *\n\t * @param size size of local stack\n\t */\n\tpublic void setLocalSize(int size);\n\n\t/**\n\t * Set the return address stack offset.\n\t * @param offset offset of return address.\n\t */\n\tpublic void setReturnAddressOffset(int offset);\n\n\t/**\n\t * Get the return address stack offset.\n\t *\n\t * @return return address offset.\n\t */\n\tpublic int getReturnAddressOffset();\n\n\t/**\n\t * Get the stack variable containing offset. This may fall in\n\t * the middle of a defined variable.\n\t *\n\t * @param offset offset of on stack to get variable.\n\t */\n\tpublic Variable getVariableContaining(int offset);\n\n\t/**\n\t * Create a stack variable. It could be a parameter or a local depending\n\t * on the direction of the stack.\n\t * <p><B>WARNING!</B> Use of this method to add parameters may force the function\n\t * to use custom variable storage. In addition, parameters may be appended even if the\n\t * current calling convention does not support them.\n\t * @throws DuplicateNameException if another variable(parameter or local) already\n\t * exists in the function with that name.\n\t * @throws InvalidInputException if data type is not a fixed length or variable name is invalid.\n\t * @throws VariableSizeException if data type size is too large based upon storage constraints.\n\t */\n\tpublic Variable createVariable(String name, int offset, DataType dataType, SourceType source)\n\t\t\tthrows DuplicateNameException, InvalidInputException;\n\n\t/**\n\t * Clear the stack variable defined at offset\n\t *\n\t * @param offset Offset onto the stack to be cleared.\n\t */\n\tpublic void clearVariable(int offset);\n\n\t/**\n\t * Get all defined stack variables.\n\t * Variables are returned from least offset (-) to greatest offset (+)\n\t *\n\t * @return an array of parameters.\n\t */\n\tpublic Variable[] getStackVariables();\n\n\t/**\n\t * Get all defined parameters as stack variables.\n\t *\n\t * @return an array of parameters.\n\t */\n\tpublic Variable[] getParameters();\n\n\t/**\n\t * Get all defined local variables.\n\t *\n\t * @return an array of all local variables\n\t */\n\tpublic Variable[] getLocals();\n\n\t/**\n\t * A stack that grows negative has local references negative and\n\t * parameter references positive. A positive growing stack has\n\t * positive locals and negative parameters.\n\t *\n\t * @return true if the stack grows in a negative direction.\n\t */\n\tpublic boolean growsNegative();\n}", "public interface StackTrace {\r\n\r\n\t /**\r\n\t * Gets the class from which the stack is tracking.\r\n\t * \r\n\t * @return\t\t\tThe name of the class\r\n\t */\r\n public String getClazz();\r\n\r\n /**\r\n * Sets the class from which the stack should tracking.\r\n * \r\n * @param clazz\tThe name of the class\r\n */\r\n public void setClazz(String clazz);\r\n\r\n /**\r\n * Gets the current message from the StackTrace.\r\n * \r\n * @return\t\t\tThe message\r\n */\r\n public String getMessage();\r\n\r\n /**\r\n * Sets a message to the StackTrace.\r\n * \r\n * @param message\tThe message\r\n */\r\n public void setMessage(String message);\r\n\r\n /**\r\n * Gets the current stack.\r\n * \r\n * @return\t\t\tThe current stack\r\n */\r\n public String getStack();\r\n\r\n /**\r\n * Sets the current stack.\r\n * \r\n * @param stack\tThe new stack\r\n */\r\n public void setStack(String stack);\r\n}", "public interface Stack<E> {\n\n\t/**\n\t * Test to see if the stack is empty\n\t * \n\t * @return true is size ==0, false otherwise\n\t */\n\tpublic boolean isEmpty();\n\t\n\t/**\n\t * Push the value on top of the Stack\n\t * \n\t * @param value\n\t */\n\tpublic void push(E value);\n\n\t/**\n\t * Pop the value from the top of the stack.\n\t * \n\t * @return popped off value\n\t */\n\tpublic E pop();\n\n\t/**\n\t * Looks at the object at the top of the stack without removing it.\n\t * \n\t * @return\n\t */\n\tpublic E peek();\n\n\t/**\n\t * Does the stack contain the value.\n\t * \n\t * @param value\n\t * \n\t * @return true if found, false otherwise\n\t */\n\tpublic boolean contains(E value);\n\n\t/**\n\t * Returns the current size of the stack.\n\t * \n\t * @return\n\t */\n\tpublic int size();\n\n}", "public interface StackTest<T> {\n\n T pop();\n void push(T t);\n boolean isEmpty();\n int getSize();\n}", "public interface IStack<T> {\n\t\n\tpublic int getCurrentSize();\n\t/** push to the end of the stack\n\t * @return the current stack size\n\t */\n\tpublic void push(T aValue);\n\t/** pop last elements off stack\n\t * @return the last value of the stack\n\t */\n\tpublic T pop();\n\t/** get frequency of given value\n\t * @param aValue to find frequency of\n\t * @return number of occurrences\n\t */\n\tpublic boolean isEmpty();\n\n\tpublic T[] toArray();\n}", "public interface Stack<E> {\n\n void push(E e) throws FullStackException;\n E pop() throws EmptyStackException; //devuelves / sacas un Elemento\n int size();\n}", "public interface StackADT<E>\r\n{\r\n\t//Adds one item to the top of the stack\r\n\tpublic void push(E item);\r\n\r\n\t//Removes and returns the top item from the stack\r\n\tpublic E pop();\r\n\r\n\t//Returns the top-most item on the stack without removing it\r\n\tpublic E peek();\r\n\r\n\t// Returns whether the stack is empty\r\n\tpublic boolean isEmpty();\r\n\r\n\t// Returns the number of items in the stack\r\n\tpublic int size();\r\n\r\n\t// Returns a string representing the state of the stack\r\n\tpublic String toString();\r\n}", "interface YoStack<E> {\n public boolean isEmpty();\n public E push(E e);\n public E pop() throws EmptyStackException;\n public E peek() throws EmptyStackException;\n}", "public interface Stack<T> extends Iterable<T> {\n\n // -----------------------\n // Base Function\n // -----------------------\n\n /**\n * push object to stack\n * @param item object, the item could be null\n */\n void push(T item);\n\n T pop();\n\n int size();\n\n boolean isEmpty();\n\n /**\n * get the last element, but not pop it\n * @return the top element\n */\n T peek();\n\n // ---------------------\n // Extend Function\n // ---------------------\n default boolean isNotEmpty() {\n return !isEmpty();\n }\n\n}", "public interface PersistentStack<E> {\n public boolean isEmpty();\n public E peek();\n public PersistentStack<E> pop();\n public PersistentStack<E> push(E elem);\n public int size();\n}", "public Stack getStack() {\r\n\t\treturn stack;\r\n\t}", "@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }", "public void setStack(String stack);", "public interface INetStack<T> {\n\n void get(final String url, final Net.Parser<T> parser,\n final Net.Callback<T> callback, final Object tag);\n\n void post(final String url, final RequestParams params,\n final Net.Parser<T> parser,\n final Net.Callback<T> callback, final Object tag);\n\n void onNetResponse(final Net.Parser<T> parser,\n final Net.Callback<T> callback,\n final String response);\n\n void onError(final Net.Callback<T> callback, final String msg);\n\n void cancel(Object tag);\n}", "public interface Stack {\n\n /**\n * Pushes the given element into the array.\n * \n * @param element\n */\n void push(int element);\n\n /**\n * Returns the element from the stack, then removes that element by\n * assigning the default value to it.\n * \n * @return\n */\n int pop();\n}", "MyStack(){\r\n\t\tsuper();\r\n\t}", "public Stacked(){\n count = 0;\n stackArray = (E[]) new Object[START_CAP];\n }", "void setStack(JainTcapStack stack);", "public MyStack() {\n\n }", "public StackImpl() {\r\n\t\t\r\n\t}", "@Test\n public void testStack() {\n DatastructureTest.STACK.push(3);\n DatastructureTest.STACK.push(7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == -1);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == -1);\n }", "public Stack getStack(int slot);", "Stack(Recycler<T> parent, Thread thread, int maxCapacity, int maxSharedCapacityFactor, int ratioMask, int maxDelayedQueues)\r\n/* 408: */ {\r\n/* 409:440 */ this.parent = parent;\r\n/* 410:441 */ this.threadRef = new WeakReference(thread);\r\n/* 411:442 */ this.maxCapacity = maxCapacity;\r\n/* 412:443 */ this.availableSharedCapacity = new AtomicInteger(Math.max(maxCapacity / maxSharedCapacityFactor, Recycler.LINK_CAPACITY));\r\n/* 413:444 */ this.elements = new Recycler.DefaultHandle[Math.min(Recycler.INITIAL_CAPACITY, maxCapacity)];\r\n/* 414:445 */ this.ratioMask = ratioMask;\r\n/* 415:446 */ this.maxDelayedQueues = maxDelayedQueues;\r\n/* 416: */ }", "public MyStack() {\r\n stack = new LinkedList<>();\r\n }", "public Vector<Command> getStack() {\r\n\t\treturn stack;\r\n\t}", "@Test\n public void testStackCodeExamples() {\n logger.info(\"Beginning testStackCodeExamples()...\");\n\n // Allocate an empty stack\n Stack<String> stack = new Stack<>();\n logger.info(\"Start with an empty stack: {}\", stack);\n\n // Push a rock onto it\n String rock = \"rock\";\n stack.pushElement(rock);\n assert stack.getTop().equals(rock);\n logger.info(\"Push a rock on it: {}\", stack);\n\n // Push paper onto it\n String paper = \"paper\";\n stack.pushElement(paper);\n assert stack.getTop().equals(paper);\n logger.info(\"Push paper on it: {}\", stack);\n\n // Push scissors onto it\n String scissors = \"scissors\";\n stack.pushElement(scissors);\n assert stack.getTop().equals(scissors);\n assert stack.getSize() == 3;\n logger.info(\"Push scissors on it: {}\", stack);\n\n // Pop off the scissors\n assert stack.popElement().equals(scissors);\n assert stack.getSize() == 2;\n logger.info(\"Pop scissors from it: {}\", stack);\n\n // Pop off the paper\n assert stack.popElement().equals(paper);\n assert stack.getSize() == 1;\n logger.info(\"Pop paper from it: {}\", stack);\n\n // Pop off the rock\n assert stack.popElement().equals(rock);\n assert stack.isEmpty();\n logger.info(\"Pop rock from it: {}\", stack);\n\n logger.info(\"Completed testStackCodeExamples().\\n\");\n }", "public void push(AnyType e) throws StackException;", "public void testMyStack() {\n\t\tMyStack<String> s = new MyStack<String>();\n\t\ts.push(\"1\");\n\t\ts.push(\"2\");\n\t\ts.push(\"3\");\n\t\ts.pop();\n\t\ts.push(\"4\");\n\t\ts.toString();\n\t\tSystem.out.println(\"MyStack size is: \" + s.size());\n\t}", "public boolean isStackable() {\r\n\t\treturn stackable;\r\n\t}", "public interface StackMessageFactory {\n /**\n * Make a new SIPServerResponse given a SIPRequest and a message\n * channel.\n *\n * @param sipRequest is the incoming request.\n * @param sipTransaction is the message channel on which this request was\n * received.\n */\n public ServerRequestInterface newSIPServerRequest(\n SIPRequest sipRequest,\n SIPTransaction sipTransaction);\n\n /**\n * Generate a new server response for the stack.\n *\n * @param sipResponse is the incoming response.\n * @param msgChannel is the message channel on which the response was\n * received.\n */\n public ServerResponseInterface newSIPServerResponse(\n SIPResponse sipResponse,\n MessageChannel msgChannel);\n}", "public MyStack() {\n\n }", "@Test\n public void testSingleStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n\n Assert.assertEquals(\"[1]\", ps.toString());\n }", "public int getStackSize() {\n\t\treturn stackSize;\n\t}", "public void setStack(int slot, Stack stack);", "public OpStack() {\n opStack = new Stack();\n }", "public StackMachineService(CustomStack customStack) {\n this.customStack = customStack;\n }", "public StackPushSingle()\n {\n super(\"PushStackSingle\");\n }", "@Override\n <E> Stack<E> getStack(String list) {\n if (list.equalsIgnoreCase(\"Simple\")){\n return new StackSinglyLinkedList<E>();\n\n } else if (list.equalsIgnoreCase(\"Doble\")){\n return new StackDoublyLinkedList<E>();\n\n } else if (list.equalsIgnoreCase(\"Circular\")){\n return new StackCircularList<E>();\n\n }\n\n return null;\n }", "public Stack() {\n stack = new Object[1];\n minStackSize = 1;\n top = -1;\n }", "public MyStack() {\n @SuppressWarnings(\"unchecked\")\n T[] newStack = (T[]) new Object[DEFAULT_STACK_SIZE];\n stackArray = newStack;\n stackSize = 0;\n }", "public Stack(Stack stk){\n this(stk.getStack());\n }", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Fixed Stack\");\r\n\t\t\r\n\t}", "public Stack() {}", "private OperandStack stack(){\n\t\treturn frame.getStack();\n\t}", "public ArrayStack(){\r\n\t\tstack= new Object[DEFAULT_SIZE];\r\n\t\t}", "@Override public void visitFrame(\n int type,\n int nLocal,\n Object[] local,\n int nStack,\n Object[] stack) {}", "@Override\n\tpublic void visitFrame(int type, int nLocal, Object[] local, int nStack,\n\t\t\tObject[] stack) {\n\t}", "public MyStack() {\n this.queue=new LinkedList<Integer>();\n }", "public ArrayStack() {\n\t\ttop = 0;\t\t\t\t\t\t\t\t\t\t// points to the first element. Since empty, points 0\n\t\tstack = (T[]) (new Object[DEFAULT_CAPACITY]);\t// Casting to whatever is our desired element.\n\t}", "public interface StackManipulation {\n\n /**\n * Determines if this stack manipulation is valid.\n *\n * @return If {@code false}, this manipulation cannot be applied and should throw an exception.\n */\n boolean isValid();\n\n /**\n * Applies the stack manipulation that is described by this instance.\n *\n * @param methodVisitor The method visitor used to write the method implementation to.\n * @param implementationContext The context of the current implementation.\n * @return The changes to the size of the operand stack that are implied by this stack manipulation.\n */\n Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext);\n\n /**\n * Canonical representation of an illegal stack manipulation.\n */\n enum Illegal implements StackManipulation {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n public boolean isValid() {\n return false;\n }\n\n /**\n * {@inheritDoc}\n */\n public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {\n throw new IllegalStateException(\"An illegal stack manipulation must not be applied\");\n }\n }\n\n /**\n * Canonical representation of a legal stack manipulation which does not require any action.\n */\n enum Trivial implements StackManipulation {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n public boolean isValid() {\n return true;\n }\n\n /**\n * {@inheritDoc}\n */\n public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {\n return StackSize.ZERO.toIncreasingSize();\n }\n }\n\n /**\n * A description of the size change that is imposed by some\n * {@link StackManipulation}.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class Size {\n\n /**\n * A size of zero.\n */\n public static final Size ZERO = new Size(0, 0);\n\n /**\n * The impact of any size operation onto the operand stack. This value can be negative if more values\n * were consumed from the stack than added to it.\n */\n private final int sizeImpact;\n\n /**\n * The maximal size of stack slots this stack manipulation ever requires. If an operation for example pushes\n * five values onto the stack and subsequently consumes three operations, this value should still be five\n * to express that a stack operation requires at least five slots in order to be applicable.\n */\n private final int maximalSize;\n\n /**\n * Creates an immutable descriptor of the size change that is implied by some stack manipulation.\n *\n * @param sizeImpact The change of the size of the operand stack that is implied by some stack manipulation.\n * @param maximalSize The maximal stack size that is required for executing this stack manipulation. Should\n * never be negative number.\n */\n public Size(int sizeImpact, int maximalSize) {\n this.sizeImpact = sizeImpact;\n this.maximalSize = maximalSize;\n }\n\n /**\n * Returns the size change on the operand stack that is represented by this instance.\n *\n * @return The size change on the operand stack that is represented by this instance.\n */\n public int getSizeImpact() {\n return sizeImpact;\n }\n\n /**\n * Returns the maximal interim size of the operand stack that is represented by this instance.\n *\n * @return The maximal interim size of the operand stack that is represented by this instance.\n */\n public int getMaximalSize() {\n return maximalSize;\n }\n\n /**\n * Concatenates this size representation with another size representation in order to represent the size\n * change that is represented by both alterations of the operand stack size.\n *\n * @param other The other size representation.\n * @return A new size representation representing both stack size requirements.\n */\n public Size aggregate(Size other) {\n return aggregate(other.sizeImpact, other.maximalSize);\n }\n\n /**\n * Aggregates a size change with this stack manipulation size.\n *\n * @param sizeChange The change in size the other operation implies.\n * @param interimMaximalSize The interim maximal size of the operand stack that the other operation requires\n * at least to function.\n * @return The aggregated size.\n */\n private Size aggregate(int sizeChange, int interimMaximalSize) {\n return new Size(sizeImpact + sizeChange, Math.max(maximalSize, sizeImpact + interimMaximalSize));\n }\n }\n\n /**\n * An abstract base implementation of a valid stack manipulation.\n */\n abstract class AbstractBase implements StackManipulation {\n\n /**\n * {@inheritDoc}\n */\n public boolean isValid() {\n return true;\n }\n }\n\n /**\n * An immutable stack manipulation that aggregates a sequence of other stack manipulations.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class Compound implements StackManipulation {\n\n /**\n * The stack manipulations this compound operation represents in their application order.\n */\n private final List<StackManipulation> stackManipulations;\n\n /**\n * Creates a new compound stack manipulation.\n *\n * @param stackManipulation The stack manipulations to be composed in the order of their composition.\n */\n public Compound(StackManipulation... stackManipulation) {\n this(Arrays.asList(stackManipulation));\n }\n\n /**\n * Creates a new compound stack manipulation.\n *\n * @param stackManipulations The stack manipulations to be composed in the order of their composition.\n */\n public Compound(List<? extends StackManipulation> stackManipulations) {\n this.stackManipulations = new ArrayList<StackManipulation>();\n for (StackManipulation stackManipulation : stackManipulations) {\n if (stackManipulation instanceof Compound) {\n this.stackManipulations.addAll(((Compound) stackManipulation).stackManipulations);\n } else if (!(stackManipulation instanceof Trivial)) {\n this.stackManipulations.add(stackManipulation);\n }\n }\n }\n\n /**\n * {@inheritDoc}\n */\n public boolean isValid() {\n for (StackManipulation stackManipulation : stackManipulations) {\n if (!stackManipulation.isValid()) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * {@inheritDoc}\n */\n public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {\n Size size = Size.ZERO;\n for (StackManipulation stackManipulation : stackManipulations) {\n size = size.aggregate(stackManipulation.apply(methodVisitor, implementationContext));\n }\n return size;\n }\n }\n\n /**\n * An implementation of {@link StackManipulation} that simplifies functional invocations via lambda expressions.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class Simple extends StackManipulation.AbstractBase {\n\n /**\n * The dispatcher to use.\n */\n private final Dispatcher dispatcher;\n\n /**\n * Creates a new stack manipulation for a dispatcher.\n *\n * @param dispatcher The dispatcher to use.\n */\n public Simple(Dispatcher dispatcher) {\n this.dispatcher = dispatcher;\n }\n\n /**\n * {@inheritDoc}\n */\n public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {\n return dispatcher.apply(methodVisitor, implementationContext);\n }\n\n /**\n * A dispatcher for an instance of {@link Simple}.\n */\n public interface Dispatcher {\n\n /**\n * A valid implementation of {@link StackManipulation#apply(MethodVisitor, Implementation.Context)}.\n *\n * @param methodVisitor The method visitor used to write the method implementation to.\n * @param implementationContext The context of the current implementation.\n * @return The changes to the size of the operand stack that are implied by this stack manipulation.\n */\n Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext);\n }\n }\n}", "Stack_Using_Arrays(){\n\t\ttop=-1;\n\t}", "public void pushStack(int newStack){\n // creates a new object\n GenericStack temp = new GenericStack(newStack);\n temp.next = top;\n top = temp;\n }", "@Test\n\tpublic void testGetStack() {\n\t\tip = new ImagePlus();\n\t\tst = ip.getStack();\n\t\tassertEquals(1,ip.getStackSize());\n\n\t\t// if stack == null and not proc == null and no info string\n\t\t// do stuff and setRoi() if needed\n\t\tproc = new ByteProcessor(1,1,new byte[] {22}, null);\n\t\tip = new ImagePlus(\"CareBearStation\",proc);\n\t\tst = ip.getStack();\n\t\tassertEquals(1,ip.getStackSize());\n\t\tassertNull(st.getSliceLabel(1));\n\t\tassertEquals(proc.getColorModel(),st.getColorModel());\n\t\tassertEquals(proc.getRoi(),st.getRoi());\n\n\t\t// if stack == null and not proc == null and yes info string\n\t\t// do stuff and setRoi() if needed\n\t\tproc = new ByteProcessor(1,1,new byte[] {22}, null);\n\t\tip = new ImagePlus(\"CareBearStation\",proc);\n\t\tip.setProperty(\"Info\",\"SnapDragon\");\n\t\tst = ip.getStack();\n\t\tassertEquals(1,ip.getStackSize());\n\t\tassertEquals(\"CareBearStation\\nSnapDragon\",st.getSliceLabel(1));\n\t\tassertEquals(proc.getColorModel(),st.getColorModel());\n\t\tassertEquals(proc.getRoi(),st.getRoi());\n\n\t\t// if not stack == null\n\t\t// do stuff and setRoi() if needed\n\t\tproc = new ByteProcessor(1,1,new byte[] {22}, null);\n\t\tip = new ImagePlus(\"CareBearStation\",proc);\n\t\tst = new ImageStack(1,1);\n\t\tst.addSlice(\"Fixed\", proc);\n\t\tst.addSlice(\"Crooked\", proc);\n\t\tip.setStack(\"Odds\",st);\n\t\tst = ip.getStack();\n\t\tassertEquals(2,ip.getStackSize());\n\t\tassertEquals(proc.getColorModel(),st.getColorModel());\n\t\tassertEquals(proc.getRoi(),st.getRoi());\n\t}", "public MyStack() {\n objects = new LinkedList<>();\n helper = new LinkedList<>();\n }", "@Test\n\tpublic void test1(){\n\t\tI_Stack<String> is = new I_Stack<String>();\n\t\tis.push(\"string1\");\n\t\tis.push(\"string2\");\n\t\tis.show(System.out);\n\t\t\n\t}", "static void stackPush(Stack<Integer> stack)\r\n\t{\r\n\t\tfor(int i=0;i<5;i++)\r\n\t\t{\r\n\t\t\tstack.push(i*5);\r\n\t\t}\r\n\t\tSystem.out.println(\"Printing the stack value which is push:\");\r\n\t\tSystem.out.println(\"Push :\"+stack +\"\\nsize of stack: \"+ stack.size());\r\n\t}", "@Test\n public void testPushTop(){\n ms = new MyStack();\n ms.push(2);\n assertEquals(2,ms.top());\n }", "@SubL(source = \"cycl/stacks.lisp\", position = 2898) \n public static final SubLObject stack_push(SubLObject item, SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_elements(stack, cons(item, stack_struc_elements(stack)));\n _csetf_stack_struc_num(stack, Numbers.add(stack_struc_num(stack), ONE_INTEGER));\n return stack;\n }", "public Stack() {\n stack = new LinkedList();\n }", "public NotationStack() {\r\n\t\tstack = new ArrayList<T>(1000);\r\n\t\tsize = 1000;\r\n\t}", "public interface IItemList<StackType extends IAEStack> extends IItemContainer<StackType>, Iterable<StackType>\n{\n\n\t/**\n\t * add a stack to the list stackSize is used to add to stackSize, this will merge the stack with an item already in\n\t * the list if found.\n\t * \n\t * @param option stacktype option\n\t */\n\tpublic void addStorage(StackType option); // adds a stack as stored\n\n\t/**\n\t * add a stack to the list as craftable, this will merge the stack with an item already in the list if found.\n\t * \n\t * @param option stacktype option\n\t */\n\tpublic void addCrafting(StackType option);\n\n\t/**\n\t * add a stack to the list, stack size is used to add to requestable, this will merge the stack with an item already\n\t * in the list if found.\n\t * \n\t * @param option stacktype option\n\t */\n\tpublic void addRequestable(StackType option); // adds a stack as requestable\n\n\t/**\n\t * @return the first item in the list\n\t */\n\tStackType getFirstItem();\n\n\t/**\n\t * @return the number of items in the list\n\t */\n\tint size();\n\n\t/**\n\t * allows you to iterate the list.\n\t */\n\t@Override\n\tpublic Iterator<StackType> iterator();\n\n\t/**\n\t * resets stack sizes to 0.\n\t */\n\tvoid resetStatus();\n\n}", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Dynamic Stack\");\r\n\t}", "@Test\n public void testPushCallTop(){\n ms = new MyStack();\n ms.push(1);\n ms.top();\n assertFalse(ms.IsEmpty());\n }", "@Test\n public void push() {\n SimpleStack stack = new DefaultSimpleStack();\n Item item = new Item();\n\n // When the item is pushed in the stack\n stack.push(item);\n\n // Then…\n assertFalse(\"The stack must be not empty\", stack.isEmpty());\n assertEquals(\"The stack constains 1 item\", 1, stack.getSize());\n assertSame(\"The pushed item is on top of the stack\", item, stack.peek());\n }", "static void stack_peek(Stack<Integer> stack)\r\n\t{\r\n\t\tInteger element=stack.peek();\r\n\t\tSystem.out.println(\"Element on stack top :\" + element);\r\n\t}", "public DSAStack()\n {\n stack = new DSALinkedList<E>();\n }", "public MyStack() {\n this.q = new LinkedList<>();\n }", "public static void main(String[] args) throws Exception {\n\t\t// TODO Auto-generated method stub\n\t\tLinkedListAsStack stack = new LinkedListAsStack();\n\t\tstack.push(10);\n\t\tstack.push(20);\n\t\tstack.push(30);\n\t\tstack.push(40);\n\t\tstack.display();// 40 30 20 10-> act as a stack\n\t\tSystem.out.println(stack.size());// 4\n\t\tSystem.out.println(stack.isEmpty());// false\n\t\tSystem.out.println(stack.pop());// 40\n\t\tSystem.out.println(stack.top());// 30\n\t\tstack.display();// 30 20 10\n\t\tSystem.out.println(stack.size());// 3\n\t}", "public static void main(String[] args) {\n\r\n\r\n\r\n\t\tPerson p1 = new Person(\"1\", \"Nishant\");\r\n\t\tPerson p2 = new Person(\"2\", \"Nikhil\");\r\n\t\t\r\n\t\tPersonStack ps = new PersonStack();\r\n\t\t\r\n\t\tps.push(p1);\r\n\t\tps.push(p2);\r\n\t\t\r\n\t\tSystem.out.println(ps.pop().toString());\r\n\t\tSystem.out.println(ps.pop().toString());\r\n\t\t\r\n\r\n\t}", "public GMap<Integer, Stack> getStacks();", "public MyStack() {\n queue = new LinkedList<>();\n }", "@Test\n public void testStackInteger() {\n DatastructureTest.INTSTACK.push(3);\n DatastructureTest.INTSTACK.push(7);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == 7);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == 7);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == 3);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == 3);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == -1);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == -1);\n }", "@Test\n public void testPush(){\n ms=new MyStack();\n ms.push(1);\n assertFalse(ms.IsEmpty());\n }", "public MyDynamicStack() {\r\n items = new LinkedList<>();\r\n }", "public static void main(String[] args) {\n// System.out.println(\"as.getSize() == \" + as.getSize());\n// as.pop();\n// System.out.println(\"as.pop() == \" + as);\n// System.out.println(\"as.peek() == \" + as.peek());\n// as.push(\"17\");\n// System.out.println(as);\n\n LinkedListStack<Integer> stack = new LinkedListStack<>();\n\n for(int i = 0 ; i < 5 ; i ++){\n stack.push(i);\n System.out.println(stack);\n }\n\n stack.pop();\n System.out.println(stack);\n\n }", "public void toStackMode() {\n\t\t// TODO Write me!\n\n\t}", "public MyStack(){\n\ta = new String[10];\n\ttop = -1;\n }", "private void _visitStackAccessor(Instruction o){\n\t\tint consume = o.consumeStack(cpg); // Stack values are always consumed first; then produced.\n\t\tif (consume > stack().slotsUsed()){\n\t\t\tconstraintViolated((Instruction) o, \"Cannot consume \"+consume+\" stack slots: only \"+stack().slotsUsed()+\" slot(s) left on stack!\\nStack:\\n\"+stack());\n\t\t}\n\n\t\tint produce = o.produceStack(cpg) - ((Instruction) o).consumeStack(cpg); // Stack values are always consumed first; then produced.\n\t\tif ( produce + stack().slotsUsed() > stack().maxStack() ){\n\t\t\tconstraintViolated((Instruction) o, \"Cannot produce \"+produce+\" stack slots: only \"+(stack().maxStack()-stack().slotsUsed())+\" free stack slot(s) left.\\nStack:\\n\"+stack());\n\t\t}\n\t}", "public CustomStack() {\n this.myCustomStack = new Object[10]; //array starts with 10 spaces, all empty\n numElements = 0; //stack starts with zero elements\n\n }", "public void push(E object) {stackList.insertAtFront(object);}", "public SolutionStack()\n {\n stack = new ArrayList<ILocation>(0);\n top = 0;\n }", "public void showStack() {\n\n\t\t/*\n\t\t * Traverse the stack by starting at the top node and then get to the\n\t\t * next node by setting to current node \"pointer\" to the next node until\n\t\t * Null is reached.\n\t\t */\n\t\tNode<T> current = getTopNode();\n\n\t\tSystem.out.println(\"\\n---------------------\");\n\t\tSystem.out.println(\"STACK INFO\");\n\n\t\twhile (current != null) {\n\t\t\tSystem.out.println(\"Node Data: \" + current.data);\n\t\t\tcurrent = current.nextNode;\n\t\t}\n\n\t\tSystem.out.println(\"<< Stack Size: \" + getStackSize() + \" >>\");\n\t\tSystem.out.println(\"----------------------\");\n\n\t}", "public MyStack() {\n queue = new LinkedList<>();\n }", "public int getSize(){\n return this.stack.size();\n }", "public Stack() {\n \tstack = new ArrayList<T>();\n }", "@Test\r\n public void testStackstack() {\r\n StackArrayList<Integer> stack = new StackArrayList<Integer>();\r\n\r\n stack.push(1);\r\n stack.push(2);\r\n stack.push(3);\r\n stack.push(4);\r\n stack.push(5);\r\n\r\n assertEquals(5, stack.peek());\r\n assertEquals(5, stack.pop());\r\n assertEquals(4, stack.size());\r\n }", "public SIPTransactionStack getSIPStack() {\n return sipStack;\n }", "public static final SubLObject setup_stacks_file() {\n Structures.register_method(print_high.$print_object_method_table$.getGlobalValue(), $dtp_stack$.getGlobalValue(), Symbols.symbol_function($sym7$STACK_PRINT_FUNCTION_TRAMPOLINE));\n Structures.def_csetf($sym8$STACK_STRUC_NUM, $sym9$_CSETF_STACK_STRUC_NUM);\n Structures.def_csetf($sym10$STACK_STRUC_ELEMENTS, $sym11$_CSETF_STACK_STRUC_ELEMENTS);\n Equality.identity($sym0$STACK);\n access_macros.register_macro_helper($sym24$DO_STACK_ELEMENTS_STACK_ELEMENTS, $sym25$DO_STACK_ELEMENTS);\n Structures.register_method(print_high.$print_object_method_table$.getGlobalValue(), $dtp_locked_stack$.getGlobalValue(), Symbols.symbol_function($sym36$LOCKED_STACK_PRINT_FUNCTION_TRAMPOLINE));\n Structures.def_csetf($sym37$LOCKED_STACK_STRUC_LOCK, $sym38$_CSETF_LOCKED_STACK_STRUC_LOCK);\n Structures.def_csetf($sym39$LOCKED_STACK_STRUC_STACK, $sym40$_CSETF_LOCKED_STACK_STRUC_STACK);\n Equality.identity($sym29$LOCKED_STACK);\n return NIL;\n }", "public void push(Object ob){\n \t Stack n_item=new Stack(ob);\n \tn_item.next=top;\n \ttop=n_item;\n }", "public boolean appendStack(final StackInterface pStack);", "public void visitStackInstruction(StackInstruction o){\n\t\t_visitStackAccessor(o);\n\t}" ]
[ "0.7751267", "0.7571999", "0.7503748", "0.74488026", "0.73504305", "0.7310138", "0.72441024", "0.71950406", "0.718321", "0.7126316", "0.7119556", "0.7101305", "0.70880884", "0.70819587", "0.70719624", "0.70220745", "0.6983954", "0.69664705", "0.6759774", "0.67199427", "0.6609459", "0.6576779", "0.6557511", "0.65391636", "0.6482009", "0.6470024", "0.645819", "0.63594514", "0.6337149", "0.632229", "0.6287999", "0.6261263", "0.62590116", "0.62584716", "0.62546736", "0.6252842", "0.6234187", "0.6230077", "0.6218873", "0.62139624", "0.6210583", "0.6202596", "0.62004167", "0.6191315", "0.61704904", "0.61685455", "0.615369", "0.61515045", "0.61361843", "0.61010695", "0.6089142", "0.60807437", "0.60631675", "0.60607016", "0.60476416", "0.60468835", "0.6032482", "0.60318124", "0.60250723", "0.6018832", "0.6013875", "0.6011118", "0.6009993", "0.6004195", "0.5971511", "0.5954511", "0.5933875", "0.59324265", "0.59103966", "0.5887868", "0.58843714", "0.5872816", "0.5867834", "0.58665335", "0.58633006", "0.5859856", "0.58598524", "0.58562887", "0.58559895", "0.5851606", "0.5845524", "0.5838144", "0.5832954", "0.5830381", "0.5829634", "0.5827998", "0.58259106", "0.58199525", "0.58196545", "0.5816363", "0.581592", "0.58154255", "0.58150107", "0.5813047", "0.5808191", "0.5807299", "0.5807066", "0.5805708", "0.5783845", "0.5777334" ]
0.7332626
5
A method returns top element and removes it from the stack
int pop();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}", "public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}", "public GenericStack popStack(){\n if(isEmpty() == true)return null;\n GenericStack temp = top;\n // makes next item in list the tip\n top = top.next;\n return temp;\n }", "public T pop() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//remove top element from stack\n\t\t//and \"clear to let GC do its work\"\n\t\treturn elements.remove(elements.size() - 1);\n\t}", "@Override\n\tpublic T pop() {\n\t\tif(isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is Empty\");\n\t\treturn null;}\n\t\ttop--;\t\t\t\t\t\t//top-- now before since we need index top-1\n\t\tT result = stack[top];\n\t\tstack[top] = null;\n\t\treturn result;\n\t\t\t\n\t}", "public T pop() {\r\n\t\tT ele = top.ele;\r\n\t\ttop = top.next;\r\n\t\tsize--;\r\n\t\t\r\n\t\treturn ele;\r\n\t}", "public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}", "public Object pop()\r\n {\n assert !this.isEmpty();\r\n\t\t\r\n Node oldTop = this.top;\r\n this.top = oldTop.getNext();\r\n oldTop.setNext(null); // enable garbage collection\r\n return oldTop.getItem();\r\n }", "public Object pop() {\n if (top >= 0) {\n Object currentObject = stack[top--];\n if (top > minStackSize) {\n decreaseStackSize(1);\n }\n return currentObject;\n }\n else {\n return null;\n }\n }", "public T pop() {\n T top = peek();\n stack[topIndex] = null;\n topIndex--;\n return top;\n }", "public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }", "public E pop()\n {\n E topVal = stack.removeFirst();\n return topVal;\n }", "public T pop() {\r\n if ( top == null )\r\n throw new IllegalStateException(\"Can't pop from an empty stack.\");\r\n T topItem = top.item; // The item that is being popped.\r\n top = top.next; // The previous second item is now on top.\r\n return topItem;\r\n }", "public T pop() {\n \tT retVal = stack.get(stack.size() - 1); // get the value at the top of the stack\n \tstack.remove(stack.size() - 1); // remove the value at the top of the stack\n \treturn retVal;\n }", "public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }", "private synchronized BackStep pop() {\r\n\t\t\tBackStep bs;\r\n\t\t\tbs = stack[top];\r\n\t\t\tif (size == 1) {\r\n\t\t\t\ttop = -1;\r\n\t\t\t} else {\r\n\t\t\t\ttop = (top + capacity - 1) % capacity;\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\treturn bs;\r\n\t\t}", "public E pop(){\n return this.stack.remove(stack.size()-1);\n }", "public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}", "public void pop();", "public Item pop() {\n if(isEmpty()) return null;\n Item item = top.data;\n top = top.next;\n size--;\n return item;\n\n }", "Object pop();", "public Object pop() {\n if (top != null) {\n Object item = top.getOperand();\n\n top = top.next;\n return item;\n }\n\n System.out.println(\"Stack is empty\");\n return null;\n\n }", "public E pop () {\n\t\treturn stack.remove( stack.size()-1 );\t\t\n\t}", "public T pop() {\n\t\tT value = null;\n\t\tif (!isEmpty()) {\n\t\t\ttop = top.next;\n\t\t\tvalue = top.value;\n\t\t}\n\t\treturn value; // returning popped value\n\t}", "public Object pop();", "public Item pop(Item item){\n\nif(isEmpty()) throw new NoSuchElementException(\"Stack undervflow\"); \n Item item =top.item;\n top = top.next;\n N--;\n return item;\n}", "public K pop() {\n\t\tK data = null;\r\n\t\tif(top!=null){\r\n\t\t\tdata = top.data;\r\n\t\t\ttop = top.next;\r\n\t\t\tsize--;\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "@Override\n\tpublic T top()\n\t{\n if(list.size()==0)\n {\n throw new IllegalStateException(\"Stack is empty\");\n }\n return list.get(getSize()-1);\n\t}", "int pop()\n\t{\n // Your code here\n if(top == -1){\n return -1;\n }\n int x = arr[top];\n top--;\n return x;\n\t}", "@Override\n public E pop() {\n E result = peek();\n storage[ top-- ] = null;\n return result;\n\n }", "@Override\n\tpublic E pop() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\tE element = arr[top];\n\t\tarr[top--] = null;\n\t\treturn element;\n\t}", "public TYPE pop();", "public T top() {\n \treturn stack.get(stack.size() - 1);\n }", "public void pop()\n {\n this.top = this.top.getNext();\n }", "@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "public T pop() {\n if(isEmpty()) {\n throw new NoSuchElementException(\"Stack is empty\");\n }\n return this.stackArray[top--];\n }", "@Override\n public T pop(){\n\n if (arrayAsList.isEmpty()){\n throw new IllegalStateException(\"Stack is empty. Nothing to pop!\");\n }\n\n T tempElement = arrayAsList.get(stackPointer - 1);\n arrayAsList.remove(--stackPointer);\n\n return tempElement;\n }", "public E pop(){\r\n Node<E> curr = top;\r\n top = top.getNext();\r\n size--;\r\n return (E)curr.getData();\r\n \r\n }", "private T pop(Node topNode)\n {\n if (isEmpty())\n {\n return null;\n }\n else // not empty\n {\n T result = (T) topNode.getData();\n first = topNode.getNextNode();\n return result;\n }\n }", "public int pop(){\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n int tmp=myarray[top];\n top--;\n return tmp;\n \n \n }", "T pop();", "T pop();", "T pop();", "public E popTop() {\n // FILL IN\n }", "private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}", "public int pop() {\r\n LinkedList<Integer> queue = new LinkedList<>();\r\n int value = stack.poll();\r\n while(!stack.isEmpty()){\r\n queue.offer(value);\r\n value = stack.poll();\r\n }\r\n stack = queue;\r\n return value;\r\n }", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop() {\r\n\r\n\t\tT top = peek(); // Throws exception if stack is empty.\r\n\t\t\r\n\t\t// Sets top of stack to next link. \r\n\t\ttopNode = topNode.getNext();\r\n\t\t\r\n\t\treturn top;\r\n\t\t\r\n\t}", "public T pop() {\n\t\tT value = peek();\n\t\tstack.remove(value);\n\t\treturn value;\n\t}", "public void pop(){\n \n if(top==null) System.out.println(\"stack is empty\");\n else top=top.next;\n \t\n }", "public E pop() throws NoSuchElementException{\n\t\treturn stackList.removeFromFront();\n\t}", "Object pop(){\r\n\t\tlastStack = getLastStack();\r\n\t\tif(lastStack!=null){\r\n\t\t\tint num = lastStack.pop();\r\n\t\t\treturn num;\r\n\t\t} else {stacks.remove(stacks.size()-1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic E pop() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tE answer = stack[t];\r\n\t\tstack[t] = null; // dereference to help garbage collection\r\n\t\tt--;\r\n\t\treturn answer;\r\n\t}", "public Employee pop() {\n if (isEmpty()) {\n throw new EmptyStackException();\n }\n /*top always contains the index of next available position in the array so, there is nothing at top.\n The top item on the stack is actually stored at top-1\n */\n Employee employee = stack[--top];\n stack[top] = null; //assign removed element position to null\n return employee; // return the removed element\n }", "public E pop() {\n if(isEmpty()) throw new EmptyStackException();\n\n E itemPopped = this.stack[top-1];\n this.stack[top-1] = null;\n top--;\n return itemPopped;\n\n }", "public int pop(){\n if (top==null) throw new EmptyStackException();\n int data = top.data;\n top=top.next;\n return data;\n }", "void pop() {\n // -\n top = top.getNextNode();\n }", "public T pop()\n\t{\n\t\treturn list.removeFirst();\n\t}", "public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }", "public int pop() {\n int value = top.value;\n top = top.pre;\n top.next = null;\n size--;\n return value;\n }", "public T pop() throws EmptyStackException\r\n {\r\n if (isEmpty())\r\n throw new EmptyStackException();\r\n\r\n top--;\r\n T result = stack[top];\r\n stack[top] = null; \r\n\r\n return result;\r\n }", "public T pop() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tT tmp = l.getHead().getData();\n\t\t\tl.setHead(l.getHead().getNext());\n\t\t\treturn tmp;\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}", "private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }", "public int pop() {\n q1.remove();\n int res = top;\n if (!q1.isEmpty()) {\n top = q1.peek();\n }\n return res;\n }", "public E removeFirst() {\n return pop();\n }", "public Object pop() {\n return stack.pop();\n }", "@Override\n\tpublic E pop() {\n\t\tif(size == 0) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\tsize--;\n\t\treturn list.remove(0);\n\t}", "int pop() {\r\n\t\ttop--;\r\n\t\treturn stack[top];\r\n\t}", "public T pop()\n {\n return pop(first);\n }", "E pop();", "E pop();", "E pop();", "public E top()\n\tthrows EmptyStackException;", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "@Override\n\tpublic int pop() {\n\t\tint topValue;\n\t\tif (top != -1) {\n\t\t\ttopValue = intContainer[top];\n\t\t\ttop = top - 1;\n\t\t\treturn topValue;\n\t\t} else {\n\t\t\tSystem.out.println(\"Stack Undeflow\");\n\t\t\treturn -1;\n\t\t}\n\t}", "public Object pop()\n\t{\n\t\tif (size == 0)\n\t\t\tthrow new EmptyStackException();\n\t\t\n\t\tObject result = elements[--size];\n\t\telements[size] = null;\n\t\treturn result;\n\t}", "public T pop() {\n if (this.top == null) {\n throw new EmptyStackException();\n }\n T data = this.top.data;\n this.top = this.top.below;\n return data;\n }", "public void pop(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't pop from stack\");\n return;\n }\n // if stack is not empty\n this.arr[this.topOfStack]=Integer.MIN_VALUE;\n this.topOfStack--;\n }", "public void pop() {\n // if the element happen to be minimal, pop it from minStack\n if (stack.peek().equals(minStack.peek())){\n \tminStack.pop();\n }\n stack.pop();\n\n }", "E pop() throws EmptyStackException;", "public int pop() {\n int res= q1.remove();\n if (!q1.isEmpty())\n top = q1.peek();\n return res;\n }", "public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }", "public Item pop()\n {\n if (isEmpty()) throw new NoSuchElementException(\"Stack underflow\");\n Item item = top.item;\n top = top.next;\n N--;\n return item;\n }", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public T top() throws StackUnderflowException;", "public int top() {\r\n Queue<Integer> temp=new LinkedList<Integer>();\r\n int counter=0;\r\n while(!stack.isEmpty()){\r\n temp.add((Integer) stack.poll());\r\n counter++;\r\n \r\n }\r\n while(counter>1)\r\n {\r\n \r\n stack.add(temp.poll());\r\n counter--;\r\n }\r\n int topInteger=temp.poll();\r\n stack.add(topInteger);\r\n return topInteger;\r\n \r\n }", "@Override\r\n\tpublic T pop() throws StackUnderflowException {\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\tstack.remove(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "public Item pop(){\n\t\tif(isEmpty()){\r\n\t\t\tSystem.out.println(\"Stack is empty\");\r\n\t\t}\r\n\t\t\r\n\t\tItem item=first.item;\r\n\t\tfirst=first.next;\r\n\t\tN--;\r\n\t\treturn item;\r\n\t\r\n\r\n\t}", "public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }", "private void pop() {\r\n pop( false );\r\n }" ]
[ "0.8113237", "0.8035936", "0.79413766", "0.7933028", "0.7906992", "0.78960705", "0.78948206", "0.7856734", "0.7841475", "0.7831527", "0.7799418", "0.7793572", "0.77818793", "0.77787787", "0.77583295", "0.77433926", "0.77218765", "0.7718594", "0.7697534", "0.76962614", "0.768426", "0.7679335", "0.7663766", "0.7654846", "0.7633198", "0.76121604", "0.7609396", "0.7605239", "0.7597208", "0.75936556", "0.7582594", "0.75792944", "0.7575818", "0.7574061", "0.7570033", "0.7547421", "0.7546961", "0.7534883", "0.75292027", "0.75209165", "0.751537", "0.751537", "0.751537", "0.75113076", "0.7483788", "0.7483003", "0.74725634", "0.74725634", "0.74725634", "0.74725634", "0.74725634", "0.74725634", "0.74725634", "0.74725634", "0.74700266", "0.7460471", "0.74478686", "0.7445035", "0.7443024", "0.7439352", "0.7438073", "0.74347293", "0.7432981", "0.74323475", "0.74323004", "0.74214107", "0.7420568", "0.7420237", "0.74193674", "0.7418699", "0.7418665", "0.7396988", "0.7394901", "0.73923606", "0.73907393", "0.73906916", "0.7389244", "0.7389244", "0.7389244", "0.737882", "0.73783195", "0.7378275", "0.737607", "0.7365075", "0.7364165", "0.7357206", "0.73487294", "0.7346494", "0.7346486", "0.73448986", "0.73380274", "0.73380274", "0.73380274", "0.73380274", "0.73380274", "0.7337481", "0.73305017", "0.7319604", "0.7315056", "0.73111916", "0.73089755" ]
0.0
-1
A method adds received element to the top of the stack
void push(int value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(E object) {stackList.insertAtFront(object);}", "@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}", "public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }", "public void push (E item){\n this.stack.add(item);\n }", "@Override\n public E push(final E obj) {\n // TODO\n top = new Node<>(obj, top);\n return obj;\n }", "private final void push(Object ob) {\r\n\t\teval_stack.add(ob);\r\n\t}", "public void push(TYPE element);", "public void push(E elem) {\n if (elem != null) {\r\n contents[++top] = elem;\r\n }\r\n\r\n // Usually better to resize after an addition rather than before for\r\n // multi-threading reasons. Although, that is not important for this class.\r\n if (top == contents.length-1) resize();\r\n }", "public void push(E element);", "public void push(T elem);", "public void push (E element);", "public void push_front(T element);", "void push(Object elem);", "public void push(int elem);", "public void push(T element);", "public void push(T element);", "public void push(Object anElement);", "public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }", "@Override\n public void push(T element){\n arrayAsList.add(element);\n stackPointer++;\n }", "public void push(E element){\n\t\tNode<E> temp = new Node<E>(element);\n\t\ttemp.next = top;\n\t\ttop = temp;\n\t}", "public void push(int element) {\n // ..... fill the stub function ......\n if(top==99)\n throw new RuntimeException(\"Stack overflow\");\n top++;\n myarray[top]=element;\n \n }", "void push(int element);", "public void push(Object ob){\n \t Stack n_item=new Stack(ob);\n \tn_item.next=top;\n \ttop=n_item;\n }", "public StackImpl<T> push(T ele) {\r\n\t\tNode oldTop = top;\r\n\t\ttop = new Node(ele);\r\n\t\ttop.next = oldTop;\r\n\t\tsize++;\r\n\t\t\r\n\t\treturn this;\r\n\t}", "public void push(Object element) {\r\n\t\tal.add(element, al.listSize);\r\n\t}", "public void stackPush(int element) {\r\n\t\ttop++;\r\n\t\tarray[top] = element;\r\n\t\tcount++;\r\n\t }", "public void push(T entry)\n { \n first = push(entry, first);\n }", "void push(E e);", "void push(E e);", "public void push(E e) {\n\t\ttop = new SNode<E>(e, top);\n\t}", "public void push(E element) {\r\n items.add(0, element);\r\n }", "public void push(E inValue)\n {\n stack.insertFirst(inValue);\n }", "void push(int a)\n\t{\n\t // Your code here\n\t top++;\n\t arr[top]=a;\n\t}", "void push(E Obj);", "public void push(AnyType e) throws StackException;", "@Override\r\n\tpublic void push(E e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void push(E e) {\r\n\t\tif (size() == stack.length)\r\n\t\t\texpandArray();\r\n\t\tstack[++t] = e; // increment t before storing new item\r\n\t}", "public void addToTop(Card card) {\n downStack.add(0, card);\n }", "public void push(T value) {\n \tstack.add(value);\n }", "public void push(E item);", "public void push(Item item){\n this.stack.add(item);\n\n }", "void push(int e) {\r\n\t\tif (top==stack.length) {\r\n\t\t\tmakeNewArray();\r\n\t\t}\r\n\t\tstack[top] = e;\r\n\t\ttop++;\r\n\t}", "public void push(E value);", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "public void push(T x);", "public void push(E e) throws Exception;", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Fixed Stack\");\r\n\t\t\r\n\t}", "public void push(Object item)\r\n {\n this.top = new Node(item, this.top);\r\n }", "public void push(E item) {\n addFirst(item);\n }", "public void push(Object obj) {\n if (top < stack.length - 1) {\n stack[++top] = obj;\n }\n else\n {\n increaseStackSize(1);\n stack[++top] = obj; \n }\n }", "void push(T t);", "public void push(int value){\n //To be written by student\n localSize++;\n top++;\n if(localSize>A.getSize()){\n A.doubleSize();\n try{\n A.modifyElement(value,top);\n }catch(Exception c){c.printStackTrace();}\n }\n else{try{\n A.modifyElement(value,top);\n }catch(Exception a){a.printStackTrace();} }\n }", "public void push(T element) {\n\t\t//add the new element\n\t\telements.add(element);\n\n\t}", "@Override\n\tpublic void push(E item) {\n\t\t\n\t}", "public E push(E element) \r\n {\r\n \tif (maxStack2.size() > 0)\r\n \t{\r\n \t \tif (maxStack2.lastElement().compareTo(element) <= 0)\r\n\t \t{\r\n\t \t\tmaxStack2.push(element);\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tmaxStack2.push(maxStack2.lastElement());\r\n\t \t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tmaxStack2.push(element);\r\n \t}\r\n \t\r\n return maxStack.push(element);\r\n }", "public void push(T o) {\r\n\t\tadd(o);\t\r\n\t}", "void push(T x);", "void push(T item);", "void push(T item);", "public E push(E item) {\n try {\n stackImpl.push(item);\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Array is full. Switching to unbound implementation\");\n StackImplementationIF<E> stackImplTemp = new ListStack<E>();\n for (Enumeration en = new ImplIterator<E>(this); en.hasMoreElements();) {\n E c = (E) en.nextElement();\n stackImplTemp.push(c);\n }\n stackImpl = stackImplTemp;\n stackImpl.push(item);\n }\n return item;\n }", "public void push(int element) {\n stack1.push(element);\n }", "public void push(int element) {\n\t\tif (top -1 == size) { // top == --size\n\t\t\t//System.out.println(\"Stack is full\");\n\n\t\t\t//Switch\n\t\t\tint[] tmp = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\ttmp[i] = stacks[i];\n\t\t\t}\n\t\t\tstacks = null;\n\t\t\tstacks = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\tstacks[i] = tmp[i];\n\t\t\t}\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t} else {\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t}\n\t\tsize++;\n\t}", "public void push(Stapelelement pStapelelement)\n {\n if(this.isEmpty())\n {\n this.top = pStapelelement;\n }\n else\n {\n Stapelelement oldTop = this.top;\n this.top = pStapelelement;\n this.top.setNext(oldTop);\n }\n }", "@Override\n\tpublic void push(E element) {\n\t\tif (size() == capacity) {\n\t\t\tthrow new FullStackException(\"Full Stack\");\n\t\t}\n\t\tarr[++top] = element;\n\t}", "public void push(Item item)\n {\n top = new Node<Item>(item, top);\n N++;\n }", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}", "public void push(T newEntry) {\n ensureCapacity();\n stack[topIndex + 1] = newEntry;\n topIndex++;\n }", "public void push(E obj) {\n super.add(obj);\n }", "public void push(E it){\r\n Node<E> curr = new Node<E>(it);\r\n curr.setNext(top);\r\n top = curr;\r\n size++;\r\n }", "static void push(Stack<Integer> top_ref, int new_data) {\r\n // Push the data onto the stack\r\n top_ref.push(new_data);\r\n }", "private static void push(Stack<Integer> top_ref, int new_data) {\n //Push the data onto the stack\n top_ref.push(new_data);\n }", "void push(T item) {\n contents.addAtHead(item);\n }", "public void push(T item);", "public void push( Object obj )\n {\n this.top = new Node( obj, this.top );\n \n this.count++;\n }", "void push(Object item);", "void push(int in);", "public void push(E data);", "public void push(Object element){\n \tSystem.out.println(\"Enter push \" +first);\n Node newNode = new Node();\n newNode.data = element;\n newNode.next = first;\n System.out.println(\"After first next assign \" +first);\n first = newNode;\n System.out.println(\"Enter Change \" +first);\n }", "public void push(T value) {\n top = new Entry<>(value, top); // diamond operator (syntactic sugar)\n }", "public void push(ILocation item)\n {\n stack.add(top, item);\n top++;\n }", "public void push(T element){\n\t\tarray[noOfElements] = element;\n\t\tnoOfElements ++;\t\t\n\t}", "public void push(int data){\n \tif(top == size)\n \tSystem.out.println(\"Stack is overflow\");\n \telse{\n \ttop++;\n \telements[top]=data;\n \t} \n\t}", "void pushFront(T value) throws ListException;", "public E push(E e) {\n Node node = new Node();\n node.data = e;\n node.next = isEmpty() ? null : top;\n top = node;\n return e;\n }", "public void push(Object element)\n\t{\n\t\tensureCapacity();\n\t\telements[size++] = element;\n\t}", "public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void push(Object element) {\n\t\tif(size == capacity) {\n\t\t\tthrow new IllegalArgumentException(\"Capacity has been reached.\");\n\t\t}\n\t\tlist.add(0, (E) element);\n\t\tsize++;\n\t\t\n\t}", "public boolean push(E element){\r\n\t\t/**If array is full, create an array double the current size*/\r\n\t\tif(top==stack.length-1){\r\n\t\t\tstack = Arrays.copyOf(stack, 2*stack.length);\r\n\t\t}\r\n\t\tstack[++top] = element;\t\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean push(T e) {\r\n\t\tif(!isFull()) {\r\n\t\t\tstack[topIndex + 1] = e;\r\n\t\t\ttopIndex++;\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }", "public void push(T aValue);", "void push(int i);", "public void push(T item)\r\n\t{\r\n\t\t if (size == Stack.length) \r\n\t\t {\r\n\t\t\t doubleSize();\r\n\t }\r\n\t\tStack[size++] = item;\r\n\t}", "void push(int x);", "public void push(int x) {\r\n stack.offer(x);\r\n }", "public void add(T val){\n myCustomStack[numElements] = val; // myCustomStack[0] = new value, using numElements as index of next open space\n numElements++; //increase numElements by one each time a value is added to the stack, numElements will always be one more than number of elements in stack\n resize(); //call resize to check if array needs resizing\n }", "@Override\r\n\tpublic void push(AnyType data) throws StackException {\n\t\ttop = new Node<AnyType>(data,top);\r\n\t}", "public void push(T item){\n Node<T> n;\n if(this.isEmpty()){\n n = new Node<>();\n n.setData(item);\n } else {\n n = new Node<>(item, this._top);\n }\n\n this._top = n;\n }", "public void push(int item) {\n if(isEmpty())\n top = new Node(item);\n else\n {\n Node newNode = new Node(item, top);\n top = newNode;\n }\n sz++;\n }", "public void push(int x) {\r\n stack.offer(x);\r\n }", "void push(int v);" ]
[ "0.7673926", "0.75138277", "0.7311357", "0.7280541", "0.72749674", "0.72625726", "0.7262108", "0.72585696", "0.71892893", "0.7185468", "0.7178219", "0.7177798", "0.7169229", "0.7153225", "0.71526223", "0.71526223", "0.71503896", "0.713234", "0.7116238", "0.71095234", "0.7105677", "0.7076024", "0.7068983", "0.70161355", "0.7009048", "0.7000841", "0.69836867", "0.6974237", "0.6974237", "0.6963774", "0.69622123", "0.6953934", "0.69378954", "0.69287574", "0.6900564", "0.6900298", "0.6852084", "0.6846251", "0.68431", "0.6817239", "0.681271", "0.6804843", "0.6800545", "0.6797934", "0.6794735", "0.6792843", "0.6791394", "0.6779884", "0.6752874", "0.67512816", "0.6736345", "0.67153734", "0.67129064", "0.67109656", "0.6707065", "0.6704206", "0.6696459", "0.66940564", "0.66940564", "0.6691492", "0.6683594", "0.6669238", "0.6668537", "0.66576207", "0.66549885", "0.6627351", "0.66185164", "0.6608574", "0.6602025", "0.6599082", "0.6599053", "0.6598223", "0.6584886", "0.65705913", "0.6566394", "0.6557121", "0.6553852", "0.65488136", "0.6546718", "0.65443045", "0.6542516", "0.65249497", "0.65248525", "0.65225405", "0.65118396", "0.6508269", "0.6501294", "0.65001327", "0.64860374", "0.6483211", "0.6479368", "0.64775693", "0.6475528", "0.6470514", "0.646407", "0.6451728", "0.64383966", "0.6436544", "0.6433697", "0.6433229", "0.6428636" ]
0.0
-1
A method returns true if stack is empty and false in otherwise
boolean isEmpty();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }", "public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }", "public boolean isEmpty() {\n \treturn stack.size() == 0;\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}", "public boolean isEmpty() {return stackList.isEmpty();}", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "public boolean emptyStack() {\n return (expStack.size() == 0);\n }", "public boolean isEmpty()\n {\n return stack.size() == 0;\n }", "public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }", "public boolean isEmpty()\n {\n return stack.isEmpty();\n }", "public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }", "public boolean empty() {\n System.out.println(stack.isEmpty());\n return stack.isEmpty();\n }", "boolean isFull(Stack stack){\n\t\tif(stack.getStackSize() >= 100) return true;\r\n\t\telse return false;\t\r\n\t}", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean empty() {\r\n return this.stack.isEmpty();\r\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean isFull() {\n return (this.top == this.stack.length);\n }", "public boolean empty() {\n return this.stack1.empty() && this.stack2.empty();\n }", "public boolean empty() {\n return stack.empty();\n }", "public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }", "public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }", "public boolean isEmpty() {\n return downStack.isEmpty();\n }", "public boolean isEmpty(){\r\n\t\treturn stackData.isEmpty();\r\n\t}", "public boolean isEmpty() \n {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "public boolean isEmpty() {\n return stackImpl.isEmpty();\n }", "public boolean isFull(){\n return (top == employeeStack.length);\n }", "public boolean empty() {\n return stack1.empty();\n }", "public boolean empty() {\n return popStack.isEmpty();\n }", "public boolean empty() {\r\n return inStack.empty() && outStack.empty();\r\n }", "public boolean empty() {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }", "public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "public boolean empty() {\n if (stackIn.empty() && stackOut.empty()) {\n return true;\n }\n return false;\n }", "public boolean empty() {\n return mStack1.isEmpty() && mStack2.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn (stackSize == 0 ? true : false);\n\t}", "public boolean isEmpty(){\n return (top == 0);\n }", "public boolean isCarStackFull() {\n boolean carStackFull = false;\n if(top >= 4) {\n carStackFull = true;\n }\n return carStackFull;\n }", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "public boolean isEmpty() {\r\n return (top == null);\r\n }", "@Test\r\n public void testIsEmptyShouldReturnFalseWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(90);\r\n stackInstance.push(5);\r\n boolean actualOutput=stackInstance.isEmpty();\r\n assertEquals(false,actualOutput);\r\n }", "public final boolean isEmpty() {\n\t\treturn !(opstack.size() > 0);\n\t}", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "public boolean isEmpty()\r\n\t{\r\n\t\treturn top<=0;\r\n\t}", "public boolean isEmpty(){\n if(top == null)return true;\n return false;\n }", "public boolean empty(){\n return this.top == -1;\n }", "boolean isEmpty() {\n // -\n if(top == null)\n return true;\n return false;\n }", "public boolean isEmpty()\r\n {\n return this.top == null;\r\n }", "@Test\r\n public void isEmptyTest1(){\r\n stack.pop();\r\n stack.pop();\r\n stack.pop();\r\n assertThat(stack.isEmpty(), is(true));\r\n }", "@Test\n public void testIsEmpty() {\n System.out.println(\"isEmpty\");\n instance = new Stack();\n assertTrue(instance.isEmpty());\n instance.push(\"ab\");\n instance.push(\"cd\");\n assertFalse(instance.isEmpty());\n instance.pop();\n instance.pop();\n assertTrue(instance.isEmpty());\n }", "public boolean isEmpty() {\n return this.top == null;\n }", "public boolean isEmpty() {\n if (opStack.size() == 0) {\n return true;\n }\n return false;\n }", "public boolean isEmpty() {\n\n return (top == null);\n }", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn (!stack.isEmpty() || localRoot!=null);\n\t\t}", "public boolean isEmpty()\n\t{\n\t\treturn top == null;\n\t}", "public boolean empty() { \n if (top == -1) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean isEmpty() {\n\t\treturn (top == null) ? true : false;\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn top==null;\r\n\t}", "public boolean isEmpty() {\n return (this.top == 0);\n }", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty() {\n return top == null;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn top < 0;\n\t}", "public boolean vacio(){\n if (stack != null){\n return false;\n }\n return true;\n }", "boolean isEmpty() {\r\n\t\treturn top==0;\r\n\t}", "public boolean isEmpty() {\n if(this.top== -1) {\n return true;\n }\n return false;\n }", "public boolean isSet() {\n return !this.stack.isEmpty();\n }", "public boolean isEmpty(){\n \treturn top==-1;\n\t}", "public boolean empty() \n { \n\treturn(top==-1);\n \n }", "public boolean isEmpty() {\n\t\t\n\t\treturn top == null;\n\t}", "public boolean isEmpty() {\n return top==-1;\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean isFull() {\n if(this.top==(size - 1)) {\n return true;\n }\n return false;\n }", "@Test\n public void isEmpty() {\n SimpleStack stack = new DefaultSimpleStack();\n\n // then the stack is empty\n assertTrue(stack.isEmpty());\n }", "@Test\n public void testIsEmpty(){\n ms = new MyStack();\n assertTrue(ms.IsEmpty());\n }", "@Test /*Test 18 - implemented isEmpty() method to NumStack class. Refactored isEmpty() to now \n call the size() method of the Stack object in NumStack to determine if it is empty, rather than \n always returning true.*/\n public void testIsEmpty() {\n assertTrue(\"NumStack object should be empty after creation\", numStackTest.isEmpty());\n }", "public boolean stackPop() {\r\n\t\t if(stackEmpty())\r\n\t\t {\r\n\t\t\t return false;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t if(top == 0)\r\n\t\t {\r\n\t\t \ttop = -1;\r\n\t\t \tcount--;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t \tarray[top] = array[top-1];\r\n\t\t \ttop--;\r\n\t\t \tcount--;\r\n\t\t }\r\n\t\t\t return true;\r\n\t\t } \t\r\n\t }", "@Test\n public void isEmptyTest() {\n ResourceStack stack5 = new ResourceStack(1,0,0,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,1,0,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,0,1,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,0,0,1);\n assertFalse(stack5.isEmpty());\n\n stack5 = new ResourceStack(0,0,0,0);\n assertTrue(stack5.isEmpty());\n }", "boolean isEmpty() \r\n { \r\n //Write your code here\r\n if(top==-1)\r\n return true;\r\n else\r\n return false;\r\n }", "public boolean empty() {\n return push.isEmpty();\n }", "public static boolean stackHelper(Stack st)\n\t{\n\t\tif (st.empty() || (int) st.peek() < 0)\n\t\t{\n\t\t\tthrow new InvalidSequenceException();\n\t\t}\n\t\treturn true;\n\t}", "public boolean canStack() {\n return this.hasStacking;\n }", "@Test\n void whenPopTillStackEmptyReturnNodeShouldBeFirstNode() {\n\n MyNode<Integer> myFirstNode = new MyNode<>(70);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(56);\n MyStack myStack = new MyStack();\n myStack.push(myFirstNode);\n myStack.push(mySecondNode);\n myStack.push(myThirdNode);\n boolean isEmpty = myStack.popTillEmpty();\n\n System.out.println(isEmpty);\n boolean result = myStack.head == null && myStack.tail == null;\n }", "public boolean hasNext() {\n\r\n\t\tif (stack.isEmpty()) {\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tIterator<Node> it = stack.peek();\r\n\r\n\t\t\tif (it.hasNext()) {\r\n\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tstack.pop();\r\n\r\n\t\t\t\treturn hasNext();\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testPush(){\n ms=new MyStack();\n ms.push(1);\n assertFalse(ms.IsEmpty());\n }", "public boolean validCommand(CommandStack stack) throws EmptyStackException {\n\t\tif(stack.peek() instanceof Maps) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\telse if(stack.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "private boolean hasPinnedStack() {\n return this.mTaskStackContainers.getPinnedStack() != null;\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn topIndex < 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn front == null;\n\t}", "public boolean isEmpty() {\n return topIndex < 0;\n }", "public boolean hasPop() {\n return popBuilder_ != null || pop_ != null;\n }", "public boolean hasPop() {\n return pop_ != null;\n }", "public boolean empty() {\n return stk1.isEmpty() && stk2.isEmpty();\n }", "public boolean isEmpty()\n\t{ \n\t\treturn (front==-1);\n\t}", "protected void stackEmptyButton() {\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tstack.pop();\n \t\tif (stack.empty()) {\n \t\t\tenter();\n \t}\n \t}\n }" ]
[ "0.8912371", "0.8606405", "0.8565068", "0.85487646", "0.8548204", "0.85108423", "0.8484385", "0.8457988", "0.844407", "0.84094584", "0.84064597", "0.8374987", "0.8362068", "0.83298016", "0.831433", "0.83093053", "0.830528", "0.82999015", "0.828543", "0.828543", "0.8257386", "0.82551867", "0.8244936", "0.8243549", "0.82415104", "0.82091385", "0.81796736", "0.81553894", "0.8144423", "0.81129885", "0.8103901", "0.80904686", "0.80505234", "0.8031048", "0.802756", "0.7998348", "0.7995992", "0.79628503", "0.7911621", "0.78875184", "0.78317004", "0.7732748", "0.7717664", "0.7696533", "0.76818883", "0.7661372", "0.76542056", "0.7626979", "0.76157916", "0.76029", "0.7590925", "0.7582876", "0.7558639", "0.755528", "0.7551533", "0.7549378", "0.754626", "0.7533856", "0.75233775", "0.7497439", "0.74850714", "0.74681515", "0.7467694", "0.74622387", "0.74428666", "0.74428666", "0.74303", "0.7414371", "0.7401751", "0.7385838", "0.7374453", "0.7366426", "0.73663", "0.7355414", "0.7323934", "0.72562814", "0.72562814", "0.72562814", "0.72491336", "0.7245665", "0.7205277", "0.72015077", "0.71967244", "0.71959215", "0.7175262", "0.7162777", "0.71594775", "0.71539223", "0.7140473", "0.71301633", "0.7115424", "0.708172", "0.70486194", "0.70386636", "0.70103693", "0.6994222", "0.6978846", "0.6974722", "0.6961805", "0.6945053", "0.6943584" ]
0.0
-1
brain of the program
public static void app(Scanner in) { String user; String temp=""; String word1; String word2; PromptBank wordBank = new PromptBank(); wordBank.setUp();//populating arrays welcome(); wordBank.greet(); //greeting and prompting the user to enter name user = in.nextLine(); user = getWord(user,'f'); System.out.println("Hello "+ user+", Tell me what is on your mind today in 1 sentence."); while(true) { boolean dramatic =false; user = in.nextLine(); if(user.equals("EXIT")) { break; } if(user.charAt(user.length()-1)=='?') { temp = wordBank.getRandomQuestionTrunk();//get a random question from the words bank }else if(user.charAt(user.length()-1)=='!') { //WOW! Dramatic! dramatic = true; temp = wordBank.getRandomStatementTrunk(); }else { temp = wordBank.getRandomStatementTrunk();//get a random statement from the words bank } //Getting first and last words word1 = getWord(user,'f'); word2 = getWord(user,'l'); //Generating and printing the statement wordBank.generatePhrase(temp, word1, word2,dramatic); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void think() {\n //get the output of the neural network\n decision = brain.output(vision);\n\n if (decision[0] > 0.8) {//output 0 is boosting\n boosting = true;\n } else {\n boosting = false;\n }\n if (decision[1] > 0.8) {//output 1 is turn left\n spin = -0.08f;\n } else {//cant turn right and left at the same time\n if (decision[2] > 0.8) {//output 2 is turn right\n spin = 0.08f;\n } else {//if neither then dont turn\n spin = 0;\n }\n }\n //shooting\n if (decision[3] > 0.8) {//output 3 is shooting\n shoot();\n }\n }", "public void train ()\t{\t}", "public static void main(String[] args) {\n\t In in = new In(args[0]);\n\t int N = in.readInt();\n\t int[][] blocks = new int[N][N];\n\t for (int i = 0; i < N; i++)\n\t for (int j = 0; j < N; j++)\n\t blocks[i][j] = in.readInt();\n\t Board initial = new Board(blocks);\n\t System.out.println(initial);\n\t \n\t System.out.println(initial.hamming());\n\t System.out.println(initial.manhattan());\n\t System.out.println(initial.isGoal());\n\t \n\t for (Board b:initial.neighbors())\n\t {\n\t \tSystem.out.println(b);\n\t }\n\t \n\t }", "private void createBrain() {\n\t\t\n\t\tMSimulationConfig simConfig;\n\n\t\t//How many input and output nodes to create in the agents brain\n\t\tint inputNodes = configNumSegments*3;\n\t\tint outputNodes = 3;\n\n\t\t//Create a CPPNFactory. Feed the factory a series of CPPN and after all chromosomes have been read in, it can return a fully formed brain.\n\t\tCPPNFactory cFactory = new CPPNFactory(inputNodes,outputNodes);\n\n\t\t/* Get a reference to the agent's chromosome. */\n\t\tChromosome chromosome = (Chromosome)geneticObject;\n\n\t\t// \t/**\n\t\t// \t * Each 'chromosome' the agent contains is an instance of the genome class.\n\t\t// \t * \n\t\t// \t * Each chromosome contains multiple types of genes that can contain the following information to build the CPPN:\n\t\t// \t * 1: A sort of 'header' gene that says how many neurons will be in this layer of the brain\n\t\t// \t * 2: Add nodes to the buildSyanpse CPPN, so this will need to include a 'type' integer, to designate the kind of function\n\t\t// \t * \t\tthat this node will use. 3 Parameter integers, which will be used to augment the function so that\n\t\t// \t * \t\teach node has a higher degree of possible diversity.\n\t\t// \t * \t\tThere are 4 different 'types' of nodes, which correspond to 0: Parabola, 1: Sigmoid, 2: Gauss, 3: Sin.\n\t\t// \t * 3: Add nodes to the buildNeurons CPPN, this should be built just like the buildSynapseCPPN. There will probably need to\n\t\t// \t * \t\tbe some field in the gene that lets this part of the code distinguish between genes for the buildNeuronCPPN and the\n\t\t// \t * \t\tbuildSyanpse CPPNs.\n\t\t// \t * \n\t\t// \t * Some additional notes:\n\t\t// \t * 1: The first two nodes in any CPPN arrayList of nodes will always be the input nodes for that network.\n\t\t// \t * 2: The last node in the CPPN arrayList of nodes will always be the output node for that network.\n\t\t// \t */\n\n\t\t// \t/**\n\t\t// \t * ##############\n\t\t// \t * CREATE CPPN HERE ###############################\n\t\t// \t * ##############\n\t\t// \t */\n\n\t\t//Once all the CPPN's have been input to the cFactory, the brain will be finished and it can be pulled out.\n\t\t// mnetwork = cFactory.getBrain();\n\t\tmnetwork = cFactory.createNetworkFromChromosome(chromosome, 8);\n\t\t\n\t\t/* Create and set the simulation configuration parameters. */\n\t\tsimConfig = new MSimulationConfig(20);\n\t\t\n\t\t/* Create the simulation instance with our network. */\n\t\tthis.msimulation = new MSimulation(this.mnetwork, simConfig);\n\t}", "public static void main(String[] args) {\n System.out.println(\"-------------------------\");\n //maze.print();\n // int count= obj.getnonVisits();\n // int percent=obj.getSizeTotal();\n // System.out.println(\"Cells: \"+percent+ \" Unvisited:\"+count);\n //if(count>0)\n // System.out.println(\"Percent unvisited: \"+((count*100)/percent)+\"%\");\n }", "public static void main(String []args){\n int N=Integer.parseInt(args[0]);//1o orisma N=plithos atomwn\r\n StateBridge root = new StateBridge();\r\n if(N>0){ \r\n int [] ntime=new int[N];\r\n \r\n \r\n for(int i=1; i<args.length;i++){ // 2o ews n orismata xronwn kathe atomoy\r\n ntime[i-1]=Integer.parseInt(args[i]);\r\n }\r\n \r\n root = new StateBridge(N,ntime);\r\n Algorithm a=new Algorithm (root);\r\n a.Astar();\r\n a.print(a.Astar());\r\n }else{\r\n System.out.println(\"error: must N>0\");\r\n }\r\n }", "public static void main(String[] args) {\n\t\tInstanceVariable h1=new InstanceVariable();\n\t\th1.name=\"zeynep\";\n\t\th1.lastName=\"celik\";\n\t\tSystem.out.println(InstanceVariable.brain);//first way\n\t\tSystem.out.println(h1.brain);//second way\n\t\tSystem.out.println(brain);//third way\n\t\tSystem.out.println(h1.eyes+\" \"+nose+\" \"+brain);\n\t\t\n\t\t\n\t\tInstanceVariable h2=new InstanceVariable();\n\t\th2.name=\"hasan\";\n\t\th2.lastName=\"celik\";\n\t\tSystem.out.println(h2.eyes+\" \"+nose+\" \"+brain);\n\t\tInstanceVariable h3=new InstanceVariable();\n\t\th3.name=\"nili\";\n\t\th3.lastName=\"celik\";\n\t\tSystem.out.println(h3.name+h3.lastName);\n\t\tSystem.out.println(h3.eyes+\" \"+nose+\" \"+brain);\n\t\t\n\t}", "private void runBest() {\n }", "public void start5()\n\t{\n\t\tSystem.out.println();\n\t\tBombe bombe = new Bombe();\n\t\tbombe.challenge1();\n\t\tSystem.out.println();\n\t\tbombe.challenge2();\n\t\tSystem.out.println();\n\t\tbombe.challenge3();\n\t}", "void breach();", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "public static void main(String[] args) {\n\t\tUtility.dirPath = \"C:\\\\Users\\\\imSlappy\\\\workspace\\\\FeelingAnalysis\\\\Documents\\\\2_group_eng\";\n\t\tString sub[] = {\"dup\",\"bug\"};\n\t\tUtility.classLabel = sub;\n\t\tUtility.numdoc = 350;\n\t\tSetClassPath.read_path(Utility.dirPath);\n\t\tUtility.language = \"en\";\n\t\t\n\t\tUtility.stopWordHSEN = Fileprocess.FileHashSet(\"data/stopwordAndSpc_eng.txt\");\n\t\tUtility.dicen = new _dictionary();\n\t\tUtility.dicen.getDictionary(\"data/dicEngScore.txt\");\n\t\t\n\t\tUtility.vocabHM = new HashMap();\n\t\t// ================= completed initial main Program ==========================\n\n\t\tMainExampleNaive ob = new MainExampleNaive();\n\t\t\n\t\t// --------------------- Pre-process -----------------------\n\t\tob.word_arr = new HashSet [Utility.listFile.length][];\n\t\tob.wordSet = new ArrayList<String>();\n\t\tfor (int i = 0; i < Utility.listFile.length; i++) {\n\t\t\tob.word_arr[i]=new HashSet[Utility.listFile[i].length];\n\t\t\tfor (int j = 0; j < Utility.listFile[i].length; j++) {\n\t\t\t\tStringBuffer strDoc = Fileprocess.readFile(Utility.listFile[i][j]);\n\t\t\t\tob.word_arr[i][j]=ob.docTokenization(new String(strDoc));\n\t\t\t}\n\t\t\tob.checkBound(3, 10000);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"++ Total : \"+Utility.vocabHM.size()+\" words\");\n\t\tSystem.out.println(\"++ \"+Utility.vocabHM);\n\t\t\n\t\t// ---------------------- Selection ------------------------\n//\t\tInformationGain ig = new InformationGain(ob.word_arr.length*ob.word_arr[0].length , ob.wordSet,ob.word_arr);\n//\t\tArrayList<String> ban_word = ig.featureSelection(0.0); // selected out with IG = 0\n//\t\t//ob.banFeature(ban_word);\n//\t\tSystem.out.println(\"ban list[\"+ban_word.size()+\"] : \"+ban_word);\n//\t\t\n//\t\tSystem.out.println(\"-- After \"+Utility.vocabHM.size());\n//\t\tSystem.out.println(\"-- \"+Utility.vocabHM);\n\t\t\n\t\tob.setWordPosition();\n\t\t// ---------------------- Processing -----------------------\n\t\tNaiveBayes naive = new NaiveBayes();\n\t\tnaive.naiveTrain(true);\n\t\t\n\t\tint result = naive.naiveUsage(\"after cold reset of my pc (crash of xp) the favorites of firefox are destroyed and all settings are standard again! Where are firefox-favorites stored and the settings ? how to backup them rgularely? All other software on my pc still works properly ! even INternetExplorer\");\n\t\tSystem.out.println(\"\\nResult : \"+Utility.classLabel[result]);\n\t}", "public static void main(String[] args) {\n\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"data/split1.arff\",\"data/split1_test.arff\");\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"/media/F/Acads/iitb/mtp/naivebayesdataset/bronchiolitis/br-processed.arff\",\"\" +\n\t\t//\t\t\"/media/F/Acads/iitb/mtp/naivebayesdataset/bronchiolitis/br-processed.arff\");\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"/media/F/Acads/iitb/mtp/naivebayesdataset/01/sylva_agnostic_valid.arff\",\"\" +\n\t\t//\t\t\"/media/F/Acads/iitb/mtp/naivebayesdataset/01/sylva_agnostic_valid.arff\");\n\n\t\t// NaiveBayesParam nb = new NaiveBayesParam(\"data/split1lac.arff\",\n\t\t// \"data/split1lacTest.arff\");\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"data/split1b.arff\", \"data/split1bTest.arff\");\n\t\t// NaiveBayesParam nb = new NaiveBayesPFaram(\"data/split1lac.arff\",\n\t\t// \"data/split1bTest.arff\");\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"data/split1lac.arff\",\"data/split1hTest.arff\");\n\t\t\n\t\t\n\t\tNaiveBayesParam nb = new NaiveBayesParam(\"/media/F/Acads/iitb/mtp/QuickHeal/data/split1per1.arff\", \"/media/F/Acads/iitb/mtp/QuickHeal/data/split1.arff\");\n\t\t\t\t\n\t\tInputData initialData = nb.calcInitialState();\n\t\ttry {\n\t\t\tinitialData.serialize(\"/home/agam/nb.dat\");\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t/*nb.calcNewState(nb.param);\n\n\n\t\ttry {\n\t\t\tdouble dist1[][] = nb.distributionForInstances(nb.trainInstances);\n\t\t\tdouble dist2[][] = nb.distributionForInstances(nb.testInstances);\n\t\t\t\n\t\t\tint countFN=0;\n\t\t\tint countFP=0;\n\t\t\tSystem.out.println(\"1.# prob0 - prob1 - actual - pred\");\n\t\t\tfor (int i = 0; i < nb.trainInstances.numInstances(); i++)\n\t\t\t{\n\t\t\t\tdouble pred;\n\t\t\t\tdouble actual = nb.trainInstances.instance(i).classValue();\n\t\t\t\t//System.out.print(\"actual=\"+actual);\n\t\t\t\tif(dist1[i][0] >= dist1[i][1])\n\t\t\t\t\tpred=0d;\n\t\t\t\telse\n\t\t\t\t\tpred=1d;\n\t\t //if (pred != actual)\n\t\t if (!(pred > actual-0.1d && pred < actual + 0.1d))\n\t\t {\n//\t\t \tif(pred == 1)\n\t\t \tif(pred > 0.9d && pred < 1.1d)\n\t\t \t\tcountFP++;\n\t\t \telse\n\t\t \t\tcountFN++;\n\t\t }\n\t\t\t}\n\t\t\tSystem.out.println(\"countFP=\"+countFP);\n\t\t\tSystem.out.println(\"%FP=\"+countFP*200.0/nb.trainInstances.numInstances());\n\t\t\tSystem.out.println(\"countFN=\"+countFN);\n\t\t\tSystem.out.println(\"%FN=\"+countFN*200.0/nb.trainInstances.numInstances());\n\t\t\t\n\t\t\tcountFN=0;\n\t\t\tcountFP=0;\n\t\t\tSystem.out.println(\"2.# prob0 - prob1 - actual - pred\");\n\t\t\tfor (int i = 0; i < nb.testInstances.numInstances(); i++)\n\t\t\t{\n\t\t\t\tdouble pred;\n\t\t\t\tdouble actual = nb.testInstances.instance(i).classValue();\n\t\t\t\tif(dist2[i][0] >= dist2[i][1])\n\t\t\t\t\tpred=0d;\n\t\t\t\telse\n\t\t\t\t\tpred=1d;\n//\t\t if (pred != actual)\n\t\t if (!(pred > actual-0.1d && pred < actual + 0.1d))\n\t\t {\n\t\t \tif(pred > 0.9d && pred < 1.1d)\n//\t\t \tif(pred == 1)\n\t\t \t\tcountFP++;\n\t\t \telse\n\t\t \t\tcountFN++;\n\t\t }\n\t\t System.out.println(\"2.#\"+dist2[i][0]+\" \"+dist2[i][1]+\" \" +actual+\" \"+pred);\n\t\t\t}\n\t\t\tSystem.out.println(\"countFP=\"+countFP);\n\t\t\tSystem.out.println(\"%FP=\"+countFP*100.0/nb.testInstances.numInstances());\n\t\t\tSystem.out.println(\"countFN=\"+countFN);\n\t\t\tSystem.out.println(\"%FN=\"+countFN*100.0/nb.testInstances.numInstances());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n*/\n/*\t\t\n\t\tdouble jac[][]=nb.calcJacobian(nb.trainInstances.instance(0));\n\n\t\tfor(int i=0;i<nb.trainInstances.numClasses();i++)\n\t\t{\n\t\t\tfor(int j=0;j<4*nb.trainInstances.numAttributes()-4+nb.trainInstances.numClasses();j++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"jac[\"+i+\"]=[\"+j+\"]=\"+jac[i][j]);\n\t\t\t}\n\t\t}\n*/\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\tlong totalTime = endTime - startTime;\n\t\tSystem.out.println(totalTime + \" milliseconds\");\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"i is : \"+i+\" j is : \"+new Initblocks().j);\n\t\tSystem.out.println(\"Cars has \"+cars.size()+\" elements\");\n\t}", "Programming(){\n\t}", "public static void main(String[] args) {\n\t\tAnalyse ana = new Analyse(20, 5);\r\n//\t\tArrayList<Map.Entry<Integer, Double>> current = ana.getNeighbor(\"\")\r\n//\t\tfor(int i = 0; i < ana.average.length; i++){\r\n//\t\t\tSystem.out.println(ana.average[i]);\r\n//\t\t}\r\n//\t\tfor (int i = 0; i < 5; i++) {\r\n//\t\t\tSystem.out.println(ana.heap.get(i).getValue());\r\n//\t\t}\r\n\t\tSystem.out.println(ana.similarity.size());\r\n//\t\tArrayList<Map.Entry<Integer, Double>> record = ana.getNeighbor(\"0155061224\");\r\n//\t\tSystem.out.println(ana.heap.size());\r\n//\t\tSystem.out.println(record.size());\r\n//\t\tfor(int i = 0; i < record.size(); i++){\r\n//\t\t\tSystem.out.println(record.get(i).getKey());\r\n//\t\t\tSystem.out.println(record.get(i).getValue());\r\n////\t\t\tSystem.out.println(ana.matrix[record.get(i).getKey()][ana.read.getItems().indexOf(3149)]);\r\n//\t\t}\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"score\" + ana.predictionBaseline(\"100\"));\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\tSystem.out.println(end - start);\r\n//\t\tSystem.out.println(ana.predictionBaseline(\"0155061224\"));\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"Respect\");\n Nubbers numbers = new Nubbers();\n int r = numbers.sum(5);\n System.out.println(r);\n }", "public static void main(String[] args) {\n\t\tBaseball bb = new Baseball(\"야구\", 9);\n\tSystem.out.println(\"경기종목 :\" + bb.getName());\n\tSystem.out.println(\"선수인원:\" + bb.getPlayer());\n\tSystem.out.println(\"경기규칙:\");\n\tbb.rule();\n\t}", "public static void main(String[] args) {\n INeighbor neighbor = new RandomNeighbor();\n IEvaluator evaluator = new BentEvaluator();\n ISolver solver = new RandomSearch(neighbor, evaluator);\n\n BoolFunction solution = solver.run();\n System.out.println(solution);\n }", "public static void main(String[] args){\n\t\tfor(int i=0; i<programRuns; i++){ //for loop to run gen numOfMutations creation \n\t\t\tnumOfMutations[i] = createnumOfMutationss(); //createnumOfMutationss returns number of total mutations\n\t\t}\n\t\n\t\tsort(numOfMutations); //sort array\n\t\tgetFreq(); //find the frequency of the number of mutations that occur\n\t\tgraph(); //create histogram of data\n\t\t\n\t}", "public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n n = Integer.parseInt(st.nextToken());\n k = Integer.parseInt(st.nextToken());\n belt = new int[2 * n + 1];\n visit = new boolean[2 * n + 1];\n st = new StringTokenizer(br.readLine());\n for (int i = 1; i <= 2 * n; i++)\n belt[i] = Integer.parseInt(st.nextToken());\n\n int answer = 0;\n start = 1;\n end = n;\n while (cnt < k) {\n answer++;\n move_belt();\n move_robot();\n make_robot();\n }\n System.out.println(answer);\n }", "public static void main(String[] args) {\n SeqRepeat sr = new SeqRepeat();\n sr.ClearRepeats();\n \n // Check 2nd task (Parameters in DistribRepeat class)\n DistribRepeat dr = new DistribRepeat();\n dr.ClearRepeats();\n \n \n // Check 3rd task (Parameters in Tree class)\n Tree tree = new Tree();\n tree.print();\n tree.printHeight();\n tree.draw();\n }", "public static void main(String[] args) {\nBeta b=new Beta();\nb.marks();\n\n\n\t}", "public static void main(String[] args) {\n In in = new In(\"rosalind_bipartiteness.txt\");\n //First read in the number of graphs to check\n int graph_num = in.readInt();\n //For loop that calls the createGraph method once for every graph\n for (int i = 1; i <= graph_num ; i++) {\n createGraph(in);\n }\n }", "public ProgramWilmaa()\n\t{\n\t}", "public static void main(String[] args) {\n\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tSystem.out.println(outcomes(n,\"\"));\n\t\tSystem.out.println(outcomesnoconsecutiveheads(n, \"\", false));\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tlearningFunction a = new learningFunction();\n\t\t\n\t\t// variable declaretion \n\t\t\n\t\tlearningFunction b; \n\t\tint x; \n\t\t\n\t\t// initialization \n\t\t\n\t\tb=new learningFunction();\n\t\t\n\t\tcar c = new car();\n\t\t\n\t\tint l; \n\t\t\n\t\tl= a.add(10, 14);\n\t\t\n\t\ta.printName(\"dfg\");\n\t\t\n\t\tboolean z = a.iflarger(100.23, 20.23);\n\t\t//System.out.println(z);\n\t\t\n\t\tz = a.iflarger(23.34, 30.12);\n\t\t\n\t\tdouble temp = a.convertFartoCel(50.98);\n\t\t\n\t\tSystem.out.println(temp);\n\t\t\n\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tBlackBox core = new BlackBox();\n\t\tcore.newEnvironment();\n\t\t\n\t\ttry {\n\t\t\t/**\n\t\t\t * insert fire fighter agents\n\t\t\t * insert fire building tasks\n\t\t\t * insert fire station agents\n\t\t\t */\n\t\t\tcore.addAgent(FireFighter.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.variables\"));\n\t\t\tcore.addTask(FireBuildingTask.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.values\"));\n\t\t\tcore.addAgent(FireStation.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.central\"));\n\t\t\t\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcore.simulationStart();\n\t\t} catch (SimulatorException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\tfor(Variable var : core.getEnvironment().getVariables())\n\t\t{\n\t\t\tSystem.out.println(var.getClass());\n\t\t\tif(var instanceof Human){\n\t\t\t\tHuman h = (Human)var;\n\t\t\t\tSystem.out.println(\"Attributes of Human \"+h.getId());\n\t\t\t\tSystem.out.println(\"Strength \"+h.getStrength());\n\t\t\t\tSystem.out.println(\"Dexterity \"+h.getDexterity());\n\t\t\t\tSystem.out.println(\"Stamina \"+h.getStamina());\n\t\t\t\tSystem.out.println(\"Charisma \"+h.getCharisma());\n\t\t\t\tSystem.out.println(\"Appearance \"+h.getAppearance());\n\t\t\t\tSystem.out.println(\"Leadership \"+h.getLeadership());\n\t\t\t\tSystem.out.println(\"Intelligence \"+h.getIntelligence());\n\t\t\t\tSystem.out.println(\"Reasoning \"+h.getReasoning());\n\t\t\t\tSystem.out.println(\"Perception \"+h.getPerception());\n\t\t\t\tSystem.out.println(\"ph \"+((h.getStrength()-1)+(h.getDexterity()-1)+(h.getStamina()-1)));\n\t\t\t\tSystem.out.println(\"sc \"+((h.getCharisma()-1)+(h.getAppearance()-1)+(h.getLeadership()-1)));\n\t\t\t\tSystem.out.println(\"mn \"+((h.getIntelligence()-1)+(h.getReasoning()-1)+(h.getPerception()-1)));\n\t\t\t\tSystem.out.println(\"will \"+h.getWill());\n\t\t\t\tSystem.out.println(\"x \"+h.getX());\n\t\t\t\tSystem.out.println(\"y \"+h.getY());\n\t\t\t\tSystem.out.println(\"domain \"+h.getDomain().size());\n\t\t\t\tSystem.out.println();\n\t\t\t}else if(var instanceof FireStation){\n\t\t\t\tFireStation h = (FireStation)var;\n\t\t\t\tSystem.out.println(\"Attributes of the Fire Station \"+h.getId());\n\t\t\t\tSystem.out.println(\"x \"+h.getX());\n\t\t\t\tSystem.out.println(\"y \"+h.getY());\n\t\t\t\tSystem.out.println(\"domain \"+h.getDomain().size());\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tfor(Value val : core.getEnvironment().getValues())\n\t\t{\n\t\t\tSystem.out.println(val.getClass());\n\t\t\tFireBuildingTask t = (FireBuildingTask)val;\n\t\t\tSystem.out.println(\"Attributes of building \"+t.getId());\n\t\t\tSystem.out.println(\"Temperature \"+t.getTemperature());\n\t\t\tSystem.out.println(\"Floors \"+t.getFloors());\n\t\t\tSystem.out.println(\"Ground Area \"+t.getGroundArea());\n\t\t\tSystem.out.println(\"Success \"+t.getSuccess());\n\t\t\tSystem.out.println(\"HP \"+t.getBuildingHP());\n\t\t\tSystem.out.println(\"x \"+t.getX());\n\t\t\tSystem.out.println(\"y \"+t.getY());\n\t\t}*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {/\n\t\t// Exercise 1 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"Exercise 1\");\n\t\tSystem.out.println(\"-----------\");\n\t\t\n\t\tint[] inputs = {1,0,1,1};\n\t\tint[] outputs = {0,0,1,1};\n\t\tNetwork n = new Network(inputs.length);\n\t\ttrainNet(n, inputs, outputs);\n\t\tint[] result = n.test(inputs, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 2 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"\\nExercise 2\");\n\t\tSystem.out.println(\"-----------\");\n\t\tint[] modifiedI = {1,0,0,1};\n\t\tSystem.out.println(\"Testing with incomplete input: \" + Arrays.toString(modifiedI));\n\t\tresult = n.test(modifiedI, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 3 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"\\nExercise 3\");\n\t\tSystem.out.println(\"-----------\");\n\t\tint[] noizyI = {1,1,1,1};\n\t\tSystem.out.println(\"Testing with noizy input: \" + Arrays.toString(noizyI));\n\t\tresult = n.test(noizyI, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\tSystem.out.println(n);\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 4 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"\\nExercise 4\");\n\t\tSystem.out.println(\"-----------\");\n\t\tinputs = new int[] {1,0,1,0,0,1};\n\t\toutputs = new int[] {1,1,0,0,1,1};\n\t\tint[] newIns = {0,1,1,0,0,0};\n\t\tint[] newOuts = {1,1,0,1,0,1};\n\t\tn = new Network(inputs.length);\n\t\ttrainNet(n, inputs, outputs);\n\t\ttrainNet(n, newIns, newOuts);\n\t\tresult = n.test(inputs, true);\n\t\tSystem.out.println(\"load param: \" + n.getLoadParameter());\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\tint[] newResult = n.test(newIns, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(newResult));\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 5 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"\\nExercise 5\");\n\t\tSystem.out.println(\"-----------\");\n\t\tmodifiedI = new int[] {1,0,0,0,0,1};\n\t\tSystem.out.println(\"Testing with incomplete input:\");\n\t\tresult = n.test(modifiedI, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\tmodifiedI = new int[] {0,1,0,0,0,0};\n\t\tSystem.out.println(\"Testing with noisy input:\");\n\t\tresult = n.test(modifiedI, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 6 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\tSystem.out.println(\"\\nExercise 6\");\n\t\tSystem.out.println(\"-----------\");\n\t\tint size = 10, iterations = 500, total = 0, maxCount = 0;\n\t\tdouble loadParameter = 0, maxLoad = 0, synapsesLoad = 0, maxSyn = 0;\n\t\tfor(int j = 0 ; j < iterations ; j++) {\n\t\t\tNetwork net = new Network(size);\n\t\t\tint[][] inPatterns = generateRandomPatterns(size);\n\t\t\tint[][] outPatterns = generateRandomPatterns(size);\n\t\t\tint count = 0;\n\t\t\tfor(int i = 0 ; i < inPatterns.length ; i++) {\n\t\t\t\tnet.train(inPatterns[i], outPatterns[i]);\n\t\t\t\tint[] res = net.test(inPatterns[i], false);\n\t\t\t\tif(Arrays.equals(res, outPatterns[i])) {\n\t\t\t\t\tcount++;\n\t\t\t\t} else {\n\t\t\t\t\t// network has made an error\n\t\t\t\t\tnet.pop();\n\t\t\t\t\tdouble lp = net.getLoadParameter();\n\t\t\t\t\tdouble sl = net.synapsesLoad();\n\t\t\t\t\tloadParameter += lp;\n\t\t\t\t\tsynapsesLoad += sl;\n\t\t\t\t\tif(lp > maxLoad)\n\t\t\t\t\t\tmaxLoad = lp;\n\t\t\t\t\tif(sl > maxSyn)\n\t\t\t\t\t\tmaxSyn = sl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttotal += count;\n\t\t\tif(count > maxCount)\n\t\t\t\tmaxCount = count;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Network of size: \" + size);\n\t\tSystem.out.println(\"Network on average trained: \" + total/iterations + \" patterns\");\n\t\tSystem.out.println(\"Network average load param: \" + loadParameter/iterations);\n\t\tSystem.out.println(\"Network average synapses load: \" + synapsesLoad/iterations);\n\t\tSystem.out.println(\"Network max load parameter: \" + maxLoad);\n\t\tSystem.out.println(\"Network max synapses load: \" + maxSyn);\n\t\tSystem.out.println(\"Network max number of trained patterns: \" + maxCount);\n\t}", "public abstract void runAlgorithm();", "public static void main(String[] args) {\n car car = new car(8,\"Base Car\");\n System.out.println(car.startEngine());\n System.out.println(car.accelerate());\n System.out.println(car.brake());\n\n //output for the lamborghini car\n lambo gall = new lambo(8,\"Gallardo\");\n System.out.println(gall.startEngine());\n System.out.println(gall.accelerate());\n System.out.println(gall.brake());\n\n //output for the ferrari car\n ferrari ferr = new ferrari(6,\"F30\");\n System.out.println(ferr.startEngine());\n System.out.println(ferr.accelerate());\n System.out.println(ferr.brake());\n\n }", "public void solution() {\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n map.put(\"paper\", new double[]{1, 0, 0});\n map.put(\"rock\", new double[]{0, 1, 0});\n map.put(\"scissors\", new double[]{0, 0, 1});\n reverseMap.put(0, \"paper\");\n reverseMap.put(1, \"rock\");\n reverseMap.put(2, \"scissors\");\n\n PictureAccessor.TrainingData trainingData = pictureAccessor.getTrainingData(trainingFolder, numberOfPixels, numberOfOutputs, map, width, height);\n NeuralNetwork neuralNetwork = new NeuralNetwork();\n BasicNetwork basicNetwork = neuralNetwork.trainSystem(trainingData.input, trainingData.output, numberOfPixels, numberOfOutputs);\n compute(basicNetwork);\n }", "public void Main(){\n\t\t\n\t\tfillSFG();\n\t\tboolean[] visited = new boolean[AdjMatrix.length];\n\t\tLinkedList<Integer> pathdump = new LinkedList<Integer>();\n\t\textractForwardPaths(startNode, endNode, startNode, visited, pathdump);\n\t\textractLoops();\n\t\tgetForwardGains();\n\t\tgetLoopGains();\n\t\tprintForwardPaths();\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintLoops();\n\t\t\n\t\t\n\t\tcalculateDeltas();\n\t\tcalculateTotalGain();\n\t\tprintDeltasAndTotalGain();\n\t\t\n\t\tfor (int i = 1; i < nonTouching.length; i++) {\n\t\t\tSystem.out.println(\"Level = \"+i);\n\t\t\tfor (int j = 0; j < nonTouching[i].size(); j++) {\n\t\t\t\tLinkedList<Integer> dump = new LinkedList<Integer>();\n\t\t\t\tdump = nonTouching[i].get(j);\n\t\t\t\tfor (int k = 0; k < dump.size(); k++) {\n\t\t\t\t\tSystem.out.print(dump.get(k)+\" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tSystem.out.println(\"************************************************\");\n\t\t}\n\t\t\n\t\tProgramWindow.getInstance().showResults(forwardPaths,forwardGains,loops,loopGains,deltas,TotalGain,nonTouching);\n\t}", "public void runProgram() {\n\n\t\tSystem.out.println(\"\\n Time to start the machine... \\n\");\n\n\t\tpress.pressOlive(myOlives);\n\n\t\tSystem.out.println(\"Total amount of oil \" + press.getTotalOil());\n\t}", "public static void main(String[] args) {\n\t\tint[] niz = new int[100];\r\n\t\t// dodjeljuje random vrijednosti od 0 do 9 u niz\r\n\t\tfor (int i = 0; i < niz.length; i++) {\r\n\t\t\tniz[i] = (int) (Math.random() * 10);\r\n\t\t}\r\n\t\t// niz za brojanje brojeva koji se ponavljaju\r\n\t\tint[] brojac = new int[10];\r\n\t\tfor (int e : niz) {\r\n\t\t\tbrojac[e]++;\r\n\t\t}\r\n\t\t// ispisuje koliko se puta ponovio broj\r\n\t\tfor (int j = 0; j < brojac.length; j++) {\r\n\t\t\tif (brojac[j] != 0) {\r\n\t\t\t\tSystem.out.println(\"Broj \" + j + \" ponovio se \" + brojac[j] + \" puta.\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) \n {\n //Read how many campuses are needed to be solved for\n scan = new Scanner(System.in);\n int n = scan.nextInt();\n \n //Loop through every campus\n for (c = 1; c <= n; c++)\n {\n //Build all the tunnels in the most efficient way\n buildTunnels();\n \n //Check that tunnels connect all the hills and print their result\n printAnswer(connectedHills == h);\n }\n }", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "public static void main (String[] arg){\n\n Personnage[] tpers = {new Guerrier(),new Sniper(),new Chirirugien(),new Medecin(), new Civil()};\n\n for (Personnage p : tpers) {\n\n System.out.println(\"\\t Instancier de\" +p.getClass().getName());\n System.out.println(\"********************************\");\n p.seDeplacer();\n p.soigne();\n p.combattre();\n\n\n }\n System.out.println(\"********************************\");\n Personnage pers = new Guerrier();\n pers.soigne();\n pers.setSoin(new Operation(\n\n ));\n pers.soigne();\n }", "public static void main(String[] args) {\n WordNet tester = new WordNet(\"synsets.txt\", \"hypernyms.txt\");\n StdOut.println(\n \"isNoun test: This should return true and it returns \" + tester.isNoun(\"mover\"));\n StdOut.println(\"distance test: This should return 3 and it returns \" + tester\n .distance(\"African\", \"renegade\"));\n StdOut.println(\n \"sca test: This should return person individual someone somebody mortal soul and it returns \"\n + tester\n .sca(\"African\", \"renegade\"));\n\n // Commented because output is large\n //StdOut.println(\"nouns test: This should return all of the nouns and it returns \" + tester.nouns());\n\n }", "public static void main(String[] args) {\n\n SuccessorGenerator successorGenerator = new TicTacToeGenerator();\n GameState initialState = (new NewGameState(\"\")).getInitialState();\n GameState finalState = null;\n\n createTree(successorGenerator, initialState);\n fillEvaluations(initialState, Player.PLAYER_MAX);\n finalState = playGame(initialState, GameStyle.RANDOM_VS_RANDOM);\n\n System.out.println(\"\\nO jogo terminou no seguinte estado:\\n\");\n System.out.println(finalState.toFormattedString());\n System.out.println(\"\\nResultado: \"+Double.toString(finalState.getEvaluation()));\n }", "public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }", "public static void main() {\n \n }", "public static void selfTest()\n {\n\t\tBoatGrader b = new BoatGrader();\n\t\t \n\t\tSystem.out.println(\"\\n ***Testing Boats with only 2 children***\");\n\t\tbegin(0, 2, b);\n\t\t \n\t\t// System.out.println(\"\\n ***Testing Boats with 2 children, 1 adult***\");\n\t\t// \t begin(1, 2, b);\n\t\t \n\t\t// System.out.println(\"\\n ***Testing Boats with 3 children, 3 adults***\");\n\t\t// begin(3, 3, b);\n }", "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "public void think() {\n\t\t\n\t}", "public static void main()\n\t{\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString [] words ={\"good\", \"bad\"};\n\t\tNaiveBayes nb =new NaiveBayes(words);\n\t\tnb.trainClassifier(new File(\"traindata.txt\"));\n\t\tnb.classifyFile(new File(\"newdata.txt\"),new File(\"classifications.txt\"));\n\t\t\n\t\t\n\t\t//To test the accuracy. Still in work\n\t\t\n//\t\tString [] words ={\"good\", \"bad\"};\n//\t\tNaiveBayes nb =new NaiveBayes(words);\n//\t\tnb.trainClassifier(new File(\"traindata.txt\"));\n//\t\tConfusionMatrix cm = nb.computeAccuracy(new File(\"testdata.txt\"));\n//\t\tSystem.out.println(cm.getTruePositives());\n//\t\tSystem.out.println(cm.getFalsePositives());\n//\t\tSystem.out.println(cm.getTrueNegatives());\n//\t\tSystem.out.println(cm.getFalseNegatives());\n\t\t\n\t}", "public static void main(String[] args)\n\t{\n\n\t\tAnalyzer analyzer = new Analyzer()\n\t\t.withProblemClass(MOEAExperimentProblem.class)\n\t\t.includeAllMetrics()\n\t\t.showStatisticalSignificance();\n\n\t\tNondominatedPopulation result= new Executor()\n\t\t\t.withProblemClass(MOEAExperimentProblem.class)\n\t\t\t.withAlgorithm(\"NSGAII\")\n\t\t\t.withMaxEvaluations(20000)\n\t\t\t.withProperty(\"populationSize\", 100)\n\t\t\t//.withInstrumenter(instrumenter)\n\t\t\t.run();\n\n\t\tint n=0;\n\t\tfor (Solution solution : result)\n\t\t{\n\t\t\tSystem.out.println(\"Solution \" + n + \": \" + solution.getObjective(0) + \" \" + solution.getObjective(1));\t\n\t\t\tn++;\n\t\t}\n\t\t/*Accumulator accumulator = instrumenter.getLastAccumulator();\n\t\tfor (int i=0; i<accumulator.size(\"NFE\"); i++) {\n\t\t\tSystem.out.println(accumulator.get(\"NFE\", i) + \"\\t\" +\n\t\t\taccumulator.get(\"GenerationalDistance\", i));\n\t\t}*/\n\n\n\t\t/*this runs in some sort of analysis mode..\n\t\tExecutor executor = new Executor()\n\t\t\t.withProblemClass(MOEAExperimentProblem.class)\n\t\t\t.withMaxEvaluations(10000);\n\n\t\tanalyzer.addAll(\"NSGAII\",\n\t\texecutor.withAlgorithm(\"NSGAII\").runSeeds(50));\n\t\ttry\n\t\t{\n\t\t\tanalyzer.printAnalysis();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"error with analysis\");\n\t\t\te.printStackTrace();\n\t\t}*/\n\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tGraph g = new Graph(9);\n\t\tg.addEdge(0, 1);\n\t\tg.addEdge(1, 2);\n\t\tg.addEdge(1, 3);\n\t\tg.addEdge(2, 4);\n\t\tg.addEdge(2, 3);\n\t\tg.addEdge(3, 4);\n\t\tg.addEdge(3, 5);\n\t\tg.addEdge(5, 6);\n\t\tg.addEdge(5, 7);\n\t\tg.addEdge(6, 8);\n\t\t\n\t\t\n\t\tSystem.out.println(\"0부터 넓이 우선 탐색 \");\n\t\tg.bfs();\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tm = 250;\n\t\tdouble coupon = 0.0;\n\t\tdouble birthday = 0.0;\n\t\tfor (int i = 0; i < iteration; i++) {\n\t\t\tarray = new int[m];\n\t\t\tArrays.fill(array, -1);\n\t\t\tresult = new int[2];\n\t\t\thash();\n\t\t\tcoupon = coupon + result[0];\n\t\t\tbirthday = birthday + result[1];\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"Coupon Collector prog :\" + coupon / iteration);\n\t\tSystem.out.println(\"Coupon Collector theory :\" + Math.sqrt(Math.PI * m / 2));\n\t\tSystem.out.print(\"\\n\");\n\t\tSystem.out.println(\"Birthday prog :\" + birthday / iteration);\n\t\tSystem.out.println(\"Birthday theory :\" + m * Math.log(m));\n\t\t\n\t}", "private static void startWork()\n {{\n String ftnTxt= null;\n FileToFtnParser parser= new FileToFtnParser( arg_ir_filename );\n String hashes39= \"#######################################\";\n\n while( true ) {\n\t ftnTxt= parser.parseFtn();\n\t if ( ftnTxt == null ) { break; }\n\t if ( arg_verbosity > 1 ) {\n\t System.out.println ( hashes39+ hashes39 );\n\t System.out.println ( \"found function: <<EOF \" );\n\t System.out.println ( ftnTxt );\n\t System.out.println ( \"EOF\" );\n\t }\n\n\t FtnParts ftnParts= new FtnParts( ftnTxt );\n\n\t if ( arg_verbosity > 0 ) {\n System.out.println( \"---\" );\n\t System.out.println( \"function: \" );\n\t System.out.println( ftnParts.toString() );\n\t }\n\n\t TestGenerator generator= new TestGenerator( ftnParts, arg_numCalls );\n\t String outFilename= arg_outDirname+ File.separator+ \n\t ftnParts.getNameWithoutSigil()+ \".ll\";\n\t generator.generate( outFilename );\n }\n\n }}", "public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}", "public static void main(){\n\t}", "public static void main(String[] args)\n\t{\n\t\talg.ub.predictor.Predictor predictorUB = new alg.ub.predictor.Resnick();\n\t\talg.ub.neighbourhood.Neighbourhood neighbourhoodUB = new ThresholdNeighbourhood(20,0);\n\t\tSimilarityMetric metricUB = new HybridSim(0.4,0.5,0.1);\n\t\t\n\t\t// configure the Item-based CF algorithm - set the predictor, neighbourhood and similarity metric ...\n\t\tPredictor predictorIB = new Resnick();\n\t\tNeighbourhood neighbourhoodIB = new kNearestNeighbourhood(20);\n\t\tSimilarityMetric metricIB = new HybridSim(0.8,0.3,0.1);\n\n\t\t\n\t\t// set the paths and filenames of the item file, train file and test file ...\n\t\tString itemFile = \"ML dataset\" + File.separator + \"u.item\";\n\t\tString trainFile = \"ML dataset\" + File.separator + \"u.train\";\n\t\tString testFile = \"ML dataset\" + File.separator + \"u.test\";\n\t\t\n\t\t// set the path and filename of the output file ...\n\t\tString outputFile = \"results\" + File.separator + \"predictions.txt\";\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Evaluates the CF algorithm:\n\t\t// - the RMSE (if actual ratings are available) and coverage are output to screen\n\t\t// - the output file is created\n\t\tDatasetReader reader = new DatasetReader(itemFile, trainFile, testFile);\n\t\t\n\t\tCFAlgorithm hbcf = new HybirdBasedCF(predictorIB, predictorUB, neighbourhoodIB, neighbourhoodUB, metricIB, metricUB, reader);\n\t\tEvaluator eval = new Evaluator(hbcf, reader.getTestData());\n\t\teval.writeResults(outputFile);\n\t\t\n\t\tDouble RMSE = eval.getRMSE();\n\t\tif(RMSE != null) System.out.println(\"RMSE: \" + RMSE);\n\t\t\n\t\tfor(int i = 1; i <= 5; i++)\n\t\t{\n\t\t\tRMSE = eval.getRMSE(i);\n\t\t\tif(RMSE != null) System.out.println(\"RMSE (true rating = \" + i + \"): \" + RMSE);\n\t\t}\n\t\t\n\t\tdouble coverage = eval.getCoverage();\n\t\tSystem.out.println(\"coverage: \" + coverage + \"%\");\n\t}", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public void belajar(){\n\t\tSystem.out.println(\"Belajar java di \"+tempat+\" selama \"+jamBelajar+\" jam\");\n\t}", "public static void main(String[] args) {\n \n\t\tAudi audi = new Audi();\n\t\t\n\t\taudi.go();\n\t\t\n\t\tTrain train = new Train();\n\t\t\n\t\ttrain.go();\n\t\t\n\t\ttrain.setGoByAlgo(new GoByCar());\n\t\t\n\t\ttrain.go();\n\t\t\n\t\t\n\t}", "boolean run();", "@Override\n\tpublic void run() {\n\t\tfileName = \"out_\" + Program.getProgram().getFileName() + \"_\";\n\t\tint numAddStop = 0;\n\t\t//fileName = \"out_themida_\";\n\n\t\t//fileState.clearContentFile();\n\t\t//bkFile.clearContentFile();\n\t\toverallStartTime = System.currentTimeMillis();\n\t\tlong overallStartTemp = overallStartTime;\n\t\t// BE-PUM algorithm\n\t\tSystem.out.println(\"Starting On-the-fly Model Generation algorithm.\");\n\t\tprogram.getResultFileTemp().appendInLine('\\n' + program.getFileName() + '\\t');\n\t\t\n\t\t// Set up initial context\n\t\tX86TransitionRule rule = new X86TransitionRule();\n\t\tBPCFG cfg = Program.getProgram().getBPCFG();\n\t\tEnvironment env = new Environment();\n\t\t//env.getMemory().resetImportTable(program);\n\t\tAbsoluteAddress location = Program.getProgram().getEntryPoint();\n\t\tInstruction inst = Program.getProgram().getInstruction(location, env);\n\t\tList<BPPath> pathList = new ArrayList<BPPath>();\n\t\t\n\t\t// Insert start node\n\t\tBPVertex startNode = null;\n\t\tstartNode = new BPVertex(location, inst);\n\t\tstartNode.setType(0);\n\t\tcfg.insertVertex(startNode);\n\n\t\tBPState curState = null;\n\t\tBPPath path = null;\n\t\tcurState = new BPState(env, location, inst);\n\t\tpath = new BPPath(curState, new PathList(), new Formulas());\n\t\tpath.setCurrentState(curState);\n\t\tpathList.add(path);\n\n\t\t/*if (Program.getProgram().getFileName().equals(\"api_test_v2.3_lvl1.exe\") \n\t\t\t\t&& isRestored) {\n\t\t\tSystem.out.println(\"Restore State from File.\");\n\t\t\tFileProcess reFile = new FileProcess(\"data/data/restoreState.txt\");\n\t\t\tpathList = restoreState(reFile);\n\t\t\t// bkFile.clearContentFile();\n\t\t\tSystem.out.println(\"Finished restoring state!\");\n\t\t}*/\n\n\t\t// Update at first -----------------------------\n\t\tTIB.setBeUpdated(true);\n\t\tTIB.updateTIB(curState);\n\t\t// ---------------------------------------------\n\n\t\t// PHONG - 20150801 /////////////////////////////\n\t\t// Packer Detection via Header\n\t\tSystem.out.println(\"================PACKER DETECTION VIA HEADER ======================\");\n\t\tif (OTFModelGeneration.detectPacker)\n\t\t{\n\t\t\tprogram.getDetection().detectViaHeader(program);\n\t\t\tprogram.getDetection().setToLogFirst(program);\n\t\t}\n\t\tSystem.out.println(\"==================================================================\");\n\t\t/////////////////////////////////////////////////\n\t\t\n\t\tsynchronized (OTFThreadManager.getInstance()) {\n\t\t\ttry {\n\t\t\t\tOTFThreadManager.getInstance().check(this, pathList);\n\t\t\t\tOTFThreadManager.getInstance().wait();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// PHONG - 20150724\n\t\tSystem.out.println(\"================PACKER DETECTION VIA OTF======================\");\n\t\tprogram.getDetection().packedByTechniques();\n\t\tprogram.getDetection().packedByTechniquesFrequency();\n\t\tSystem.out.println(\"==============================================================\");\n\t}", "public static void main(String[] args) {\n\t\t/*Tuple[] tuples = new Tuple[]{\n\t\t\tnew Tuple(\"0 0 1 0 0\", \"1 3\", ' '),\n\t\t\tnew Tuple(\"1 0 0 1 1\", \"1 2\", ' '),\n\t\t\tnew Tuple(\"0 0 0 1 1\", \"1 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"2 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"3 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"3 2\", ' '),\n\t\t\tnew Tuple(\"0 0 0 1 0\", \"3 3\", ' '),\n\t\t\tnew Tuple(\"0 1 0 1 1\", \"2 3\", ' ')\n\t\t};\n\t\tdata = new DataSet(tuples);*/\n\t\t\n\t\t//data = Parser.parseAttributes(\"Corel5k-train.arff\", 374);\n\t\tdata = Parser.parseShortNotation(\"diabetes.txt\", 1, new NumericalItemSet(new int[]{}));\n\t\ts = data.s();\n\t\tn = data.getTuples().length;\n\t\tm = data.getTuples()[0].getClassValues().length;\n\t\t\n\t\t/*double u = 0;\n\t\tlong l = 0;\n\t\tfor(int j = 0; j < 10; j++) {\n\t\t\tdouble t = System.currentTimeMillis();\n\t\t\tfor(int i = 0; i < 10000; i++)\n\t\t\t\tu = data.getBluePrint().getOneItemSet(2, 48).ub();\n\t\t\tl += (System.currentTimeMillis() - t);\n\t\t}\n\t\tSystem.out.println(((double)l/10));*/\n\t\n\t\t\n\t\tSystem.out.println(\"Data loaded, \"+data.getTuples().length+\" tuples, \"+\n\t\t\t\tdata.getTuples()[0].getItemSet().getLength()+\" items, \"+\n\t\t\t\tdata.getTuples()[0].getClassValues().length+\" class values\");\n\t\t\t\t\n\t\tStopWatch.tic(\"Full time\");\n\t\tSystem.out.println(icc());\n\t\tStopWatch.printToc(\"Full time\");\n\t}", "public static void main(String[] args) {\n\t\tDog dog=new Dog(12,30);\r\n\t\tLion lion=new Lion(14,100);\r\n\t\tSystem.out.println(dog.height+\" \"+dog.weight);\r\n\t\tdog.talk();\r\n\t\tSystem.out.println(lion.height+\" \"+lion.weight);\r\n\t\tlion.talk();\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args)\n {\n WordNet obj=new WordNet(\"synsets.txt\", \"hypernyms.txt\");\n System.out.println(obj.g.V()+\" \"+obj.g.E());\n System.out.println(obj.h2.size());\n System.out.println(obj.distance(\"American_water_spaniel\", \"histology\"));\n }", "public static void main(String[] args) {\n\t\tString solutionFile = \"dataset/vlc/task1_solution.en.clusterMle.txt\";\n//\t\tString queryFile = \"dataset/vlc/task1_query.en.f8.n5.txt\";\n//\t\tString targetFile = \"dataset/vlc/task1_target.en.f8.n5.txt\";\n//\t\tString linkFile = \"dataset/vlc/sim_0p_100n.csv\";\n\t\t\n\t\tString malletFile = \"dataset/vlc/folds/all.0.4189.mallet\";\n\t\tString queryFile = \"dataset/vlc/folds/query.0.csv\";\n\t\tString targetFile = \"dataset/vlc/folds/target.0.csv\";\n\t\tString linkFile = \"dataset/vlc/folds/trainingPairs.0.csv\";\n\t\t\n\t\tdouble alpha = 0.01, beta = 0.01, lambda = 0.01;\n\t\t\n\t\tMalletMleCluster clusterMle = new MalletMleCluster(malletFile, linkFile, alpha);\n\t\tTask1Solution solver = new Task1Solution(clusterMle);\n//\t\tfor(alpha = 0.1; alpha<1; alpha += 0.2) {\n//\t\t\tfor(beta = 0.1; beta<1; beta += 0.2) {\n\t\t\t\tfor (lambda = 0.1; lambda<1; lambda += 0.05) {\n\t\t\tclusterMle.setSmoothParameters(alpha, beta, lambda);\n//\t\t\tclusterMle.retrieveTask1Solution(queryFile, solutionFile);\n\t\t\ttry {\n\t\t\t\tsolver.retrieveTask1Solution(queryFile, solutionFile);\n\t\t\t\tdouble precision = Task1Solution.evaluateResult(targetFile, solutionFile);\n\t\t\t\tSystem.out.println(\"alpha: \" + alpha + \"beta: \" + beta + \n\t\t\t\t\t\t\", Lambda: \" + lambda + \", Mle precision: \" + precision);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n\t\tsc.init();\n\t\tanswer = 0;\n\t\tN = sc.nextInt(); // 2~1000\n\t\tM = sc.nextInt(); // 2~1000\n\t\tlattice = new boolean[N][M]; // 1,1부터 시작\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < M; j++) {\n\t\t\t\tlattice[i][j] = (sc.nextInt() == 0) ? false : true;\n\t\t\t}\n\t\t}\n\t\t// 상하좌우 둘레 모두 true로 변경\n\t\t/*\n\t\t * for (int i = 0; i < N+2; i++) { lattice[0][i] = true; lattice[i][0] = true;\n\t\t * lattice[N+1][i] = true; lattice[i][N+1] = true; }\n\t\t */\n\t\tH = sc.nextInt(); // 1 ~ N\n\t\tW = sc.nextInt(); // 1 ~ M\n\t\tSr = sc.nextInt() - 1; // 1 ~ N-H+1 // 1,1부터\n\t\tSc = sc.nextInt() - 1;\n\t\tFr = sc.nextInt() - 1; // 1 ~ N-H+1\n\t\tFc = sc.nextInt() - 1; // 1 ~ M-W+1 //\n\n\t\tint n = N - H + 1;\n\t\tint m = M - W + 1;\n\t\tmap = new boolean[n][m];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tmap[i][j] = check(i, j);\n\t\t\t}\n\t\t}\n\n\t\tif (calc(0)) {\n\t\t\tSystem.out.println(answer);\n\t\t} else {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tHuman a = new Human();\r\n\t\tHuman b = new Human();\r\n\t\ta.attack(b);\r\n\t\ta.showHealth();\r\n\t\tb.showHealth();\r\n\t\t\r\n\t\tWizard wizard1 = new Wizard();\r\n\t\twizard1.fireBall(a);\r\n\t\twizard1.heal(wizard1);\r\n\t\twizard1.showHealth();\r\n\t\t\r\n\t\tSamurai s1 = new Samurai();\r\n\t\ts1.howMany();\r\n\t\tSamurai s2 = new Samurai();\r\n\t\ts1.howMany();\r\n\t\ts2.howMany();\r\n\t}", "public static void main(String [] arg) throws IOException{\n\t\tSequenceDatabase2 sequenceDatabase2 = new SequenceDatabase2(); \n\t\tsequenceDatabase2.loadFile(fileToPath(\"contextPrefixSpan-conClases.txt\"));\n\t\t//sequenceDatabase2.loadFile(fileToPath(\"ejemplo-3clases.txt\"));\n\t\t//sequenceDatabase2.print();\n\t\t\n\t\tint minsup2 = 2; // we use a minsup of 2 sequences\n\t\t\n\t\tint k = 5;\n\t\t\n\t\t// Create an instance of the algorithm\n\t\tAlgoBIDEPlus2 algo = new AlgoBIDEPlus2();\n\t\t\n // if you set the following parameter to true, the sequence ids of the sequences where\n // each pattern appears will be shown in the result\n boolean showSequenceIdentifiers = false;\n\t\t\n\t\t// execute the algorithm\n//\t\tSequentialPatterns patterns = algo.runAlgorithm(sequenceDatabase2, null, minsup2, k);\n//\t\talgo.printStatistics(sequenceDatabase2.size());\n//\t\tpatterns.printFrequentPatterns(sequenceDatabase2.size(),showSequenceIdentifiers);\n Map<String,List<SequentialPatterns>> mapaPatrones = algo.runAlgorithm(sequenceDatabase2, null, minsup2, k);\n \n algo.printStatistics(sequenceDatabase2.size());\n \n for(String clase: mapaPatrones.keySet()) {\n \tSystem.out.println(\"c: \" + clase);\n\t Iterator<SequentialPatterns> iterator = mapaPatrones.get(clase).iterator();\n\t while (iterator.hasNext()) {\n\t \tSequentialPatterns auxPatterns = iterator.next();\n\t \tauxPatterns.printFrequentPatterns(sequenceDatabase2.size(),showSequenceIdentifiers);\n\t }\n } \n\t}", "public static void main(String[] args) \n\t{\n\t Scanner sc = new Scanner(System.in);\n\t \n\t // Input the number of test cases\n\t int t = sc.nextInt();\n\t \n\t while (t > 0)\n\t {\n\t // Input the number\n\t \tint N = sc.nextInt();\n\t \t\n\t \tprintBinaries(N);\n\t \t\n\t t--;\t \n\t }\t \n\t sc.close();\n\n\t}", "private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligence)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public static void main(String[] args) {\n\n\t\tBOA b=new BOA();\n\t\tb.trust();\n\t\tb.deposit();\n\t\tb.financing();\n\t\tb.givecredit();\n\t\tb.withdraw();\n\t\tSystem.out.println(\"----------------------------------------\");\n\t\tBank ba=new BOA();\n\t\tba.deposit();\n\t\tba.trust();\n\t\tba.withdraw();\n\t}", "public static void main(String[] args) {\n\t\tHorseList.add(new Horse1(\"0번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"1번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"2번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"3번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"4번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"5번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"6번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"7번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"8번마\",1));\n\t\tRunning.add(0);\n\t\tHorseList.add(new Horse1(\"9번마\",1));\n\t\tRunning.add(0);\n\n\t\t\n\t\tfor(Horse1 hs : HorseList) {\n\t\t\ths.start();\t\n\t\t}\n\t\t\n\t\tfor(int i=0; i<55; i++) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t\tfor (Horse1 hs : HorseList) {\n\t\t\t\t\t\tString result =\"\";\n\t\t\t\t\t\tresult +=hs.getNm();\n\t\t\t\t\t\tfor (int j = 0; j < 50; j++) {\n\t\t\t\t\t\tif(j==Running.get(Integer.parseInt(hs.getNm().substring(0,1)))) {\n\t\t\t\t\t\t\tresult +=\"♘>\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tresult +=\"-\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(result);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"경기 끝...\");\n\t\tSystem.out.println(\"---------------------\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" 경기 결과 \");\n\t\tSystem.out.println(\"=================전역변수로정렬===================\");\n\t\tSystem.out.println(\" 1등 2등 3등 4등 5등 6등 7등 8등 9등 10등\");\n\t\tSystem.out.println(\"말이름 : \" + strRank);\n\t\tSystem.out.println(\"=================compare정렬전===================\");\t\t\n\t\tfor(Horse1 hs : HorseList) {\n\t\t\tSystem.out.println(hs.getNm() + \" : \" + hs.getRank() + \"등\");\n\t\t}\n\t\tSystem.out.println(\"=================compare정렬후===================\");\n\t\tCollections.sort(HorseList, new Sortrank1());\n\t\tfor(Horse1 hs : HorseList) {\n\t\t\tSystem.out.println(hs.getNm() + \" : \" + hs.getRank()+ \"등\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tPerson John = new Person(\"John\",1957);\r\n\t\tJohn.display();\r\n\t\tJohn.Senority();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n String dataset = args[1];\n if(args[0].equals(\"nb\")) {\n if (args.length > 2) {\n boolean cf = Boolean.parseBoolean(args[2]);\n int ngram = Integer.parseInt(args[3]);\n if(dataset.equals(\"small\"))\n naiveBayes(cf, ngram);\n else {\n indexFileRead_TREC(cf, ngram);\n //testNewNaiveBayes(cf, ngram);\n //naiveBayesClassifier(cf, ngram);\n }\n\n }else {\n if(dataset.equals(\"small\"))\n naiveBayes(false, 0);\n else {\n indexFileRead_TREC(false, 0);\n //testNewNaiveBayes(false, 0);\n //naiveBayesClassifier(false, 0);\n }\n }\n }else if(args[0].equals(\"svm\")) {\n if (args.length > 2) {\n boolean rp = Boolean.parseBoolean(args[2]);\n int size = Integer.parseInt(args[3]);\n svm_test(rp, size);\n } else\n svm_test(false, 0);\n }\n //indexFileRead_LBJ();\n\t}", "private void run() {\n final int[][] graph = new int[][] {\n {0, 16, 13, 0, 0, 0},\n {0, 0, 10, 12, 0, 0},\n {0, 4, 0, 0, 14, 0},\n {0, 0, 9, 0, 0, 20},\n {0, 0, 0, 7, 0, 4},\n {0, 0, 0, 0, 0, 0}\n };\n\n System.out.println(String.format(\"The maximum possible flow is %d\", fordFulkerson(graph, 0, 5)));\n }", "public static void main(String[] args)\n\t{\tint generation = 0;\n\t\tint sum = 0;\n\t\tExecutor exec=new Executor();\n\t\t\n\t\tGeneticController pacman = new GeneticController();\n\t\tController<EnumMap<GHOST,MOVE>> ghosts = new Legacy();\n\n\n\t\tLispStatements ls = new LispStatements();\n\t\tArrayList<String> functionSet = new ArrayList<>();\n\t\tfunctionSet.add(\"2ifblue\");\n\t\tfunctionSet.add(\"4ifle\");\n\t\tfunctionSet.add(\"2ifindanger\");\n\t\tfunctionSet.add(\"2ifpowerpillscleared\");\n\t\tfunctionSet.add(\"2istopowersafe\");\n\t\tArrayList<String> terminalSet = new ArrayList<>();\n\t\tterminalSet.add(\"distToPill\");\n\t\tterminalSet.add(\"distToPower\");\n\t\tterminalSet.add(\"distGhost\");\n\t\tterminalSet.add(\"distTo2ndGhost\");\n\t\tterminalSet.add(\"distTo3rdGhost\");\n\t\tterminalSet.add(\"distToEdibleGhost\");\n\t\tterminalSet.add(\"distToNonEdibleGhost\");\n\t\tterminalSet.add(\"moveToFood\");\n\t\tterminalSet.add(\"moveToPower\");\n\t\tterminalSet.add(\"moveToEdibleGhost\");\n\t\tterminalSet.add(\"moveFromNonEdibleGhost\");\n\t\tterminalSet.add(\"moveFromPower\");\n\t\tterminalSet.add(\"runaway\");\n\t\ttry {\n\t\t\tls.setFunctionalSet(functionSet);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\t\tls.setTerminalSet(terminalSet);\n\t\ttry {\n\t\t\tGenetic.Executor.setUp(pacman, ls, 8);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\n\t\tdouble average = 0;\n\n\t\twhile (generation < 51) {\n\t\t\twhile (Generation.isGenFinished()) {\n\n\t\t\t\t\tfor(int i = 0; i < 10; i++) {\n\t\t\t\t\t\tint delay = 0;\n\t\t\t\t\t\tboolean visual = false;\n\t\t\t\t\t\tsum += exec.runGame(pacman, ghosts, visual, delay);\n\t\t\t\t\t}\n\n\t\t\t\t\tGeneration.setFitness(50000 - (sum/10));\n\t\t\t\t\tSystem.out.println(sum/10);\n\n\n\t\t\t\t\tsum = 0;\n\n\t\t\t\tGeneration.pointerUpdate();\n\t\t\t}\n\t\t\tSystem.out.println(\"Generation \" + generation);\n\t\t\tGenetic.Executor.newGen();\n\t\t\tSystem.out.println(Generation.getBestRating());\n\t\t\tgeneration ++;\n\t\t}\n\n\t\tSystem.out.println(Generation.getBestTree());\n\t\tSystem.out.println(Generation.getBestRating());\n\n\n\n/*\n\t\tboolean visual=false;\n\t\tString fileName=\"results/replay10.txt\";\n\n\t\tint bestScore = 0;\n\t\tint result = 0;\n\t\tint average = 0;\n\t\tfor(int i = 0; i < 1000 ; i++) {\n\t\t\tresult = exec.runGameTimedRecorded(pacman, ghosts, visual, fileName, bestScore);\n\t\t\taverage +=result;\n\t\t\tif(result > bestScore){\n\t\t\t\tbestScore = result;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tvisual = true;\n\t\tSystem.out.println(average/1000.0);\n\t\texec.replayGame(fileName,visual);\n\t\t*/\n\n\n\t}", "public static void main(String[] args) {\n\t\tCalcul cc = new Calcul();\r\n\t\t\r\n\t\tSystem.out.println(\"첫번째 인자를 입력 : \");\r\n\t\tint a = cc.scan();\r\n\t\tcc.setA(a);\r\n\t\tSystem.out.println(\"가감승제를 입력 : \");\r\n\t\tint tmp = cc.scan();\r\n\t\tcc.setTmp(tmp);\r\n\t\tSystem.out.println(\"두번째 인자를 입력 : \");\r\n\t\tint b = cc.scan();\r\n\t\tcc.setB(b);\r\n\t\t\r\n\t\tcc.prn();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n GeometricBrownianMotion gbm = new GeometricBrownianMotion(PROCESSES, ITERATIONS, INCREMENT);\n gbm.setProcess(0, 1, 0.1f, 0.4f);\n gbm.setProcess(1, 1, 0.1f, 0.3f, true);\n gbm.setProcess(2, 1, 0.2f, 0.2f);\n gbm.setProcess(3, 1, 0.1f, 0.1f);\n //gbm.setProcess(4, 5, 0.01f, 0.2f, true);\n DataGrapher graph = new DataGrapher(gbm.generateData());\n\n JFrame f = new JFrame();\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n f.add(graph);\n f.setSize(400,400);\n f.setLocation(200,200);\n f.setVisible(true);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tbiker bb=new biker(304,\"domiinar\");//now we need constructor to initialise values in biker class\r\n\t\tstudent7 xx=new student7(4000,\"innverted\");//from here values are sent to student7 class so we dont need this keyword\r\n\t\t//here we will call method\r\n\t\tbb.display();\r\n\t\txx.show();\r\n\t\t\r\n\t\t}", "public void logic(){\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tModel m=new Model();\r\n\t\tSystem.out.println(m.cercaAnagrammi(\"eat\"));\r\n\t}", "static void SampleItinerary() {\n\t\tSystem.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\t\tbg.AdultRowToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t\tbg.AdultRideToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t}", "public static void main(String[] args){\n// kazan.megtolt();\n// kazan.kiurit();\n// kazan.megtolt();\n gombEsemeny(false);\n gombEsemeny(false);\n gombEsemeny(true);\n gombEsemeny(false);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tLanguage l = new AnimalScript(\"QR\", \"Dan Le\", 1920, 1080);\r\n\t\tQR gN = new QR(l);\r\n\t\tgN.setProperties();\r\n\t\tgN.printSourceCode();\r\n\t\tint n= 4;\r\n\t\tgN.start(getDefaultMatrix(),n,null,null);\r\n\t\tSystem.out.println(l);\r\n\t}", "public static void main(String[] args) {\n homework ();\n }", "public static void main(String[] args) {\nCar car=new Car();\r\nSystem.out.println(car.color);\r\nSystem.out.println(Car.name);\r\ncar.run();\r\ncar.play();\r\n\t}", "public static void main(String[] args) {\n\t\tIntersection intersection = new Intersection(10, 20);\n\t\t\n\t\t//create the ArrayList for the carGenerators\n\t\tArrayList<CarGenerator> carGen = new ArrayList<CarGenerator>();\n\t\t\n\t\t//create a TestGenerators and add them to the ArraList\n\t\tTestGenerator tg1 = new TestGenerator(intersection,true);\n\t\tTestGenerator tg2 = new TestGenerator(intersection,false);\n\t\tcarGen.add(tg1);\n\t\tcarGen.add(tg2);\n\t\t\n\n\n\t\t\n\t\t//create the simulator for testing\n\t\tSimulator simulator = new Simulator(intersection, 500, carGen);\n\n\t\t//create and start threads for the simulator and the generators\n\t\tThread[] t = new Thread[3];\n\t\tt[0] = new Thread(simulator);\n\t\tt[1] = new Thread(carGen.get(0));\n\t\tt[2] = new Thread(carGen.get(1));\n\t\tt[0].start();\n\t\tt[1].start();\n\t\tt[2].start();\n\t\t\n\t\t//wait until generator and simulator are done, then print statistics\n\t\ttry {\n\t\t\tt[0].join();\n\t\t\tt[1].join();\n\t\t} catch (InterruptedException e) {}\n\t\tStatistics stats = new Statistics();\n\t\tstats.addTime(tg1.reportTotalTravelTime());\n\t\tstats.addTime(tg2.reportTotalTravelTime());\n\t\tSystem.out.println(stats.getReport());\n\t\tSystem.exit(0);\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Horse> trainingSet = utility.readHorseColicfile(\"horseTrain.txt\");\n\t\tArrayList<Variable> variableSets = Horse.getAllVar();\n\t\tTree tree = new Tree();\n\t\t\n\t\tNode decisionTree = tree.buildTree(trainingSet, variableSets);\n\t\tutility.printNode(decisionTree);\n\t\t\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Horse> testSet = utility.readHorseColicfile(\"horseTest.txt\");\n\t\tutility.testTree(testSet, decisionTree);\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tmg[i] = sc.nextInt();\n\t\t\tsum += mg[i];\n\t\t}\n\t\tif(sum%3 != 0) {\n\t\t\tSystem.out.println(\"no\");\n\t\t}else {\n\t\t\tdfs(0, 0, 0);\n\t\t\tif(f) {\n\t\t\t\tSystem.out.println(\"yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"no\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tString filename = \"C:/Users/Myky/Documents/EDAN55/Independent Set/g30.txt\";\n\t\tint[][] adjMatrix = readFile(filename);\n\t\tCounter counter = new Counter(0);\n\t\tint MIS = run(adjMatrix);\n\t\tprint(MIS);\n\n\t}", "private void compute() {\n try {\n sc = new InputReader(new FileInputStream(\"./resources/trainandpeter\"));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(ex);\n }\n text = sc.readNext().toCharArray();\n n = text.length;\n pattern1 = sc.readNext();\n pattern2 = sc.readNext();\n buildDfa(pattern1.toCharArray());\n int patpos1 = search(0, n, true);\n int patpos2 = search(n - 1, -1, false);\n if (patpos1 == -1 && patpos2 == -1) {\n System.out.println(\"fantasy\");\n System.exit(0);\n }\n buildDfa(pattern2.toCharArray());\n int patpos3 = -1;\n if (patpos1 > -1) {\n patpos3 = search(patpos1 + pattern1.length(), n, true);\n }\n int patpos4 = -1;\n if (patpos2 > -1) {\n patpos4 = search(patpos2 - pattern1.length(), -1, false);\n }\n if (patpos3 == -1 && patpos4 == -1) {\n System.out.println(\"fantasy\");\n System.exit(0);\n }\n if (patpos1 > -1 && patpos2 > -1 && patpos3 > -1 && patpos4 > -1) {\n System.out.println(\"both\");\n System.exit(0);\n }\n if (patpos1 > -1 && patpos3 > -1) {\n System.out.println(\"forward\");\n System.exit(0);\n }\n if (patpos2 > -1 && patpos4 > -1) {\n System.out.println(\"backward\");\n System.exit(0);\n }\n }", "public static void main(String[] args) {\n PetriNet inst = new CoffeeMachinePetri();\r\n Scanner scanner = new Scanner(System.in);\r\n int input ;\r\n input = scanner.nextInt();\r\n while(input!=0)\r\n {\r\n System.out.println(\"Introduceti optiunea: \");\r\n input = scanner.nextInt();\r\n inst.exec(input);\r\n \r\n System.out.println(inst.getStareCurenta());\r\n\t\t}\r\n inst.exec(0);\r\n }", "private static boolean bayesian() {\n\t\tSystem.out.println(\"BAYESIAN\");\n\t\t\n//\t\tFFNeuralNetwork ffnn = new FFNeuralNetwork(ActivationFunction.SIGMOID0p5,5,5);\n\t\tModelLearner modeler = new ModelLearnerHeavy(100, new int[] {}, new int[] {5},\n\t\t\t\tnew int[] {}, ActivationFunction.SIGMOID0p5, 10);\n\t\t\n\t\tCollection<DataPoint> data = new ArrayList<DataPoint>();\n\t\tdata.add(new DataPoint(new double[] {0,0,1,0,0}, new double[] {0,0,0,1,0})); // move right\n\t\tdata.add(new DataPoint(new double[] {0,0,1,0,0}, new double[] {0,1,0,0,0})); // move left\n\t\tdata.add(new DataPoint(new double[] {0,1,0,0,0}, new double[] {1,0,0,0,0})); // move left again\n\t\tdata.add(new DataPoint(new double[] {0,0,0,1,0}, new double[] {0,0,1,0,0})); // move back to center\n\t\tdata.add(new DataPoint(new double[] {0,0,0,1,0}, new double[] {0,0,0,0,0})); // disappear\n\t\t\n//\t\tControlPanel.learnFromBackPropagation(ffnn.getInputNodes(), ffnn.getOutputNodes(), data,\n//\t\t\t\t10000, 1,1,0,0,0,0);\n\t\tfor (DataPoint dp : data) {\n\t\t\tmodeler.observePreState(dp.getInput());\n\t\t\tmodeler.observePostState(dp.getOutput());\n\t\t\tmodeler.saveMemory();\n\t\t}\n\t\tmodeler.learnFromMemory(1.5,0.5,0, false, 1000);\n\t\tmodeler.getTransitionsModule().getNeuralNetwork().report(data);\n\t\t\n\t\tdouble[] foresight = Foresight.montecarlo(modeler, new double[] {0,0,1,0,0}, null, null, 1, 10000, 10, 0.1);\n\t\tfor (double d : foresight) System.out.print(d + \"\t\");\n\t\tSystem.out.println(near(foresight[0],0) && near(foresight[1],0.5) && near(foresight[2],0)\n\t\t\t\t&& near(foresight[3],0.5) && near(foresight[4],0)\n\t\t\t\t? \"montecarlo 1 ok\" : \"montecarlo 1 sucks\");\n\t\tforesight = Foresight.montecarlo(modeler, new double[] {0,0,1,0,0}, null, null, 2, 10000, 10, 0.1);\n\t\tfor (double d : foresight) System.out.print(d + \"\t\");\n\t\tSystem.out.println(near(foresight[0],0.5) && near(foresight[1],0) && near(foresight[2],0.25)\n\t\t\t\t&& near(foresight[3],0) && near(foresight[4],0)\n\t\t\t\t? \"montecarlo 2 ok\" : \"montecarlo 2 sucks\");\n\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\t\tBinaryTree bt = new BinaryTree();\n\t\tbt.display();\n\t\t\n//\t\tbt.preo();\n//\t\tbt.preoIterative();\n//\t\t\n//\t\tbt.ino();\n//\t\tbt.inoIterative();\n//\t\t\n//\t\tbt.posto();\n//\t\tbt.postoIterative();\n//\t\t\n//\t\tbt.levelo();\n//\t\tbt.levelolw();\n//\t\t\n//\t\tSystem.out.println(bt.diameter());\n//\t\tSystem.out.println(bt.diameter2());\n\t\t\n\t\tbt.pws();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tCharm charm = new Charm();\n\t\tSystem.out.print(\"Point of face : \");\n\t\tint face = in.nextInt();\n\t\tboolean bool = charm.isCondition(face);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\tface = in.nextInt();\n\t\t\tbool = charm.isCondition(face);\n\t\t}\n\t\t\n\t\t//2\n\t\tSystem.out.print(\"Point of rich : \");\n\t\tint rich = in.nextInt();\n\t\tbool = charm.isCondition(rich);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\trich = in.nextInt();\n\t\t\tbool = charm.isCondition(rich);\n\t\t}\n\t\t\n\t\t//3\n\t\tSystem.out.print(\"Point of nature : \");\n\t\tint nature = in.nextInt();\n\t\tbool = charm.isCondition(nature);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\tnature = in.nextInt();\n\t\t\tbool = charm.isCondition(nature);\n\t\t}\n\t\t\n\t\t//4\n\t\tSystem.out.print(\"Point of smile : \");\n\t\tint smile = in.nextInt();\n\t\tbool = charm.isCondition(smile);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\tsmile = in.nextInt();\n\t\t\tbool = charm.isCondition(smile);\n\t\t}\n\t\t\n\t\t//5\n\t\tSystem.out.print(\"Point of speech : \");\n\t\tint speech = in.nextInt();\n\t\tbool = charm.isCondition(speech);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\tspeech = in.nextInt();\n\t\t\tbool = charm.isCondition(speech);\n\t\t}\n\t\t\n\t\tcharm.setFace(face);\n\t\tcharm.setNature(nature);\n\t\tcharm.setRich(rich);\n\t\tcharm.setSmile(smile);\n\t\tcharm.setSpeech(speech);\n\t\t\n\t\tdouble result = charm.process();\n\t\tSystem.out.println(\"Point of your charm is : \"+result);\n\t}", "public static void main(String[] args) {\n\t\tSbi re =new Sbi();\n // re.rateOfIntrest();\n re.rateOfIntrest(4,5);\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tBike bike = new Bike();\n\t\tbike.applyBrake();\n\t\tbike.increaseSpeed();\n\t\tSystem.out.println(bike.noOfWheels);\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tEagle eagle = new Eagle();\n\t\teagle.eat();\n\t\teagle.sound();\n\t\teagle.fly();\n\t\tSystem.out.println(\"sdfsdf\"+Bird.numberOfLegs);\n\t\tSystem.out.println(\"sadfsf\"+Bird.outCovering);\n\t}", "public static void main(String[] args) {\n Sea sea;\n Explorer dory, marlin;\n int doryBetter=0, marlinBetter=0;\n for (int j=0; j<10; j++) {\n for (int i = 5; i < 105; i += 5) {\n sea = new Sea(i, i);\n dory = new Explorer(sea, new StackExploreList());\n dory.solve();\n int d, m;\n d = dory.getTotalVisited();\n sea.clearMaze();\n marlin = new Explorer(sea, new QueueExploreList());\n marlin.solve();\n m = marlin.getTotalVisited();\n if (d>m) doryBetter++;\n else marlinBetter ++;\n }\n }\n System.out.println(\"Number of times Dory found Nemo faster: \"+doryBetter+\"\\nNumber of times Marlin found Nemo Faster: \"+marlinBetter);\n }", "public static void main(String[] args) {\n\t\tLogicTrainPassenger tp = new LogicTrainPassenger();\n\t\t//tp.insert1();\n\t\ttp.select1();\n\t}", "public static void main(String[] args){\n\t\t\tANN neuralNetwork= new ANN();\n\t\t\tCenteredFrame frame = new CenteredFrame(neuralNetwork);\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n\t\tString[] stereotypeBooks = {\"Critique of the Critique of Pure Reason\", \"Token Work of Fiction to Show I Can Write\", \n\t\t\t\t\"Deconstructing Everything I Find\", \"The Metaphysics of Dasein or Some Other Word I Made Up\", \n\t\t\t\t\"I Understand Existence More Than All Y'all Fools\"};\n\t\tSA0 stereotype = new SA0(\"Immanuel Locke\", 79, \"Male\", 1724, 5, 5, \"Germany\", \"Metaphysics\", stereotypeBooks);\n\t\tSystem.out.println(stereotype.defendSelf());\n\t\tSystem.out.println(stereotype.getSummary()); \n\t\t\n\t\tString[] nietzscheBooks = {\"Thus Spake Zarathustra\", \"Beyond Good and Evil\", \"The Antichrist\", \n\t\t\t\t\"Human, All Too Human\", \"The Gay Science\"};\n\t\tSA0 nietzsche = new SA0(\"Friedrich Nietzsche\", 55, \"Male\", 1844, 4, 8, \"Germany\", \"Metaphysics\", nietzscheBooks);\n\t\tSystem.out.println(nietzsche.defendSelf());\n\t\tSystem.out.println(nietzsche.getSummary()); \n\t}" ]
[ "0.6771939", "0.6413055", "0.63274664", "0.6322962", "0.62864447", "0.6271506", "0.62387186", "0.623533", "0.6234843", "0.61689323", "0.615048", "0.6085704", "0.60856646", "0.60826254", "0.60673785", "0.60618913", "0.6059235", "0.60501254", "0.6038217", "0.6030811", "0.60302407", "0.601341", "0.6005512", "0.6002941", "0.5994393", "0.59897745", "0.59856063", "0.5985336", "0.5978925", "0.59718454", "0.59710264", "0.5959684", "0.5948416", "0.5945676", "0.5941377", "0.5939902", "0.5934882", "0.5930703", "0.5930084", "0.5922697", "0.59143674", "0.5900457", "0.589571", "0.5891671", "0.58897835", "0.5889658", "0.5888976", "0.5888179", "0.58877444", "0.58857805", "0.58667284", "0.5864486", "0.5860048", "0.585444", "0.5848133", "0.58436465", "0.5840248", "0.5833892", "0.5828384", "0.58274543", "0.58257157", "0.5821337", "0.58153784", "0.5813308", "0.5809682", "0.58082557", "0.5806021", "0.580196", "0.5799411", "0.5795903", "0.57948047", "0.5794185", "0.5789189", "0.5789167", "0.5787481", "0.57862145", "0.578614", "0.57854503", "0.5784196", "0.57831514", "0.5782072", "0.57807094", "0.5778643", "0.5775418", "0.57721335", "0.577103", "0.57708424", "0.5763789", "0.5760002", "0.5755252", "0.5750436", "0.5750043", "0.5748038", "0.57468694", "0.57448775", "0.57436174", "0.57422215", "0.5739845", "0.5737774", "0.5730998", "0.5730433" ]
0.0
-1
returns the first or last word without punctuation
public static String getWord(String sentence, char word) { String[] words; words = sentence.split(" "); String cleanedWord=""; if(word=='f') {//return the first word String temp = words[0]; for(int i=0; i < temp.length(); i++) { if(Character.isLetter(temp.charAt(i))) { cleanedWord+= Character.toString(temp.charAt(i)); } } }else {//return the last word String temp = words[words.length -1]; for(int i=0; i < temp.length(); i++) { if(Character.isLetter(temp.charAt(i))) { cleanedWord+= Character.toString(temp.charAt(i)); } } } return cleanedWord; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String removePunctuation( String word )\n {\n while(word.length() > 0 && !Character.isAlphabetic(word.charAt(0)))\n {\n word = word.substring(1);\n }\n while(word.length() > 0 && !Character.isAlphabetic(word.charAt(word.length()-1)))\n {\n word = word.substring(0, word.length()-1);\n }\n \n return word;\n }", "public static String getPunctuation( String word )\n { \n String punc = \"\";\n for(int i=word.length()-1; i >= 0; i--){\n if(!Character.isLetterOrDigit(word.charAt(i))){\n punc = punc + word.charAt(i);\n } else {\n return punc;\n }\n }\n return punc;\n }", "private String removePunctuation(String word) {\n\n StringBuffer sb = new StringBuffer(word);\n if (word.length() == 0) {\n return word;\n }\n for (String cs : COMMON_SUFFIX) {\n if (word.endsWith(\"'\" + cs) || word.endsWith(\"’\" + cs)) {\n sb.delete(sb.length() - cs.length() - 1, sb.length());\n break;\n }\n }\n if (sb.length() > 0) {\n int first = Character.getType(sb.charAt(0));\n int last = Character.getType(sb.charAt(sb.length() - 1));\n if (last != Character.LOWERCASE_LETTER\n && last != Character.UPPERCASE_LETTER) {\n sb.deleteCharAt(sb.length() - 1);\n }\n if (sb.length() > 0 && first != Character.LOWERCASE_LETTER\n && first != Character.UPPERCASE_LETTER) {\n sb.deleteCharAt(0);\n }\n }\n return sb.toString();\n }", "java.lang.String getPunctuationToAppend();", "public String removeLastWord(String text) {\n return text.substring(0, text.lastIndexOf(\" \"));\n }", "String getPunctuation();", "private String firstWord(String userMessage) {\n if (userMessage.contains(\" \"))\n return userMessage.substring(0, userMessage.indexOf(\" \"));\n return userMessage;\n }", "public static String punct(String w) {\n int len = w.length();\n String newW = \"\"; //just letters\n String start= \"\"; //string of start punctuations\n String end = \"\"; //string of end punctuations\n for (int i = 0; i < len; i++) {\n if (endPunct.indexOf(w.substring(i, i+1)) != -1) {\n end += w.substring(i, i+1); } //if there is an end punctuation put it in the end NOT counting apostrophes \n else if (startPunct.indexOf(w.substring(i,i+1)) != -1) {\n start += w.substring(i, i+1); } //if there is a start punctution, put it in start\n else {\n newW += w.substring(i, i+1); } //string of just the letters \n }\n return start + newW + end; }", "public static String lastWord(Scanner s){\n\t\t\n\t\t//assume the first string in list is the last word to be returned.\n\t\tString lastString = s.next();\n\t\t\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\tString temp = s.next();\n\t\t\t\n\t\t\t//Check to see if if this words come after the current last word if so store that string in lastString\n\t\t\tif(temp.compareToIgnoreCase(lastString) >= 1){\n\t\t\t\tlastString = temp;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn lastString;\n\t}", "java.lang.String getWord();", "private static String cutTextAtLastSpace(String lastTxt) {\n\t\tint idx = lastTxt.lastIndexOf(\" \");\n\t\t// if no space is found, cut on length\n\t\tif (idx > 0) {\n\t\t\tlastTxt = lastTxt.substring(0, idx);\n\t\t}\n\t\treturn lastTxt;\n\t}", "public static boolean isFirstWordInSentence(String word) {\n return word.matches(\"\\\\p{Punct}*\\\\p{Lu}[\\\\p{L}&&[^\\\\p{Lu}]]*\");\n }", "public String getKeyword(String word) {\n\t\tboolean foundPunct = false;\n String returnStr = \"\";\n for(int inc = 0; inc < word.length(); inc++) {\n char testChar = word.charAt(inc);\n if(Character.isLetter(testChar) == true) {\n if(foundPunct == true) {return null;}\n else{returnStr = returnStr + Character.toString(testChar).toLowerCase();}}\n else {foundPunct = true;}}\n if(noiseWords.contains(returnStr) == true) {\n return null;}\n if(returnStr == \"\") {\n return null;}\n return returnStr;\n\t}", "public static String removeNonWord(String message)\r\n {\r\n int start = getLetterIndex(message, head); //get the fist index that contain English letter\r\n int end = getLetterIndex(message, tail); //get the last index that contain English letter\r\n if (start == end) // if only contain one letter\r\n return String.valueOf(message.charAt(start)); // return the letter\r\n return message.substring(start, end + 1); // return the content that contain English letter\r\n }", "public static String delFirstChar(String word){\n\t\tif(word.length() <= 1){\n\t\t\treturn word;\n\t\t}\n\t\tword = word.substring(1, word.length());\n\t\tguessPW(word);\n\t\treturn word;\n\n\t}", "public String getFirstLongestConcatenatedWord() {\n return concatenatedWords.get(0);\n }", "public String getWordUnderCursor() {\r\n\t\t\r\n\t\t//we cannot search backward, so we start from the beginning: \r\n\t\tString text = getAllText();\r\n\t\tint index = getCaretPosition();\r\n\t\tPattern pattern = Pattern.compile(\"[a-zA-Z]+\"); //test version, this is not perfect. For example words between quotes\r\n\t\tMatcher matcher = pattern.matcher(text);\r\n\t\twhile(matcher.find()) {\r\n\t\t\tif(matcher.start() > index)\r\n\t\t\t\treturn \"\";\r\n\t\t\tif(matcher.start() <= index && matcher.end() >= index)\r\n\t\t\t\treturn getText(matcher.start(), matcher.end()-matcher.start());\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public static String delLastChar(String word){\n\t\tif(word.length() <= 1){\n\t\t\treturn word;\n\t\t}\n\t\tword = word.substring(0, word.length() - 1);\n\t\tguessPW(word);\n\t\treturn word;\n\n\t}", "private String firstSentenceSplitting(String s) {\n // Double new-line means a new sentence:\n s = paragraph.matcher(s).replaceAll(\"$1\" + EOS);\n // Punctuation followed by whitespace means a new sentence:\n s = punctWhitespace.matcher(s).replaceAll(\"$1\" + EOS);\n // New (compared to the perl module): Punctuation followed by uppercase followed\n // by non-uppercase character (except dot) means a new sentence:\n s = punctUpperLower.matcher(s).replaceAll(\"$1\" + EOS + \"$2\");\n // Break also when single letter comes before punctuation:\n s = letterPunct.matcher(s).replaceAll(\"$1\" + EOS);\n return s;\n }", "String stemOf (String word);", "public static String extractTrailingPunctuation(String text) {\n StringBuffer buffer = new StringBuffer();\n for (int i = text.length() - 1; i >= 0; i--) {\n char c = text.charAt(i);\n if (c == '.' || c == ';' || c == ',' || c == ':') {\n buffer.append(c);\n } else {\n break;\n }\n }//\n if (buffer.length() == 0) return \"\";\n buffer = buffer.reverse();\n return buffer.toString();\n }", "public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter your first word: \");\n String word1 = scan.next();\n System.out.println(\"Enter your second word: \");\n String word2 = scan.next();\n\n char lastLetter = word1.charAt(word1.length()-1);\n char firstLetter = word2.charAt(0);\n if (lastLetter == firstLetter) {\n System.out.println(word1+word2.substring(1));\n }else {\n System.out.println(word1 + word2);\n\n }\n\n\n }", "private String removePunctuation(String word) {\t\t\r\n\t\t\t//removes all punctuation and special characters\r\n\t\t\t// adds a space so we can deal with words such as pre-req\r\n\t\treturn word.replaceAll(\"[&@#$%^*()\\\\\\\"\\\\\\\\/$\\\\-\\\\!\\\\+\\\\=|(){},.;:!?\\\\%]+\", \" \");\t\t\r\n\t\t\r\n\t}", "private static int lengthOfLastWord(String s) {\n int count = 0;\n char[] arr = s.trim().toCharArray();\n\n for (int i = arr.length - 1; i >= 0; i--) {\n if (arr[i] == ' ') { break; }\n count++;\n }\n return count;\n }", "private static String capitaliseSingleWord(String word) {\n String capitalisedFirstLetter = word.substring(0, 1).toUpperCase();\n String lowercaseRemaining = word.substring(1).toLowerCase();\n return capitalisedFirstLetter + lowercaseRemaining;\n }", "public static void main(String args[])\n {\n String s = \"Bharat mata ki jai\";\n char[] c = s.toCharArray();\n\n for(int i =0; i<c.length;i++)\n {\n if(c[i]!=' ' && (i == 0 || c[i-1]==' '))\n {\n System.out.print(c[i]+\" \");\n }\n }\n\n\n\n\n }", "int lengthLastWord(String input) {\n int len = input.length();\n int lastLen = 0;\n int pastLen = 0;\n for (int index = 0;index < len;index++) {\n lastLen ++;\n if(input.charAt(index) == ' ') {\n pastLen = lastLen;\n lastLen = 0;\n \n }\n }\n \n return pastLen;\n \n}", "static String cutName(String input) { return input.split(\" \")[0]; }", "public String getWord() {\n if(words[index] != null) {\n return words[index];\n } else {\n return \"\";\n }\n }", "public static String stemNSW(String word)\n\t{\n\t\treturn isNSW(getRoot(word.toLowerCase()));\n\t}", "public synchronized String getLastWord() {\n\t\treturn lastWord;\n\t}", "private static String firstUpperCase(String word) {\n\t\tif (word == null || word.isEmpty()) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn word.substring(0, 1).toUpperCase() + word.substring(1);\n\t}", "public static String cleanName(String firstOrLastName) {\n return firstOrLastName.trim().replaceAll(\"\\\\s+\", \" \");\n }", "private String stripPunctuations(String token, Set<String> tokensWithoutPunctuations) {\n for (final String punct : Utils.PUNCTUATIONS) {\n if (token.startsWith(punct)) {\n final String strippedToken = token.substring(punct.length());\n if (tokensWithoutPunctuations.contains(strippedToken)) {\n return strippedToken;\n }\n } else if (token.endsWith(punct)) {\n final String strippedToken = token.substring(0, token.length() - punct.length());\n if (tokensWithoutPunctuations.contains(strippedToken)) {\n return strippedToken;\n }\n }\n }\n return token;\n }", "public String getKeyWord(String word) {\n // COMPLETE THIS METHOD\n word = word.toLowerCase();\n while (word.length() > 0 && !(Character.isDigit(word.charAt(word.length() - 1))) && !(Character.isLetter(word.charAt(word.length() - 1)))) {\n char ch = word.charAt(word.length()-1);\n //if((isPunctuation(ch))){\n if (word.endsWith(\"!\") ||\n word.endsWith(\";\") ||\n word.endsWith(\":\") ||\n word.endsWith(\"?\") ||\n word.endsWith(\",\") ||\n word.endsWith(\".\")) {\n word = word.substring(0, word.length() - 1);\n } else {\n return null;\n }\n }\n\n for (int i = 0; i < word.length(); i++) {\n if (!(Character.isLetter(word.charAt(i)))) {\n return null;\n }\n }\n\n if (noiseWords.containsKey(word))\n return null;\n return word;\n\n }", "private static void last(String name){\n int last= name.length();\n System.out.print(name.toLowerCase().substring(last-1));\n }", "public static String getLastWord(ArrayList<String> s) {\n int i = s.size();\n return s.get(i - 1);\n }", "public static String longestWord(String sen) {\n if (sen == null) {\n return null;\n }\n String filtered = sen.replaceAll(\"[^a-zA-Z ]\", \"\");\n String[] words = filtered.split(\" \");\n String current = \"\";\n for (String word : words) {\n if (word.length() > current.length()) {\n current = word;\n }\n }\n return current;\n }", "public String getWord (int wordIndex) {\n if (wordIndex < 0 ) {\n return \"\";\n } else {\n int s = getWordStart (wordIndex);\n int e = indexOfNextSeparator (tags, s, true, true, slashToSeparate);\n if (e > s) {\n return tags.substring (s, e);\n } else {\n return \"\";\n }\n }\n }", "public String reverseWords(String s) {\n\t\tString ans=\"\";\n\t\tString temp[];\n\t\tif(s.isEmpty())\n\t\t\treturn \"\";\n\t\ttemp=s.split(\" \");\n\t\tfor(int i=temp.length-1;i>=0;i--) {\n\t\t\tif(!temp[i].isEmpty()) {\n\t\t\t\tans+=temp[i]+\" \";\n\t\t\t}\n\t\t}\n\t\treturn ans.trim();\n\t}", "public static String the(String str)\n\t{\t\t\n\t\tif (str.startsWith(\"the \")) return str;\n\t\telse if (str.startsWith(\"The \")) return str;\n\t\telse if (str.toLowerCase().charAt(0) == str.charAt(0)) return \"the \" + str;\n\t\telse return \"The \" + str.toLowerCase();\n\t}", "public String firstAlphabeticalTitlePseudoLetter(String title){\n\t\t int first = 0;\n if ( title.toLowerCase().startsWith(\"the\") && !title.toLowerCase().startsWith(\"the \") ) { first = 3; }\n\t\t return title.substring(first, (first + 1));\n\t }", "static String refineWord(String currentWord) {\n\t\t// makes string builder of word\n\t\tStringBuilder builder = new StringBuilder(currentWord);\n\t\tStringBuilder newWord = new StringBuilder();\n\n\t\t// goes through; if it's not a letter, doesn't add to the new word\n\t\tfor (int i = 0; i < builder.length(); i++) {\n\t\t\tchar currentChar = builder.charAt(i);\n\t\t\tif (Character.isLetter(currentChar)) {\n\t\t\t\tnewWord.append(currentChar);\n\t\t\t}\n\t\t}\n\n\t\t// returns lower case\n\t\treturn newWord.toString().toLowerCase().trim();\n\t}", "public List<Word> getWordsEndingAt(int end);", "public int lengthOfLastWord(String s) {\n String[] words = s.split(\" \");\n return words.length==0?0:words[words.length-1].length();\n }", "String trimLeft( String txt ){\r\n // trim\r\n int start = 0;\r\n WHITESPACE: for( int i=0; i < txt.length(); i++ ){\r\n char ch = txt.charAt(i);\r\n if( Character.isWhitespace(ch)){\r\n continue;\r\n }\r\n else {\r\n start = i;\r\n break WHITESPACE;\r\n }\r\n }\r\n return txt.substring(start); \r\n }", "public default String getUnmatchedWords(final String nextUnmatchedWord) {\r\n\t\treturn this.hasUnmatchedWords()\r\n\t\t\t\t? this.getUnmatchedWords() + \" \" + nextUnmatchedWord\r\n\t\t\t\t: nextUnmatchedWord;\r\n\t}", "public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public String reverseWords(String s) {\n\t\ts = s.trim();\n\t\tStringBuffer result = new StringBuffer();\n\t\tString[] buffer = s.split(\" \");\n\t\tfor (int i = buffer.length - 1; i >= 0; i--) {\n\t\t\tif (!buffer[i].equals(\"\")) {\n\t\t\t\tresult.append(buffer[i]);\n\t\t\t\tresult.append(\" \");\n\t\t\t}\n\t\t}\n\t\tString r = result.toString();\n\t\tif (!r.equals(\"\")) {\n\t\t\treturn r.substring(0, r.length() - 1);\n\t\t}\n\t\telse {\n\t\t\treturn r;\n\t\t}\n\t}", "public String acronym(String phrase) {\n /*StringBuilder acronymFeed = new StringBuilder(\"\");\n String wordHolder = \"\";\n int spaceIndex;\n char firstLetter;\n do{\n spaceIndex = phrase.indexOf(\" \");\n wordHolder = phrase.substring(0,spaceIndex);\n acronymFeed.append(wordHolder.charAt(0));\n phrase = phrase.replaceFirst(wordHolder, \"\");\n } while (spaceIndex != -1 && wordHolder != \"\" && phrase != \"\");\n \n \n \n \n \n String acronymResult = acronymFeed.toString().toUpperCase();\n return acronymResult;\n */\n \n char[] letters = phrase.toCharArray();\n String firstLetters = \"\";\n firstLetters += String.valueOf(letters[0]);\n for (int i = 1; i < phrase.length();i++){\n if (letters[i-1] == ' '){\n firstLetters += String.valueOf(letters[i]);\n }\n }\n firstLetters = firstLetters.toUpperCase();\n return firstLetters;\n }", "public static String wordPunc(Item item) throws ProcessException {\n\t\tItem ww = item.getItemAs(Relation.TOKEN);\n\t\tif (ww != null && ww.getNext() != null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\tif (ww != null && ww.getParent() != null) {\n\t\t\t\treturn ww.getParent().getFeatures().getString(\"punc\");\n\t\t\t} else {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t}", "boolean hasPunctuationToAppend();", "public String getSecondWord()\r\n {\r\n return this.aSecondWord; \r\n }", "static Stream<String> splitIntoWords(String str) \r\n\t{\r\n\t\treturn Arrays.stream(str.split(\"\\\\W+\")).filter(s -> s.length() > 0);\r\n\t}", "public int lengthOfLastWord(String s) {\n return s.trim().length()-s.trim().lastIndexOf(\" \")-1;\n }", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n System.out.println(\"Enter the word:\");\n String word= scan.next();\n\n char lastChar=word.charAt(word.length()-1);\n System.out.println(lastChar);\n\n\n }", "private String stripNoneWordChars(String uncleanString) {\n return uncleanString.replace(\".\", \" \").replace(\":\", \" \").replace(\"@\", \" \").replace(\"-\", \" \").replace(\"_\", \" \").replace(\"<\", \" \").replace(\">\", \" \");\n\n }", "public String getWord()\n\t{\n\t\treturn word.get(matcher());\n\t}", "@Override\n public String longestWord() {\n return \"\";\n }", "public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}", "public String acronym(String phrase) {\n\t\tString[] p = phrase.split(\"[\\\\W\\\\s]\");\n\t\tString returner = \"\";\n\t\tfor (String s : p) {\n\t\t\tif (!s.isEmpty())\n\t\t\t\treturner = returner + s.charAt(0);\n\t\t}\n\t\treturn returner.toUpperCase();\n\t}", "private String validateWord (String word) {\r\n String chars = \"\";\r\n for (int i = 0; i < word.length (); ++i) {\r\n if (!Character.isLetter (word.charAt (i))) {\r\n chars += \"\\\"\" + word.charAt (i) + \"\\\" \";\r\n }\r\n }\r\n return chars;\r\n }", "public static String capitalizeAllFirstLetters(String s)\n {\n char firstLetter;\n String result, word, capitalizedWord;\n String [] array;\n\n result = \"\";\n\n if(s.length() > 0)\n {\n array = s.split(\" \");\n\n for(int i =0; i < array.length; i++)\n {\n word = array[i];\n firstLetter = Character.toUpperCase(word.charAt(0));\n capitalizedWord = firstLetter + word.substring(1);\n\n result += capitalizedWord + \" \";\n }\n }\n\n return result;\n }", "public static String capFirstChar(String word) {\n \tif(word == null || word.length() == 0)\n \t\treturn word;\n\n \tword = word.toLowerCase().replace('_', ' ');\n\t\treturn Character.valueOf(Character.toUpperCase(word.charAt(0))).toString() + word.substring(1);\n }", "SList oddWords();", "public static String lastTerm(String input)\n {\n assert isNonBlank(input);\n int dotx = input.lastIndexOf('.');\n \n if (dotx < 0)\n return input;\n \n return input.substring(dotx + 1);\n }", "List<String> tokenize1(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "String getWordIn(String schar, String echar);", "private static String spellPunctuation(String string) {\n\t\tchar[] in = string.toCharArray();\n\t\tStringBuilder out = new StringBuilder();\n\t\t\n\t\tchar b = 0; //previous\n\t\tchar c = 0; //current\n\t\tchar d = 0; //next\n\t\tint n = in.length;\n\t\t\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tc = in[i];\n\t\t\t\n\t\t\tif (i+1 < n) {\n\t\t\t\td = in[i+1];\n\t\t\t}\n\t\t\t\n\t\t\tswitch (c) {\n\t\t\t\tcase ',':\n\t\t\t\t\tif (d != ' ') {\n\t\t\t\t\t\tout.append(\" comma \");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tout.append(\" comma\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '.':\n\t\t\t\t\tif (d == ' ') { //skip periods at the end of sentences\n\t\t\t\t\t\t//skip\n\t\t\t\t\t}\n\t\t\t\t\telse { //keep number with a decimal intact\n\t\t\t\t\t\tout.append(c);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase ';':\n\t\t\t\t\tout.append(\" semicolon\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase ':':\n\t\t\t\t\tout.append(\" colon\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\u201c':\n\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\u201d':\n\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\"':\n\t\t\t\t\tif (b == ' ') { //previous is space; start string\n\t\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\t}\n\t\t\t\t\telse if (c == ' ') { //next is space; end string\n\t\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\t}\n\t\t\t\t\telse { //mid-word\n\t\t\t\t\t\tout.append(\" double quote \");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\'': //single quote\n\t\t\t\tcase '\\u2019': //apostrophe\n\t\t\t\t\tif (b == ' ') { //previous is space; start string\n\t\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\t}\n\t\t\t\t\telse if (c == ' ') { //next is space; end string\n\t\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\t}\n\t\t\t\t\telse { //mid-word\n\t\t\t\t\t\t//contraction apostrophe is ignored; don't -> dont\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '%':\n\t\t\t\t\tout.append(\" percent\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tout.append(c);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tb = c;\n\t\t}\n\t\t\n\t\treturn out.toString();\n\t}", "@Override\n public String longestWord() {\n if (this.word.length() > this.restOfSentence.longestWord().length()) {\n return this.word;\n }\n return this.restOfSentence.longestWord();\n }", "private String getConvertedWord(String word) {\r\n\t\tString newWord = \"\";\r\n\t\tif(word == null || word.length() == 0)\r\n\t\t\tnewWord = \"\";\r\n\t\telse if(word.length() < 3)\r\n\t\t\tnewWord = word;\r\n\t\telse \r\n\t\t\tnewWord = \"\"+word.charAt(0) + (word.length() - 2) + word.charAt(word.length() - 1);\r\n\t\t\t\r\n\t\tif(DEBUG)\r\n\t\t\tSystem.out.printf(\"Converted %s to %s\\n\", word, newWord);\r\n\t\treturn newWord;\r\n\r\n\t}", "public static FeatureNode getFirstWord(FeatureNode word)\n\t{\n\t\tFeatureNode fn = word.get(\"phr-head\");\n\t\twhile (fn != null)\n\t\t{\n\t\t\tFeatureNode wd = fn.get(\"phr-word\");\n\t\t\tif (wd != null) return wd;\n\n\t\t\tFeatureNode subf = fn.get(\"phr-head\");\n\t\t\tif (subf != null)\n\t\t\t{\n\t\t\t\twd = getFirstWord(fn);\n\t\t\t\tif (wd != null) return wd;\n\t\t\t}\n\t\t\tfn = fn.get(\"phr-next\");\n\t\t}\n\t\treturn null;\n\t}", "public String getSecondLongestConcatenatedWord() {\n return concatenatedWords.get(1);\n }", "public String propergram(String word){\n // word.toLowerCase();\n String[] tempstr =word.split(\"_\");\n String tempstr2;\n\n for(int i=0;i<tempstr.length;i++){\n if((tempstr[i].charAt(0))>='A'&&(tempstr[i].charAt(0))<='Z') {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0)));\n }\n else {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0))).toUpperCase();\n }\n tempstr[i] = tempstr2.concat(tempstr[i].substring(1));\n if (i != 0) {\n word=word.concat(\" \").concat(tempstr[i]);\n } else {\n word = tempstr[i];\n }\n\n }\n return word;\n\n\n }", "HasValue<String> getMiddleInitial();", "public String firstAlphabeticalTitleLetter(String title){\n\t\t int first = 0;\n if ( title.toLowerCase().startsWith(\"the \") ) { first = 4; }\n\t\t return title.substring(first, (first + 1));\n\t }", "public static String reverseWordWise(String input) {\n String output = \"\";\n int index = 0;\n \n for (int i = 0; i < input.length(); i++) {\n if (input.charAt(i) == ' ') {\n index = i+1;\n output += input.charAt(i);\n } else {\n output = output.substring(0,index) + input.charAt(i) + output.substring(index);\n }\n }\n return output;\n\n\t}", "public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}", "String reverseWords(String input){\n\t\tStringBuilder output = new StringBuilder(input.length());\n\t\tint startIndex = -1;\n\t\tfor(int i = input.length()-1; i >= 0; i--){\n\t\t\tif(input.charAt(i) == ' ' || i == 0){\n\t\t\t\tif(i == 0)\n\t\t\t\t\tstartIndex = i;\n\t\t\t\telse\n\t\t\t\t\tstartIndex = i+1;\n\t\t\t\twhile(startIndex != input.length() && input.charAt(startIndex) != ' '){\n\t\t\t\t\toutput.append(input.charAt(startIndex));\n\t\t\t\t\tstartIndex++;\n\t\t\t\t}\n\t\t\t\toutput.append(' ');\n\t\t\t}\n\t\t}\n\t\treturn output.toString();\n\t}", "public String normalize(String word);", "public String findFirstWord(String a, String b) {\n\t\tchar[] aArray = a.toCharArray();\n\t\tchar[] bArray = b.toCharArray();\n\n\t\t//loop through letters of each\n\t\tfor (int i = 0; i < aArray.length; i++) {\n\n\t\t\t// if letter in a comes before b, then return a\n\t\t\tif (aArray[i] < bArray[i]) {\n\t\t\t\treturn a;\n\t\t\t}\n\n\t\t\t// check if letter in b comes before a\n\t\t\tif (aArray[i] > bArray[i]) {\n\t\t\t\treturn b;\n\t\t\t}\n\n\t\t\t// otherwise they are equal and you can move to the next letter\n\t\t}\n\n\t\t// you need this line in case the above loop doesn't return anything.\n\t\t// this is for the compiler.\n\t\treturn a;\n\t}", "private String doubleFinalConsonant(String word) {\n\t\tStringBuffer buffer = new StringBuffer(word);\n\t\tbuffer.append(buffer.charAt(buffer.length() - 1));\n\t\treturn buffer.toString();\n\t}", "public int getWordLength(String word) {\n char[] notValidChars = {',', '-', '\"', '.', '\\''};\n int wordLength = 0;\n for(int i = 0, n = word.length(); i < n; i++) {\n char currentChar = word.charAt(i);\n boolean isCharFirstOrLast = word.indexOf(currentChar) == 0 || word.indexOf(currentChar) == n-1;\n boolean isNotChar = arrayContainsChar(notValidChars, currentChar);\n \n // if char is valid char, or an invalid char that's not the starting or ending of the word\n if(Character.isLetter(currentChar) || (isNotChar && !isCharFirstOrLast) ) {\n wordLength++;\n }\n }\n return wordLength;\n }", "public static String reverseWordsAlt(String str){\r\n\t\t\r\n\t\tstr = reverse(str, 0,str.length()-1);\r\n\t\t\r\n\t\tint start=0;\r\n\t\tint end =0;\r\n\t\t\r\n\t\twhile(end < str.length()){\r\n\t\t\t\r\n\t\t\twhile(end<str.length() && str.charAt(end)!=' '){\r\n\t\t\t\tend++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(start<end){\r\n\t\t\t\tstr=reverse(str,start,end-1);\r\n\t\t\t\tstart=end+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tend++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tstr = reverse(str,start,end-1);\r\n\t\t\r\n\t\treturn str;\r\n\t}", "private static String toStartCase(String words) {\n String[] tokens = words.split(\"\\\\s+\");\n StringBuilder builder = new StringBuilder();\n for (String token : tokens) {\n builder.append(capitaliseSingleWord(token)).append(\" \");\n }\n return builder.toString().stripTrailing();\n }", "@Test\n\tpublic void revStrSentances() {\n\n\t\tString s = \"i like this program very much\";\n\t\tString[] words = s.split(\" \");\n\t\tString revStr = \"\";\n\t\tfor (int i = words.length - 1; i >= 0; i--) {\n\t\t\trevStr += words[i] + \" \";\n\n\t\t}\n\n\t\tSystem.out.println(revStr);\n\n\t}", "public String reverseFirstLast() {\n\t\tint commaIndex = inputString.indexOf(',');\n\t\tString newStr = inputString.substring(commaIndex + 1).trim() + \" \" + inputString.substring(0, commaIndex);\n\t\treturn newStr;\n\t}", "public char[] nextToken() {\n\t\t// read and return the next word of the document\n\t\tif(loc<words.length){\n\n\t\t\tString res=words[loc];\n\t\t\tloc++;\n\t\t\treturn res.toCharArray();\n\t\t}\n\n\t\t// or return null if it reaches the end of the document\n\t\treturn null;\n\t}", "public String getAnyWordStartingWith(String s) {\n TrieNode temp = searchNode(s);\n if (temp == null){\n return \"noWord\";\n }\n while (!temp.isWord){\n for (String c: temp.children.keySet()){\n temp = temp.children.get(c);\n s += c;\n break;\n }\n }\n return s;\n }", "public String get_all_words(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "public Sentence getFirstSentence ()\n {\n\n Paragraph p = this.getFirstParagraph ();\n\n if (p == null)\n {\n\n return null;\n\n }\n\n return p.getFirstSentence ();\n\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "@Test\n\tpublic void testRemoveWhiteSpacesAndPunctuation() {\n\t\tString input = \"2$2?5 5!63\";\n\t\tString actual = GeneralUtility.removeWhiteSpacesAndPunctuation(input);\n\t\tString expected = \"225563\";\n\t\tAssert.assertEquals(expected, actual);\n\t}", "public String removePunct(String input) {\n\t\tchar[] inputs = input.toCharArray();\n\t\tString result = \"\";\n\t\tfor (Character c : inputs) {\n\t\t\tif (Character.isLetter(c) || c == '\\'')\n\t\t\t\tresult += c;\n\t\t\telse if (Character.isWhitespace(c))\n\t\t\t\tresult += \" \";\n\t\t}\n\t\treturn result;\n\t}", "public int lengthOfLastWord(final String A) {\n int i,n;\n StringBuilder str = new StringBuilder();\n String[] st = A.split(\" \");\n n=st.length;\n if(n==0)\n return 0;\n str.append(st[n-1]);\n return str.length();\n }", "private String removeFalseEndOfSentence(String s) {\n // Don't split at e.g. \"U. S. A.\":\n s = abbrev1.matcher(s).replaceAll(\"$1\");\n // Don't split at e.g. \"U.S.A.\": \n s = abbrev2.matcher(s).replaceAll(\"$1\");\n // Don't split after a white-space followed by a single letter followed\n // by a dot followed by another whitespace.\n // e.g. \" p. \"\n s = abbrev3.matcher(s).replaceAll(\"$1$2\");\n // Don't split at \"bla bla... yada yada\" \n s = abbrev4.matcher(s).replaceAll(\"$1$2\");\n // Don't split [.?!] when the're quoted:\n s = abbrev5.matcher(s).replaceAll(\"$1\");\n\n // Don't split at abbreviations, treat them case insensitive\n s = ABREVLIST_PATTERN.matcher(s).replaceAll(\"$1\");\n\n //a special list of abbrevs used at the end of sentence\n s = ENDABREVLIST_PATTERN.matcher(s).replaceAll(\"$1$3\");\n \n // Don't break after quote unless there's a capital letter:\n // e.g.: \"That's right!\" he said.\n s = abbrev6.matcher(s).replaceAll(\"$1$2\");\n\n // fixme? not sure where this should occur, leaving it commented out:\n // don't break: text . . some more text.\n // text=~s/(\\s\\.\\s)$EOS(\\s*)/$1$2/sg;\n\n // e.g. \"Das ist . so.\" -> assume one sentence\n s = abbrev7.matcher(s).replaceAll(\"$1\");\n\n // e.g. \"Das ist . so.\" -> assume one sentence\n s = abbrev8.matcher(s).replaceAll(\"$1\");\n \n s = ELLIPSIS.matcher(s).replaceAll(\"$1$3\");\n \n s = s.replaceAll(\"(\\\\d+\\\\.) \" + EOS + \"([\\\\p{L}&&[^\\\\p{Lu}]]+)\", \"$1 $2\");\n\n // z.B. \"Das hier ist ein(!) Satz.\"\n s = s.replaceAll(\"\\\\(([!?]+)\\\\) \" + EOS, \"($1) \");\n return s;\n }", "public String getWord()\r\n\t\t{\r\n\t\t\treturn word;\r\n\t\t}", "public static String cap(String w) {\n if (w.toLowerCase().equals(w)){ //if there are no capitals\n return w; // //then just return the word as is\n }\n else{\n // for (int i=0; i<w.length(); i++) {\n \n return w.substring(0,1).toUpperCase() + w.substring(1).toLowerCase(); //if there is a capital then make the first only the first letter capital and the rest lowercase\n }\n }", "public String translateSentence(String sentence)\n {\n // store the punctuation in a variable.\n String punc = sentence.substring(sentence.length() - 1);\n // Use split to tokenize the sentence as per spec.\n String[] words = sentence.split(\" \");\n int lastIdx = words.length - 1;\n // Replace the punctuation in the last word with nothing, we'll add it later at the end.\n words[lastIdx] = words[lastIdx].replace(punc, \"\");\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < words.length; i++)\n {\n // for the first word, we want to lowercase it and capitalize only the first letter.\n if (i == 0)\n {\n sb.append(convertToLatin(words[i].toLowerCase()) + \" \");\n }\n else\n {\n sb.append(convertToLatin(words[i]) + \" \");\n }\n }\n // Trim off the last space and add the punctuation.\n String sent = sb.toString().substring(0, sb.toString().length() - 1) + punc;\n sent = sent.substring(0, 1).toUpperCase() + sent.substring(1);\n return sent;\n }" ]
[ "0.70089555", "0.70068246", "0.6579595", "0.6416325", "0.6373655", "0.6368519", "0.6333631", "0.62906677", "0.6241353", "0.62178165", "0.6184696", "0.6166781", "0.6122218", "0.6113473", "0.60916996", "0.60875946", "0.6067756", "0.60358566", "0.6015019", "0.5963153", "0.59333676", "0.5928642", "0.5925033", "0.5880634", "0.57960963", "0.5795074", "0.577763", "0.57624674", "0.5759531", "0.57531893", "0.57427925", "0.57260346", "0.57234454", "0.5715978", "0.570475", "0.56988525", "0.5665686", "0.5651894", "0.56169134", "0.55833095", "0.55621284", "0.5558527", "0.55564106", "0.5534227", "0.5523858", "0.55171645", "0.5515193", "0.55049896", "0.54982936", "0.549081", "0.54776174", "0.5476802", "0.5465871", "0.5447036", "0.544691", "0.542349", "0.5408769", "0.54086494", "0.5404506", "0.53895795", "0.53747696", "0.5368191", "0.5367092", "0.5354572", "0.5348555", "0.53387994", "0.53344256", "0.5331779", "0.5320544", "0.531878", "0.53158087", "0.53118974", "0.53027105", "0.53019035", "0.5297367", "0.5292673", "0.52905095", "0.5286736", "0.5269106", "0.5259471", "0.5253981", "0.52376187", "0.5226344", "0.52179676", "0.521725", "0.5216633", "0.5215425", "0.5205253", "0.52043223", "0.5203234", "0.52024037", "0.5198281", "0.5187992", "0.5186257", "0.5171105", "0.5169851", "0.516759", "0.5160709", "0.5160466", "0.5157306" ]
0.6722178
2
Do your task here
@Override public boolean onQueryTextSubmit(String query) { showLoading(); weatherPresenter.getWeatherForCity(searchView.getQuery().toString()); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void doTask() {\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "abstract void doTaskOnRun();", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\n }", "public void execute() {\r\n\t\r\n\t}", "public void execute(){\n\t\t\n\t}", "protected void execute() {\n\t\t\n\t}", "public void processing();", "protected void execute() {\n\n\t}", "public void performOtherTasks() {\n\t\t\tSystem.out.println(\"performing tasks other than servicing\");\n\t\t\t// do whatever you want to do in the servicing package\n\t\t}", "public void execute() {\n\n\t}", "public void execute() {\n\t\t\n\t}", "protected void execute() {}", "public abstract void task();", "protected void execute() {\n\t}", "public void process() {\n\t}", "protected void execute()\n\t{\n\t}", "protected abstract void work();", "protected void internalRun() {\n work();\n }", "protected void execute() {\n\n\n \n }", "protected void execute() {\r\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void work() {\n\t}", "public void work() {\n\t}", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "@Override\r\n\tpublic void process(ResultItems arg0, Task arg1) {\n\t\t\r\n\t}", "private static void executeTask02() {\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttask();\n\t\t}", "public void run() {\n doProcessDocuments();\n //doReport();\n\n }", "@Override\r\n\tprotected void execute() {\r\n\t}", "public void run() {\n\t\t\n\t\t\n\t\t\tsaleMethod1();\n\t\t\t//saleMethod3();\n\t\t\t//saleMethod2();\n\t}", "@Override\n\tpublic void execute() {\n\t\trecevier.doSomething();\n\t}", "protected void run() {\r\n\t\t//\r\n\t}", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "@Override\n\tpublic void process(Task task, Page page) {\n\t\t\n\t}", "protected void additionalProcessing() {\n\t}", "public void performOperation() {\n processFile(this.scopedFile);\n }", "protected void execute()\n {\n }", "public void execute() {\n }", "protected void execute() {\n\t\t//execution handled by pid thread\n\t}", "@Override\npublic void run() {\n perform();\t\n}", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "void work();", "public void logic(){\r\n\r\n\t}", "@Override\n public void run() {\n runTask();\n\n }", "@Override\r\n\tpublic void doWorkFlowAnalysis() {\n\t\t\r\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void doAct() {\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "public void processTask(final EngineTask task) {\n processTask(task, null);\n }", "@Override\n public void run() {\n if (checkFailure()) {\n throw new InvalidInputException(\"任务结果计算器暂时无法工作,因为未满足条件\");\n } else {\n analysisDistribution();\n File file = writeFile();\n task.setResult(OSSWriter.upload(file));\n task.setHasResult(true);\n taskController.update(task);\n }\n }", "@Override\n public void run() {\n\tprocess();\n }", "public void run() {\n\t\t\r\n\t}", "public void run() {\n\t\t\r\n\t}", "@Override\n\tpublic void doJob() {\n\t\tSystem.out.println(\"Studying\");\n\t}", "public void doSomething(){\n\t\t// now in here calling doMore();\n\t\tdoMore();\n\t\tSystem.out.println(\"-----------\");\n\t\t\n\t\t\t\n\t\t}", "public void execute(){\n\n }", "public void process() {\n\n }", "public static void run() {\n try {\n //recreating tables added to update csv data without application restart\n new SqlUtility().setConnection().dropAllTables().createPersonTable().createRecipientTable();\n new CsvPersonParser().run();\n new CsvReсipientParser().run();\n\n List<Person> list;\n list = new SqlUtility().setConnection().grubData();\n String result = \"\";\n result = ListToMessage.converter(list);\n if(!\"\".equals(result)) {\n NotificationSender.sender(result, email, pass, addressList);\n }\n } catch (ClassNotFoundException e){e.printStackTrace();}\n catch (SQLException ee){ee.printStackTrace();}\n catch (ParseException eee) {eee.printStackTrace();}\n\n }", "@Override\n protected void execute() {\n \n }", "public void run() {\n\t\t\t\tString patient_id = Statics.patientdesc.getPatient_id();\r\n\t\t\t\tString zid = Statics.patientdesc.getZy_id();\r\n\r\n\t\t\t\tdata = MyUntils.getMRPinggu(patient_id, zid, itemid,date);\r\n\t\t\t\tMessage msg = new Message();\r\n\t\t\t\tmsg.what = 101;\r\n\t\t\t\tmhandler.sendMessage(msg);\r\n\t\t\t}", "public void run() {\n\n }", "abstract void doJob();", "public void actions() {\n\t\t\tProvider p = array_provider[theTask.int_list_providers_that_tried_task.get(0)];\n\t\t\t\n\t\t\t//there is a percentage of probability that the user will fail to complete the task\n\t\t\tif(random.draw((double)PERCENTAGE_TASK_FAILURE/100)){ // SUCCESS\n\n\t\t\t\ttot_success_tasks++;\n\t \tthrough_time += time() - theTask.entryTime;\n\t\t\t\ttheTask.out();\n\t\t\t\t\n\t\t\t\tif(FIXED_EARNING_FOR_TASK) earning_McSense = earning_McSense + FIXED_EARNING_VALUE;\n\t\t\t\telse {\n\n\t\t\t\t\t//Provider p = (Provider) theTask.providers_that_tried_task.first();\n\t\t\t\t\tearning_McSense = earning_McSense + (p.min_price*PERCENTAGE_EARNING)/100;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\telse { // FAILURE\n\t\t\t\t//we should check again and if the check fails insert the task in rescheduled_waiting\n\t\t\t\ttheTask.into(taskrescheduled);\n\t\t\t\ttot_failed_tasks++;\n\t\t\t\t//new StartTaskExecution(theTask).schedule(time());\n\n\t\t\t}\n\t\t\t// the provider frees one slot\n\t\t\tp.number_of_task_executing--;\n\t\t\ttot_scheduled_completed_in_good_or_bad_tasks++;\n\n \t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public void run() {\r\n\t\t// overwrite in a subclass.\r\n\t}", "public void postPerform() {\n // nothing to do by default\n }", "public void doTask(Entity e) {\r\n\t\tif (getTask().equals(\"heal\")) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tint healing = rand.nextInt(50) + 1;\r\n\t\t\tif (getNumTasks() > 0) {\r\n\t\t\t\tuseTask();\r\n\t\t\t\tif (Jedi.class.isInstance(e)) {\r\n\t\t\t\t\tJedi healMe = (Jedi) e;\r\n\t\t\t\t\thealMe.heal(healing);\r\n\t\t\t\t} else if (Rebel.class.isInstance(e)) {\r\n\t\t\t\t\tRebel healMe = (Rebel) e;\r\n\t\t\t\t\thealMe.heal(healing);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Medical droid heals \" + e.getName()\r\n\t\t\t\t\t\t+ \" with \" + healing + \" hp.\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out\r\n\t\t\t\t\t\t.println(\"Medical Droid \"\r\n\t\t\t\t\t\t\t\t+ getName()\r\n\t\t\t\t\t\t\t\t+ \" has run out of number of tasks available to perform.\");\r\n\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Medical Droid \" + getName()\r\n\t\t\t\t\t+ \" has no tasks upon which to perform.\");\r\n\t\t}\r\n\t}", "public void process();", "@Override\r\n\tvoid execute(Runnable task);", "public void doTask(String task) {\n \t// show the command line parameters\n String[] params = org.archiviststoolkit.plugin.ATPluginFactory.getInstance().getCliParameters();\n for(int i = 0; i < params.length; i++) {\n System.out.println(\"Parameter \" + (i+1) + \" = \" + params[i]);\n }\n \n // options for when calling convertResourceToFile\n boolean suppressInternalOnly = false;\n boolean includeDaos = false;\n boolean numberedComponents = false;\n boolean useDOIDAsHREF = false;\n boolean MARC = false;\n boolean EAD = false;\n \n java.util.Hashtable optionsAndArgs = new java.util.Hashtable();\n for(int i=3; i<params.length;i++){\n \tif((params[i]).equals(\"-ead\"))\n \t\tEAD = true;\n \telse if((params[i]).equals(\"-marc\"))\n \t\tMARC = true;\n \telse if((params[i]).equals(\"-suppressInternalOnly\"))\n \t\tsuppressInternalOnly = true;\n \telse if((params[i]).equals(\"-includeDaos\"))\n \t\tincludeDaos = true;\n \telse if((params[i]).equals(\"-numberedComponents\"))\n \t\tnumberedComponents = true;\n \telse if((params[i]).equals(\"-useDOIDAsHREF\"))\n \t\tuseDOIDAsHREF = true;\n \telse if(params[i].startsWith(\"-\"))\n \t\toptionsAndArgs.putAll(addParams(params, i));\n }\n \n // ensure EAD and or MARC is select\n if(!MARC && !EAD){\n \tSystem.out.println(\"You must choose to export EAD and/or MARC records.\");\n \treturn;\n }\n \n DomainAccessObject access = new ResourcesDAO();\n\n // get the list of all resources from the database\n java.util.List<Resources> resources;\n java.util.List<Resources> completedResources;\n\n try {\n resources = (java.util.List<Resources>) access.findAll();\n } catch (Exception e) {\n resources = null;\n }\n\n int recordCount = resources.size();\n \n // Get the path where to export the files to from the command line arguments\n String exportRootPath = params[2];\n\n //dummy progress panel to pass into convertResourceToFile\n InfiniteProgressPanel fakePanel = new InfiniteProgressPanel();\n\n // print out the resource identifier and title and export as ead\n System.out.println(\"Exporting Resources\");\n\n // Get the runtime for clearing memory\n Runtime runtime = Runtime.getRuntime();\n\n // get the ead exporter\n EADExport ead = new EADExport();\n \n MARCExport marc = new MARCExport();\n \n // create an index file of all resources\n java.io.File indexFile = new java.io.File(exportRootPath + \"resourceIndex.txt\");\n try{\n \tindexFile.createNewFile();\n }catch(Exception e){\n \tSystem.out.println(\"Failed to create index file\");\n }\n \n // populate index file\n \ttry{\n \tjava.io.FileWriter fstream = new java.io.FileWriter(indexFile);\n \tjava.io.BufferedWriter out = new java.io.BufferedWriter(fstream);\n \tfor(int i=0; i< recordCount; i++){\n \t\tout.write(resources.get(i).getResourceIdentifier().toString()+'\\t');\n \t\tString status = resources.get(i).getFindingAidStatus();\n \t\tstatus = status.replace(\"\\n\", \"\");\n \t\tstatus = status.replace(\"\\r\", \"\");\n \t\tif(status.length() > 0){\n \t\t\tout.write(status+'\\t');\n \t\t}else{\n \t\t\tout.write(\"--------\"+'\\t');\n \t\t}\n \t\t// remove newlines / carriage returns\n \t\tString title = resources.get(i).getTitle().replaceAll(\"\\\\n\",\"\").replaceAll(\"\\\\r\",\"\");\n \t\tif(title.length() > 0){\n \t\t\tout.write(title+'\\t');\n \t\t}else{\n \t\t\tout.write(\"--------\"+'\\t');\n \t\t}\n \t\t//this doesnt work\n \t\tout.write(resources.get(i).getLastUpdated().toString());\n \t\tout.newLine();\n \t\t\n \t\tout.flush();\n \t}\n \tout.close();\n \tfstream.close();\n }catch(Exception e){\n \tSystem.out.println(e);\n }\n \n PrintStream printStreamOriginal=System.out;\n \n for(int i = 0; i < recordCount; i++) {\n \tif(filterOnOptions(resources.get(i), optionsAndArgs)){ \t\t\n\t try {\n\t // load the full resource from database using a long session\n\t Resources resource = (Resources)access.findByPrimaryKeyLongSession(resources.get(i).getIdentifier());\n\t\n\t System.out.println(resource.getResourceIdentifier() + \" : \" + resource.getTitle());\n\t \n\t String fileName = StringHelper.removeInvalidFileNameCharacters(resource.getResourceIdentifier());\n\t \n\t System.setOut(new PrintStream(new OutputStream(){\n\t \t\t\tpublic void write(int b) {\n\t \t\t\t}\n\t \t\t}));\n\t \n\t if(EAD){\n\t \tjava.io.File fileEAD = new java.io.File(exportRootPath + fileName + \"-EAD\" + \".xml\");\n\t \tfileEAD.createNewFile();\n\t \tead.convertResourceToFile(resource, fileEAD, fakePanel, suppressInternalOnly, numberedComponents, includeDaos, useDOIDAsHREF);\n\t }\n\t \n\t if(MARC){\n\t \tjava.io.File fileMARC = new java.io.File(exportRootPath + fileName + \"-MARC\" + \".xml\");\n\t \tfileMARC.createNewFile();\n\t \tmarc.convertDBRecordToFile(resource, fileMARC, fakePanel, suppressInternalOnly);\n\t }\n\t System.setOut(printStreamOriginal);\n\t \n\t } catch (Exception e) {\n\t \tSystem.setOut(printStreamOriginal);\n\t System.out.println(e);\n\t }\n\t\n\t // close the long session. This is critical to saving memory. If it's\n\t // left open then hinernate caches the resource records even though\n\t // we don't need them anymore\n\t access.getLongSession().close(); // close the connection\n \t}\n \t// since we no longer need this resource, set it to null\n // close the session in an attemp to save memory\n resources.set(i, null);\n \n // run GC to clear some memory after 10 exports, not sure if this is\n // really needed but running GC cost little in time so might as well?\n runtime.gc();\n }\n\n System.out.println(\"Finished Exporting ...\");\n }", "@Override\n public void execute() {\n \n \n }" ]
[ "0.66798913", "0.63685006", "0.63685006", "0.63685006", "0.6361045", "0.6337763", "0.6337763", "0.627025", "0.6263499", "0.6259415", "0.6226876", "0.6224788", "0.6215925", "0.6155758", "0.61531067", "0.6129904", "0.61124545", "0.6091028", "0.6087604", "0.60858583", "0.60779977", "0.6059569", "0.6052279", "0.6025161", "0.60241467", "0.60225654", "0.60225654", "0.6020983", "0.6012441", "0.5988722", "0.5979942", "0.59756994", "0.597413", "0.5968728", "0.59576964", "0.59375125", "0.5919093", "0.5919093", "0.5919093", "0.5919093", "0.5919093", "0.5919093", "0.5919093", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.5912741", "0.59032136", "0.5884026", "0.5866229", "0.5865586", "0.5836533", "0.58356035", "0.58308214", "0.5818103", "0.5818103", "0.5818103", "0.5818103", "0.5806224", "0.5805925", "0.580309", "0.5802414", "0.5799428", "0.5799206", "0.5799206", "0.5799206", "0.5797846", "0.5796592", "0.5796592", "0.57916594", "0.5788505", "0.57849276", "0.5780377", "0.57779366", "0.57779366", "0.5777469", "0.5775352", "0.5772411", "0.5768704", "0.57660425", "0.5765582", "0.5759283", "0.57557553", "0.57547617", "0.5748926", "0.5747454", "0.573921", "0.5734223", "0.5731583", "0.5719901", "0.5714888", "0.57099754", "0.57055855" ]
0.0
-1
TODO Autogenerated method stub
public MemberVO login_id_check(String m_userid, String m_password) { MemberVO memberVO = mDao.login_id_check(m_userid); if(memberVO != null) { String cryptPassowrd = memberVO.getM_password(); if(passwordEncoder.matches(m_password, cryptPassowrd)) { // 암호가 일치하면 return memberVO; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Libro> readAll() { return libroDao.readAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
common part: create layout
@SuppressWarnings("deprecation") @AutoGenerated private HorizontalLayout buildHorizontalLayout_1() { HorizontalLayout horizontalLayout_1 = new HorizontalLayout(); horizontalLayout_1.setImmediate(false); horizontalLayout_1.setWidth("-1px"); horizontalLayout_1.setHeight("-1px"); horizontalLayout_1.setMargin(false); horizontalLayout_1.setSpacing(true); // textFieldCodigo textFieldCodigo = new TextField(); textFieldCodigo.setCaption(bundle.getString("code")); textFieldCodigo.setImmediate(false); textFieldCodigo.setWidth(AttrDim.FORM_COM_DOUBLE_WIDTH); textFieldCodigo.setHeight("-1px"); horizontalLayout_1.addComponent(textFieldCodigo); // comboBoxStatus comboBoxStatus = new ComboBox(); comboBoxStatus.setCaption(bundle.getString("situation")); comboBoxStatus.setImmediate(false); comboBoxStatus.setContainerDataSource(ContainerUtils.listaStatusBean()); comboBoxStatus.setWidth(AttrDim.FORM_COM_DOUBLE_WIDTH); comboBoxStatus.setHeight("-1px"); comboBoxStatus.setContainerDataSource(AppData.listStatusInteger()); comboBoxStatus.setItemCaptionMode(ComboBox.ITEM_CAPTION_MODE_PROPERTY); comboBoxStatus.setItemCaptionPropertyId("statusNome"); comboBoxStatus.setNullSelectionAllowed(false); horizontalLayout_1.addComponent(comboBoxStatus); return horizontalLayout_1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void iniciarLayout();", "Board createLayout();", "public abstract void doLayout();", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }", "private void buildLayout() {\n HorizontalLayout actions = new HorizontalLayout(filter, newPart);\n actions.setWidth(\"100%\"); //what portion of screen to take\n filter.setWidth(\"100%\"); //what portion filter textbox takes\n actions.setExpandRatio(filter, 1); //expand (leaves no gaps)\n\n VerticalLayout left = new VerticalLayout(actions, partList);\n left.setSizeFull();\n partList.setSizeFull();\n left.setExpandRatio(partList, 1);\n\n HorizontalLayout mainLayout = new HorizontalLayout(left, partForm);\n mainLayout.setSizeFull();\n mainLayout.setExpandRatio(left, 1);\n\n // Split and allow resizing\n setContent(mainLayout);\n }", "public void initLayouts() {\n\t\tJPanel p_header = (JPanel) getComponentByName(\"p_header\");\n\t\tJPanel p_container = (JPanel) getComponentByName(\"p_container\");\n\t\tJPanel p_tree = (JPanel) getComponentByName(\"p_tree\");\n\t\tJPanel p_commands = (JPanel) getComponentByName(\"p_commands\");\n\t\tJPanel p_execute = (JPanel) getComponentByName(\"p_execute\");\n\t\tJPanel p_buttons = (JPanel) getComponentByName(\"p_buttons\");\n\t\tJPanel p_view = (JPanel) getComponentByName(\"p_view\");\n\t\tJPanel p_info = (JPanel) getComponentByName(\"p_info\");\n\t\tJPanel p_chooseFile = (JPanel) getComponentByName(\"p_chooseFile\");\n\t\tJButton bt_apply = (JButton) getComponentByName(\"bt_apply\");\n\t\tJButton bt_revert = (JButton) getComponentByName(\"bt_revert\");\n\t\tJTextArea ta_header = (JTextArea) getComponentByName(\"ta_header\");\n\t\tJLabel lb_icon = (JLabel) getComponentByName(\"lb_icon\");\n\t\tJLabel lb_name = (JLabel) getComponentByName(\"lb_name\");\n\t\tJTextField tf_name = (JTextField) getComponentByName(\"tf_name\");\n\n\t\tBorder etched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);\n\n\t\tp_header.setBorder(etched);\n\t\tp_container.setBorder(etched);\n\t\tp_commands.setBorder(etched);\n\t\t// p_execute.setBorder(etched);\n\t\t// p_view.setBorder(etched);\n\t\t// p_buttons.setBorder(etched);\n\n\t\tp_buttons.setLayout(new FlowLayout(FlowLayout.LEFT, 25, 2));\n\t\tp_chooseFile.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 1));\n\t\tp_view.setLayout(new BorderLayout(0, 0));\n\t\tp_info.setLayout(null);\n\n\t\t// GroupLayout for main JFrame\n\t\t// If you want to change this, use something like netbeans or read more\n\t\t// into group layouts\n\t\tGroupLayout groupLayout = new GroupLayout(getContentPane());\n\t\tgroupLayout\n\t\t\t\t.setHorizontalGroup(groupLayout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_commands,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t225,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_execute,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t957,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_container,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t957,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_header,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1188,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tgroupLayout\n\t\t\t\t.setVerticalGroup(groupLayout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(p_header,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, 57,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_commands,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t603,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_container,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t549,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_execute,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t48,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\n\t\tGroupLayout gl_p_container = new GroupLayout(p_container);\n\t\tgl_p_container\n\t\t\t\t.setHorizontalGroup(gl_p_container\n\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_view,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t955,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt_apply)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt_revert))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlb_name)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttf_name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t893,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tgl_p_container\n\t\t\t\t.setVerticalGroup(gl_p_container\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttf_name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(lb_name))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addComponent(p_view,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t466, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(bt_revert)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(bt_apply))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)));\n\t\tp_container.setLayout(gl_p_container);\n\n\t\t// GroupLayout for p_header\n\n\t\tGroupLayout gl_p_header = new GroupLayout(p_header);\n\t\tgl_p_header.setHorizontalGroup(gl_p_header.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tAlignment.TRAILING,\n\t\t\t\tgl_p_header\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(ta_header, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t1069, Short.MAX_VALUE).addGap(18)\n\t\t\t\t\t\t.addComponent(lb_icon).addGap(4)));\n\t\tgl_p_header\n\t\t\t\t.setVerticalGroup(gl_p_header\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_header\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGap(6)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_header\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tta_header,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t44,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(lb_icon))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tp_header.setLayout(gl_p_header);\n\n\t\tGroupLayout gl_p_commands = new GroupLayout(p_commands);\n\t\tgl_p_commands\n\t\t\t\t.setHorizontalGroup(gl_p_commands\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_commands\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_commands\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_tree,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t211,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_buttons,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tgl_p_commands.setVerticalGroup(gl_p_commands.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tgl_p_commands\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(p_buttons, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(p_tree, GroupLayout.DEFAULT_SIZE, 558,\n\t\t\t\t\t\t\t\tShort.MAX_VALUE).addContainerGap()));\n\t\tp_commands.setLayout(gl_p_commands);\n\n\t\tgetContentPane().setLayout(groupLayout);\n\t}", "protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}", "public void setupLayout() {\n // left empty for subclass to override\n }", "public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}", "private void layout() {\n\n\n _abortButton= makeAbortButton();\n _abortButton.addStyleName(\"download-group-abort\");\n _content.addStyleName(\"download-group-content\");\n _detailUI= new DetailUIInfo[getPartCount(_monItem)];\n layoutDetails();\n }", "private void defineLayout(IPageLayout layout) {\n String editorArea = layout.getEditorArea();\r\n\r\n IFolderLayout folder;\r\n\r\n // Place remote system view to left of editor area.\r\n folder = layout.createFolder(NAV_FOLDER_ID, IPageLayout.LEFT, 0.2F, editorArea);\r\n folder.addView(getRemoveSystemsViewID());\r\n\r\n // Place properties view below remote system view.\r\n folder = layout.createFolder(PROPS_FOLDER_ID, IPageLayout.BOTTOM, 0.75F, NAV_FOLDER_ID);\r\n folder.addView(\"org.eclipse.ui.views.PropertySheet\"); //$NON-NLS-1$\r\n\r\n // Place job log explorer view below editor area.\r\n folder = layout.createFolder(JOB_LOG_EXPLORER_FOLDER_ID, IPageLayout.BOTTOM, 0.0F, editorArea);\r\n folder.addView(JobLogExplorerView.ID);\r\n\r\n // Place command log view below editor area.\r\n folder = layout.createFolder(CMDLOG_FOLDER_ID, IPageLayout.BOTTOM, 0.75F, JobLogExplorerView.ID);\r\n folder.addView(getCommandLogViewID());\r\n\r\n layout.addShowViewShortcut(getRemoveSystemsViewID());\r\n layout.addShowViewShortcut(\"org.eclipse.ui.views.PropertySheet\"); //$NON-NLS-1$\r\n layout.addShowViewShortcut(getCommandLogViewID());\r\n\r\n layout.addPerspectiveShortcut(ID);\r\n\r\n layout.setEditorAreaVisible(false);\r\n }", "@Override\n public void layout() {\n // TODO: not implemented\n }", "void computeNewLayout();", "public void createInitialLayout(IPageLayout layout) {\n \n\t}", "private void buildMainLayout(IAuthorizationContext pContext)\r\n throws UnauthorizedAccessAttemptException, IOException {\r\n\r\n createObjectEntry();\r\n\r\n if (parent.getParentUI().siteName.equals(parent.getParentUI().siteNameCVMA)) {\r\n defineInfoLayoutCVMA();\r\n } else {\r\n defineInfoLayoutStandard();\r\n }\r\n\r\n thumbLayout = new VerticalLayout();\r\n thumbLayout.setSizeFull();\r\n thumbLayout.setSpacing(false);\r\n thumbLayout.setMargin(false);\r\n thumbLayout.setStyleName(\"white\");\r\n thumbLayout.setHeight(\"150px\");\r\n thumbLayout.setWidth(\"161px\");\r\n\r\n // initialize thumbnail field and button\r\n setThumbButton();\r\n\r\n // build content layout\r\n buttonLayout = new VerticalLayout();\r\n buttonLayout.setSizeFull();\r\n buttonLayout.setSpacing(false);\r\n buttonLayout.setMargin(false);\r\n buttonLayout.setStyleName(\"white\");\r\n buttonLayout.setHeight(\"150px\");\r\n buttonLayout.setWidth(\"161px\");\r\n\r\n // set download button\r\n setDownloadButton();\r\n\r\n // set metadata viewer button\r\n setMetadataViewerButton();\r\n\r\n // download button\r\n setImageDownloadButton();\r\n\r\n // map button\r\n setMapButton();\r\n\r\n // build content layout\r\n contentLayout = new HorizontalLayout();\r\n contentLayout.setSizeFull();\r\n contentLayout.setMargin(false);\r\n contentLayout.setMargin(new MarginInfo(false, false, true, false));\r\n contentLayout.setStyleName(\"white\");\r\n contentLayout.addComponent(thumbLayout);\r\n contentLayout.addComponent(infoLayout);\r\n contentLayout.addComponent(buttonLayout);\r\n contentLayout.setComponentAlignment(thumbLayout, Alignment.TOP_LEFT);\r\n contentLayout.setComponentAlignment(infoLayout, Alignment.TOP_CENTER);\r\n contentLayout.setComponentAlignment(buttonLayout, Alignment.TOP_RIGHT);\r\n contentLayout.setExpandRatio(infoLayout, 11f);\r\n }", "@Override\n protected Layout constructShellLayout() {\n GridLayout mainLayout = new GridLayout(1, false);\n\n return mainLayout;\n }", "private HorizontalLayout buildMainLayout() {\n\t\tmainLayout = new HorizontalLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"-1px\");\r\n\t\tmainLayout.setMargin(true);\r\n\t\tmainLayout.setSpacing(true);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"100%\");\r\n\t\tsetHeight(\"100%\");\r\n\t\t\r\n\t\t// panelImg\r\n\t\tpanelImg = buildPanelImg();\r\n\t\tmainLayout.addComponent(panelImg);\r\n\t\t\r\n\t\t// gridInfo\r\n\t\tgridInfo = buildGridInfo();\r\n\t\tmainLayout.addComponent(gridInfo);\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "private void initLayout(){\r\n\t\t\r\n\t\tlabelSalvar.setLayoutX(((pane.getWidth() - labelSalvar.getWidth()) / 2) - 332);\r\n\t\tlabelSalvar.setLayoutY(60);\r\n\t\ttxSalvar.setLayoutX(((pane.getWidth() - txSalvar.getWidth()) / 2) - 100);\r\n\t\ttxSalvar.setPrefWidth(500);\r\n\t\ttxSalvar.setLayoutY(60);\r\n\t\t\r\n\t\tlabelArquivoRTF.setLayoutX(((pane.getWidth() - labelArquivoRTF.getWidth()) / 2) - 325);\r\n\t\tlabelArquivoRTF.setLayoutY(100);\r\n\t\ttxArquivoRTF.setLayoutX(((pane.getWidth() - txArquivoRTF.getWidth()) / 2) - 100);\r\n\t\ttxArquivoRTF.setPrefWidth(500);\r\n\t\ttxArquivoRTF.setLayoutY(100);\r\n\t\t\r\n\t\tlabelLinhaInicio.setLayoutX(((pane.getWidth() - labelLinhaInicio.getWidth()) / 2) - 145);\r\n\t\tlabelLinhaInicio.setLayoutY(140);\r\n\t\ttxLinhaInicio.setLayoutX(((pane.getWidth() - txArquivoRTF.getWidth()) / 2) - 10);\r\n\t\ttxLinhaInicio.setPrefWidth(50);\r\n\t\ttxLinhaInicio.setLayoutY(140);\r\n\t\t\r\n\t\tlabelLinhaFim.setLayoutX(((pane.getWidth() - labelLinhaFim.getWidth()) / 2) + 220);\r\n\t\tlabelLinhaFim.setLayoutY(140);\r\n\t\ttxLinhaFinal.setLayoutX(((pane.getWidth() - txLinhaFinal.getWidth()) / 2) + 350);\r\n\t\ttxLinhaFinal.setPrefWidth(50);\r\n\t\ttxLinhaFinal.setLayoutY(140);\r\n\t\t\r\n\t\tbtnExecutar.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) + 80);\r\n\t\tbtnExecutar.setLayoutY(210);\r\n\t\t\r\n\t\tprogressBar.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) + 260);\r\n\t\tprogressBar.setLayoutY(280);\r\n\t\t\r\n\t\tlabelBy.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) - 350);\r\n\t\tlabelBy.setScaleY(0.5);\r\n\t\tlabelBy.setScaleX(0.5);\r\n\t\tlabelBy.setLayoutY(280);\r\n\t\t\r\n\t}", "@Override\n public void createInitialLayout(IPageLayout layout) {\n defineActions(layout);\n defineLayout(layout);\n }", "private void doTheLayout(){\n\n\t JPanel top = new JPanel();\n\t JPanel center = new JPanel();\n\t JPanel bottom = new JPanel();\n\n\t top.setLayout( new FlowLayout());\n\t top.add(label1);\n\t top.add(field1);\n\n\t center.setLayout( new FlowLayout());\n\t center.add(label2);\n\t center.add(field2);\n\n\t bottom.setLayout( new FlowLayout());\n\t bottom.add(SortButton);\n\t bottom.add(CloseButton);\n\n\t setLayout( new BorderLayout());\n\t add(top, \"North\");\n\t add(center, \"Center\");\n\t add(bottom, \"South\");\n\n\t }", "NodeLayout createNodeLayout();", "private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"100%\");\r\n\t\tmainLayout.setMargin(false);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tmainLayout.setWidth(\"100.0%\");\r\n\t\tmainLayout.setHeight(\"100.0%\");\r\n\t\t\r\n\t\t// label\r\n\t\tlabel = new Label();\r\n\t\tlabel.setImmediate(false);\r\n\t\tlabel.setWidth(\"-1px\");\r\n\t\tlabel.setHeight(\"-1px\");\r\n\t\tlabel.setValue(\"Stellvertreter ernennen\");\r\n\t\tlabel.setStyleName(Runo.LABEL_H1);\r\n\t\tmainLayout.addComponent(label, \"top:25.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// benutzer\r\n\t\tbenutzer = new ListSelect();\r\n\t\tbenutzer.setImmediate(false);\r\n\t\tbenutzer.setWidth(\"46.0%\");\r\n\t\tbenutzer.setHeight(\"70.0%\");\r\n\t\tmainLayout.addComponent(benutzer, \"top:35.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// ok\r\n\t\tok = new Button();\r\n\t\tok.setCaption(\"Stellvertreter ernennen\");\r\n\t\tok.setImmediate(false);\r\n\t\tok.setWidth(\"25%\");\r\n\t\tok.setHeight(\"-1px\");\r\n\t\tok.addListener(this);\r\n\t\tmainLayout.addComponent(ok, \"top:83.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// delete\r\n\t\tdelete = new Button();\r\n\t\tdelete.setCaption(\"Stellvertreter löschen\");\r\n\t\tdelete.setImmediate(false);\r\n\t\tdelete.setWidth(\"25%\");\r\n\t\tdelete.setHeight(\"-1px\");\r\n\t\tdelete.addListener(this);\r\n\t\tmainLayout.addComponent(delete, \"top:88.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// logout\r\n\t\tlogout = new Button();\r\n\t\tlogout.setCaption(\"logout\");\r\n\t\tlogout.setImmediate(false);\r\n\t\tlogout.setWidth(\"-1px\");\r\n\t\tlogout.setHeight(\"-1px\");\r\n\t\tlogout.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tlogout.addListener(this);\r\n\t\tmainLayout.addComponent(logout, \"top:97.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// back\r\n\t\tback = new Button();\r\n\t\tback.setCaption(\"Startseite\");\r\n\t\tback.setImmediate(true);\r\n\t\tback.setWidth(\"-1px\");\r\n\t\tback.setHeight(\"-1px\");\r\n\t\tback.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tback.addListener(this);\r\n\t\tmainLayout.addComponent(back, \"top:94.0%;left:35.0%;\");\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "private void createLayout() {\n\t\t\n\t\tmenu = new JMenuBar();\n\t\tfile = new JMenu(\"Arquivo\");\n\t\tedit = new JMenu(\"Editar\");\n\t\tmenu.add(file);\n\t\tmenu.add(edit);\n\n\t\tnewfile = new JMenuItem(\"Novo\");\n\t\tnewfile.addActionListener(new NewFileListener());\n\t\tfile.add(newfile);\n\t\t\n\t\tcopy = new JMenuItem(\"Copiar\");\n\t\tcopy.addActionListener(new CopyListener());\n\t\tedit.add(copy);\n\t\t\n\t\tcut = new JMenuItem(\"Cortar\");\n\t\tcut.addActionListener(new CutListener());\n\t\tedit.add(cut);\n\t\t\n\t\tpaste = new JMenuItem(\"Colar\");\n\t\tpaste.addActionListener(new PasteListener());\n\t\tedit.add(paste);\n\n \n edit.add(undoAction);\n edit.add(redoAction);\n \n \t\topen = new JMenuItem(\"Abrir\");\n\t\topen.addActionListener(new OpenFileListener());\n\t\tfile.add(open);\n\n\t\texit = new JMenuItem(\"Sair\");\n\t\texit.addActionListener(new ExitFileListener());\n\t\tfile.add(exit);\n\t\tframe.setJMenuBar(menu);\n\t\t\n\t\tcaret = new DefaultCaret();\n\t\tarea = new JTextArea(25, 65);\n\t\tarea.setLineWrap(true);\n\t\tarea.setText(documentText);\n\t\tarea.setWrapStyleWord(true);\n\t\t\n\t\t\n\t\tarea.setCaret(caret);\n\t\tdocumentListener = new TextDocumentListener();\n\t\tarea.getDocument().addDocumentListener(documentListener); \n\t\t\n area.getDocument().addUndoableEditListener(new UndoListener());\n \n\t\tscrollpane = new JScrollPane(area);\n\t\tscrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\tsetLayout(layout);\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\n\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup()\n\t\t\t\t.addComponent(documentNameLabel)\n\t\t\t\t.addComponent(scrollpane));\n\t\tlayout.setVerticalGroup(layout.createSequentialGroup()\n\t\t\t\t.addComponent(documentNameLabel)\n\t\t\t\t.addComponent(scrollpane));\n\t}", "private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }", "private void prepareLayout() {\n\n\t\tm_layouts = new ArrayList<SQLTableLayout>();\n\n\t\t//\n\t\t// construct the table tag\n\t\t//\n\t\tSQLTableLayout layout = new SQLTableLayout(TAG_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(TAG_FIELD_ID, \"INTEGER primary key\",\n\t\t\t\t\"tag id\");\n\t\tlayout.addFieldToSQLTableLayout(TAG_FIELD_NAME, \"TEXT\", \"tag name\");\n\t\tlayout.addFieldToSQLTableLayout(TAG_FIELD_CREATE_DATE, \"TEXT\",\n\t\t\t\t\"creation date of tag\");\n\t\tlayout.addFieldToSQLTableLayout(TAG_FIELD_USAGE, \"INTEGER\",\n\t\t\t\t\"tag usage in repository\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct the table file\n\t\t//\n\t\tlayout = new SQLTableLayout(FILE_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_ID, \"INTEGER primary key\",\n\t\t\t\t\"file id\");\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_PATH, \"TEXT\", \"path of file\");\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_TYPE, \"TEXT\", \"type of file\");\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_CREATE_DATE, \"TEXT\",\n\t\t\t\t\"creation date of file\");\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_HASH_SUM, \"TEXT\",\n\t\t\t\t\"hash sum of file\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct the mapping table\n\t\t//\n\t\tlayout = new SQLTableLayout(MAP_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(MAP_FIELD_ID, \"INTEGER primary key\",\n\t\t\t\t\"map id\");\n\t\tlayout.addFieldToSQLTableLayout(MAP_FIELD_FILE, \"INTEGER\", \"file id\");\n\t\tlayout.addFieldToSQLTableLayout(MAP_FIELD_TAG, \"INTEGER\", \"tag id\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct the directory table\n\t\t//\n\t\tlayout = new SQLTableLayout(DIRECTORY_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(DIRECTORY_FIELD_ID,\n\t\t\t\t\"INTEGER primary key\", \"directory id\");\n\t\tlayout.addFieldToSQLTableLayout(DIRECTORY_FIELD_PATH, \"TEXT\",\n\t\t\t\t\"path of directory\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct pending file table\n\t\t//\n\t\tlayout = new SQLTableLayout(PENDING_FILE_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(PENDING_FIELD_ID,\n\t\t\t\t\"INTEGER primary key\", \"pending id\");\n\t\tlayout.addFieldToSQLTableLayout(PENDING_FIELD_PATH, \"TEXT\",\n\t\t\t\t\"pending path of file\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct synchronized table\n\t\t//\n\t\tlayout = new SQLTableLayout(SYNC_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_ID, \"INTEGER primary key\",\n\t\t\t\t\"sync id\");\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_PATH, \"TEXT\",\n\t\t\t\t\"path of synced file\");\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_DATE, \"TEXT\", \"sync date\");\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_TAGS, \"TEXT\",\n\t\t\t\t\"tags of synced file\");\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_HASH_SUM, \"TEXT\",\n\t\t\t\t\"hash sum of synced file\");\n\t\tm_layouts.add(layout);\n\t}", "private void setupLayout()\n {\n Container contentPane;\n\n setSize(300, 300); \n\n contentPane = getContentPane();\n\n // Layout this PINPadWindow\n }", "@AutoGenerated\n\tprivate VerticalLayout buildMainLayout() {\n\t\tmainLayout = new VerticalLayout();\n\t\tmainLayout.setStyleName(\"contenido\");\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"-1px\");\n\t\tmainLayout.setMargin(true);\n\t\tmainLayout.setSpacing(true);\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"100.0%\");\n\t\tsetHeight(\"-1px\");\n\t\t\n\t\t// hl_cabecera\n\t\thl_cabecera = buildHl_cabecera();\n\t\tmainLayout.addComponent(hl_cabecera);\n\t\t\n\t\t// horizontalLayout_1\n\t\thorizontalLayout_1 = buildHorizontalLayout_1();\n\t\tmainLayout.addComponent(horizontalLayout_1);\n\t\tmainLayout.setComponentAlignment(horizontalLayout_1, new Alignment(20));\n\t\t\n\t\t// l_preferenciasUsuario\n\t\tl_preferenciasUsuario = new Label();\n\t\tl_preferenciasUsuario.setStyleName(\"mih2\");\n\t\tl_preferenciasUsuario.setImmediate(false);\n\t\tl_preferenciasUsuario.setWidth(\"100.0%\");\n\t\tl_preferenciasUsuario.setHeight(\"-1px\");\n\t\tl_preferenciasUsuario.setValue(\"Preferencias de Usuario\");\n\t\tmainLayout.addComponent(l_preferenciasUsuario);\n\t\t\n\t\t// hl_gridContent\n\t\thl_gridContent = new HorizontalLayout();\n\t\thl_gridContent.setImmediate(false);\n\t\thl_gridContent.setWidth(\"100.0%\");\n\t\thl_gridContent.setHeight(\"-1px\");\n\t\thl_gridContent.setMargin(false);\n\t\tmainLayout.addComponent(hl_gridContent);\n\t\t\n\t\t// b_enviar\n\t\tb_enviar = new Button();\n\t\tb_enviar.setCaption(\"Actualizar\");\n\t\tb_enviar.setImmediate(true);\n\t\tb_enviar.setWidth(\"-1px\");\n\t\tb_enviar.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(b_enviar);\n\t\tmainLayout.setComponentAlignment(b_enviar, new Alignment(48));\n\t\t\n\t\treturn mainLayout;\n\t}", "private void createLayout () {\n \t\n \tBorderPane border = new BorderPane();\n \t\n \t\n \t tabPane = new TabPane();\n ArrayList <ScrollPane> tabs = new ArrayList <ScrollPane>();\n \t\n //create column 1 - need to refactor this and make more generic\n TilePane col1 = new TilePane();\n \tcol1.setPrefColumns(2);\n \tcol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol1.setAlignment(Pos.TOP_LEFT);\n \tcol1.getChildren().addAll(createElements ());\n \tScrollPane scrollCol1 = new ScrollPane(col1);\n \ttabs.add(scrollCol1);\n \t\n \tTilePane col2 = new TilePane();\n \tcol2.setPrefColumns(2);\n \tcol2.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol2.setAlignment(Pos.TOP_LEFT);\n \tcol2.getChildren().addAll(createElements ());\n \tScrollPane scrollCol2 = new ScrollPane(col2);\n \ttabs.add(scrollCol2);\n \t\n \t\n \t\n for (int i = 0; i < tabs.size(); i++) {\n Tab tab = new Tab();\n String tabLabel = \"Col-\" + i;\n tab.setText(tabLabel);\n keywordsList.put(tabLabel, new ArrayList <String>());\n \n tab.setContent(tabs.get(i));\n tabPane.getTabs().add(tab);\n }\n \t\n \t\n \t\n \t\n \t\n \t\n //System.out.println(controller.getScene());\n border.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n border.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n ToolBar toolbar = createtoolBar();\n toolbar.setPrefHeight(50);\n \n border.setTop(toolbar);\n\t\t\n\n\t scrollCol1.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n\t scrollCol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n border.setCenter(tabPane);\n\t Group root = (Group)this.getRoot();\n root.getChildren().add(border);\n\t}", "public abstract int presentViewLayout();", "public Layout() {\n super(\"Chitrashala\");\n initComponents();\n }", "private void createMigLayout() {\r\n setLayout(new MigLayout(\"\", \"[][]6[]\", \"[]6[]\"));\r\n\r\n add(indexTitle, \"wrap\");\r\n add(dirUrl, \"span 3\");\r\n add(openDir, \"wrap\");\r\n add(indexProgress, \"wrap, span 4, growx\");\r\n add(addExistingCheck, \"span 3, split 2, right\");\r\n add(new JLabel(\"Add Existing Index\"));\r\n add(startIndexing, \"wrap 3sp\");\r\n add(new JLabel(\r\n \"<html>\"\r\n + \"\t<b style ='color:#3888a9'>Important Notes:</b>\"\r\n + \"\t\t<ol>\"\r\n + \"\t\t\t<li>JPEG images in directory and <i>sub-directories</i> will be indexed.</li>\"\r\n + \"\t\t\t<li>You can <i>update the existing index</i> in the database by checking the checkbox.</li>\"\r\n + \"</ol>\" + \"</html>\"), \"span 4\");\r\n }", "@AutoGenerated\n\tprivate HorizontalLayout buildMainLayout() {\n\t\tmainLayout = new HorizontalLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"-1px\");\n\t\tmainLayout.setHeight(\"29px\");\n\t\tmainLayout.setMargin(false);\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"-1px\");\n\t\tsetHeight(\"29px\");\n\t\t\n\t\t// pnToolbar\n\t\tpnToolbar = buildPnToolbar();\n\t\tmainLayout.addComponent(pnToolbar);\n\t\t\n\t\treturn mainLayout;\n\t}", "private void setupLayout() {\n this.setLayout(new BorderLayout());\n\t\tthis.setupConstraints();\n\n\t\tJPanel titleAuthorFields = new JPanel(new GridBagLayout());\n\t\ttitleAuthorFields.add(Pirex.inputField(titleLabel, titleTextField, null), cTitleField);\n\t\ttitleAuthorFields.add(Pirex.inputField(authorLabel, authorTextField, null), cAuthorField);\n\n\t\tJPanel inputFields = new JPanel(new GridLayout(3, 0));\n\t\tinputFields.add(Pirex.inputField(fileLabel, fileTextField, fileBrowseButton));\n\t\tinputFields.add(Pirex.inputField(fileTypeLabel, fileTypeComboBox, null));\n\t\tinputFields.add(titleAuthorFields);\n\t\tinputFields = Pirex.borderLayoutWrap(null, null, inputFields, null, separator);\n\n\t\tJPanel leftAlignedProcessButton = Pirex.leftAlign(processButton);\n\t\tJPanel processPanel = Pirex.borderLayoutWrap(leftAlignedProcessButton, null, summaryScrollPanel, null, null);\n\t\tJPanel loadTabPanel = Pirex.borderLayoutWrap(inputFields, null, processPanel, null, null);\n\n\t\tthis.add(Pirex.withBorder(loadTabPanel), BorderLayout.CENTER);\n\n }", "public testLayout() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Layout() {\n }", "private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }", "private void setViewLayout() {\n\t\tthis.setBorder(new EmptyBorder(15, 15, 15, 15));\n\t\tthis.setLayout(new GridLayout(2, 2, 15, 15));\n\t}", "@Override\n\t\tpublic void layout (final int l, final int t, final int r, final int b) {\n\t\t}", "private void generateLayout() {\n\t\tJPanel generatePanel = new JPanel();\n\t\tgeneratePanel.setLayout(new GridBagLayout());\n\t\tJButton generatePrimes = new JButton(\"Generate Primes\");\n\t\tgeneratePrimes.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgeneratePrimesPopup();\n\t\t\t}\n\t\t});\n\t\tJButton generateHex = new JButton(\"Generate Hex Cross\");\n\t\tgenerateHex.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tprimes.clearCrosses();\n\t\t\t\tprimes.generateHexPrimes();\n\t\t\t\tupdateValues(\"Succesful Hex Cross Prime Numbers Generated\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\tgbc.fill = GridBagConstraints.CENTER;\n\t\tgbc.insets = new Insets(1,1,0,0);\n\t\tJPanel digitsPanel = new JPanel();\n\t\tdigitsPanel.setLayout(new GridLayout(2,1));\n\t\tLPrimedigits.setFont(new Font(\"Tahoma\", Font.BOLD,15));\n\t\tLHexDigits.setFont(new Font(\"Tahoma\", Font.BOLD,15));\n\t\tdigitsPanel.add(LPrimedigits);\n\t\tdigitsPanel.add(LHexDigits);\n\t\tgbc.gridx = 0;\n\t\tgbc.weightx = 0.1;\n\t\tgeneratePanel.add(generatePrimes,gbc);\n\t\tgbc.gridx = 1;\n\t\tgbc.weightx = 0.1;\n\t\tgeneratePanel.add(digitsPanel,gbc);\n\t\tgbc.weightx = 0.1;\n\t\tgbc.gridx = 2;\n\t\tgeneratePanel.add(generateHex,gbc);\n\t\tgeneratePanel.setBorder(BorderFactory.createLineBorder(new Color(150,0,0), 2));\n\t\tmainLayout.add(generatePanel);\n\t}", "GraphLayout createGraphLayout();", "@AutoGenerated\n\tprivate HorizontalLayout buildMainLayout() {\n\t\tmainLayout = new HorizontalLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"500px\");\n\t\tmainLayout.setHeight(\"-1px\");\n\t\tmainLayout.setMargin(false);\n\t\tmainLayout.setSpacing(true);\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"500px\");\n\t\tsetHeight(\"-1px\");\n\t\t\n\t\t// verticalLayout_1\n\t\tverticalLayout_1 = buildVerticalLayout_1();\n\t\tmainLayout.addComponent(verticalLayout_1);\n\t\t\n\t\t// verticalLayout_2\n\t\tverticalLayout_2 = buildVerticalLayout_2();\n\t\tmainLayout.addComponent(verticalLayout_2);\n\t\tmainLayout.setExpandRatio(verticalLayout_2, 1.0f);\n\t\t\n\t\treturn mainLayout;\n\t}", "@AutoGenerated\n\tprivate HorizontalLayout buildInfo_container() {\n\t\tinfo_container = new HorizontalLayout();\n\t\tinfo_container.setImmediate(false);\n\t\tinfo_container.setWidth(\"100.0%\");\n\t\tinfo_container.setHeight(\"-1px\");\n\t\tinfo_container.setMargin(false);\n\t\t\n\t\t// nativeButton_upVote\n\t\tnativeButton_upVote = new NativeButton();\n\t\tnativeButton_upVote.setCaption(\"Up Vote\");\n\t\tnativeButton_upVote.setImmediate(false);\n\t\tnativeButton_upVote.setWidth(\"-1px\");\n\t\tnativeButton_upVote.setHeight(\"-1px\");\n nativeButton_upVote.setStyleName(\"vote-button\");\n\t\tinfo_container.addComponent(nativeButton_upVote);\n\t\t\n\t\t// nativeButton_downVote\n\t\tnativeButton_downVote = new NativeButton();\n\t\tnativeButton_downVote.setCaption(\"Down Vote\");\n\t\tnativeButton_downVote.setImmediate(false);\n\t\tnativeButton_downVote.setWidth(\"-1px\");\n\t\tnativeButton_downVote.setHeight(\"-1px\");\n nativeButton_downVote.setStyleName(\"vote-button\");\n\t\tinfo_container.addComponent(nativeButton_downVote);\n\n //nativeButton_accept\n nativeButton_accept = new NativeButton();\n nativeButton_accept.setCaption(\"Accept\");\n nativeButton_accept.setVisible(false);\n nativeButton_accept.setStyleName(\"accept-button\");\n info_container.addComponent(nativeButton_accept);\n\n //label_date\n label_date = new Label();\n label_date.setStyleName(\"date-label\");\n label_date.setWidth(\"-1px\");\n label_date.setHeight(\"-1px\");\n info_container.addComponent(label_date);\n info_container.setExpandRatio(label_date, 1.0f);\n info_container.setComponentAlignment(label_date, Alignment.MIDDLE_RIGHT);\n\t\t\n\t\t// label_user\n\t\tlabel_user = new Label();\n\t\tlabel_user.setImmediate(false);\n\t\tlabel_user.setWidth(\"-1px\");\n\t\tlabel_user.setHeight(\"-1px\");\n\t\tlabel_user.setValue(\"By \");\n label_user.setStyleName(\"user-label\");\n\t\tinfo_container.addComponent(label_user);\n//\t\tinfo_container.setExpandRatio(label_user, 1.0f);\n\t\tinfo_container.setComponentAlignment(label_user, new Alignment(34));\n\t\t\n\t\treturn info_container;\n\t}", "private void initMiddleBodyLayout() {\r\n midPanelLayoutCanv = new VerticalPanel();\r\n midPanelLayoutCanv.setWidth(middlePanelWidth + \"px\");\r\n midPanelLayoutCanv.setHeight((leftPanelHeight - 2) + \"px\");\r\n RootPanel.get(\"diva_mid_panel\").clear();\r\n RootPanel.get(\"diva_mid_panel\").add(midPanelLayoutCanv);\r\n //pca and profile plot layout\r\n topMidLayout = new HorizontalPanel();\r\n int newWidth = (middlePanelWidth / 2);\r\n int newHeight = newWidth + 22;\r\n topMidLayout.setHeight(newHeight + \"px\");\r\n topMidLayout.setWidth(middlePanelWidth + \"px\");\r\n topMidLayout.setStyleName(\"whitelayout\");\r\n\r\n //rank table layout\r\n rankLayoutCanv = new VLayout();\r\n rankLayoutCanv.setHeight((leftPanelHeight - (newHeight + 2)) + \"px\");\r\n rankLayoutCanv.setWidth(middlePanelWidth + \"px\");\r\n midPanelLayoutCanv.add(topMidLayout);\r\n midPanelLayoutCanv.add(rankLayoutCanv);\r\n }", "GeomLayout.IGeomLayoutCreateFromNode geomLayoutCreator();", "private void createContents() {\r\n\t\tshlAboutGoko = new Shell(getParent(), getStyle());\r\n\t\tshlAboutGoko.setSize(376, 248);\r\n\t\tshlAboutGoko.setText(\"About Goko\");\r\n\t\tshlAboutGoko.setLayout(new GridLayout(1, false));\r\n\r\n\t\tComposite composite_1 = new Composite(shlAboutGoko, SWT.NONE);\r\n\t\tcomposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\r\n\t\tcomposite_1.setLayout(new GridLayout(1, false));\r\n\r\n\t\tLabel lblGokoIsA = new Label(composite_1, SWT.WRAP);\r\n\t\tGridData gd_lblGokoIsA = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblGokoIsA.widthHint = 350;\r\n\t\tlblGokoIsA.setLayoutData(gd_lblGokoIsA);\r\n\t\tlblGokoIsA.setText(\"Goko is an open source desktop application for CNC control and operation\");\r\n\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblAlphaVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblAlphaVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblAlphaVersion.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblAlphaVersion.setText(\"Version\");\r\n\r\n\t\tLabel lblVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblVersion.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(composite_1, SWT.NONE);\r\n\r\n\t\tLabel lblDate = new Label(composite_2, SWT.NONE);\r\n\t\tlblDate.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblDate.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblDate.setText(\"Build\");\r\n\t\t\r\n\t\tLabel lblBuild = new Label(composite_2, SWT.NONE);\r\n\t\tlblBuild.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\t\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader(); \r\n\t\tInputStream stream = loader.getResourceAsStream(\"/version.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(stream);\r\n\t\t\tString version = prop.getProperty(\"goko.version\");\r\n\t\t\tString build = prop.getProperty(\"goko.build.timestamp\");\r\n\t\t\tlblVersion.setText(version);\r\n\t\t\tlblBuild.setText(build);\t\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tLOG.error(e);\r\n\t\t}\r\n\t\t\r\n\t\tComposite composite = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblMoreInformationOn = new Label(composite, SWT.NONE);\r\n\t\tGridData gd_lblMoreInformationOn = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblMoreInformationOn.widthHint = 60;\r\n\t\tlblMoreInformationOn.setLayoutData(gd_lblMoreInformationOn);\r\n\t\tlblMoreInformationOn.setText(\"Website :\");\r\n\r\n\t\tLink link = new Link(composite, SWT.NONE);\r\n\t\tlink.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://www.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tlink.setText(\"<a>http://www.goko.fr</a>\");\r\n\t\t\r\n\t\tComposite composite_3 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_3.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblForum = new Label(composite_3, SWT.NONE);\r\n\t\tGridData gd_lblForum = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblForum.widthHint = 60;\r\n\t\tlblForum.setLayoutData(gd_lblForum);\r\n\t\tlblForum.setText(\"Forum :\");\r\n\t\t\r\n\t\tLink link_1 = new Link(composite_3, 0);\r\n\t\tlink_1.setText(\"<a>http://discuss.goko.fr</a>\");\r\n\t\tlink_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://discuss.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tComposite composite_4 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_4.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblContact = new Label(composite_4, SWT.NONE);\r\n\t\tGridData gd_lblContact = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblContact.widthHint = 60;\r\n\t\tlblContact.setLayoutData(gd_lblContact);\r\n\t\tlblContact.setText(\"Contact :\");\r\n\t\t\t \r\n\t\tLink link_2 = new Link(composite_4, 0);\r\n\t\tlink_2.setText(\"<a>\"+toAscii(\"636f6e7461637440676f6b6f2e6672\")+\"</a>\");\r\n\r\n\t}", "private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\n\t\t// Setzt die Hintergrundfarbe auf Grün\n\t\tmainLayout.addStyleName(\"backgroundErfassung\");\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"100%\");\n\n\t\treturn mainLayout;\n\t}", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "private void setUpLayout() {\n\n this.setLayout(new GridLayout(7, 1, 40, 37));\n this.setBackground(new Color(72, 0, 0));\n this.setBorder(BorderFactory.createEmptyBorder(8, 150, 8, 150));\n }", "void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}", "private Container layoutContainer(Container panel, XmlNode node,\n Vector xmlChildren) {\n panel.removeAll();\n String panelId = node.getAttribute(ATTR_ID);\n String layout = node.getAttribute(ATTR_LAYOUT, \"\");\n Vector children = new Vector();\n Vector nodes = new Vector();\n int hspace = node.getAttribute(ATTR_HSPACE, 0);\n int vspace = node.getAttribute(ATTR_VSPACE, 0);\n int rows = node.getAttribute(ATTR_ROWS, 0);\n int cols = node.getAttribute(ATTR_COLS, 1);\n String defaultComp = node.getAttribute(ATTR_DEFAULT, \"nocomp\");\n JTabbedPane tabs = null;\n\n if (layout.equals(VALUE_LAYOUTBORDER)) {\n panel.setLayout(new BorderLayout());\n } else if (layout.equals(VALUE_LAYOUTCARD)) {\n panel.setLayout(new CardLayout());\n } else if (layout.equals(VALUE_LAYOUTTAB)) {\n tabs = new JTabbedPane();\n panel.setLayout(new BorderLayout());\n panel.add(\"Center\", tabs);\n } else if (layout.equals(VALUE_LAYOUTFLOW)) {\n panel.setLayout(new FlowLayout(FlowLayout.LEFT, hspace, vspace));\n } else if (layout.equals(VALUE_LAYOUTGRID)) {\n panel.setLayout(new GridLayout(rows, cols, hspace, vspace));\n }\n for (int i = 0; i < xmlChildren.size(); i++) {\n XmlNode childXmlNode =\n getReffedNode((XmlNode) xmlChildren.elementAt(i));\n Component childComponent = xmlToUi(childXmlNode);\n if (childComponent == null) {\n continue;\n }\n componentToParent.put(childComponent, panel);\n children.addElement(childComponent);\n nodes.addElement(childXmlNode);\n if ( !childComponent.isVisible()) {\n continue;\n }\n if (layout.equals(VALUE_LAYOUTBORDER)) {\n String place = childXmlNode.getAttribute(ATTR_PLACE,\n \"Center\");\n panel.add(place, childComponent);\n } else if (layout.equals(VALUE_LAYOUTTAB)) {\n tabs.add(childXmlNode.getAttribute(ATTR_LABEL),\n childComponent);\n } else if (layout.equals(VALUE_LAYOUTCARD)) {\n String childId = childXmlNode.getAttribute(ATTR_ID);\n panel.add(childId, childComponent);\n if (defaultComp.equals(childId)) {\n ((CardLayout) panel.getLayout()).show(panel, childId);\n }\n } else if (layout.equals(VALUE_LAYOUTINSET)) {\n GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace,\n hspace);\n GuiUtils.doLayout(panel, new Component[] { childComponent },\n 1, GuiUtils.DS_Y, GuiUtils.DS_Y);\n\n break;\n } else if (layout.equals(VALUE_LAYOUTWRAP)) {\n GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace,\n hspace);\n GuiUtils.doLayout(panel, new Component[] { childComponent },\n 1, GuiUtils.DS_N, GuiUtils.DS_N);\n\n break;\n } else if ( !layout.equals(VALUE_LAYOUTGRIDBAG)) {\n panel.add(childComponent);\n }\n }\n if (layout.equals(VALUE_LAYOUTGRIDBAG)) {\n double[] cw =\n GuiUtils.parseDoubles(node.getAttribute(ATTR_COLWIDTHS));\n double[] rh =\n GuiUtils.parseDoubles(node.getAttribute(ATTR_ROWHEIGHTS));\n if (cw == null) {\n cw = GuiUtils.DS_Y;\n }\n if (rh == null) {\n rh = GuiUtils.DS_N;\n }\n GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace, hspace);\n GuiUtils.doLayout(panel, GuiUtils.getCompArray(children),\n node.getAttribute(ATTR_COLS, 1), cw, rh);\n }\n\n containerToNodeList.put(panel, nodes);\n\n return panel;\n }", "private void createPageContent() \n\t{\n\t\tGridLayout gl = new GridLayout(4, true);\n gl.verticalSpacing = 10;\n\t\t\n\t\tGridData gd;\n\t\tfinal Label wiz1Label = new Label(shell, SWT.NONE);\n\t\twiz1Label.setText(\"Enter Fields\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\twiz1Label.setLayoutData(gd);\n\t\twiz1Label.pack();\n\t\tText nameInput = new Text(shell, SWT.BORDER);\n\t\tnameInput.setMessage(\"Name\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tnameInput.setLayoutData(gd);\n\t\tnameInput.pack();\n\t\t//Component\n\t\tText componentInput = new Text(shell, SWT.BORDER);\n\t\tcomponentInput.setMessage(\"Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcomponentInput.setLayoutData(gd);\n\t\tcomponentInput.pack();\n\t\t//school\n\t\tText schoolInput = new Text(shell, SWT.BORDER);\n\t\tschoolInput.setMessage(\"School\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tschoolInput.setLayoutData(gd);\n\t\tschoolInput.pack();\n\t\t//range\n\t\tText rangeInput = new Text(shell, SWT.BORDER);\n\t\trangeInput.setMessage(\"Range\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\trangeInput.setLayoutData(gd);\n\t\trangeInput.pack();\n\t\t//Effect\n\t\tText effectInput = new Text(shell, SWT.BORDER);\n\t\teffectInput.setMessage(\"Effect\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\teffectInput.setLayoutData(gd);\n\t\teffectInput.pack();\n\t\t//castingtime\n\t\tText castimeInput = new Text(shell, SWT.BORDER);\n\t\tcastimeInput.setMessage(\"Casting Time\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcastimeInput.setLayoutData(gd);\n\t\tcastimeInput.pack();\n\t\t//materialcomponent\n\t\tText materialInput = new Text(shell, SWT.BORDER);\n\t\tmaterialInput.setMessage(\"Material Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tmaterialInput.setLayoutData(gd);\n\t\tmaterialInput.pack();\n\t\t//Savingthrow\n\t\tText savthrowInput = new Text(shell, SWT.BORDER);\n\t\tsavthrowInput.setMessage(\"Saving Throw\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tsavthrowInput.setLayoutData(gd);\n\t\tsavthrowInput.pack();\n\t\t//Focus\n\t\tText focusInput = new Text(shell, SWT.BORDER);\n\t\tfocusInput.setMessage(\"Focus\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tfocusInput.setLayoutData(gd);\n\t\tfocusInput.pack();\n\t\t//Duration\n\t\tText durationInput = new Text(shell, SWT.BORDER);\n\t\tdurationInput.setMessage(\"Duration\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdurationInput.setLayoutData(gd);\n\t\tdurationInput.pack();\n\t\t//spellresistance\n\t\tLabel resistanceLabel = new Label(shell, SWT.NONE);\n\t\tresistanceLabel.setText(\"Can Spell Be Resisted\");\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceLabel.setLayoutData(gd);\n\t\tresistanceLabel.pack();\n\t\tButton resistanceInput = new Button(shell, SWT.CHECK);\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceInput.setLayoutData(gd);\n\t\tresistanceInput.pack();\n\t\t//level\n\t\tText levelInput = new Text(shell, SWT.BORDER);\n\t\tlevelInput.setMessage(\"Level\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tlevelInput.setLayoutData(gd);\n\t\tlevelInput.pack();\n\t\t//Damage\n\t\tText damageInput = new Text(shell, SWT.BORDER);\n\t\tdamageInput.setMessage(\"Damage\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 1;\n\t\tdamageInput.setLayoutData(gd);\n\t\tdamageInput.pack();\n\t\t//DamageAlternative\n\t\tText damagealterInput = new Text(shell, SWT.BORDER);\n\t\tdamagealterInput.setMessage(\"Damage Alternative\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdamagealterInput.setLayoutData(gd);\n\t\tdamagealterInput.pack();\n\t\n\t\t//description\n\t\t\n\t\tText descriptionInput = new Text(shell, SWT.WRAP | SWT.V_SCROLL);\n\t\tdescriptionInput.setText(\"Description (Optional)\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\tgd.verticalSpan = 15;\n\t\tdescriptionInput.setLayoutData(gd);\n\t\tdescriptionInput.pack();\n\t\tLabel blank = new Label(shell, SWT.NONE);\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, true);\n\t\tgd.horizontalSpan = 4;\n\t\tblank.setLayoutData(gd);\n\t\tblank.pack();\n\t\tButton save = new Button(shell, SWT.PUSH);\n\n\t\tsave.setText(\"Save\");\n\t\tsave.addListener(SWT.Selection, new Listener()\n\t\t{\n\t\t\tpublic void handleEvent(Event event)\n\t\t\t{\n\t\t\t\tBoolean checkfault = false;\n\t\t\t\tLinkedHashMap<String, String> a = new LinkedHashMap<String, String>();\n\t\t\t\tif(nameInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tnameInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(componentInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcomponentInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(schoolInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tschoolInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(castimeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcastimeInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(levelInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tlevelInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(checkfault)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ta.put(\"NAME\", nameInput.getText());\n\t\t\t\ta.put(\"COMPONENTS\", componentInput.getText());\n\t\t\t\ta.put(\"SCHOOL\", schoolInput.getText());\n\t\t\t\ta.put(\"CASTINGTIME\", castimeInput.getText());\n\t\t\t\ta.put(\"LEVEL\", levelInput.getText());\n\t\t\t\tif(resistanceInput.getSelection())\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"YES\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"NO\");\n\t\t\t\t}\n\t\t\t\tif(!materialInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"MATERIALCOMPONENT\", materialInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!savthrowInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SAVINGTHROW\", savthrowInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!focusInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"FOCUS\", focusInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!durationInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DURATION\", durationInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damageInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGE\", damageInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damagealterInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGEALTERNATE\", damagealterInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!rangeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"RANGE\", rangeInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!effectInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"EFFECT\", effectInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ta.put(\"DESCRIPTION\", descriptionInput.getText());\n\t\t\t\tnewspell = new SpellEntity(a);\n\t\t\t\tMain.gameState.abilities.put(newspell.getName(), newspell);\n\t\t\t\tMain.gameState.customContent.put(newspell.getName(), newspell);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t}\n\t\t);\n\t\tgd = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tsave.setLayoutData(gd);\n\t\tsave.pack();\n\t\tshell.setLayout(gl);\n\t\tshell.layout();\n\t\tshell.pack();\n//\t\t//wizard\n//\t\t\t\tfinal Composite wizPanel = new Composite(shell, SWT.BORDER);\n//\t\t\t\twizPanel.setBounds(0,0,WIDTH, HEIGHT);\n//\t\t\t\tfinal StackLayout wizLayout = new StackLayout();\n//\t\t\t\twizPanel.setLayout(wizLayout);\n//\t\t\t\t\n//\t\t\t\t//Page1 -- Name\n//\t\t\t\tfinal Composite wizpage1 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\twizpage1.setBounds(0,0,WIDTH,HEIGHT);\n//\t\t\t\t\n//\t\t\t\tfinal Label wiz1Label = new Label(wizpage1, SWT.NONE);\n//\t\t\t\twiz1Label.setText(\"Enter Name (required)\");\n//\t\t\t\twiz1Label.pack();\n//\t\t\t\tfinal Text wizpage1text = new Text(wizpage1, SWT.BORDER);\n//\t\t\t\twizpage1text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage1text.setText(\"FireBall\");\n//\t\t\t\tButton next1 = createNextButton(wizpage1);//TODO cancel and previous button\n//\t\t\t\tcreateBackButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tnext1.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage1text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellname = wizpage1text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tSystem.out.println(\"PANIC: ITEM WIZARD PAGE 1 OUT\");\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz1Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\t);\n//\t\t\t\t\n//\t\t\t\twizPages.add(wizpage1);\n//\t\t\t\t//Page2 -- component\n//\t\t\t\tfinal Composite wizpage2 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz2Label = new Label(wizpage2, SWT.NONE);\n//\t\t\t\twiz2Label.setText(\"Enter Component: (required)\");\n//\t\t\t\twiz2Label.pack();\n//\t\t\t\tfinal Text wizpage2text = new Text(wizpage2, SWT.BORDER);\n//\t\t\t\twizpage2text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage2text.setText(\"Fire\");\n//\t\t\t\tButton next2 = createNextButton(wizpage2);\n//\t\t\t\tcreateBackButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tnext2.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage2text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellcomp = wizpage2text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz2Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage2);\n//\t\t\t\t//Page3 -- School\n//\t\t\t\tfinal Composite wizpage3 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz3Label = new Label(wizpage3, SWT.NONE);\n//\t\t\t\twiz3Label.setText(\"Enter School: (required)\");\n//\t\t\t\twiz3Label.pack();\n//\t\t\t\tfinal Text wizpage3text = new Text(wizpage3, SWT.BORDER);\n//\t\t\t\twizpage3text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage3text.setText(\"Descruction\");\n//\t\t\t\tButton next3 = createNextButton(wizpage3);\n//\t\t\t\tcreateBackButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tnext3.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage3text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellschool = wizpage3text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz3Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage3);\n//\t\t\t\t//Page4 -- Range\n//\t\t\t\tfinal Composite wizpage4 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz4Label = new Label(wizpage4, SWT.NONE);\n//\t\t\t\twiz4Label.setText(\"Enter Range: (required)\");\n//\t\t\t\twiz4Label.pack();\n//\t\t\t\tfinal Text wizpage4text = new Text(wizpage4, SWT.BORDER);\n//\t\t\t\twizpage4text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage4text.setText(\"50 feet\");\n//\t\t\t\tButton next4 = createNextButton(wizpage4);\n//\t\t\t\tcreateBackButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tnext4.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage4text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellrange = wizpage4text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz4Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage4);\n//\t\t\t\t//Page5 -- effect\n//\t\t\t\tfinal Composite wizpage5 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz5Label = new Label(wizpage5, SWT.NONE);\n//\t\t\t\twiz5Label.setText(\"Enter Effect: (required)\");\n//\t\t\t\twiz5Label.pack();\n//\t\t\t\tfinal Text wizpage5text = new Text(wizpage5, SWT.BORDER);\n//\t\t\t\twizpage5text.setBounds(50, 50, 250, 150);\n//\t\t\t\twizpage5text.setText(\"No effect\");\n//\t\t\t\tButton next5 = createNextButton(wizpage5);\n//\t\t\t\tcreateBackButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tnext5.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelleffect = wizpage5text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz5Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage5);\n//\t\t\t\t//Page6 -- casting time\n//\t\t\t\tfinal Composite wizpage6 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz6Label = new Label(wizpage6, SWT.NONE);\n//\t\t\t\twiz6Label.setText(\"Enter Casting Time: (required)\");\n//\t\t\t\twiz6Label.pack();\n//\t\t\t\tfinal Text wizpage6text = new Text(wizpage6, SWT.BORDER);\n//\t\t\t\twizpage6text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage6text.setText(\"1 turn\");\n//\t\t\t\tButton next6 = createNextButton(wizpage6);\n//\t\t\t\tcreateBackButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tnext6.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellcastime = wizpage6text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz6Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage6);\n//\t\t\t\t//Page7 -- Material Component\n//\t\t\t\tfinal Composite wizpage7 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz7Label = new Label(wizpage7, SWT.NONE);\n//\t\t\t\twiz7Label.setText(\"Enter Material Component: (required)\");\n//\t\t\t\twiz7Label.pack();\n//\t\t\t\tfinal Text wizpage7text = new Text(wizpage7, SWT.BORDER);\n//\t\t\t\twizpage7text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage7text.setText(\"None\");\n//\t\t\t\tButton next7 = createNextButton(wizpage7);\n//\t\t\t\tcreateBackButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tnext7.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage7text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellmaterial = wizpage7text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz7Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage7);\n//\t\t\t\t//Page8 -- saving throw\n//\t\t\t\tfinal Composite wizpage8 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz8Label = new Label(wizpage8, SWT.NONE);\n//\t\t\t\twiz8Label.setText(\"Enter Saving Throw: (required)\");\n//\t\t\t\twiz8Label.pack();\n//\t\t\t\tfinal Text wizpage8text = new Text(wizpage8, SWT.BORDER);\n//\t\t\t\twizpage8text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage8text.setText(\"Will negate XX\");\n//\t\t\t\tButton next8 = createNextButton(wizpage8);\n//\t\t\t\tcreateBackButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tnext8.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage8text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellsaving = wizpage8text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz8Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage8);\n//\t\t\t\t//Page9 -- Focus\n//\t\t\t\tfinal Composite wizpage9 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz9Label = new Label(wizpage9, SWT.NONE);\n//\t\t\t\twiz9Label.setText(\"Enter Focus: (required)\");\n//\t\t\t\twiz9Label.pack();\n//\t\t\t\tfinal Text wizpage9text = new Text(wizpage9, SWT.BORDER);\n//\t\t\t\twizpage9text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage9text.setText(\"A dart\");\n//\t\t\t\tButton next9 = createNextButton(wizpage9);\n//\t\t\t\tcreateBackButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tnext9.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage9text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellfocus = wizpage9text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz9Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage9);\n//\t\t\t\t//Page10 -- Duration\n//\t\t\t\tfinal Composite wizpage10 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz10Label = new Label(wizpage10, SWT.NONE);\n//\t\t\t\twiz10Label.setText(\"Enter Duration: (required)\");\n//\t\t\t\twiz10Label.pack();\n//\t\t\t\tfinal Text wizpage10text = new Text(wizpage10, SWT.BORDER);\n//\t\t\t\twizpage10text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage10text.setText(\"5 Turns\");\n//\t\t\t\tButton next10 = createNextButton(wizpage10);\n//\t\t\t\tcreateBackButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tnext10.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage10text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellduration = wizpage10text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz10Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage10);\n//\t\t\t\t//Page11 -- Level\n//\t\t\t\tfinal Composite wizpage11 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz11Label = new Label(wizpage11, SWT.NONE);\n//\t\t\t\twiz11Label.setText(\"Enter Level (required)\");\n//\t\t\t\twiz11Label.pack();\n//\t\t\t\tfinal Text wizpage11text = new Text(wizpage11, SWT.BORDER);\n//\t\t\t\twizpage11text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage11text.setText(\"1\");\n//\t\t\t\tButton next11 = createNextButton(wizpage11);\n//\t\t\t\tcreateBackButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tnext11.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage11text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\ttry\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tif(Integer.parseInt(wizpage11text.getText()) >= 0)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelllevel = String.valueOf(Integer.parseInt(wizpage11text.getText()));\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tcatch(NumberFormatException a)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage11);\n//\t\t\t\t//Page12 -- resistance\n//\t\t\t\tfinal Composite wizpage12 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz12Label = new Label(wizpage12, SWT.NONE);\n//\t\t\t\twiz12Label.setText(\"Enter Spell resistance: (Yes/No)\");\n//\t\t\t\twiz12Label.pack();\n//\t\t\t\tfinal Text wizpage12text = new Text(wizpage12, SWT.BORDER);\n//\t\t\t\twizpage12text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage12text.setText(\"Yes\");\n//\t\t\t\tButton next12 = createNextButton(wizpage12);\n//\t\t\t\tcreateBackButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tnext12.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage12text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellresistance = wizpage12text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz12Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage12);\n//\t\t\t\t//Page13 - Description\n//\t\t\t\tfinal Composite wizpage13 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tLabel wiz13Label = new Label(wizpage13, SWT.NONE);\n//\t\t\t\twiz13Label.setText(\"Enter Description (Optional)\");\n//\t\t\t\twiz13Label.pack(); \n//\t\t\t\tfinal Text wizpage13text = new Text(wizpage13, SWT.BORDER);\n//\t\t\t\twizpage13text.setBounds(50, 50, 300, 200);\n//\t\t\t\twizpage13text.setText(\"Description here\");\n//\t\t\t\tButton next13 = createNextButton(wizpage13);\n//\t\t\t\tcreateBackButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tnext13.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage13text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = wizpage13text.getText();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = \"<empty>\";\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tCreateVerificationPage(wizPanel, wizLayout);\n//\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage13);\n//\t\t\t\t\n//\t\t\t\twizLayout.topControl = wizpage1;\n//\t\t\t\twizPanel.layout();\n\t}", "public void layoutView()\n\t{\n\t\tthis.setLayout(new GridLayout(2,5));\n\t\tthis.add(expression);\n\t\tthis.add(var);\n\t\tthis.add(start);\n\t\tthis.add(end);\n\t\tthis.add(this.plot);\n\t\tthis.add(InputView.coords);\n\t\tthis.add(this.in);\n\t\tthis.add(this.out);\n\t}", "@Override\r\n\tpublic void layoutContainer(Container arg0) {\n\t\t\r\n\t}", "public void makeLayout() {\n\t\tgl_layout.setHorizontalGroup(\n\t\t\tgl_layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_layout.createSequentialGroup()\n\t\t\t\t\t.addGap(150)\n\t\t\t\t\t.addComponent(favSearchTextField, GroupLayout.PREFERRED_SIZE, 400, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(10)\n\t\t\t\t\t.addComponent(button, GroupLayout.PREFERRED_SIZE, 98, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(10)\n\t\t\t\t\t.addComponent(refresh, GroupLayout.PREFERRED_SIZE, 106, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t)\n\t\t);\n\t\tgl_layout.setVerticalGroup(\n\t\t\tgl_layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_layout.createSequentialGroup()\n\t\t\t\t\t.addGap(10)\t\t\t\t\t\t\n\t\t\t\t\t.addComponent(favSearchTextField, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(10)\n\t\t\t\t)\n\t\t\t\t.addGroup(gl_layout.createSequentialGroup()\n\t\t\t\t\t.addGap(10)\n\t\t\t\t\t.addComponent(button, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(10)\n\t\t\t\t)\n\t\t\t\t.addGroup(gl_layout.createSequentialGroup()\n\t\t\t\t\t.addGap(10)\n\t\t\t\t\t.addComponent(refresh, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(10)\n\t\t\t\t)\n\t\t);\n\t\tthis.setLayout(gl_layout);\t\t\n\t}", "private void layoutComponents() {\n setLayout(new MigLayout(\"fill, wrap 1, hidemode 3, \"\n + (padding ? \"ins rel\" : \"ins 0\")));\n\n add(infoLabel, \"growx\");\n add(scrollPane, \"grow, pushy\");\n add(addOptionPanel, \"growx\");\n }", "@AutoGenerated\r\n\tprivate HorizontalLayout buildMainLayout() {\n\t\tmainLayout = new HorizontalLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"800px\");\r\n\t\tmainLayout.setMargin(false);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"100.0%\");\r\n\t\tsetHeight(\"800px\");\r\n\t\t\r\n\t\t// verticalLayout_5\r\n\t\tverticalLayout_5 = buildVerticalLayout_5();\r\n\t\tmainLayout.addComponent(verticalLayout_5);\r\n\t\tmainLayout.setComponentAlignment(verticalLayout_5, new Alignment(48));\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "private void setUpLayout() {\n myLinearLayout=(LinearLayout)rootView.findViewById(R.id.container_wartaMingguan);\n\n // Add LayoutParams\n params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n params.setMargins(0, 10, 0, 0);\n\n // Param untuk deskripsi\n paramsDeskripsi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n paramsDeskripsi.setMargins(0, 0, 0, 0);\n\n tableParams = new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);\n rowTableParams = new TableLayout.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n\n // Untuk tag \"warta\"\n LinearLayout rowLayout = new LinearLayout(getActivity());\n rowLayout.setOrientation(LinearLayout.HORIZONTAL);\n\n // Membuat linear layout vertical untuk menampung kata-kata\n LinearLayout colLayout = new LinearLayout(getActivity());\n colLayout.setOrientation(LinearLayout.VERTICAL);\n colLayout.setPadding(0, 5, 0, 0);\n }", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "private JPanel createContentPanel() {\n JPanel panel = new JPanel();\n panel.setLayout(new MigLayout());\n panel.setPreferredSize(new Dimension(400, 300));\n panel.setOpaque(true);\n panel.setBorder(BorderFactory.createTitledBorder(\n localization.get(\"AttributesTitle\")));\n\n roomNameField = LabeledComponent\n .textField(localization.get(\"RoomNameLabel\"),\n new InfoPanelDocListener(this, new SetName()));\n roomNameField.addToPanel(panel);\n\n includeField = LabeledComponent\n .textField(localization.get(\"IncludeLabel\"),\n new InfoPanelDocListener(this, new SetInclude()));\n includeField.addToPanel(panel);\n\n inheritField = LabeledComponent\n .textField(localization.get(\"InheritLabel\"),\n new InfoPanelDocListener(this, new SetInherit()));\n inheritField.addToPanel(panel);\n\n buildStreetNameField(panel);\n\n buildAddEditStreetsButton(panel);\n\n buildColorSelector(panel);\n\n shortDescriptionField = LabeledComponent\n .textField(localization.get(\"ShortDescLabel\"),\n new InfoPanelDocListener(this, new SetShort()));\n panel.add(shortDescriptionField.getLabel());\n panel.add(shortDescriptionField.getComponent(), \"span, grow, wrap\");\n\n determinateField = LabeledComponent\n .textField(localization.get(\"DeterminateLabel\"),\n new InfoPanelDocListener(this, new SetDeterminate()));\n determinateField.addToPanel(panel);\n\n lightField = LabeledComponent\n .textField(localization.get(\"LightLabel\"),\n new InfoPanelDocListener(this, new SetLight()));\n lightField.addToPanel(panel);\n\n longDescriptionField = LabeledComponent\n .textArea(localization.get(\"LongDescLabel\"),\n new InfoPanelDocListener(this, new SetLong()));\n panel.add(longDescriptionField.getLabel(), \"wrap\");\n panel.add(longDescriptionField.getComponent(), \"span, grow\");\n\n return panel;\n }", "private void initBaseLayout() {\n if (topText != null) {\n TextView topicText = new TextView(mainContext);\n topicText.setText(topText);\n dimensionsContainer.setViewStyle(KEY_TOPIC_TEXT, topicText);\n topicText.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_topic));\n topicText.setClickable(true);\n topicText.setOnClickListener(generalClickListener);\n blankLayout.addView(topicText);\n }\n//Add topLayout\n //if (topLayout == null) {\n topLayout = new LinearLayout(mainContext);\n topLayout.setOrientation(LinearLayout.HORIZONTAL);\n topLayout.setLayoutParams(layoutParams_WC_WC);\n topLayout.setBackgroundColor(bgColor_Table);\n blankLayout.addView(topLayout);\n//Add numTop\n TextView numTop = new TextView(mainContext);\n numTop.setText(R.string.symbol_num);\n dimensionsContainer.setViewStyle(KEY_NUM_TOP, numTop);\n numTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_num_top));\n numTop.setClickable(true);\n numTop.setOnClickListener(generalClickListener);\n topLayout.addView(numTop);\n//Add nameTop\n TextView nameTop = new TextView(mainContext);\n nameTop.setText(nameTopTextResId);\n dimensionsContainer.setViewStyle(KEY_NAME_TOP, nameTop);\n nameTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_name_top));\n nameTop.setClickable(true);\n nameTop.setOnClickListener(generalClickListener);\n topLayout.addView(nameTop);\n\n\n\n\n\n\n//Add topHScrollView\n// if (layoutHandler.topHScrollView == null) {\n topHScrollView = new SyncedHorizontalScrollView(mainContext);\n topHScrollView.setLayoutParams(layoutParams_WC_MP);\n topHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor() !=\n null) //OverScrollColor\n {\n topHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor());\n }\n topLayout.addView(topHScrollView);\n\n//Add topScrollLayout\n // if(layoutHandler.topScrollLayout == null) {\n topScrollLayout = new LinearLayout(mainContext);\n topScrollLayout.setBackgroundColor(bgColor_Table);\n topHScrollView.addView(topScrollLayout);\n\n//Add bodyScrollView\n //if(layoutHandler.bodyScrollView == null) {\n bodyScrollView = new ScrollView(mainContext);\n bodyScrollView.setLayoutParams(layoutParams_MP_WC);\n bodyScrollView.setVerticalScrollBarEnabled(false);\n //bodyScrollView.setOverScrollMode(View.OVER_SCROLL_NEVER);\n blankLayout.addView(bodyScrollView);\n//Add bodyLayout\n //if(layoutHandler.bodyLayout == null) {\n bodyLayout = new LinearLayout(mainContext);\n bodyLayout.setOrientation(LinearLayout.HORIZONTAL);\n bodyLayout.setLayoutParams(layoutParams_WC_WC);\n bodyScrollView.addView(bodyLayout);\n\n//Add bodyLeftLayout\n //if(layoutHandler.bodyLeftLayout == null) {\n bodyLeftLayout = new LinearLayout(mainContext);\n bodyLeftLayout.setOrientation(LinearLayout.VERTICAL);\n bodyLeftLayout.setLayoutParams(layoutParams_WC_WC);\n bodyLeftLayout.setBackgroundColor(bgColor_Table);\n bodyLayout.addView(bodyLeftLayout);\n\n//Add bodyHScrollView\n //if(layoutHandler.bodyHScrollView == null) {\n bodyHScrollView = new SyncedHorizontalScrollView(mainContext);\n bodyHScrollView.setLayoutParams(layoutParams_WC_WC);\n bodyHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor() !=\n null)//OverScrollColor\n {\n bodyHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor());\n }\n bodyLayout.addView(bodyHScrollView);\n\n//Add bodyRightLayout\n //if(layoutHandler.bodyRightLayout == null) {\n bodyRightLayout = new LinearLayout(mainContext);\n bodyRightLayout.setOrientation(LinearLayout.VERTICAL);\n bodyRightLayout.setBackgroundColor(bgColor_Table);\n bodyHScrollView.addView(bodyRightLayout);\n\n//Add Scroll Listeners\n\n ScrollManager scrollManager = new ScrollManager();\n scrollManager.setScrollDirection(ScrollManager.SCROLL_HORIZONTAL);\n scrollManager.addScrollClient(topHScrollView);\n scrollManager.addScrollClient(bodyHScrollView);\n\n// bodyScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// bodyHScrollView.getParent().requestDisallowInterceptTouchEvent(false);\n// return false;\n// }\n// });\n// bodyHScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// v.getParent().requestDisallowInterceptTouchEvent(true);\n// return false;\n// }\n// });\n\n //ScrollManager.disallowParentScroll(bodyHScrollView, 100);\n //ScrollManager.disallowChildScroll(bodyHScrollView, bodyLayout, 100);\n //bodyHScrollView.getWidth());\n //Dimensions.dipToPixels(mainContext, 800));\n// ScrollManager\n// .disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 200));\n //TODO: disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 50));\n\n }", "@AutoGenerated\n\tprivate VerticalLayout buildMainLayout() {\n\t\tmainLayout = new VerticalLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"-1px\");\n\t\tmainLayout.setMargin(false);\n\t\tmainLayout.setSpacing(true);\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"100.0%\");\n\t\tsetHeight(\"-1px\");\n\t\t\n\t\t// lblTitle\n\t\tlblTitle = new Label();\n\t\tlblTitle.setImmediate(false);\n\t\tlblTitle.setWidth(\"-1px\");\n\t\tlblTitle.setHeight(\"-1px\");\n\t\tlblTitle.setValue(\"Song\");\n\t\tmainLayout.addComponent(lblTitle);\n\t\tmainLayout.setComponentAlignment(lblTitle, new Alignment(20));\n\t\t\n\t\t// formLayout\n\t\tformLayout = buildFormLayout();\n\t\tmainLayout.addComponent(formLayout);\n\t\tmainLayout.setComponentAlignment(formLayout, new Alignment(20));\n\t\t\n\t\t// layoutButtons\n\t\tlayoutButtons = buildLayoutButtons();\n\t\tmainLayout.addComponent(layoutButtons);\n\t\tmainLayout.setComponentAlignment(layoutButtons, new Alignment(20));\n\t\t\n\t\treturn mainLayout;\n\t}", "@AutoGenerated\n\tprivate VerticalLayout buildMainLayout() {\n\t\tmainLayout = new VerticalLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"100%\");\n\t\tmainLayout.setMargin(false);\n\n\t\t// top-level component properties\n\t\tsetWidth(\"60.0%\");\n\t\tsetHeight(\"60.0%\");\n\n\t\t// lblHeading\n\t\tlblHeading = new Label();\n\t\tlblHeading.setImmediate(false);\n\t\tlblHeading.setWidth(\"-1px\");\n\t\tlblHeading.setHeight(\"-1px\");\n\t\tlblHeading.setValue(\"This is class 4\");\n\t\tmainLayout.addComponent(lblHeading);\n\n\t\t// button_1\n\t\tbutton_1 = new Button();\n\t\tbutton_1.setCaption(\"Button\");\n\t\tbutton_1.setImmediate(false);\n\t\tbutton_1.setWidth(\"-1px\");\n\t\tbutton_1.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(button_1);\n\n\t\treturn mainLayout;\n\t}", "@AutoGenerated\n\tprivate AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"540px\");\n\t\tmainLayout.setHeight(\"400px\");\n\t\tmainLayout.setMargin(true);\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"540px\");\n\t\tsetHeight(\"400px\");\n\t\t\n\t\t// commentField\n\t\tcommentField = new TextField();\n\t\tcommentField.setCaption(\"Comentarios\");\n\t\tcommentField.setImmediate(false);\n\t\tcommentField.setWidth(\"400px\");\n\t\tcommentField.setHeight(\"140px\");\n\t\tmainLayout.addComponent(commentField, \"top:100.0px;left:20.0px;\");\n\t\t\n\t\t// discountField\n\t\tdiscountField = new TextField();\n\t\tdiscountField.setCaption(\"Descuento\");\n\t\tdiscountField.setImmediate(false);\n\t\tdiscountField.setWidth(\"80px\");\n\t\tdiscountField.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(discountField, \"top:140.0px;left:440.0px;\");\n\t\t\n\t\t// invoiceField\n\t\tinvoiceField = new ComboBox();\n\t\tinvoiceField.setCaption(\"Código Factura\");\n\t\tinvoiceField.setImmediate(false);\n\t\tinvoiceField.setWidth(\"200px\");\n\t\tinvoiceField.setHeight(\"-1px\");\n\t\tinvoiceField.setRequired(true);\n\t\tmainLayout.addComponent(invoiceField, \"top:20.0px;left:200.0px;\");\n\t\t\t\t\n\t\t// invoiceLineDateField\n\t\tinvoiceLineDateField = new DateField();\n\t\tinvoiceLineDateField.setCaption(\"Fecha\");\n\t\tinvoiceLineDateField.setImmediate(false);\n\t\tinvoiceLineDateField.setWidth(\"100px\");\n\t\tinvoiceLineDateField.setHeight(\"-1px\");\n\t\tinvoiceLineDateField.setInvalidAllowed(false);\n\t\tinvoiceLineDateField.setRequired(true);\n\t\tinvoiceLineDateField.setResolution(4);\n\t\tmainLayout.addComponent(invoiceLineDateField,\n\t\t\t\t\"top:20.0px;left:420.0px;\");\n\t\t\n\t\t// invoiceLineStatusField\n\t\tinvoiceLineStatusField = new ComboBox();\n\t\tinvoiceLineStatusField.setCaption(\"Estado\");\n\t\tinvoiceLineStatusField.setImmediate(false);\n\t\tinvoiceLineStatusField.setWidth(\"240px\");\n\t\tinvoiceLineStatusField.setHeight(\"-1px\");\n\t\tinvoiceLineStatusField.setRequired(true);\n\t\tmainLayout.addComponent(invoiceLineStatusField, \"top:58.0px;left:281.0px;\");\n\t\t\t\t\n\t\t// ivaField\n\t\tivaField = new ComboBox();\n\t\tivaField.setCaption(\"Iva\");\n\t\tivaField.setImmediate(false);\n\t\tivaField.setWidth(\"80px\");\n\t\tivaField.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(ivaField, \"top:176.0px;left:440.0px;\");\n\t\t\n\t\t// numberField\n\t\tnumberField = new TextField();\n\t\tnumberField.setCaption(\"Número\");\n\t\tnumberField.setImmediate(false);\n\t\tnumberField.setWidth(\"80px\");\n\t\tnumberField.setHeight(\"-1px\");\n\t\tnumberField.setRequired(true);\n\t\tmainLayout.addComponent(numberField, \"top:20.0px;left:20.0px;\");\n\t\t\n\t\t// priceField\n\t\tpriceField = new TextField();\n\t\tpriceField.setCaption(\"Precio\");\n\t\tpriceField.setImmediate(false);\n\t\tpriceField.setWidth(\"80px\");\n\t\tpriceField.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(priceField, \"top:100.0px;left:440.0px;\");\n\t\t\n\t\t// priceFinalField\n\t\tpriceFinalField = new TextField();\n\t\tpriceFinalField.setCaption(\"Precio Final\");\n\t\tpriceFinalField.setImmediate(false);\n\t\tpriceFinalField.setWidth(\"80px\");\n\t\tpriceFinalField.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(priceFinalField, \"top:216.0px;left:440.0px;\");\n\t\t\n\t\t// servicesField\n\t\tservicesField = new ServiceCollectionField();\n\t\tservicesField.setImmediate(false);\n\t\tservicesField.setWidth(\"500px\");\n\t\tservicesField.setHeight(\"122px\");\n\t\tmainLayout.addComponent(servicesField, \"top:260.0px;left:20.0px;\");\n\t\t\n\t\treturn mainLayout;\n\t}", "private void $$$setupUI$$$() {\n topPanel = new JPanel();\n topPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n headerLabel = new JLabel();\n headerLabel.setText(\"Header\");\n topPanel.add(headerLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n contentPanel = new JPanel();\n contentPanel.setLayout(new BorderLayout(0, 0));\n topPanel.add(contentPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n buttonBack = new JButton();\n buttonBack.setText(\"Back\");\n panel1.add(buttonBack, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonNext = new JButton();\n buttonNext.setText(\"Next\");\n panel1.add(buttonNext, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel1.add(buttonCancel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status\");\n panel2.add(statusLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }", "private void doLayout()\n \t{\n \t\tModel model = doc.getModel();\n \t\tExtendedLayoutModel sbase = (ExtendedLayoutModel)model.getExtension(LayoutConstants.namespaceURI);\n \t\tif (sbase != null)\n \t\t{\n \t\t\tfor (Layout l : sbase.getListOfLayouts())\n \t\t\t{\n \t\t\t\t// TODO: list of compartment glyphs, text glyphs, etc...\n \t\t\t\tfor (SpeciesGlyph g : l.getListOfSpeciesGlyphs())\n \t\t\t\t{\n \t\t\t\t\tString sid = g.getSpecies();\n \t\t\t\t\tPeerSpecies sbr = getSpeciesPeer(sid);\n \t\t\t\t\tif (sbr != null) {\n \t\t\t\t\t\tsbr.setSpeciesGlyph(g);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "private void setupLayout()\n\t{\n\t\tbaseLayout.putConstraint(SpringLayout.WEST,firstButton,107,SpringLayout.WEST, this);\n\t\tbaseLayout.putConstraint(SpringLayout.SOUTH, firstButton, -32, SpringLayout.SOUTH, this);\n\t\tbaseLayout.putConstraint(SpringLayout.WEST, firstField, 37, SpringLayout.WEST, this);\n\t\tbaseLayout.putConstraint(SpringLayout.SOUTH, firstField, -24, SpringLayout.SOUTH, this);\n\t}", "private void setLayout() {\n\tHorizontalLayout main = new HorizontalLayout();\n\tmain.setMargin(true);\n\tmain.setSpacing(true);\n\n\t// vertically divide the right area\n\tVerticalLayout left = new VerticalLayout();\n\tleft.setSpacing(true);\n\tmain.addComponent(left);\n\n\tleft.addComponent(openProdManager);\n\topenProdManager.addListener(new Button.ClickListener() {\n\t public void buttonClick(ClickEvent event) {\n\t\tCustomerWindow productManagerWin = new CustomerWindow(CollectorManagerApplication.this);\n\t\tproductManagerWin.addListener(new Window.CloseListener() {\n\t\t public void windowClose(CloseEvent e) {\n\t\t\topenProdManager.setEnabled(true);\n\t\t }\n\t\t});\n\n\t\tCollectorManagerApplication.this.getMainWindow().addWindow(productManagerWin);\n\t\topenProdManager.setEnabled(false);\n\t }\n\t});\n\n\t\n\tsetMainWindow(new Window(\"Sistema de Cobranzas\", main));\n\n }", "@Override\n\tpublic String getLayout() {\n\t\treturn \"main\";\n\t}", "private void geometry()\n\t\t{\n\t\t\t// JComponent : Instanciation\n\t\tthis.jPanelAction = new JPanelAction();\n\t\tthis.jPanelCommande = new JPanelCommande(jPanelAction);\n\n\t\t\t// Layout : Specification\n\t\t\t{\n\t\t\tBorderLayout borderLayout = new BorderLayout();\n\t\t\tsetLayout(borderLayout);\n\n\t\t\t// flowlayout.setHgap(20);\n\t\t\t// flowlayout.setVgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\t\tthis.add(this.jPanelAction, BorderLayout.CENTER);\n\t\tthis.add(this.jPanelCommande, BorderLayout.SOUTH);\n\t\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n materialFirstWordLabel = new JLabel();\n materialFirstWordLabel.setText(\"нет данных\");\n contentPane.add(materialFirstWordLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(10, -1), null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n materialMarkLabel = new JLabel();\n materialMarkLabel.setText(\" \");\n materialMarkLabel.setVerticalTextPosition(1);\n panel1.add(materialMarkLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialProfileLabel = new JLabel();\n materialProfileLabel.setText(\" \");\n materialProfileLabel.setVerticalTextPosition(3);\n panel1.add(materialProfileLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialSeparator = new JSeparator();\n panel1.add(materialSeparator, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n contentPane.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "public GroupLayout miseEnPage(){\n\t\tGroupLayout gl_contentPanel = new GroupLayout(contentPanel);\n\t\tgl_contentPanel.setHorizontalGroup(\n\t\t\t\tgl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap(13, Short.MAX_VALUE)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addComponent(lblPort)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addComponent(textField_Port, GroupLayout.PREFERRED_SIZE, 53, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addComponent(lblNombreDeJoueurs)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addComponent(textField_nbJoueur, GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t\t\t\t.addComponent(chckbxPartieLocale))\n\t\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(lblNomPartie)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField_NomPartie))\n\t\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(lblMotDePasse)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField_Mdp, GroupLayout.PREFERRED_SIZE, 106, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addComponent(createButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addComponent(cancelButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t);\n\t\tgl_contentPanel.setVerticalGroup(\n\t\t\t\tgl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t.addGap(42)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblNomPartie)\n\t\t\t\t\t\t\t\t.addComponent(textField_NomPartie, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblMotDePasse)\n\t\t\t\t\t\t\t\t.addComponent(textField_Mdp, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblPort)\n\t\t\t\t\t\t\t\t.addComponent(textField_Port, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblNombreDeJoueurs)\n\t\t\t\t\t\t\t\t.addComponent(textField_nbJoueur, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(chckbxPartieLocale))\n\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(cancelButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(createButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(100, Short.MAX_VALUE))\n\t\t\t\t);\n\t\treturn gl_contentPanel;\n\t}", "private void setLayout() {\n int orientation = getResources().getConfiguration().orientation;\n // if the orientation is Portrait\n if (orientation == Configuration.ORIENTATION_PORTRAIT) {\n if (!webViewFragment.isAdded()) {\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT));\n } else {\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT, 0f));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT, 3f));\n\n }\n }\n else { // if the orientation is Landscape\n if (!webViewFragment.isAdded()) {\n\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT));\n } else {\n // Make the LandmarkLayout take 1/3 of the layout's width\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 1f));\n // Make the WebPageLayout take 2/3's of the layout's width\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 2f));\n }\n }\n }", "@AutoGenerated\n\tprivate AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"100%\");\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"100.0%\");\n\t\tsetHeight(\"100.0%\");\n\t\t\n\t\t// tablaGestionEvaluaciones\n\t\ttablaGestionEvaluaciones = new Table();\n\t\ttablaGestionEvaluaciones.setImmediate(false);\n\t\ttablaGestionEvaluaciones.setWidth(\"100.0%\");\n\t\ttablaGestionEvaluaciones.setHeight(\"100.0%\");\n\t\tmainLayout.addComponent(tablaGestionEvaluaciones,\n\t\t\t\t\"top:57.0px;right:20.0px;bottom:20.0px;left:20.0px;\");\n\t\t\n\t\t// botonCrearEvaluacion\n\t\tbotonCrearEvaluacion = new Button();\n\t\tbotonCrearEvaluacion.setCaption(\"Crear Evaluación\");\n\t\tbotonCrearEvaluacion.setImmediate(true);\n\t\tbotonCrearEvaluacion.setWidth(\"-1px\");\n\t\tbotonCrearEvaluacion.setHeight(\"-1px\");\n\t\tmainLayout\n\t\t\t\t.addComponent(botonCrearEvaluacion, \"top:14.0px;left:20.0px;\");\n\t\t\n\t\t// buttonEditarEvaluacion\n\t\tbuttonEditarEvaluacion = new Button();\n\t\tbuttonEditarEvaluacion.setCaption(\"Editar Evaluación\");\n\t\tbuttonEditarEvaluacion.setImmediate(false);\n\t\tbuttonEditarEvaluacion.setWidth(\"-1px\");\n\t\tbuttonEditarEvaluacion.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(buttonEditarEvaluacion,\n\t\t\t\t\"top:14.0px;left:160.0px;\");\n\t\t\n\t\treturn mainLayout;\n\t}", "public Layout() {\n\n //nao precisa colocar externo, apenas referencia com a linha 0\n for (int i = 0; i < 4; i++) {\n matrix[0][i] = Estados.EXTERNO;\n }\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = Estados.ROOM;\n }\n\n matrix[2][1] = Estados.ROOM_EMPTY;\n matrix[2][2] = Estados.ROOM_EMPTY2;\n\n matrix[2][0] = Estados.ACESSO_EXTERNO;\n matrix[2][3] = Estados.ACESSO_INTERNO;\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = Estados.ROOM;\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[4][i] = Estados.EXTERNO2;\n }\n\n }", "void buildLayout(){\n\t\tsetText(\"Score: \" + GameModel.instance().getPoints());\n\t\tsetX(10);\n\t\tsetY(10);\n\t\tsetFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n\t\t\n\t}", "private void layoutGame() {\n\t\tthis.doLayoutGame();\r\n\t\tthis.doLayoutGame();\r\n\t}", "private VerticalLayout buildGridInfo() {\n\t\tgridInfo = new VerticalLayout();\r\n\t\tgridInfo.setImmediate(false);\r\n\t\tgridInfo.setWidth(\"100%\");\r\n\t\tgridInfo.setHeight(\"100.0%\");\r\n\t\tgridInfo.setMargin(false);\r\n\t\tgridInfo.setSpacing(true);\r\n\t\t\r\n\t\t// gridTitle\r\n\t\tgridTitle = buildGridTitle();\r\n\t\tgridInfo.addComponent(gridTitle);\r\n\t\tgridInfo.setExpandRatio(gridTitle, 1.0f);\r\n\t\t\r\n\t\t// gridData\r\n\t\tgridData = buildGridData();\r\n\t\tgridInfo.addComponent(gridData);\r\n\t\tgridInfo.setExpandRatio(gridData, 1.0f);\r\n\t\t\r\n\t\treturn gridInfo;\r\n\t}", "private void setupLayout() {\r\n\t\tgetContentPane().add(panel);\r\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagButton = new JButton();\n Font memberImportTagButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagButton.getFont());\n if (memberImportTagButtonFont != null) memberImportTagButton.setFont(memberImportTagButtonFont);\n memberImportTagButton.setText(\"导入选择的标签分组-取并集\");\n panel2.add(memberImportTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagRetainButton = new JButton();\n Font memberImportTagRetainButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagRetainButton.getFont());\n if (memberImportTagRetainButtonFont != null)\n memberImportTagRetainButton.setFont(memberImportTagRetainButtonFont);\n memberImportTagRetainButton.setText(\"导入选择的标签分组-取交集\");\n panel2.add(memberImportTagRetainButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportAllButton = new JButton();\n Font memberImportAllButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportAllButton.getFont());\n if (memberImportAllButtonFont != null) memberImportAllButton.setFont(memberImportAllButtonFont);\n memberImportAllButton.setText(\"导入所有关注公众号的用户\");\n panel2.add(memberImportAllButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionPanel = new JPanel();\n importOptionPanel.setLayout(new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(importOptionPanel, new GridConstraints(1, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionOpenIdCheckBox = new JCheckBox();\n importOptionOpenIdCheckBox.setEnabled(false);\n importOptionOpenIdCheckBox.setSelected(true);\n importOptionOpenIdCheckBox.setText(\"openId\");\n importOptionPanel.add(importOptionOpenIdCheckBox, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n importOptionPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n importOptionBasicInfoCheckBox = new JCheckBox();\n importOptionBasicInfoCheckBox.setText(\"昵称、性别等基本信息\");\n importOptionBasicInfoCheckBox.setToolTipText(\"每获取一条信息会花费一次每日接口调用量\");\n importOptionPanel.add(importOptionBasicInfoCheckBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n importOptionAvatarCheckBox = new JCheckBox();\n importOptionAvatarCheckBox.setText(\"头像\");\n importOptionAvatarCheckBox.setToolTipText(\"勾选会导致左侧列表甚至WePush变卡哦\");\n importOptionPanel.add(importOptionAvatarCheckBox, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n clearDbCacheButton = new JButton();\n clearDbCacheButton.setText(\"清空本地缓存\");\n importOptionPanel.add(clearDbCacheButton, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagComboBox = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n memberImportTagComboBox.setModel(defaultComboBoxModel1);\n panel3.add(memberImportTagComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagFreshButton = new JButton();\n Font memberImportTagFreshButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagFreshButton.getFont());\n if (memberImportTagFreshButtonFont != null) memberImportTagFreshButton.setFont(memberImportTagFreshButtonFont);\n memberImportTagFreshButton.setText(\"刷新\");\n panel3.add(memberImportTagFreshButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"标签分组\");\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "abstract void snapshotLayout();", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "@LayoutRes\n protected abstract int getLayoutId();", "public void setLayout() {\n\t\tpersonenListe.getItems().addAll(deck.getPersonenOrdered());\n\t\tpersonenListe.setValue(\"Täter\");\n\t\twaffenListe.getItems().addAll(deck.getWaffenOrdered());\n\t\twaffenListe.setValue(\"Waffe\");\n\t\t// zimmerListe.getItems().addAll(deck.getZimmerOrdered());\n\t\tzimmerListe.setValue(\"Raum\");\n\n\t\tanklage.setMinSize(80, 120);\n\t\tanklage.setMaxSize(80, 120);\n\t\tanklage.setTextFill(Color.BLACK);\n\t\tanklage.setStyle(\"-fx-background-color: #787878;\");\n\n\t\twurfel.setMinSize(80, 120);\n\t\twurfel.setMaxSize(80, 120);\n\t\twurfel.setTextFill(Color.BLACK);\n\t\twurfel.setStyle(\"-fx-background-color: #787878;\");\n\n\t\tgang.setMinSize(80, 120);\n\t\tgang.setMaxSize(80, 120);\n\t\tgang.setTextFill(Color.BLACK);\n\t\tgang.setStyle(\"-fx-background-color: #787878;\");\n\n\t\ttop = new HBox();\n\t\ttop.setSpacing(1);\n\t\ttop.setAlignment(Pos.CENTER);\n\n\t\tbuttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(anklage, wurfel, gang);\n\n\t\tbottom = new HBox();\n\t\tbottom.setSpacing(150);\n\t\tbottom.setAlignment(Pos.CENTER);\n\t\tbottom.getChildren().addAll(close);\n\n\t\tfenster = new BorderPane();\n\t\tfenster.setStyle(\"-fx-background-image: url('media/ZugFensterResized.png');\");\n\t\tfenster.setTop(top);\n\t\tfenster.setCenter(buttons);\n\t\tfenster.setBottom(bottom);\n\t}", "private void buildview() {\n\t\tCssLayout cd= new CssLayout();\n\t\t\n\t\t//table.setSizeFull();\n\t\t\t\n\t\t\ttable.setContainerDataSource(container);\n\t\t\ttable.setVisibleColumns(new Object[]{\"Name\",\"Component\",\"Indication\",\"Comment\",\"MethodofAdministration\"});\n\t\t\ttable.setColumnHeader(\"MethodofAdministration\", \"Method of Administration\");\n\t\t\t\n\t\t\ttable.setWidth(\"100%\");\n\t\t\tcd.addComponent(table);\n\t\t\tcd.setSizeFull();\n\t\t\tsetContent(cd);\n\t\t\n\t}", "@AutoGenerated\r\n\tprivate GridLayout buildMainLayout() {\n\t\tmainLayout = new GridLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"-1px\");\r\n\t\tmainLayout.setMargin(true);\r\n\t\tmainLayout.setSpacing(true);\r\n\t\tmainLayout.setRows(2);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"-1px\");\r\n\t\t\r\n\t\t// verticalLayout_1\r\n\t\thorizontalLayout_1 = buildHorizontalLayout_1();\r\n\t\tmainLayout.addComponent(horizontalLayout_1, 0, 0);\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "@SuppressWarnings(\"UnnecessaryBoxing\")\r\n private void initLayoutDimensions() {\r\n leftPanelWidth = Page.getScreenWidth() * 20 / 100;\r\n leftPanelHeight = Page.getScreenHeight() - 225;\r\n middlePanelWidth = Page.getScreenWidth() / 2;\r\n if (Double.valueOf(middlePanelWidth) % 2.0 > 0.0) {\r\n middlePanelWidth = middlePanelWidth - 1;\r\n }\r\n rightPanelWidth = Page.getScreenWidth() - (leftPanelWidth + 2 + middlePanelWidth + 2);\r\n }", "private void createMainMenuMiddleComposite() {\n\t\tString imgSlipUI = null;\n\t\tString imgJackpotBtn = null;\n\t\tString imgVoucherBtn = null;\n\t\tif(Util.isSmallerResolution()) {\n\t\t\timgSlipUI = ImageConstants.S_SLIPS_UI_BUTTON_IMG;\n\t\t\timgJackpotBtn = ImageConstants.S_JACKPOT_UI_BUTTON_IMG;\n\t\t\timgVoucherBtn = ImageConstants.S_VOUCHER_UI_BUTTON_IMG;\n\t\t}\n\t\telse {\n\t\t\timgSlipUI = ImageConstants.SLIPS_UI_BUTTON_IMG;\n\t\t\timgJackpotBtn = ImageConstants.JACKPOT_UI_BUTTON_IMG;\n\t\t\timgVoucherBtn = ImageConstants.VOUCHER_UI_BUTTON_IMG;\n\t\t}\n\t\t\n\t\tGridData gridData11 = new GridData();\n\t\tgridData11.horizontalAlignment = GridData.CENTER;\n\t\tgridData11.grabExcessHorizontalSpace = true;\n\t\tgridData11.grabExcessVerticalSpace = true;\n\t\tgridData11.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData10 = new GridData();\n\t\tgridData10.horizontalAlignment = GridData.CENTER;\n\t\tgridData10.grabExcessHorizontalSpace = true;\n\t\tgridData10.grabExcessVerticalSpace = true;\n\t\tgridData10.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData9 = new GridData();\n\t\tgridData9.horizontalAlignment = GridData.CENTER;\n\t\tgridData9.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData6 = new GridData();\n\t\tgridData6.heightHint = 100;\n\t\t// gridData6.heightHint = 70;\n\t\tgridData6.widthHint = 100;\n\t\t// gridData6.widthHint = 90;\n\t\tgridData6.grabExcessHorizontalSpace = true;\n\t\tgridData6.grabExcessVerticalSpace = true;\n\t\tgridData6.horizontalAlignment = GridData.CENTER;\n\t\tgridData6.verticalAlignment = GridData.END;\n\n\t\tGridLayout gridLayout3 = new GridLayout();\n\t\tgridLayout3.horizontalSpacing = 20;\n\t\tgridLayout3.numColumns = 3;\n\t\tGridData gridData5 = new GridData();\n\t\tgridData5.grabExcessHorizontalSpace = true;\n\t\tgridData5.verticalAlignment = GridData.FILL;\n\t\tgridData5.heightHint = 100;\n\t\tgridData5.grabExcessVerticalSpace = true;\n\t\tgridData5.horizontalAlignment = GridData.FILL;\n\t\tmainMenuMiddleComposite = new Composite(this, SWT.NONE);\n\t\tmainMenuMiddleComposite.setBackground(new Color(Display.getCurrent(),\n\t\t\t\t171, 209, 255));\n\t\tmainMenuMiddleComposite.setLayout(gridLayout3);\n\t\tmainMenuMiddleComposite.setLayoutData(gridData5);\n\n\t\tGridData gridData3 = new GridData();\n\t\tgridData3.grabExcessVerticalSpace = true;\n\t\tgridData3.horizontalAlignment = GridData.CENTER;\n\t\tgridData3.verticalAlignment = GridData.END;\n\t\tgridData3.heightHint = 100;\n\t\tgridData3.widthHint = 100;\n\t\tgridData3.grabExcessHorizontalSpace = true;\n\n\t\tGridData gridData1 = new GridData();\n\t\tgridData1.grabExcessVerticalSpace = true;\n\t\tgridData1.horizontalAlignment = GridData.CENTER;\n\t\tgridData1.verticalAlignment = GridData.END;\n\t\tgridData1.heightHint = 100;\n\t\tgridData1.widthHint = 100;\n\t\tgridData1.grabExcessHorizontalSpace = true;\n\n\t\tbtnSlipUI = new CbctlButton(mainMenuMiddleComposite, SWT.FLAT, \"\",\n\t\t\t\tLabelKeyConstants.SLIPS_UI_BUTTON);\n\t\tbtnSlipUI\n\t\t\t\t.setFont(new Font(Display.getDefault(), \"Arial\", 12, SWT.BOLD));\n\t\t\n\t\tbtnSlipUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgSlipUI)));\n\t\tbtnSlipUI.setLayoutData(gridData1);\n\n\t\tbtnJackpotUI = new CbctlButton(mainMenuMiddleComposite, SWT.NONE, \"\",\n\t\t\t\tLabelKeyConstants.JACKPOT_UI_BUTTON);\n\t\tbtnJackpotUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tbtnJackpotUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgJackpotBtn)));\n\t\tbtnJackpotUI.setLayoutData(gridData3);\n\n\t\tbtnVoucherUI = new CbctlButton(mainMenuMiddleComposite, SWT.NONE, \"\",\n\t\t\t\tLabelLoader.getLabelValue(LabelKeyConstants.VOUCHER_UI_BUTTON));\n\t\tbtnVoucherUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgVoucherBtn)));\n\t\tbtnVoucherUI.setLayoutData(gridData6);\n\n\t\tlblSlipUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblSlipUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.SLIPS_UI_BUTTON));\n\t\tlblSlipUI.setBackground(new Color(Display.getCurrent(), 171, 209, 255));\n\t\tlblSlipUI\n\t\t\t\t.setFont(new Font(Display.getDefault(), \"Arial\", 12, SWT.BOLD));\n\t\tlblSlipUI.setLayoutData(gridData9);\n\n\t\tlblJackpotUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblJackpotUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.JACKPOT_UI_BUTTON));\n\t\tlblJackpotUI.setBackground(new Color(Display.getCurrent(), 171, 209,\n\t\t\t\t255));\n\t\tlblJackpotUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tlblJackpotUI.setLayoutData(gridData10);\n\n\t\tlblVoucherUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblVoucherUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.VOUCHER_UI_BUTTON));\n\t\tlblVoucherUI.setBackground(new Color(Display.getCurrent(), 171, 209,\n\t\t\t\t255));\n\t\tlblVoucherUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tlblVoucherUI.setLayoutData(gridData11);\n\n\t}", "private void initLayouts() {\n mRelativeLayout1WA = findViewById(R.id.history_layout_one_week_ago);\n mRelativeLayout6DA = findViewById(R.id.history_layout_six_days_ago);\n mRelativeLayout5DA = findViewById(R.id.history_layout_five_days_ago);\n mRelativeLayout4DA = findViewById(R.id.history_layout_four_days_ago);\n mRelativeLayout3DA = findViewById(R.id.history_layout_three_days_ago);\n mRelativeLayout2DA = findViewById(R.id.history_layout_two_days_ago);\n mRelativeLayoutY = findViewById(R.id.history_layout_yesterday);\n\n layoutsList.add(mRelativeLayoutY);\n layoutsList.add(mRelativeLayout2DA);\n layoutsList.add(mRelativeLayout3DA);\n layoutsList.add(mRelativeLayout4DA);\n layoutsList.add(mRelativeLayout5DA);\n layoutsList.add(mRelativeLayout6DA);\n layoutsList.add(mRelativeLayout1WA);\n\n }", "private void setupAllSpecialLayoutViews(){\n allSpecialLayoutViews = new ArrayList<>();\n allSpecialLayoutViews.add(radianSpecialLayout);\n allSpecialLayoutViews.add(sineSpecialLayout);\n allSpecialLayoutViews.add(cosineSpecialLayout);\n allSpecialLayoutViews.add(tangentSpecialLayout);\n allSpecialLayoutViews.add(radianDivBar);\n allSpecialLayoutViews.add(radianTextDenominator);\n allSpecialLayoutViews.add(sineDivBar);\n allSpecialLayoutViews.add(sineTextDenominator);\n allSpecialLayoutViews.add(cosineDivBar);\n allSpecialLayoutViews.add(cosineTextDenominator);\n allSpecialLayoutViews.add(tangentDivBar);\n allSpecialLayoutViews.add(tangentTextDenominator);\n }", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n toolBarPanel = new JPanel();\n toolBarPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(toolBarPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n containerPanel = new JPanel();\n containerPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(containerPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n errorPanel = new JPanel();\n errorPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(errorPanel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n valuePanel = new JPanel();\n valuePanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(valuePanel, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"view as\");\n mainPanel.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboBox1 = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"UTF-8String\");\n comboBox1.setModel(defaultComboBoxModel1);\n mainPanel.add(comboBox1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\r\n final JPanel panel1 = new JPanel();\r\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel = new JPanel();\r\n mMainPanel.setLayout(new GridLayoutManager(15, 3, new Insets(0, 0, 0, 0), -1, -1));\r\n panel1.add(mMainPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n label = new JLabel();\r\n Font labelFont = this.$$$getFont$$$(null, -1, 28, label.getFont());\r\n if (labelFont != null) label.setFont(labelFont);\r\n label.setText(\"CodeRecommender\");\r\n mMainPanel.add(label, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer1 = new Spacer();\r\n mMainPanel.add(spacer1, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel2 = new JPanel();\r\n panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel2, new GridConstraints(4, 0, 6, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel3 = new JPanel();\r\n panel3.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n statement = new JTextArea();\r\n statement.setBackground(new Color(-12434103));\r\n statement.setColumns(0);\r\n statement.setEditable(false);\r\n statement.setEnabled(true);\r\n Font statementFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 15, statement.getFont());\r\n if (statementFont != null) statement.setFont(statementFont);\r\n statement.setText(\" In the current ai craze, we want to use neural network-related technology to grab a large amount of source code from the open source community to achieve the recommendation of the N+1 line of code from the known N lines of code, and package this function into a practical plug-in on the IDE.\");\r\n panel3.add(statement, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, 70), null, 1, false));\r\n final JPanel panel4 = new JPanel();\r\n panel4.setLayout(new GridLayoutManager(12, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.setBackground(new Color(-12828863));\r\n panel3.add(panel4, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n Download = new JButton();\r\n Font DownloadFont = this.$$$getFont$$$(null, -1, 12, Download.getFont());\r\n if (DownloadFont != null) Download.setFont(DownloadFont);\r\n Download.setText(\"Find\");\r\n panel4.add(Download, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel5 = new JPanel();\r\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel5, new GridConstraints(11, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label1 = new JLabel();\r\n label1.setText(\"See the guide on the https://github.com/huangjihui511/java-code-recommand-IDEA-plugin \");\r\n panel5.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer2 = new Spacer();\r\n panel5.add(spacer2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n pathTextField = new JTextField();\r\n pathTextField.setEditable(false);\r\n Font pathTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, pathTextField.getFont());\r\n if (pathTextFieldFont != null) pathTextField.setFont(pathTextFieldFont);\r\n pathTextField.setText(\"/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 \");\r\n panel4.add(pathTextField, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n SetPath = new JButton();\r\n Font SetPathFont = this.$$$getFont$$$(null, -1, 12, SetPath.getFont());\r\n if (SetPathFont != null) SetPath.setFont(SetPathFont);\r\n SetPath.setText(\"Set\");\r\n panel4.add(SetPath, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n Help = new JButton();\r\n Help.setText(\"Help\");\r\n panel4.add(Help, new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel6 = new JPanel();\r\n panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel6.setFocusTraversalPolicyProvider(false);\r\n panel6.setFocusable(false);\r\n panel4.add(panel6, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel7 = new JPanel();\r\n panel7.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel7, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label2 = new JLabel();\r\n label2.setIcon(new ImageIcon(getClass().getResource(\"/timg (1) - 副本.jpg\")));\r\n label2.setText(\"\");\r\n panel7.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JLabel label3 = new JLabel();\r\n label3.setIcon(new ImageIcon(getClass().getResource(\"/微信图片_20190328224952 (2) - 副本.jpg\")));\r\n label3.setText(\"\");\r\n panel7.add(label3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel8 = new JPanel();\r\n panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel7.add(panel8, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel9 = new JPanel();\r\n panel9.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel9, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n webaddressTextField = new JTextField();\r\n webaddressTextField.setEditable(false);\r\n Font webaddressTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, webaddressTextField.getFont());\r\n if (webaddressTextFieldFont != null) webaddressTextField.setFont(webaddressTextFieldFont);\r\n webaddressTextField.setText(\"/Volumes/PythonSupporting\");\r\n panel4.add(webaddressTextField, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n final JPanel panel10 = new JPanel();\r\n panel10.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel10, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label4 = new JLabel();\r\n Font label4Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label4.getFont());\r\n if (label4Font != null) label4.setFont(label4Font);\r\n label4.setText(\"Find the package\");\r\n panel10.add(label4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer3 = new Spacer();\r\n panel10.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel11 = new JPanel();\r\n panel11.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel11.setToolTipText(\"\");\r\n panel4.add(panel11, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label5 = new JLabel();\r\n Font label5Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label5.getFont());\r\n if (label5Font != null) label5.setFont(label5Font);\r\n label5.setText(\"Set the path\");\r\n panel11.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer4 = new Spacer();\r\n panel11.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel12 = new JPanel();\r\n panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel12, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel13 = new JPanel();\r\n panel13.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel13, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel14 = new JPanel();\r\n panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel14, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel15 = new JPanel();\r\n panel15.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel15, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n pic = new JPanel();\r\n pic.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.putClientProperty(\"html.disable\", Boolean.FALSE);\r\n panel3.add(pic, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n a = new JLabel();\r\n a.setText(\"\");\r\n pic.add(a, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel16 = new JPanel();\r\n panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel16, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel17 = new JPanel();\r\n panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel17, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel18 = new JPanel();\r\n panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel18, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer5 = new Spacer();\r\n mMainPanel.add(spacer5, new GridConstraints(5, 1, 10, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel19 = new JPanel();\r\n panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel19, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel20 = new JPanel();\r\n panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel20, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer6 = new Spacer();\r\n panel1.add(spacer6, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer7 = new Spacer();\r\n panel1.add(spacer7, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer8 = new Spacer();\r\n panel1.add(spacer8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n }", "protected void createContents() {\n\n\t}", "private void buildHeader(Layout parent) {\n\n }", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "public interface ViewLayout {\r\n\r\n\t/** \r\n\t * Creates a reference to the view which layout should be calculated.\r\n\t * \r\n\t * @param view\r\n\t * \t\tthe view which layout should be calculated.\r\n\t */\r\n\tpublic void setView(View view);\r\n\t\r\n\t/**\r\n\t * Layouts the view components on the parent panel by assigning\r\n\t * them positions.\r\n\t * \r\n\t * @param parent\r\n\t * \t\tthe displaying parent container of the view\r\n\t */\r\n\tpublic void layoutContainer(Container parent);\r\n\r\n}", "private void createMainMenuHeaderComposite() {\n\n\t\tGridData gridData8 = new GridData();\n\t\tgridData8.grabExcessHorizontalSpace = true;\n\t\tgridData8.horizontalAlignment = GridData.FILL;\n\t\tgridData8.verticalAlignment = GridData.BEGINNING;\n\t\tgridData8.grabExcessVerticalSpace = true;\n\t\tGridData gridData7 = new GridData();\n\t\tgridData7.grabExcessHorizontalSpace = true;\n\t\tgridData7.horizontalAlignment = GridData.FILL;\n\t\tgridData7.verticalAlignment = GridData.END;\n\t\tgridData7.grabExcessVerticalSpace = true;\n\t\tGridData gridData21 = new GridData();\n\t\tgridData21.horizontalAlignment = GridData.FILL;\n\t\tgridData21.grabExcessHorizontalSpace = true;\n\t\tgridData21.grabExcessVerticalSpace = false;\n\t\tgridData21.heightHint = 150;\n\t\tgridData21.verticalAlignment = GridData.BEGINNING;\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.horizontalSpacing = 50;\n\t\tgridLayout.marginWidth = 20;\n\t\tgridLayout.marginHeight = 0;\n\t\tgridLayout.verticalSpacing = 35;\n\t\tmainMenuHeaderComposite = new Composite(this, SWT.NONE);\n\t\tmainMenuHeaderComposite.setBackground(new Color(Display.getCurrent(),\n\t\t\t\t255, 255, 255));\n\t\tmainMenuHeaderComposite.setLayoutData(gridData21);\n\t\tmainMenuHeaderComposite.setLayout(gridLayout);\n\n\t\tlblTitle1 = new CbctlLabel(mainMenuHeaderComposite, SWT.CENTER);\n\t\tlblTitle1\n\t\t\t\t.setText(LabelLoader\n\t\t\t\t\t\t.getLabelValue(LabelKeyConstants.WELCOME_NOTE_ON_TOUCH_SCREEN_HOMEPAGE));\n\t\tlblTitle1\n\t\t\t\t.setFont(SDSControlFactory.getStandardTouchScreenFont());\n\t\tlblTitle1.setLayoutData(gridData7);\n\n\t\tlblTitle2 = new CbctlLabel(mainMenuHeaderComposite, SWT.CENTER);\n\t\tlblTitle2\n\t\t\t\t.setText(LabelLoader\n\t\t\t\t\t\t.getLabelValue(LabelKeyConstants.SELECT_NOTE_ON_TOUCH_SCREEN_HOMEPAGE));\n\t\tlblTitle2\n\t\t\t\t.setFont(SDSControlFactory.getStandardTouchScreenFont());\n\t\tlblTitle2.setLayoutData(gridData8);\n\t}" ]
[ "0.7441121", "0.7408097", "0.73983043", "0.7349182", "0.7343956", "0.72837514", "0.7228967", "0.72196674", "0.716834", "0.7118178", "0.7112332", "0.71101266", "0.70597374", "0.70571274", "0.6990229", "0.6926798", "0.6901655", "0.6854118", "0.68504196", "0.68446213", "0.68368685", "0.6783188", "0.6759682", "0.67309034", "0.6673435", "0.66200835", "0.65828514", "0.65800583", "0.65591884", "0.65570545", "0.65567595", "0.65414953", "0.6533817", "0.6528927", "0.65221506", "0.6510406", "0.6501033", "0.6495626", "0.64799005", "0.6470482", "0.64617133", "0.6450147", "0.6445254", "0.6439915", "0.64341444", "0.64323527", "0.64293355", "0.64242285", "0.6423748", "0.64126766", "0.64016813", "0.63963145", "0.6384965", "0.63835275", "0.6374324", "0.6373989", "0.63736635", "0.6357495", "0.6350608", "0.63358897", "0.6329535", "0.6319707", "0.631756", "0.6311248", "0.62908554", "0.6290835", "0.6288659", "0.6287615", "0.6285164", "0.62839264", "0.6269888", "0.6261724", "0.6260101", "0.62521136", "0.62484986", "0.624712", "0.62470645", "0.6246525", "0.62457556", "0.624454", "0.6244338", "0.6244212", "0.62423617", "0.6237739", "0.62333804", "0.6228355", "0.6228241", "0.62271667", "0.6223703", "0.6221801", "0.6210153", "0.6208609", "0.6207323", "0.6204501", "0.62025356", "0.62011784", "0.61998993", "0.61963207", "0.619598", "0.61945784", "0.6174235" ]
0.0
-1
Construct an account view.
public AccountSummaryView(Context context, Account account) { super(context); this.account = account; LayoutParams lp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT); setLayoutParams(lp); setBackgroundDrawable(context.getResources().getDrawable(R.drawable.list_item_background_states)); addView(createIcon()); addView(createAccountLayout()); addView(createBalance()); addView(createCurrency()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private View createAccountLayout() {\r\n\t\tLinearLayout accountLayout = new LinearLayout(getContext());\r\n\t\tLayoutParams aclp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT, 3);\r\n\t\taccountLayout.setOrientation(VERTICAL);\r\n\t\taccountLayout.setLayoutParams(aclp);\r\n\t\tTextView t = new TextView(getContext());\r\n\t\tLayoutParams tlp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\r\n\t\tt.setLayoutParams(tlp);\r\n\t\tt.setText(account.getName());\r\n\t\tt.setTextSize(16);\r\n\t\tt.setTypeface(Typeface.DEFAULT_BOLD);\r\n\t\tt.setTextColor(getContext().getResources().getColor(R.color.black));\r\n\t\taccountLayout.addView(t);\r\n\r\n\t\tTextView desc = new TextView(getContext());\r\n\t\tif (account.getLastOperation() != null) {\r\n\t\t\tdesc.setText(\"\" + DateUtil.defaultDateFormat.format(account.getLastOperation()));\r\n\t\t}\r\n\t\taccountLayout.addView(desc);\r\n\t\treturn accountLayout;\r\n\t}", "public UserAccountViewPanel() {\n initComponents();\n }", "public String viewAccount() {\n ConversationContext<Account> ctx = AccountController.newEditContext(getPart().getAccount());\n ctx.setLabelWithKey(\"part_account\");\n getCurrentConversation().setNextContextSubReadOnly(ctx);\n return ctx.view();\n }", "AccountBarView(Account a, AccountHolder aH) {\n\t\tthis.a = a;\n\t\tthis.aH = aH;\n\t\t\n\t\taccountType = a.getClass().getSimpleName();\n\t\tacctId = EventManager.getUniqueID(a);\n\t\t\n\t\tfirstRun = true;\n\t}", "public SeeAnAccount() {\n initComponents();\n }", "Account() { }", "public\n RegisterView()\n {\n super(ViewKeys.REGISTER);\n\n setAccount(null);\n setAccountChooser(new ElementComboBoxChooser(getAccounts()));\n setFilter(new TransactionFilter());\n setPanel(new Panel());\n setSearchWidget(new SearchWidget(createPopupMenu()));\n\n // Build panel.\n setFill(GridBagConstraints.BOTH);\n add(createToolsPanel(), 0, 0, 1, 1, 0, 0);\n add(getPanel(), 0, 1, 1, 1, 100, 100);\n\n getAccountChooser().setAllowInactiveAccounts(false);\n\n // Add listeners.\n getAccountChooser().addActionListener(new ActionHandler());\n getSearchWidget().addActionListener(new ActionHandler());\n }", "public void createAccount(View view) {\n Intent intent = new Intent(this, UserAccountCreateActivity.class);\n startActivity(intent);\n }", "public AccountListView() {\r\n initComponents();\r\n \r\n }", "public AccountPresenter(AccountActivity activity) {\n\t\tsuper(activity);\n\t\tthis.activity = activity;\n\t}", "public Account() {\n this(DSL.name(\"account\"), null);\n }", "public interface AccountView extends BelatrixConnectView {\n\n void goSubCategoryDetail(Integer categoryId, Integer employeeId);\n void showScore(String score);\n void showLocation(String locationIcon);\n void showLevel(String level);\n void showSkypeId(String skypeID);\n void showEmployeeName(String employeName);\n void showEmail(String role);\n void showProfilePicture(String profilePicture);\n void showRecommendMenu(boolean show);\n void showEditProfileButton(boolean show);\n void goToEditProfile(Employee employee);\n void goToGiveStar(Employee employee);\n void goToExpandPhoto(String url);\n void notifyNavigationRefresh();\n void showInformativeDialog(String information);\n void goBackToLogin();\n void goToEditSkills();\n void showEditSkillsButton(boolean show);\n void onEmployeeLoaded(int employeeId);\n}", "public JPanel getNewClientAccountPanel() {\n clientAccountView = new ClientAccountView();\n clientAccountView.setAccNum(smCntr.getID());\n clientAccountView.setFormToAdd();\n return clientAccountView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater,\n ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_single_account_mode, container, false);\n initializeUI(view);\n\n // Creates a PublicClientApplication object with res/raw/auth_config_single_account.json\n PublicClientApplication.createSingleAccountPublicClientApplication(getContext(),\n R.raw.auth_config_single_account,\n new IPublicClientApplication.ISingleAccountApplicationCreatedListener() {\n @Override\n public void onCreated(ISingleAccountPublicClientApplication application) {\n /**\n * This test app assumes that the app is only going to support one account.\n * This requires \"account_mode\" : \"SINGLE\" in the config json file.\n **/\n mSingleAccountApp = application;\n loadAccount();\n }\n\n @Override\n public void onError(MsalException exception) {\n displayError(exception);\n }\n });\n\n return view;\n }", "public LoginView(View view, Activity activity, MoneyModel model) {\n this.view = view;\n this.activity = activity;\n this.model = model;\n\n // Instantiate the view\n loginButton = (Button) activity.findViewById(R.id.loginButton);\n createUserButton = (Button) activity.findViewById(R.id.createUserButton);\n\n usernameField = (EditText) activity.findViewById(R.id.usernameField);\n passwordField = (EditText) activity.findViewById(R.id.passwordField);\n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public account() {\n initComponents();\n autoID();\n branch();\n }", "public CreateAccountPanel() {\n initComponents();\n initializeDateChooser();\n }", "public PanelAccountInfo() {\n initComponents();\n setTextFields();\n setLabels();\n }", "View createView();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n accountInfoBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account_info, container, false);\n return accountInfoBinding.getRoot();\n }", "public AccountInfo() {\n initComponents();\n }", "public AccountViewModel(Model model, ViewState viewState) {\n this.model = model;\n this.viewState = viewState;\n value = new SimpleDoubleProperty();\n total = new SimpleDoubleProperty();\n balance = new SimpleDoubleProperty();\n user = new SimpleStringProperty();\n }", "@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_account, container, false);\n return view;\n }", "public Account createAccount() {\n\t\t\n\t\tAccountBuilder builder = new AccountBuilder();\n\t\tUserRole role = new UserRole();\n\t\trole.setUsername(getUsername());\n\t\trole.setRole(\"ROLE_USER\");\n\t\t\n\t\t//builds the account entity using the front end POJO\n\t\tbuilder\n\t\t\t.withUsername(getUsername())\n\t\t\t.withPassword(getPassword())\n\t\t\t.withLastName(getLastName())\n\t\t\t.withFirstName(getFirstName())\n\t\t\t.withRole(role)\n\t\t\t.withStatus(AccountStatus.ACTIVE)\n\t\t\t.withEmail(getEmail())\n\t\t\t.withStoreCd(getStoreCd());\n\t\t\n return builder.build();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_account, container, false);\n }", "public Account() {\n super();\n }", "public void createFirebaseAccountsUI() {\n mAccountsFragment.startActivityForResult(\n AuthUI.getInstance()\n .createSignInIntentBuilder()\n .setAvailableProviders(providers)\n .build(),\n mAccountsFragment.RC_SIGN_IN);\n }", "public interface WalletBalanceView extends BaseView {\n void renderAccountInfo(NewAccountInfo info);\n}", "ViewCreator get(String userName);", "public ClientAccountViewController() {\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_account, container, false);\r\n }", "public Account() {\r\n\t\tthis(\"unknown@billsplit.com\", \"Account\");\r\n\t}", "public AccountInfo() {\n this(null, null);\n }", "public Account(Name alias) {\n this(alias, ACCOUNT);\n }", "public UserView() {\n initComponents();\n new UserDaoImp().createTable();\n displayDataIntoTable();\n displayDataAtComboBox();\n\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_my_account, container, false);\r\n }", "public AccountsRecord() {\n super(Accounts.ACCOUNTS);\n }", "public UserAccount() {\n\n\t}", "public ViewSavingAccountJPanel(Person person) {\n initComponents();\n DisplaySavingAccount(person);\n \n }", "ListView getManageAccountListView();", "public UserAcct() {\r\n }", "public UserView createUserView() {\r\n return new IGAFitnessPlotView();\r\n }", "Account create();", "public Account() {\n\t}", "public ViewAccountInformationPrivilege(String username, Bank bank) {\n super(\"View account information\", username, bank);\n }", "public Account() {\n this(null, 0);\n }", "private void buildAccountBalancePane() // buildAccountBalancePane method start\n\t{\n\t\t// creating object\n\t\tbalanceOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tbalanceOutput.setEditable(false);\n\t\tbalanceOutput.setFont(font);\n\t\tbalanceOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\taccountBalancePane.add(balanceOutput);\n\t\taccountBalancePane.add(new JScrollPane(balanceOutput));\n\t}", "public ExternallyOwnedAccount() {}", "public Account() {\n }", "public Account() {\n }", "public Account() {\n\n\t}", "public UserAccount() {\n }", "private View() {}", "RegisteredUserView(String username, String email, String name) {\n this.username = username;\n this.email = email;\n this.name = name;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootview =inflater.inflate(R.layout.fragment_my_account, container, false);\n personImg = (ImageView)rootview. findViewById(R.id.person_img);\n persontxt = (TextView) rootview.findViewById(R.id.personName);\n personNum = (TextView) rootview.findViewById(R.id.telephoneNum);\n personEmail = (TextView) rootview.findViewById(R.id.emailtxt);\n accountEdit = (Button) rootview.findViewById(R.id.accountedit);\n changeLang = (Button) rootview.findViewById(R.id.changelang);\n signout = (Button) rootview.findViewById(R.id.signout);\n getData();\n\n return rootview;\n }", "public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }", "public Account() {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_account, container, false);\n unbinder = ButterKnife.bind(this, view);\n mUsername.setText(username);\n setManagerName();\n\n\n return view;\n }", "public Account() {\n\n }", "private Account createAccount(byte[] address) {\n return new Account(address);\n }", "public AddUserView() {\n initComponents();\n }", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "public RequestAccessView() {\r\n setHeightFull();\r\n setClassName(StyleConstants.FIRE_GRADIENT.getName());\r\n setAlignItems(Alignment.CENTER);\r\n setJustifyContentMode(JustifyContentMode.CENTER);\r\n add(initRegisterForm());\r\n }", "public RegistraEntradaSaidaView() {\n initComponents();\n }", "public JPanel getModifyClientAccountPanel() {\n clientAccountView = new ClientAccountView();\n clientAccountView.setFormToModify();\n return clientAccountView;\n }", "public SignupAccountInfoAvatar() {\n super(\"SignupAvatar.AccountInfo\", BrowserConstants.DIALOGUE_BACKGROUND);\n this.profileConstraints = ProfileConstraints.getInstance();\n this.securityQuestionModel = new DefaultComboBoxModel();\n this.usernameReservations = new HashMap<String, UsernameReservation>();\n this.emailReservations = new HashMap<EMail, EMailReservation>();\n initSecurityQuestionModel();\n initComponents();\n addValidationListeners();\n initFocusListener();\n }", "public HomeView(User user) {\n initComponents();\n this.user = user;\n jLabelName.setText(user.getName()); \n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_add_account, container, false);\n initView(inflate);\n return inflate;\n }", "public HomeAddettoUI(Account a) {\n\t\tsuper(a);\n\n\t\tJButton btn_events = new JButton(\"Registra evento\");\n\t\tbtn_events.setBounds(10, 275, 205, 21);\n\t\tbtn_events.setActionCommand(\"event\");\n\t\tbtn_events.addActionListener(this);\n\t\tgetContentPane().add(btn_events);\n\n\t\tJButton btn_prenotations = new JButton(\"Registra prenotazione\");\n\t\tbtn_prenotations.setBounds(10, 300, 205, 21);\n\t\tbtn_prenotations.setActionCommand(\"pren\");\n\t\tbtn_prenotations.addActionListener(this);\n\t\tgetContentPane().add(btn_prenotations);\n\n\t\tJButton btn_amount = new JButton(\"Registra pagamento\");\n\t\tbtn_amount.setBounds(10, 325, 205, 21);\n\t\tbtn_amount.setActionCommand(\"amount\");\n\t\tbtn_amount.addActionListener(this);\n\t\tgetContentPane().add(btn_amount);\n\t\t\n\t\tJButton btn_restaurant = new JButton(\"Registra conto ristorante\");\n\t\tbtn_restaurant.setBounds(10, 350, 205, 21);\n\t\tbtn_restaurant.setActionCommand(\"risto\");\n\t\tbtn_restaurant.addActionListener(this);\n\t\tgetContentPane().add(btn_restaurant);\n\t}", "public Account() {\n dateCreated = new java.util.Date();\n }", "public Account() {\n dateCreated = new java.util.Date();\n }", "private void ViewAccounts() {\n for (int k = 0; k < accountList.size(); k++) {\n\n System.out.print(k + \": \" + accountList.get(k) + \" || \");\n\n }\n }", "private Account createAccount4() {\n Account account = new Account(\"123456004\", \"Chad I. Cobbs\",\n new SimpleDate(4, 23, 1976).asDate(), \"chadc@netzero.com\", true, false,\n new CreditCard(\"1234123412340004\"), new CreditCard(\"4320123412340005\"));\n\n final Percentage percent50 = new Percentage(0.5);\n final Percentage percent25 = new Percentage(0.25);\n account.addBeneficiary(\"Jane\", percent25);\n account.addBeneficiary(\"Amy\", percent25);\n account.addBeneficiary(\"Susan\", percent50);\n return account;\n }", "public Account(Holder holder) {\n this(holder, 0);\n }", "public account(){\n this.accNo = 000;\n this.id = 000;\n this.atype = \"\";\n this.abal = 0.00;\n }", "public AccountPanel(MainFrame mainFrameObject) {\n super();\n\n this.parentMainFrame = mainFrameObject;\n this.recordInvoiceOrPaymentFrame = new RecordInvoiceOrPaymentFrame(mainFrameObject);\n\n this.tenantsDataManager = new TenantsDataManager();\n this.accountStatementDataManager = new AccountStatementDataManager();\n\n initializePanel();\n setComponents();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n fragmentAccountBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account, container, false);\n\n appPreference = AppPreference.getInstance(getContext());\n signInToken = appPreference.getString(SIGNIN_TOKEN);\n\n // if user is login\n if (signInToken.isEmpty()) {\n\n fragmentAccountBinding.tvLoginLogout.setText(\"Login\");\n fragmentAccountBinding.tvUserName.setText(\"Login / Create account\");\n\n intent = new Intent(getContext(), RegistrationActivity.class);\n\n Glide.with(AppConstants.mContext)\n .load(R.drawable.placeholder_products)\n .into(fragmentAccountBinding.ivDisplayPicture);\n\n } else {\n\n userName = appPreference.getString(USER_NAME);\n userAvatar = appPreference.getString(USER_AVATAR);\n\n intent = new Intent(getContext(), OrderListingActivity.class);\n\n fragmentAccountBinding.tvUserName.setText(userName);\n String avatarImagePath = USER_STORAGE_BASE_URL.concat(userAvatar);\n\n fragmentAccountBinding.tvLoginLogout.setText(\"Logout\");\n\n Glide.with(AppConstants.mContext)\n .load(avatarImagePath)\n .placeholder(R.drawable.placeholder_products)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n .skipMemoryCache(true)\n .into(fragmentAccountBinding.ivDisplayPicture);\n }\n\n initListeners();\n\n return fragmentAccountBinding.getRoot();\n }", "public void populateView() {\r\n populateHead();\r\n ArrayList arrayList = new ArrayList();\r\n arrayList.add(new AccDetailItem(\"Loan Amount\", this.account.totLoanAmt, MiscUtils.getColor(getResources(), this.account.totLoanAmt)));\r\n arrayList.add(new AccDetailItem(\"Interest Rate\", this.account.interestRate));\r\n arrayList.add(new AccDetailItem(\"Repayment Amount\", this.account.repaymentAmt, MiscUtils.getColor(getResources(), this.account.repaymentAmt)));\r\n arrayList.add(new AccDetailItem(\"Start Date\", this.account.startDt));\r\n arrayList.add(new AccDetailItem(\"End Date\", this.account.endDt));\r\n arrayList.add(new AccDetailItem(\"Status\", this.account.loanStatus));\r\n ArrayList arrayList2 = new ArrayList();\r\n arrayList2.add(new AccDetailItem(\"Outstanding Amount\", this.account.formattedOutstandingAmount, ContextCompat.getColor(getContext(), R.color.primary_red)));\r\n arrayList2.add(new AccDetailItem(\"Overdue Amount\", String.valueOf(this.account.overdueAmount), MiscUtils.getColor(getResources(), (double) this.account.overdueAmount)));\r\n arrayList2.add(new AccDetailItem(\"No. of Repayments Overdue\", this.account.overdueCount));\r\n this.list.setAdapter(new AccountDetailItemAdapter(getActivity(), arrayList));\r\n this.list2.setAdapter(new AccountDetailItemAdapter(getActivity(), arrayList2));\r\n MiscUtils.setListViewHeightBasedOnChildren(this.list);\r\n MiscUtils.setListViewHeightBasedOnChildren(this.list2);\r\n }", "@Override\n\tpublic TiUIView createView(Activity activity)\n\t{\n\t\tif (placeholder) {\n\n\t\t\t// Placeholder for header or footer, do not create view.\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new RowView(this);\n\t}", "public AssetRegistrationView() {\n initComponents();\n }", "private Response createActivityView(String scopeName, String roleName, Integer activityId, String tripId, Integer reportId, boolean withHistory, HttpServletRequest request, ActivityViewEnum view) throws ServiceException {\n String username = request.getRemoteUser();\n List<Dataset> datasets = usmService.getDatasetsPerCategory(USMSpatial.USM_DATASET_CATEGORY, username, USMSpatial.APPLICATION_NAME, roleName, scopeName);\n return createSuccessResponse(activityService.getFishingActivityForView(activityId, tripId, reportId, datasets, view, withHistory));\n }", "public AccountDepositUI() {\n initComponents();\n }", "@Override\n\tpublic String getName() {\n\t\treturn \"viewAccount.do\";\n\t}", "public LoginView() {\n initComponents();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n View v = inflater.inflate(R.layout.fragment_account, parent, false);\n\n setOnClickListeners(v);\n\n return v;\n }", "public ViewObject(ActivityInstance instance)\n {\n // Populate fields\n this.templateId = instance.getTemplate().getId();\n this.name = instance.getName();\n this.description = instance.getDescription();\n this.paramValues = instance.getParameterValues();\n }", "public TenantPage(User u) {\n initComponents();\n setIcon();\n user = u;\n userNamejLabel.setText(user.getFullName());\n userIdjLabel.setText(String.valueOf(user.getId()));\n userTypejLabel.setText(user.getUserType());\n displayPropertiesInfo();\n }", "Account create(Context context);", "public AdministradorView() {\n initComponents();\n }", "public Account(String alias) {\n this(DSL.name(alias), ACCOUNT);\n }", "private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"jse@qui.fr\", true, false, new CreditCard(\"4320123412340008\"));\n\n return account;\n }", "public Account(String currency) {\n //numAccount += 1;\n incrementNumAccount();\n this.accountID = numAccount;\n this.dateOfCreation = LocalDate.now();\n\n setPrimaryCurrency(currency);\n this.currencyBalance = Money.of(0, this.primaryCurrency);\n ownerID = new ArrayList<>();\n }", "public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }", "private void initAcountSetView() {\n\t\tmAcountSetView = mInflater.inflate(R.layout.accout_set_view, null);\r\n\t\tmAccountBtn = (Button) mAcountSetView.findViewById(R.id.acount_set_btn);\r\n\t\tmAccountBtn.setOnClickListener(this);\r\n\t\tmNickEt = (EditText) mAcountSetView.findViewById(R.id.nick_ed);\r\n\t\tmHeadWheel = (WheelView) mAcountSetView.findViewById(R.id.acount_head);\r\n\t\tmSexWheel = (WheelView) mAcountSetView.findViewById(R.id.acount_sex);\r\n\t\tmHeadWheel.setViewAdapter(new HeadAdapter(getActivity()));\r\n\t\tmSexWheel.setViewAdapter(new SexAdapter(getActivity()));\r\n\t}", "public AccountOptionalFragment()\n {\n super();\n }", "Account(String username, String email) {\n this.username = username;\n this.email = email;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_profile, container, false);\n\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());\n\n tvName = (TextView) view.findViewById(R.id.tvNameProfile);\n tvId = (TextView) view.findViewById(R.id.tvIdProfile);\n tvAge = (TextView) view.findViewById(R.id.tvAgeProfile);\n tvPhone = (TextView) view.findViewById(R.id.tvPhoneProfile);\n tvEmail = (TextView) view.findViewById(R.id.tvEmailProfile);\n tvPassword = (TextView) view.findViewById(R.id.tvPasswordProfile);\n\n tvName.setText(preferences.getString(BankContractor.UserAccountDb.COL_NAME,\"nul\"));\n tvId.setText(preferences.getString(BankContractor.UserAccountDb.COL_ID,\"nul\"));\n tvAge.setText(preferences.getString(BankContractor.UserAccountDb.COL_AGE,\"nul\"));\n tvPhone.setText(preferences.getString(BankContractor.UserAccountDb.COL_PHONE,\"nul\"));\n tvEmail.setText(preferences.getString(BankContractor.UserAccountDb.COL_EMAIL,\"nul\"));\n tvPassword.setText(preferences.getString(BankContractor.UserAccountDb.COL_PASSWORD,\"nul\"));\n\n return view;\n }", "private GetAccount()\r\n/* 19: */ {\r\n/* 20:18 */ super(new APITag[] { APITag.ACCOUNTS }, new String[] { \"account\" });\r\n/* 21: */ }" ]
[ "0.705516", "0.649984", "0.635911", "0.63327944", "0.6285737", "0.6237382", "0.6054275", "0.60342246", "0.602235", "0.5974565", "0.596438", "0.59133303", "0.58748686", "0.5851763", "0.58503133", "0.5818958", "0.5783027", "0.57632667", "0.5744692", "0.5713694", "0.5704575", "0.5701365", "0.56978846", "0.56885624", "0.56501305", "0.56498903", "0.5621517", "0.5611745", "0.55993754", "0.55858517", "0.5549422", "0.5539401", "0.55102634", "0.550529", "0.54855555", "0.54721653", "0.54668844", "0.54619205", "0.54500467", "0.544411", "0.54407054", "0.54369473", "0.5420278", "0.5397862", "0.53817135", "0.5381474", "0.5376593", "0.5373682", "0.53677475", "0.536763", "0.53642637", "0.53642637", "0.5353354", "0.5346349", "0.53443354", "0.5342562", "0.53398746", "0.5333453", "0.5331191", "0.53305537", "0.5314376", "0.5309308", "0.5306729", "0.530205", "0.5296153", "0.5295725", "0.5294713", "0.5283672", "0.52833676", "0.5264731", "0.52576876", "0.5246334", "0.5246334", "0.5238199", "0.5229321", "0.52254015", "0.52182597", "0.5212427", "0.52113914", "0.52088594", "0.5208702", "0.5208109", "0.51900256", "0.5184765", "0.51745003", "0.51665056", "0.51471376", "0.51421607", "0.51274896", "0.51220775", "0.51201904", "0.5113619", "0.51084846", "0.51050836", "0.51000744", "0.50971645", "0.5095908", "0.509158", "0.5091129", "0.5088893" ]
0.6678517
1
Create the account icon view.
private View createIcon() { ImageView img = new ImageView(getContext()); LayoutParams imglp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT); imglp.gravity = Gravity.CENTER_VERTICAL; imglp.rightMargin = 5; img.setLayoutParams(imglp); img.setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.account)); return img; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Icon createIcon();", "public void createFirebaseAccountsUI() {\n mAccountsFragment.startActivityForResult(\n AuthUI.getInstance()\n .createSignInIntentBuilder()\n .setAvailableProviders(providers)\n .build(),\n mAccountsFragment.RC_SIGN_IN);\n }", "private static Component createIconComponent()\n {\n JPanel wrapIconPanel = new TransparentPanel(new BorderLayout());\n\n JLabel iconLabel = new JLabel();\n\n iconLabel.setIcon(DesktopUtilActivator.getResources()\n .getImage(\"service.gui.icons.AUTHORIZATION_ICON\"));\n\n wrapIconPanel.add(iconLabel, BorderLayout.NORTH);\n\n return wrapIconPanel;\n }", "@Source(\"create.gif\")\n\tpublic ImageResource createIcon();", "@Source(\"create.gif\")\n\tpublic DataResource createIconResource();", "private void createXONImageMakerIconPane() throws Exception {\r\n\t\tif (m_XONImageMakerIconPanel != null)\r\n\t\t\treturn;\r\n\t\tImageUtils iu = new ImageUtils();\r\n\t\tm_XONImageMakerIconPanel = new JPanel() {\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tRectangle visibleRect = this.getVisibleRect();\r\n\t\t\t\tDimension panelSize = new Dimension(\r\n\t\t\t\t\t\t(int) visibleRect.getWidth(),\r\n\t\t\t\t\t\t(int) visibleRect.getHeight());\r\n\t\t\t\t// RGPTLogger.logToConsole(\"Panel Size: \"+panelSize);\r\n\t\t\t\tg.drawImage(XON_IMAGE_MAKER_ICON, 0, 0, panelSize.width,\r\n\t\t\t\t\t\tpanelSize.height, this);\r\n\t\t\t}\r\n\t\t};\r\n\t}", "AsyncImageView getIconView();", "public void registerIcons(IIconRegister iconRegister) {\n/* 51 */ this.itemIcon = iconRegister.registerIcon(\"forgottenrelics:Soul_Tome\");\n/* */ }", "AccountBarView(Account a, AccountHolder aH) {\n\t\tthis.a = a;\n\t\tthis.aH = aH;\n\t\t\n\t\taccountType = a.getClass().getSimpleName();\n\t\tacctId = EventManager.getUniqueID(a);\n\t\t\n\t\tfirstRun = true;\n\t}", "public void setupIcons() {\n try {\n tabLayout.getTabAt(0).setCustomView(getTabView(R.string.ic_user_black_bg, 0));\n tabLayout.getTabAt(1).setCustomView(getTabView(R.string.ic_hot_or_burn, 1));\n tabLayout.getTabAt(2).setCustomView(getTabView(R.string.ic_chat_1, 0));\n\n viewPager.addOnPageChangeListener(this);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }", "public AccountSummaryView(Context context, Account account) {\r\n\t\tsuper(context);\r\n\t\tthis.account = account;\r\n\t\tLayoutParams lp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\tsetLayoutParams(lp);\r\n\t\tsetBackgroundDrawable(context.getResources().getDrawable(R.drawable.list_item_background_states));\r\n\r\n\t\taddView(createIcon());\r\n\r\n\t\taddView(createAccountLayout());\r\n\r\n\t\taddView(createBalance());\r\n\t\taddView(createCurrency());\r\n\t}", "@Nullable\n @Override\n public Icon getIcon(boolean unused) {\n RowIcon rowIcon = new RowIcon(2);\n\n rowIcon.setIcon(ElixirIcons.MODULE, 0);\n rowIcon.setIcon(PlatformIcons.ANONYMOUS_CLASS_ICON, 1);\n\n return rowIcon;\n }", "public interface AccountView extends BelatrixConnectView {\n\n void goSubCategoryDetail(Integer categoryId, Integer employeeId);\n void showScore(String score);\n void showLocation(String locationIcon);\n void showLevel(String level);\n void showSkypeId(String skypeID);\n void showEmployeeName(String employeName);\n void showEmail(String role);\n void showProfilePicture(String profilePicture);\n void showRecommendMenu(boolean show);\n void showEditProfileButton(boolean show);\n void goToEditProfile(Employee employee);\n void goToGiveStar(Employee employee);\n void goToExpandPhoto(String url);\n void notifyNavigationRefresh();\n void showInformativeDialog(String information);\n void goBackToLogin();\n void goToEditSkills();\n void showEditSkillsButton(boolean show);\n void onEmployeeLoaded(int employeeId);\n}", "public abstract String typeIcon();", "Icon getIcon();", "@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}", "private View createAccountLayout() {\r\n\t\tLinearLayout accountLayout = new LinearLayout(getContext());\r\n\t\tLayoutParams aclp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT, 3);\r\n\t\taccountLayout.setOrientation(VERTICAL);\r\n\t\taccountLayout.setLayoutParams(aclp);\r\n\t\tTextView t = new TextView(getContext());\r\n\t\tLayoutParams tlp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\r\n\t\tt.setLayoutParams(tlp);\r\n\t\tt.setText(account.getName());\r\n\t\tt.setTextSize(16);\r\n\t\tt.setTypeface(Typeface.DEFAULT_BOLD);\r\n\t\tt.setTextColor(getContext().getResources().getColor(R.color.black));\r\n\t\taccountLayout.addView(t);\r\n\r\n\t\tTextView desc = new TextView(getContext());\r\n\t\tif (account.getLastOperation() != null) {\r\n\t\t\tdesc.setText(\"\" + DateUtil.defaultDateFormat.format(account.getLastOperation()));\r\n\t\t}\r\n\t\taccountLayout.addView(desc);\r\n\t\treturn accountLayout;\r\n\t}", "@FXML\n public void makeIcons() {\n openStage(Fxmls.MyBoxIconsFxml);\n }", "@Override\r\n\t\tpublic void requestIcon(String arg0) {\n\t\t\t\r\n\t\t}", "public RevealIcon() {\n this.width = getOrigWidth();\n this.height = getOrigHeight();\n\t}", "public Icon getIcon();", "public void clickIconViewButton() {\n\t\tfilePicker.stickyButton(locIconBtn);\n\t}", "private void showIconDialog(IconInfo iconInfo) {\n Drawable iconD = iconInfo.getDrawable();\n String iconType = iconD.getClass().getSimpleName();\n\n LayoutInflater inflater = m_context.getLayoutInflater();\n final View dialogLayout = inflater.inflate(R.layout.icon_dlg, null);\n\n View shareBtn = dialogLayout.findViewById(R.id.icon_dlg_share);\n shareBtn.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n Utils.shareScreen(dialogLayout, \"iconDetail\", null);\n }\n });\n\n final TextView imageName = Ui.viewById(dialogLayout, R.id.icon_dlg_name);\n final TextView imageSize = Ui.viewById(dialogLayout, R.id.icon_dlg_size);\n final TextView imageType = Ui.viewById(dialogLayout, R.id.icon_dlg_type);\n final TextView imageExtra = Ui.viewById(dialogLayout, R.id.icon_dlg_extra);\n\n imageName.setText(iconInfo.fieldStr());\n imageSize.setText(String.format(\"Size: %d x %d\",\n iconD.getIntrinsicWidth(), iconD.getIntrinsicHeight()));\n imageType.setText(iconType);\n\n final ImageView imageView = Ui.viewById(dialogLayout, R.id.icon_dlg_image);\n // imageView.setImageDrawable(iconD);\n boolean hasStates = iconD.isStateful();\n\n final View stateTitle = dialogLayout.findViewById(R.id.icon_dlg_state_title);\n stateTitle.setVisibility(hasStates ? View.VISIBLE : View.GONE);\n\n final TableRow row1 = Ui.viewById(dialogLayout, R.id.icon_dlg_state_row1);\n row1.removeAllViews();\n\n final TableRow row2 = Ui.viewById(dialogLayout, R.id.icon_dlg_state_row2);\n row2.removeAllViews();\n\n boolean showRows = false;\n String extraInfo = \"\";\n\n if (hasStates) {\n extraInfo = \"StateFul\";\n showRows = true;\n\n StateListDrawable stateListDrawable = (StateListDrawable) iconD;\n Set<Drawable> stateIcons = new HashSet<>();\n showStateIcon(imageView, row1, row2, stateListDrawable, android.R.attr.state_enabled, \"Enabled\", stateIcons);\n showStateIcon(imageView, row1, row2, stateListDrawable, android.R.attr.state_pressed, \"Pressed\", stateIcons);\n showStateIcon(imageView, row1, row2, stateListDrawable, android.R.attr.state_checked, \"Checked\", stateIcons);\n showStateIcon(imageView, row1, row2, stateListDrawable, android.R.attr.state_selected, \"Selected\", stateIcons);\n }\n\n if (iconD instanceof LayerDrawable) {\n showRows = true;\n LayerDrawable layerDrawable = (LayerDrawable) iconD;\n int layerCnt = layerDrawable.getNumberOfLayers();\n extraInfo = String.format(Locale.getDefault(), \"Layers:%d\", layerCnt);\n for (int layerIdx = 0; layerIdx < Math.min(layerCnt, 3); layerIdx++) {\n showLayerIcon(imageView, row1, row2, layerDrawable.getDrawable(layerIdx), layerIdx);\n }\n } else if (iconD instanceof AnimationDrawable) {\n final AnimationDrawable animationDrawable = (AnimationDrawable) iconD;\n extraInfo = String.format(Locale.getDefault(), \"Frames:%d\", animationDrawable.getNumberOfFrames());\n showRows = true;\n showAnimationBtns(imageView, animationDrawable, row1, row2);\n\n // Can't control animation at this time, drawable not rendered yet.\n // animationDrawable.stop();\n }\n\n row1.setVisibility(showRows ? View.VISIBLE : View.GONE);\n row2.setVisibility(showRows ? View.VISIBLE : View.GONE);\n\n imageExtra.setText(extraInfo);\n imageView.setImageDrawable(iconD);\n\n dialogLayout.findViewById(R.id.icon_dlg_whiteBtn).setOnClickListener(new View.OnClickListener() {\n @SuppressWarnings(\"deprecation\")\n @Override\n public void onClick(View v) {\n imageView.setBackgroundDrawable(v.getBackground());\n }\n });\n\n dialogLayout.findViewById(R.id.icon_dlg_grayBtn).setOnClickListener(new View.OnClickListener() {\n @SuppressWarnings(\"deprecation\")\n @Override\n public void onClick(View v) {\n imageView.setBackgroundDrawable(v.getBackground());\n }\n });\n\n dialogLayout.findViewById(R.id.icon_dlg_blackBtn).setOnClickListener(new View.OnClickListener() {\n @SuppressWarnings(\"deprecation\")\n @Override\n public void onClick(View v) {\n imageView.setBackgroundDrawable(v.getBackground());\n }\n });\n\n dialogLayout.findViewById(R.id.icon_dlg_squaresBtn).setOnClickListener(new View.OnClickListener() {\n @SuppressWarnings(\"deprecation\")\n @Override\n public void onClick(View v) {\n imageView.setBackgroundDrawable(v.getBackground());\n }\n });\n\n AlertDialog.Builder builder = new AlertDialog.Builder(m_context);\n builder.setView(dialogLayout);\n\n builder.setMessage(\"Icon\")\n .setCancelable(false)\n .setPositiveButton(\"Close\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // if this button is clicked, close\n dialog.cancel();\n }\n });\n\n builder.show();\n }", "public String viewAccount() {\n ConversationContext<Account> ctx = AccountController.newEditContext(getPart().getAccount());\n ctx.setLabelWithKey(\"part_account\");\n getCurrentConversation().setNextContextSubReadOnly(ctx);\n return ctx.view();\n }", "public interface WalletBalanceView extends BaseView {\n void renderAccountInfo(NewAccountInfo info);\n}", "private static IconResource initIconResource() {\n\t\tIconResource iconResource = new IconResource(Configuration.SUPERVISOR_LOGGER);\n\t\t\n\t\ticonResource.addResource(IconTypeAWMS.HOME.name(), iconPath + \"home.png\");\n\t\ticonResource.addResource(IconTypeAWMS.INPUT_ORDER.name(), iconPath + \"input-order.png\");\n\t\ticonResource.addResource(IconTypeAWMS.OUTPUT_ORDER.name(), iconPath + \"output-order.png\");\n\t\ticonResource.addResource(IconTypeAWMS.PLUS.name(), iconPath + \"plus.png\");\n\t\ticonResource.addResource(IconTypeAWMS.MINUS.name(), iconPath + \"minus.png\");\n\t\ticonResource.addResource(IconTypeAWMS.EDIT.name(), iconPath + \"edit.png\");\n\t\ticonResource.addResource(IconTypeAWMS.CONFIRM.name(), iconPath + \"confirm.png\");\n\t\ticonResource.addResource(IconTypeAWMS.CANCEL.name(), iconPath + \"cancel.png\");\n\t\ticonResource.addResource(IconTypeAWMS.USER.name(), iconPath + \"user.png\");\n\t\t\n\t\treturn iconResource;\n\t}", "public void lightIcons() {\n teamPhoto.setImage((new Image(\"/Resources/Images/emptyTeamLogo.png\")));\n copyIcon.setImage((new Image(\"/Resources/Images/black/copy_black.png\")));\n helpPaneIcon.setImage((new Image(\"/Resources/Images/black/help_black.png\")));\n if (user.getUser().getProfilePhoto() == null) {\n accountPhoto.setImage((new Image(\"/Resources/Images/black/big_profile_black.png\")));\n }\n }", "public AddNewPerson() {\r\n super();\r\n initComponents();\r\n Image icon = getToolkit().getImage(getClass().getResource(\"/images/app_icon_32.png\"));\r\n setIconImage(icon);\r\n setLocation(250, 100);\r\n setVisible(true);\r\n }", "private BitmapDescriptor getMarkerIconFromDrawableForAdministration() {\r\n Drawable drawable = getResources().getDrawable(R.drawable.ic_administration);\r\n Canvas canvas = new Canvas();\r\n Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);\r\n canvas.setBitmap(bitmap);\r\n drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());\r\n drawable.draw(canvas);\r\n return BitmapDescriptorFactory.fromBitmap(bitmap);\r\n }", "private Label createIcon(String name) {\n Label label = new Label();\n Image labelImg = new Image(getClass().getResourceAsStream(name));\n ImageView labelIcon = new ImageView(labelImg);\n label.setGraphic(labelIcon);\n return label;\n }", "public SignupAccountInfoAvatar() {\n super(\"SignupAvatar.AccountInfo\", BrowserConstants.DIALOGUE_BACKGROUND);\n this.profileConstraints = ProfileConstraints.getInstance();\n this.securityQuestionModel = new DefaultComboBoxModel();\n this.usernameReservations = new HashMap<String, UsernameReservation>();\n this.emailReservations = new HashMap<EMail, EMailReservation>();\n initSecurityQuestionModel();\n initComponents();\n addValidationListeners();\n initFocusListener();\n }", "public org.netbeans.modules.j2ee.dd.api.common.Icon getIcon(){return null;}", "public int getIcon()\n\t{\n\t\treturn getClass().getAnnotation(AccuAction.class).icon();\n\t}", "public UserAccountViewPanel() {\n initComponents();\n }", "public PrincipalDigitador() {\n initComponents();\n setIcon();\n }", "String getIcon();", "String getIcon();", "protected HStaticIcon createHStaticIcon()\n {\n return new HStaticIcon();\n }", "public AccountTypeInfomation() {\n initComponents(); \n rbtnSelectAll.setSelected(false);\n btnCreate.setVisible(true);\n btnEdit.setVisible(false);\n btnRemove.setVisible(false);\n loadDefault();\n }", "public void\r DisplayIcon(CType display_context, int x, int y, int icon_number);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n fragmentAccountBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account, container, false);\n\n appPreference = AppPreference.getInstance(getContext());\n signInToken = appPreference.getString(SIGNIN_TOKEN);\n\n // if user is login\n if (signInToken.isEmpty()) {\n\n fragmentAccountBinding.tvLoginLogout.setText(\"Login\");\n fragmentAccountBinding.tvUserName.setText(\"Login / Create account\");\n\n intent = new Intent(getContext(), RegistrationActivity.class);\n\n Glide.with(AppConstants.mContext)\n .load(R.drawable.placeholder_products)\n .into(fragmentAccountBinding.ivDisplayPicture);\n\n } else {\n\n userName = appPreference.getString(USER_NAME);\n userAvatar = appPreference.getString(USER_AVATAR);\n\n intent = new Intent(getContext(), OrderListingActivity.class);\n\n fragmentAccountBinding.tvUserName.setText(userName);\n String avatarImagePath = USER_STORAGE_BASE_URL.concat(userAvatar);\n\n fragmentAccountBinding.tvLoginLogout.setText(\"Logout\");\n\n Glide.with(AppConstants.mContext)\n .load(avatarImagePath)\n .placeholder(R.drawable.placeholder_products)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n .skipMemoryCache(true)\n .into(fragmentAccountBinding.ivDisplayPicture);\n }\n\n initListeners();\n\n return fragmentAccountBinding.getRoot();\n }", "public String getAccountImage() {\n return accountImage;\n }", "private void initIcons() {\n \n \n addIcon(lblFondoRest, \"src/main/java/resource/fondo.png\");\n addIcon(lblCheckRest, \"src/main/java/resource/check.png\");\n \n }", "public vtnAdminMenuUsuariosA() {\n initComponents();\n Image icono = Toolkit.getDefaultToolkit().getImage(\"src/design/softipet.png\");\n this.setIconImage(icono);\n }", "private void setupTurnIconCharacteristic() {\n turnIconCharacteristic =\n new BluetoothGattCharacteristic(CHARACT_TURNICON_UUID,\n BluetoothGattCharacteristic.PROPERTY_READ | BluetoothGattCharacteristic.PROPERTY_WRITE | BluetoothGattCharacteristic.PROPERTY_NOTIFY,\n BluetoothGattCharacteristic.PERMISSION_READ | BluetoothGattCharacteristic.PERMISSION_WRITE);\n\n turnIconCharacteristic.addDescriptor(\n Peripheral.getClientCharacteristicConfigurationDescriptor());\n\n turnIconCharacteristic.addDescriptor(\n Peripheral.getCharacteristicUserDescriptionDescriptor(CHARACT_TURNICON_DESC));\n\n turnIconCharacteristic.setValue(turnIconCharacteristic_value);\n }", "@Override\n\tprotected String iconResourceName() {\n\t\treturn \"nkv550.png\";\n\t}", "B itemIconGenerator(ItemIconGenerator<ITEM> itemIconGenerator);", "public String getTextAccountNameIcon()\n\t{\n\t\treturn elementUtils.getElementText(wbAccountNameIcon); //return wbAccountNameIcon.getText()\n\t}", "public Icon icon() {\n\t\treturn new ImageIcon(image());\n\t}", "@Source(\"images/Default_user_icon.png\")\n @ImageOptions(flipRtl = true)\n ImageResource defaultUserAvatar();", "public static RadianceIcon of(int width, int height) {\n ext_accdt base = new ext_accdt();\n base.width = width;\n base.height = height;\n return base;\n }", "public void createAccount(View view) {\n Intent intent = new Intent(this, UserAccountCreateActivity.class);\n startActivity(intent);\n }", "public void darkIcons() {\n teamPhoto.setImage((new Image(\"/Resources/Images/emptyTeamLogo.png\")));\n copyIcon.setImage((new Image(\"/Resources/Images/white/copy_white.png\")));\n helpPaneIcon.setImage((new Image(\"/Resources/Images/white/help_white.png\")));\n if (user.getUser().getProfilePhoto() == null) {\n accountPhoto.setImage((new Image(\"/Resources/Images/white/big_profile_white.png\")));\n }\n }", "public abstract String getIconPath();", "public SeeAnAccount() {\n initComponents();\n }", "public WelcomeITIAdmin() {\n initComponents();\n new UIEnhancements().setIcon(\"tablaIconFull.png\", this);\n \n }", "public View getGraphic()\n{\n // Get image for file\n //Image img = _type==FileType.PACKAGE_DIR? Package : ViewUtils.getFileIconImage(_file);\n Image img = ViewUtils.getFileIconImage(_file);\n View grf = new ImageView(img); grf.setPrefSize(18,18);\n \n // If error/warning add Error/Warning badge as composite icon\n /*BuildIssue.Kind status = _proj!=null? _proj.getRootProject().getBuildIssues().getBuildStatus(_file) : null;\n if(status!=null) {\n Image badge = status==BuildIssue.Kind.Error? ErrorBadge : WarningBadge;\n ImageView bview = new ImageView(badge); bview.setLean(Pos.BOTTOM_LEFT);\n StackView spane = new StackView(); spane.setChildren(grf, bview); grf = spane;\n }*/\n \n // Return node\n return grf;\n}", "public String getIcon() {\n\t\treturn \"icon\";\n\t}", "public HomeAddettoUI(Account a) {\n\t\tsuper(a);\n\n\t\tJButton btn_events = new JButton(\"Registra evento\");\n\t\tbtn_events.setBounds(10, 275, 205, 21);\n\t\tbtn_events.setActionCommand(\"event\");\n\t\tbtn_events.addActionListener(this);\n\t\tgetContentPane().add(btn_events);\n\n\t\tJButton btn_prenotations = new JButton(\"Registra prenotazione\");\n\t\tbtn_prenotations.setBounds(10, 300, 205, 21);\n\t\tbtn_prenotations.setActionCommand(\"pren\");\n\t\tbtn_prenotations.addActionListener(this);\n\t\tgetContentPane().add(btn_prenotations);\n\n\t\tJButton btn_amount = new JButton(\"Registra pagamento\");\n\t\tbtn_amount.setBounds(10, 325, 205, 21);\n\t\tbtn_amount.setActionCommand(\"amount\");\n\t\tbtn_amount.addActionListener(this);\n\t\tgetContentPane().add(btn_amount);\n\t\t\n\t\tJButton btn_restaurant = new JButton(\"Registra conto ristorante\");\n\t\tbtn_restaurant.setBounds(10, 350, 205, 21);\n\t\tbtn_restaurant.setActionCommand(\"risto\");\n\t\tbtn_restaurant.addActionListener(this);\n\t\tgetContentPane().add(btn_restaurant);\n\t}", "private void init() {\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint iIcon = user.getIcon();\n\t\tlblUserListIcon = new JLabel();\n\t\tImageIcon userListIcon = null;\n\t\tif(iIcon == 1) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0101.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 2) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0202.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 3) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0303.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 4) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0404.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 5) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0505.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 6) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0606.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 7) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0707.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 8) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0808.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 9) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/0909.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 10) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/1010.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}else if(iIcon == 11) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/1111.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}\n\t\tif(user.isRoomMaster()) {\n\t\t\tuserListIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(\"img/crown.png\")\n\t\t\t\t\t.getScaledInstance(22, 22, Image.SCALE_SMOOTH));\n\t\t}\n\t\tlblUserListIcon.setIcon(userListIcon);\n\t\tlblUserListName = new JLabel(user.getNick(), JLabel.LEFT);\n\t\tlblUserListName.setFont(new Font(Font.DIALOG, Font.PLAIN, 15));\n\t\t\n\t\tpMenu = new JPopupMenu();\n\t lederPass = new JMenuItem(\"방장권한위임\");\n\t \n\t pMenu.add(lederPass);\n\t}", "public Icon getTabIcon();", "public String getUserIcon() {\n return userIcon;\n }", "public\n RegisterView()\n {\n super(ViewKeys.REGISTER);\n\n setAccount(null);\n setAccountChooser(new ElementComboBoxChooser(getAccounts()));\n setFilter(new TransactionFilter());\n setPanel(new Panel());\n setSearchWidget(new SearchWidget(createPopupMenu()));\n\n // Build panel.\n setFill(GridBagConstraints.BOTH);\n add(createToolsPanel(), 0, 0, 1, 1, 0, 0);\n add(getPanel(), 0, 1, 1, 1, 100, 100);\n\n getAccountChooser().setAllowInactiveAccounts(false);\n\n // Add listeners.\n getAccountChooser().addActionListener(new ActionHandler());\n getSearchWidget().addActionListener(new ActionHandler());\n }", "private void updateIcon(MarketIndex index) throws IOException {\n\n if(index.getImage()==null){\n String url = \"https://etoro-cdn.etorostatic.com/market-avatars/\"+index.getSymbol().toLowerCase()+\"/150x150.png\";\n byte[] bytes = utils.getBytesFromUrl(url);\n if(bytes!=null){\n if(bytes.length>0){\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }else{ // Icon not found on etoro, symbol not managed on eToro or icon has a different name? Use standard icon.\n Image img = utils.getDefaultIndexIcon();\n bytes = utils.imageToByteArray(img);\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }\n\n }", "public BioDataMetaData(String userId) {\n \n \n \n initComponents();\n this.userId=userId;\n \n Image img = new ImageIcon(System.getProperty(\"user.dir\")+\"/\"+\"ICON_LOGO.jpg\").getImage();\n this.setIconImage(img);\n this.setTitle(\"ADD NEW ITEM\"); \n// initComponents();\n }", "public void setUpFavouriteIcon() {\n if (isUserOwner()) {\n view.hideFavouriteIcon();\n } else if (currentAdvertIsFavourite()) {\n view.setIsAFavouriteIcon();\n } else {\n view.setIsNotAFavouriteIcon();\n }\n }", "public abstract Drawable getIcon();", "@Override\n\tpublic void setIcon(Drawable icon) {\n\t\t\n\t}", "private DuakIcons()\r\n {\r\n }", "public frmPrincipal() {\n initComponents();\n this.setLocationRelativeTo(null);\n \n Image imgIconoApp = new ImageIcon(\"src/vistas/icon.png\").getImage();\n setIconImage(imgIconoApp);\n }", "public AccountInfo() {\n initComponents();\n }", "public void iconSetup(){\r\n chessboard.addRedIcon(\"Assets/PlusR.png\");\r\n chessboard.addRedIcon(\"Assets/TriangleR.png\");\r\n chessboard.addRedIcon(\"Assets/ChevronR.png\");\r\n chessboard.addRedIcon(\"Assets/SunR.png\"); \r\n chessboard.addRedIcon(\"Assets/ArrowR.png\");\r\n \r\n chessboard.addBlueIcon(\"Assets/PlusB.png\");\r\n chessboard.addBlueIcon(\"Assets/TriangleB.png\");\r\n chessboard.addBlueIcon(\"Assets/ChevronB.png\");\r\n chessboard.addBlueIcon(\"Assets/SunB.png\");\r\n chessboard.addBlueIcon(\"Assets/ArrowB.png\");\r\n }", "private void createIcons() {\n wRook = new ImageIcon(\"./src/Project3/wRook.png\");\r\n wBishop = new ImageIcon(\"./src/Project3/wBishop.png\");\r\n wQueen = new ImageIcon(\"./src/Project3/wQueen.png\");\r\n wKing = new ImageIcon(\"./src/Project3/wKing.png\");\r\n wPawn = new ImageIcon(\"./src/Project3/wPawn.png\");\r\n wKnight = new ImageIcon(\"./src/Project3/wKnight.png\");\r\n\r\n bRook = new ImageIcon(\"./src/Project3/bRook.png\");\r\n bBishop = new ImageIcon(\"./src/Project3/bBishop.png\");\r\n bQueen = new ImageIcon(\"./src/Project3/bQueen.png\");\r\n bKing = new ImageIcon(\"./src/Project3/bKing.png\");\r\n bPawn = new ImageIcon(\"./src/Project3/bPawn.png\");\r\n bKnight = new ImageIcon(\"./src/Project3/bKnight.png\");\r\n }", "public Icon getIcon(Object object);", "public void setIcon(Image i) {icon = i;}", "B itemIcon(ITEM item, Resource icon);", "public IconRenderer() \n\t{\n\t\t\n\t}", "Icon getIcon(URI activityType);", "java.lang.String getIcon();", "java.lang.String getIcon();", "public MatteIcon() {\r\n this(32, 32, null);\r\n }", "private void setIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconabc.png\")));\n }", "@Override\n\tpublic void setIcon(int resId) {\n\t\t\n\t}", "public interface IconFactory {\n\n\t/**\n\t * Get the icon for an item.\n\t *\n\t * @param object\n\t * Can be any class, but the implementation may place restrictions on valid types.\n\t */\n\tpublic Icon getIcon(Object object);\n}", "public AccountListView() {\r\n initComponents();\r\n \r\n }", "public UpdateAccountInfoUI() {\n initComponents();\n userNameLabel.setText(Authentication.online_user.getUserName());\n usernamePlaceholder.setText(Authentication.online_user.getUserName());\n emailPlaceholder.setText(Authentication.online_user.getEmail());\n passwordPLaceholder.setText(Authentication.online_user.getPassword());\n \n }", "@SuppressLint(\"NewApi\")\n\tvoid changeIcon()\n\t{\n\n\t\tif (CropImage.isExplicitCameraPermissionRequired(this)) {\n\t\t\trequestPermissions(new String[]{Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE}, CropImage.CAMERA_CAPTURE_PERMISSIONS_REQUEST_CODE);\n\t\t} else {\n\t\t\tCropImage.startPickImageActivity(this);\n\t\t}\n\n\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn \"viewAccount.do\";\n\t}", "private JButton getIcoButton() {\r\n\t\tif (icoButton == null) {\r\n\t\t\ticoButton = new JButton();\r\n\t\t\ticoButton.setIcon(new ImageIcon(getClass().getResource(\"/img/icon/tileimg.png\")));\r\n\t\t\ticoButton.setPreferredSize(new Dimension(23, 23));\r\n\t\t\ticoButton.setLocation(new Point(72, 1));\r\n\t\t\ticoButton.setSize(new Dimension(23, 23));\r\n\t\t\ticoButton.setToolTipText(\"图片编辑\");\r\n\t\t\ticoButton.setActionCommand(\"icoButton\");\r\n\t\t\tbuttonAction = new ButtonAction(this);\r\n\t\t\ticoButton.addActionListener(buttonAction);\r\n\t\t}\r\n\t\treturn icoButton;\r\n\t}", "void setIcon(Dialog dialog);", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "IconUris iconUris();", "@Override\n public void mudarIcone(String enderecoImg, int botao) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private void createImageView() {\n /**\n * We use @{@link AdjustableImageView} so that we can have behaviour like setAdjustViewBounds(true)\n * for Android below API 18\n */\n viewsToBeInflated.add(new AdjustableImageView(getActivityContext()));\n }", "public abstract String getIcon(int current_turn);", "public PanelAccountInfo() {\n initComponents();\n setTextFields();\n setLabels();\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"podologia32x32.png\")));\n }", "@Override\n protected void onBeforeClusterItemRendered(Person person, MarkerOptions markerOptions) {\n mImageView.setImageResource(person.profilePhoto);\n Bitmap icon = mIconGenerator.makeIcon();\n //write your info code here\n markerOptions.icon(BitmapDescriptorFactory.fromBitmap(icon)).title(person.name);\n }", "public void clickIconSignin()\n\t{\n \telementUtils.performElementClick(wbIconSignin); //wbIconSignin.click();\n\t}", "public ContactInfo() {\r\n\t\t\tsetLayout(new FlowLayout(FlowLayout.LEFT));\r\n\t\t\tImageIcon icon = createImageIcon(\"icon1.jpg\", \"Icon\");\r\n\t\t\tJLabel iconLabel = new JLabel(icon);\r\n\t\t\ticonLabel.setPreferredSize(new Dimension(50, 50));\r\n\t\t\ticonLabel.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t\t\tadd(iconLabel);\r\n\t\t\tadd(new TextField());\r\n\t\t}" ]
[ "0.6520566", "0.6072668", "0.60408294", "0.58021003", "0.57055527", "0.55735886", "0.5548777", "0.5548118", "0.54293346", "0.53151906", "0.53093994", "0.53015584", "0.52937776", "0.52785444", "0.527825", "0.52574015", "0.52567416", "0.5232056", "0.5224171", "0.5206533", "0.5203121", "0.51977605", "0.51966864", "0.5191873", "0.51911646", "0.51793027", "0.51657283", "0.5162298", "0.51592255", "0.5154232", "0.51525205", "0.515081", "0.5139897", "0.5125134", "0.5122753", "0.51210827", "0.51210827", "0.5110086", "0.5097859", "0.5097612", "0.5083093", "0.5076663", "0.50747436", "0.50625455", "0.5061495", "0.50539154", "0.5053239", "0.50443023", "0.50309527", "0.5013621", "0.50062597", "0.49985698", "0.49904385", "0.4989388", "0.4987341", "0.49856728", "0.49672216", "0.4962519", "0.49371487", "0.49325308", "0.4932219", "0.4921049", "0.49204046", "0.49108893", "0.49049413", "0.48995134", "0.48922408", "0.48866603", "0.48773065", "0.48714182", "0.48699203", "0.4869615", "0.48665896", "0.48658788", "0.48567396", "0.48549134", "0.48537552", "0.48525533", "0.4850919", "0.4850919", "0.48479557", "0.48455715", "0.48355806", "0.48333025", "0.48329392", "0.4830375", "0.48238808", "0.48225254", "0.48219872", "0.48176736", "0.48152015", "0.48141247", "0.48133588", "0.48114464", "0.4805581", "0.47966298", "0.479365", "0.47932142", "0.4793021", "0.47864333" ]
0.76567745
0
Create the account layout view
private View createAccountLayout() { LinearLayout accountLayout = new LinearLayout(getContext()); LayoutParams aclp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT, 3); accountLayout.setOrientation(VERTICAL); accountLayout.setLayoutParams(aclp); TextView t = new TextView(getContext()); LayoutParams tlp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT); t.setLayoutParams(tlp); t.setText(account.getName()); t.setTextSize(16); t.setTypeface(Typeface.DEFAULT_BOLD); t.setTextColor(getContext().getResources().getColor(R.color.black)); accountLayout.addView(t); TextView desc = new TextView(getContext()); if (account.getLastOperation() != null) { desc.setText("" + DateUtil.defaultDateFormat.format(account.getLastOperation())); } accountLayout.addView(desc); return accountLayout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AccountSummaryView(Context context, Account account) {\r\n\t\tsuper(context);\r\n\t\tthis.account = account;\r\n\t\tLayoutParams lp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\tsetLayoutParams(lp);\r\n\t\tsetBackgroundDrawable(context.getResources().getDrawable(R.drawable.list_item_background_states));\r\n\r\n\t\taddView(createIcon());\r\n\r\n\t\taddView(createAccountLayout());\r\n\r\n\t\taddView(createBalance());\r\n\t\taddView(createCurrency());\r\n\t}", "public UserAccountViewPanel() {\n initComponents();\n }", "protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}", "private void setLayoutElements() {\n // AuthenticatedUser is async thread.\n // It is getting the details for the\n // authenticated user and use them\n // to set UI elements below.\n AuthenticatedUser getAccount = new AuthenticatedUser(\n this, profilePictureProgressBar, profilePicture, firstName, lastName, email\n );\n\n // Starting the thread.\n getAccount.execute();\n }", "@Override\n public View onCreateView(LayoutInflater inflater,\n ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_single_account_mode, container, false);\n initializeUI(view);\n\n // Creates a PublicClientApplication object with res/raw/auth_config_single_account.json\n PublicClientApplication.createSingleAccountPublicClientApplication(getContext(),\n R.raw.auth_config_single_account,\n new IPublicClientApplication.ISingleAccountApplicationCreatedListener() {\n @Override\n public void onCreated(ISingleAccountPublicClientApplication application) {\n /**\n * This test app assumes that the app is only going to support one account.\n * This requires \"account_mode\" : \"SINGLE\" in the config json file.\n **/\n mSingleAccountApp = application;\n loadAccount();\n }\n\n @Override\n public void onError(MsalException exception) {\n displayError(exception);\n }\n });\n\n return view;\n }", "private void setLayout() {\n\t\ttxtNickname.setId(\"txtNickname\");\n\t\ttxtPort.setId(\"txtPort\");\n\t\ttxtAdress.setId(\"txtAdress\");\n\t\tlblNickTaken.setId(\"lblNickTaken\");\n\n\t\tgrid.setPrefSize(516, 200);\n\t\tbtnLogin.setDisable(true);\n\t\ttxtNickname.setPrefSize(200, 25);\n\t\tlblNickTaken.setPrefSize(250, 10);\n\t\tlblNickTaken.setText(null);\n\t\tlblNickTaken.setTextFill(Color.RED);\n\t\tlblNick.setPrefSize(120, 50);\n\t\ttxtAdress.setText(\"localhost\");\n\t\ttxtPort.setText(\"4455\");\n\t\tlblCardDesign.setPrefSize(175, 25);\n\t\tcomboBoxCardDesign.getSelectionModel().select(0);\n\t\tbtnLogin.setGraphic(imvStart);\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_account, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_account, container, false);\n return view;\n }", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_account, container, false);\n }", "public interface AccountView extends BelatrixConnectView {\n\n void goSubCategoryDetail(Integer categoryId, Integer employeeId);\n void showScore(String score);\n void showLocation(String locationIcon);\n void showLevel(String level);\n void showSkypeId(String skypeID);\n void showEmployeeName(String employeName);\n void showEmail(String role);\n void showProfilePicture(String profilePicture);\n void showRecommendMenu(boolean show);\n void showEditProfileButton(boolean show);\n void goToEditProfile(Employee employee);\n void goToGiveStar(Employee employee);\n void goToExpandPhoto(String url);\n void notifyNavigationRefresh();\n void showInformativeDialog(String information);\n void goBackToLogin();\n void goToEditSkills();\n void showEditSkillsButton(boolean show);\n void onEmployeeLoaded(int employeeId);\n}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_my_account, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootview =inflater.inflate(R.layout.fragment_my_account, container, false);\n personImg = (ImageView)rootview. findViewById(R.id.person_img);\n persontxt = (TextView) rootview.findViewById(R.id.personName);\n personNum = (TextView) rootview.findViewById(R.id.telephoneNum);\n personEmail = (TextView) rootview.findViewById(R.id.emailtxt);\n accountEdit = (Button) rootview.findViewById(R.id.accountedit);\n changeLang = (Button) rootview.findViewById(R.id.changelang);\n signout = (Button) rootview.findViewById(R.id.signout);\n getData();\n\n return rootview;\n }", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_add_account, container, false);\n initView(inflate);\n return inflate;\n }", "public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}", "public void populateView() {\r\n populateHead();\r\n ArrayList arrayList = new ArrayList();\r\n arrayList.add(new AccDetailItem(\"Loan Amount\", this.account.totLoanAmt, MiscUtils.getColor(getResources(), this.account.totLoanAmt)));\r\n arrayList.add(new AccDetailItem(\"Interest Rate\", this.account.interestRate));\r\n arrayList.add(new AccDetailItem(\"Repayment Amount\", this.account.repaymentAmt, MiscUtils.getColor(getResources(), this.account.repaymentAmt)));\r\n arrayList.add(new AccDetailItem(\"Start Date\", this.account.startDt));\r\n arrayList.add(new AccDetailItem(\"End Date\", this.account.endDt));\r\n arrayList.add(new AccDetailItem(\"Status\", this.account.loanStatus));\r\n ArrayList arrayList2 = new ArrayList();\r\n arrayList2.add(new AccDetailItem(\"Outstanding Amount\", this.account.formattedOutstandingAmount, ContextCompat.getColor(getContext(), R.color.primary_red)));\r\n arrayList2.add(new AccDetailItem(\"Overdue Amount\", String.valueOf(this.account.overdueAmount), MiscUtils.getColor(getResources(), (double) this.account.overdueAmount)));\r\n arrayList2.add(new AccDetailItem(\"No. of Repayments Overdue\", this.account.overdueCount));\r\n this.list.setAdapter(new AccountDetailItemAdapter(getActivity(), arrayList));\r\n this.list2.setAdapter(new AccountDetailItemAdapter(getActivity(), arrayList2));\r\n MiscUtils.setListViewHeightBasedOnChildren(this.list);\r\n MiscUtils.setListViewHeightBasedOnChildren(this.list2);\r\n }", "Board createLayout();", "public void initViews() {\n View accountExists = activity.findViewById(R.id.button_register);\n Button buttonSubmitAuth = activity.findViewById(R.id.button_login);\n\n viewUsername = activity.findViewById(R.id.login_username);\n viewPassword = activity.findViewById(R.id.login_password);\n\n accountExists.setOnClickListener(view ->\n activity.setViewPagerCurrentItem(OnboardingActivity.Companion.getFRAGMENT_REGISTRATION()));\n\n buttonSubmitAuth.setOnClickListener(view -> authenticateUser());\n }", "private void create() {\n\t\tGridLayout grid = new GridLayout(3,2);\n\t\tthis.setLayout(grid);\n\t\tthis.setBackground(Color.WHITE);\n\t\t\n\t\tadd(new JLabel(\"Username/Library Card #:\", SwingConstants.LEFT), grid);\n\t\tusername.setPreferredSize(new Dimension(1, 12));\n\t\tadd(username,grid);\n\t\t\n\t\tadd(new JLabel(\"Password:\", SwingConstants.LEFT), grid);\n\t\tadd(password, grid);\n\t\t\n\t\tLoginAction();\n\t\tadd(submit, grid);\n\t}", "View createView();", "private Component createLogin() {\n CustomLayout custom = new CustomLayout(\"../../sampler/layouts/examplecustomlayout\");\n\n // Create components and bind them to the location tags\n // in the custom layout.\n username = new TextField();\n custom.addComponent(username, \"username\");\n\n password = new PasswordField();\n custom.addComponent(password, \"password\");\n\n Button ok = new Button(\"Login\");\n custom.addComponent(ok, \"okbutton\");\n\n // Add login listener\n ok.addListener(this);\n\n return custom;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_account, container, false);\n btn_viewall_address = view.findViewById(R.id.btn_viewall_address_account);\n btn_sign_out = view.findViewById(R.id.btn_signout_account);\n profile_image = view.findViewById(R.id.profile_image_myaccount);\n fulname = view.findViewById(R.id.txt_username_account);\n email = view.findViewById(R.id.txt_email_account);\n layoutContainer = view.findViewById(R.id.layoutContainer);\n curent_order_image = view.findViewById(R.id.imv_status_order_myaccount);\n currentOrderStatus = view.findViewById(R.id.txt_current_order_status_account);\n settingAccount = view.findViewById(R.id.floatint_setting_account);\n\n orderedIndicator = view.findViewById(R.id.imv_ordered_indicator_myaccount);\n packedIndicator = view.findViewById(R.id.imv_packed_indocator_myaccount);\n shippedIndicator = view.findViewById(R.id.imv_shipped_indicator_myaccount);\n deliveriedIndicator = view.findViewById(R.id.imv_dilivered_indicator_myaccount);\n\n orderedProgress = view.findViewById(R.id.progress_ordered_packed_myaccount);\n packedProgress = view.findViewById(R.id.progress_packed_shipped_myaccount);\n shippedProgress = view.findViewById(R.id.progress_shipped_delivered_myaccount);\n\n recent_title = view.findViewById(R.id.txt_title_your_recent_order_account);\n layoutRecent = view.findViewById(R.id.liner_order_recent_account);\n\n fulname= view.findViewById(R.id.txt_full_name_address_account);\n address = view.findViewById(R.id.txt_address_account);\n phonenumber = view.findViewById(R.id.txt_phonenumber_account);\n fullname_address = view.findViewById(R.id.txt_full_name_address_account);\n\n\n\n loadingDialog = new Dialog(getContext());\n loadingDialog.setContentView(R.layout.loading_dialog);\n loadingDialog.setCancelable(false);\n loadingDialog.getWindow().setBackgroundDrawable(getContext().getDrawable(R.drawable.slider_main));\n loadingDialog.getWindow().setLayout(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n //loadingDialog.show();\n\n\n\n layoutContainer.getChildAt(1).setVisibility(View.GONE);\n\n loadingDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n\n for(MyOrderItemModel myOrderItemModel: DbQueries.myOrderItemModelList){\n if(!myOrderItemModel.isCancelationOrderRequest()){\n if(!myOrderItemModel.getOrderStatus().equals(\"Delivered\") && !myOrderItemModel.getOrderStatus().equals(\"Cancelled\")){\n layoutContainer.getChildAt(1).setVisibility(View.VISIBLE);\n Glide.with(getContext()).load(myOrderItemModel.getProductImage()).apply(new RequestOptions().placeholder(R.drawable.image_place)).into(curent_order_image);\n currentOrderStatus.setText(myOrderItemModel.getOrderStatus());\n switch (myOrderItemModel.getOrderStatus()){\n case \"Ordered\":\n orderedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n break;\n case \"Packed\":\n orderedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n packedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n orderedProgress.setProgress(100);\n break;\n case \"Shipped\":\n orderedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n packedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n shippedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n orderedProgress.setProgress(100);\n packedProgress.setProgress(100);\n break;\n case \"Out for delivery\":\n orderedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n packedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n shippedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n deliveriedIndicator.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorGreenDark)));\n orderedProgress.setProgress(100);\n packedProgress.setProgress(100);\n shippedProgress.setProgress(100);\n break;\n }\n // for MyOrderItemModel\n\n }\n }\n }\n\n int i = 0;\n for(MyOrderItemModel orderItemModel: DbQueries.myOrderItemModelList) {\n if(i < 4) {\n if (orderItemModel.getOrderStatus().equals(\"Delivered\")) {\n Glide.with(getContext()).load(orderItemModel.getProductImage()).apply(new RequestOptions().placeholder(R.drawable.image_place)).into((CircleImageView) layoutRecent.getChildAt(i));\n i++;\n }\n }else {\n break;\n }\n }\n if(i == 0){\n recent_title.setText(\"Không có sản phẩm đặt hàng gần đây\");\n }\n if(i < 3){\n for (int x = i; x < 4; x++){\n layoutRecent.getChildAt(x).setVisibility(View.GONE);\n }\n }\n loadingDialog.show();\n loadingDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n loadingDialog.setOnDismissListener(null);\n if(DbQueries.addressModelList.size() == 0 ){\n address.setText(\"Đại Chỉ: Chưa có\");\n fullname_address.setText(\"Họ & Tên: Chưa có\");\n phonenumber.setText(\"Di Động: Chưa có\");\n }else {\n setAddress();\n }\n }\n });\n DbQueries.loadAddress(getContext(), loadingDialog, false);\n }\n });\n DbQueries.loadOrders(getContext(), null, loadingDialog);\n btn_viewall_address.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intentManage = new Intent(getContext(), MyAddressActivity.class);\n intentManage.putExtra(\"Mode\", MANAGE_ADDRESS);\n startActivity(intentManage);\n }\n });\n btn_sign_out.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FirebaseAuth.getInstance().signOut();\n DbQueries.clearData();\n Intent intentRegis = new Intent(getContext(), RegisterActivity.class);\n startActivity(intentRegis);\n getActivity().finish();\n }\n });\n //loadingDialog.dismiss();\n settingAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent updateUserInfor = new Intent(getContext(), UpdateUserInforActivity.class);\n updateUserInfor.putExtra(\"username\", fullname_address.getText());\n updateUserInfor.putExtra(\"email\", email.getText());\n updateUserInfor.putExtra(\"profile\", DbQueries.profile);\n\n startActivity(updateUserInfor);\n }\n });\n return view;\n }", "public\n RegisterView()\n {\n super(ViewKeys.REGISTER);\n\n setAccount(null);\n setAccountChooser(new ElementComboBoxChooser(getAccounts()));\n setFilter(new TransactionFilter());\n setPanel(new Panel());\n setSearchWidget(new SearchWidget(createPopupMenu()));\n\n // Build panel.\n setFill(GridBagConstraints.BOTH);\n add(createToolsPanel(), 0, 0, 1, 1, 0, 0);\n add(getPanel(), 0, 1, 1, 1, 100, 100);\n\n getAccountChooser().setAllowInactiveAccounts(false);\n\n // Add listeners.\n getAccountChooser().addActionListener(new ActionHandler());\n getSearchWidget().addActionListener(new ActionHandler());\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n accountInfoBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account_info, container, false);\n return accountInfoBinding.getRoot();\n }", "@Override\n\tpublic TiUIView createView(Activity activity)\n\t{\n\t\tif (placeholder) {\n\n\t\t\t// Placeholder for header or footer, do not create view.\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new RowView(this);\n\t}", "private void defineLayout(IPageLayout layout) {\n String editorArea = layout.getEditorArea();\r\n\r\n IFolderLayout folder;\r\n\r\n // Place remote system view to left of editor area.\r\n folder = layout.createFolder(NAV_FOLDER_ID, IPageLayout.LEFT, 0.2F, editorArea);\r\n folder.addView(getRemoveSystemsViewID());\r\n\r\n // Place properties view below remote system view.\r\n folder = layout.createFolder(PROPS_FOLDER_ID, IPageLayout.BOTTOM, 0.75F, NAV_FOLDER_ID);\r\n folder.addView(\"org.eclipse.ui.views.PropertySheet\"); //$NON-NLS-1$\r\n\r\n // Place job log explorer view below editor area.\r\n folder = layout.createFolder(JOB_LOG_EXPLORER_FOLDER_ID, IPageLayout.BOTTOM, 0.0F, editorArea);\r\n folder.addView(JobLogExplorerView.ID);\r\n\r\n // Place command log view below editor area.\r\n folder = layout.createFolder(CMDLOG_FOLDER_ID, IPageLayout.BOTTOM, 0.75F, JobLogExplorerView.ID);\r\n folder.addView(getCommandLogViewID());\r\n\r\n layout.addShowViewShortcut(getRemoveSystemsViewID());\r\n layout.addShowViewShortcut(\"org.eclipse.ui.views.PropertySheet\"); //$NON-NLS-1$\r\n layout.addShowViewShortcut(getCommandLogViewID());\r\n\r\n layout.addPerspectiveShortcut(ID);\r\n\r\n layout.setEditorAreaVisible(false);\r\n }", "public JPanel getNewClientAccountPanel() {\n clientAccountView = new ClientAccountView();\n clientAccountView.setAccNum(smCntr.getID());\n clientAccountView.setFormToAdd();\n return clientAccountView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_librarian_account_manager, container, false);\n }", "private Widget createLoginPanel(final IViewContext<ICommonClientServiceAsync> viewContext)\n {\n DockPanel loginPanel = new DockPanel();\n // WORKAROUND The mechanism behind the autofill support does not work in testing\n if (!GWTUtils.isTesting())\n {\n final LoginPanelAutofill loginWidget = LoginPanelAutofill.get(viewContext);\n loginPanel.add(loginWidget, DockPanel.CENTER);\n } else\n {\n final LoginWidget loginWidget = new LoginWidget(viewContext);\n loginPanel.add(loginWidget, DockPanel.CENTER);\n }\n return loginPanel;\n }", "public CreateAccountPanel() {\n initComponents();\n initializeDateChooser();\n }", "public PanelAccountInfo() {\n initComponents();\n setTextFields();\n setLabels();\n }", "@AutoGenerated\r\n\tprivate VerticalLayout buildLayoutLogin() {\n\t\tlayoutLogin = new VerticalLayout();\r\n\t\tlayoutLogin.setImmediate(false);\r\n\t\tlayoutLogin.setWidth(\"100.0%\");\r\n\t\tlayoutLogin.setHeight(\"100.0%\");\r\n\t\tlayoutLogin.setMargin(false);\r\n\t\tlayoutLogin.setSpacing(true);\r\n\t\t\r\n\t\t// pnlLogo\r\n\t\tpnlLogo = buildPnlLogo();\r\n\t\tlayoutLogin.addComponent(pnlLogo);\r\n\t\tlayoutLogin.setComponentAlignment(pnlLogo, new Alignment(24));\r\n\t\t\r\n\t\t// verticalLayout_3\r\n\t\tverticalLayout_3 = buildVerticalLayout_3();\r\n\t\tlayoutLogin.addComponent(verticalLayout_3);\r\n\t\t\r\n\t\t// pnlDatos\r\n\t\tpnlDatos = buildPnlDatos();\r\n\t\tlayoutLogin.addComponent(pnlDatos);\r\n\t\tlayoutLogin.setComponentAlignment(pnlDatos, new Alignment(48));\r\n\t\t\r\n\t\t// pnlCaptcha\r\n\t\tpnlCaptcha = new VerticalLayout();\r\n\t\tpnlCaptcha.setCaption(\"Digite los Valores que aparecen en la Imagen\");\r\n\t\tpnlCaptcha.setImmediate(false);\r\n\t\tpnlCaptcha.setWidth(\"100.0%\");\r\n\t\tpnlCaptcha.setHeight(\"60px\");\r\n\t\tpnlCaptcha.setMargin(false);\r\n\t\tlayoutLogin.addComponent(pnlCaptcha);\r\n\t\tlayoutLogin.setComponentAlignment(pnlCaptcha, new Alignment(20));\r\n\t\t\r\n\t\t// pnlCaptchaButtons\r\n\t\tpnlCaptchaButtons = buildPnlCaptchaButtons();\r\n\t\tlayoutLogin.addComponent(pnlCaptchaButtons);\r\n\t\tlayoutLogin.setComponentAlignment(pnlCaptchaButtons, new Alignment(20));\r\n\t\t\r\n\t\t// pnlBotonera\r\n\t\tpnlBotonera = buildPnlBotonera();\r\n\t\tlayoutLogin.addComponent(pnlBotonera);\r\n\t\tlayoutLogin.setComponentAlignment(pnlBotonera, new Alignment(20));\r\n\t\t\r\n\t\t// verticalLayout_4\r\n\t\tverticalLayout_4 = buildVerticalLayout_4();\r\n\t\tlayoutLogin.addComponent(verticalLayout_4);\r\n\t\tlayoutLogin.setComponentAlignment(verticalLayout_4, new Alignment(6));\r\n\t\t\r\n\t\treturn layoutLogin;\r\n\t}", "ListView getManageAccountListView();", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.authentication_layout, container, false);\n\t\tbtnLogin = (ButtonRectangle) view.findViewById(R.id.btn_login);\n\t\tbtnLoginAsGuest = (ButtonRectangle) view.findViewById(R.id.btn_login_as_guest);\n\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_update_account, container, false);\n mActivity.initToolBar(\"\",false);\n mActivity.hideToolbar();\n initViews(view);\n initListeners();\n getAllCurrency();\n return view;\n }", "public AccountListView() {\r\n initComponents();\r\n \r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n fragmentAccountBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account, container, false);\n\n appPreference = AppPreference.getInstance(getContext());\n signInToken = appPreference.getString(SIGNIN_TOKEN);\n\n // if user is login\n if (signInToken.isEmpty()) {\n\n fragmentAccountBinding.tvLoginLogout.setText(\"Login\");\n fragmentAccountBinding.tvUserName.setText(\"Login / Create account\");\n\n intent = new Intent(getContext(), RegistrationActivity.class);\n\n Glide.with(AppConstants.mContext)\n .load(R.drawable.placeholder_products)\n .into(fragmentAccountBinding.ivDisplayPicture);\n\n } else {\n\n userName = appPreference.getString(USER_NAME);\n userAvatar = appPreference.getString(USER_AVATAR);\n\n intent = new Intent(getContext(), OrderListingActivity.class);\n\n fragmentAccountBinding.tvUserName.setText(userName);\n String avatarImagePath = USER_STORAGE_BASE_URL.concat(userAvatar);\n\n fragmentAccountBinding.tvLoginLogout.setText(\"Logout\");\n\n Glide.with(AppConstants.mContext)\n .load(avatarImagePath)\n .placeholder(R.drawable.placeholder_products)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n .skipMemoryCache(true)\n .into(fragmentAccountBinding.ivDisplayPicture);\n }\n\n initListeners();\n\n return fragmentAccountBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_account, container, false);\n unbinder = ButterKnife.bind(this, view);\n mUsername.setText(username);\n setManagerName();\n\n\n return view;\n }", "public interface WalletBalanceView extends BaseView {\n void renderAccountInfo(NewAccountInfo info);\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_profile_account, container, false);\n\n TextView statistic_data = (TextView) view.findViewById(R.id.account_link_to_statistic_data);\n statistic_data.setOnClickListener(this);\n\n TextView password_change = (TextView) view.findViewById(R.id.account_link_to_password_change);\n password_change.setOnClickListener(this);\n\n /*TextView notifications_settings = (TextView) view.findViewById(R.id.account_link_to_notifications_settings);\n notifications_settings.setOnClickListener(this);\n\n\n\n TextView help = (TextView) view.findViewById(R.id.account_link_to_help);\n help.setOnClickListener(this);\n\n TextView privacy = (TextView) view.findViewById(R.id.account_link_to_privacy);\n privacy.setOnClickListener(this);\n\n TextView terms_of_service = (TextView) view.findViewById(R.id.account_link_to_terms_of_service_title);\n terms_of_service.setOnClickListener(this);*/\n\n TextView recieved_rates = (TextView)view.findViewById(R.id.account_link_to_recieved_rates);\n recieved_rates.setOnClickListener(this);\n return view;\n }", "private void buildAccountBalancePane() // buildAccountBalancePane method start\n\t{\n\t\t// creating object\n\t\tbalanceOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tbalanceOutput.setEditable(false);\n\t\tbalanceOutput.setFont(font);\n\t\tbalanceOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\taccountBalancePane.add(balanceOutput);\n\t\taccountBalancePane.add(new JScrollPane(balanceOutput));\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n prefs = this.getActivity().getSharedPreferences(\n \"userDetailsSharedPref\", MODE_PRIVATE);\n\n StringRequest stringRequest = makeRequest();\n stringRequest.setTag(\"defTAG\");\n RequestQueue requestQueue = Volley.newRequestQueue(this.getActivity());\n requestQueue.add(stringRequest);\n StringRequest stringRequest1 = getBalance();\n stringRequest1.setTag(\"defTAG1\");\n requestQueue.add(stringRequest1);\n\n View view = inflater.inflate(R.layout.fragment_account, container, false);\n\n graphView = (GraphView) view.findViewById(R.id.graph);\n graphView.getViewport().setScrollable(true); // enables horizontal scrolling\n graphView.getViewport().setScrollableY(true); // enables vertical scrolling\n graphView.getViewport().setScalable(true); // enables horizontal zooming and scrolling\n graphView.getViewport().setScalableY(true); // enables vertical zooming and scrolling\n\n return view;\n }", "private void createView() {\n\t\tTabWidget tWidget = (TabWidget) findViewById(android.R.id.tabs);\r\n\t\tshowLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView = (ImageView) showLayout.getChildAt(0);\r\n\t\tTextView textView = (TextView) showLayout.getChildAt(1);\r\n\t\timageView.setImageResource(R.drawable.main_selector);\r\n\t\ttextView.setText(R.string.show);\r\n\r\n\t\taddLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView1 = (ImageView) addLayout.getChildAt(0);\r\n\t\tTextView textView1 = (TextView) addLayout.getChildAt(1);\r\n\t\timageView1.setImageResource(R.drawable.add_selector);\r\n\t\ttextView1.setText(R.string.add_record);\r\n\r\n\t\tchartLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView2 = (ImageView) chartLayout.getChildAt(0);\r\n\t\tTextView textView2 = (TextView) chartLayout.getChildAt(1);\r\n\t\timageView2.setImageResource(R.drawable.chart_selector);\r\n\t\ttextView2.setText(R.string.chart_show);\r\n\t}", "public Layout() {\n super(\"Chitrashala\");\n initComponents();\n }", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n View v = inflater.inflate(R.layout.fragment_account, parent, false);\n\n setOnClickListeners(v);\n\n return v;\n }", "protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}", "@Override\r\n\tprotected void initView(View view) {\n\t\trly_personal_info = (RelativeLayout) view.findViewById(R.id.rly_personal_info);\r\n\t\t\r\n\t}", "private MarkupContainer createLoginFragment() {\r\n return new Fragment(CONTENT_VIEW, LOGIN_FRAGMENT, this)\r\n .add(new LoginPanel(PART_LOGIN_VIEW, LoginPanel.NextPage.CART))\r\n .add(new RegisterPanel(PART_REGISTER_VIEW, RegisterPanel.NextPage.CART))\r\n .add(new GuestPanel(PART_GUEST_VIEW));\r\n }", "AccountBarView(Account a, AccountHolder aH) {\n\t\tthis.a = a;\n\t\tthis.aH = aH;\n\t\t\n\t\taccountType = a.getClass().getSimpleName();\n\t\tacctId = EventManager.getUniqueID(a);\n\t\t\n\t\tfirstRun = true;\n\t}", "public void createAccount(View view) {\n Intent intent = new Intent(this, UserAccountCreateActivity.class);\n startActivity(intent);\n }", "DefineAuthenticationView() {\n\t\tvBox = new VBox();\n\t\tvBox.setPadding(new Insets(5,5,5,5));\n\t\tvBox.setSpacing(5);\n\t\tlabel = new Label(\"Choose your desired method of authentication:\");\n\t\tlabel.setWrapText(true);\n\t\tvBox.getChildren().add(label);\n\t\t\n\t\tcombobox = new ComboBox<>();\n\t\tfor (InputType type : InputType.values())\n\t\t\tcombobox.getItems().add(type);\n\t\tvBox.getChildren().add(combobox);\n\n\t\tVBox alignVBox = new VBox();\n\t\talignVBox.setAlignment(Pos.BASELINE_CENTER);\n\t\tHBox alignHBox = new HBox();\n\t\talignHBox.setAlignment(Pos.CENTER);\n\t\t\n\t\tbutton = new Button();\n\t\tbutton.setText(\"Next\");\n\t\tbutton.setLayoutX(1000);\n\t\talignHBox.getChildren().add(button);\n\t\talignVBox.getChildren().add(alignHBox);\n\t\talignVBox.setMaxHeight(Double.MAX_VALUE);\n\t\tVBox.setVgrow(alignVBox, Priority.ALWAYS);\n\t\tvBox.getChildren().add(alignVBox);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_profile, container, false);\n\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());\n\n tvName = (TextView) view.findViewById(R.id.tvNameProfile);\n tvId = (TextView) view.findViewById(R.id.tvIdProfile);\n tvAge = (TextView) view.findViewById(R.id.tvAgeProfile);\n tvPhone = (TextView) view.findViewById(R.id.tvPhoneProfile);\n tvEmail = (TextView) view.findViewById(R.id.tvEmailProfile);\n tvPassword = (TextView) view.findViewById(R.id.tvPasswordProfile);\n\n tvName.setText(preferences.getString(BankContractor.UserAccountDb.COL_NAME,\"nul\"));\n tvId.setText(preferences.getString(BankContractor.UserAccountDb.COL_ID,\"nul\"));\n tvAge.setText(preferences.getString(BankContractor.UserAccountDb.COL_AGE,\"nul\"));\n tvPhone.setText(preferences.getString(BankContractor.UserAccountDb.COL_PHONE,\"nul\"));\n tvEmail.setText(preferences.getString(BankContractor.UserAccountDb.COL_EMAIL,\"nul\"));\n tvPassword.setText(preferences.getString(BankContractor.UserAccountDb.COL_PASSWORD,\"nul\"));\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_account_view, container, false);\n\n ArrayList<Fragment> pageList = new ArrayList<>();\n FeedPageFragment feedPageFragment = new FeedPageFragment();\n feedPageFragment.setFilter(PostRecyclerViewAdapter.POST_FILTER_TYPE.Profile);\n feedPageFragment.linkUser(mUser);\n pageList.add(feedPageFragment);\n\n UsersPageFragment followersPage = new UsersPageFragment();\n followersPage.setFilter(UserRecyclerViewAdapter.USER_FILTER_TYPE.Followers);\n followersPage.linkUser(mUser);\n UsersPageFragment followingPage = new UsersPageFragment();\n followingPage.setFilter(UserRecyclerViewAdapter.USER_FILTER_TYPE.Following);\n followingPage.linkUser(mUser);\n\n pageList.add(followersPage);\n pageList.add(followingPage);\n\n mEditProfileButton = (Button)view.findViewById(R.id.edit_profile_button);\n mTabLayout = (TabLayout)view.findViewById(R.id.profile_tabs_layout);\n mViewPager = (ViewPager)view.findViewById(R.id.profile_tabs_pager);\n mViewPagerAdapter = new CustomPagerAdapter(getFragmentManager(),pageList);\n mViewPager.setAdapter(mViewPagerAdapter);\n mTabLayout.setupWithViewPager(mViewPager);\n\n if (mUser.equals(ApplicationState.getInstance().getUser())) {\n mEditProfileButton.setVisibility(View.VISIBLE);\n mEditProfileButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //Start profile edit activity\n startActivity(new Intent(getContext(), AccountModifyActivity.class));\n //BAD HACK: Close this activity and recreate it later\n getActivity().finish();\n }\n });\n } else {\n mEditProfileButton.setVisibility(View.GONE);\n mEditProfileButton.setOnClickListener(null);\n }\n\n mAccountViewUsername = (TextView) view.findViewById(R.id.account_view_username);\n mAccountViewFullName = (TextView) view.findViewById(R.id.account_view_full_name);\n mAccountViewLocation = (TextView) view.findViewById(R.id.account_view_location);\n mAccountViewBio = (TextView) view.findViewById(R.id.account_view_bio);\n mAccountViewImage = (ImageView) view.findViewById(R.id.account_view_image);\n\n return view;\n }", "public CreateAccountGUI() throws Exception{\n\r\n\t\tsuper();\r\n\r\n\t\tsetTitle(\"Create an account\");\r\n\t\tsetSize(600, 400);\r\n\t\tsetBackground(Color.CYAN);\r\n\t\tsetResizable(false);\r\n\t\tsetDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\r\n\t\tsetLocationRelativeTo(null);\r\n\r\n\t\tString[] labels = {\"Username: \", \"First Name: \", \"Surname: \",\r\n \"Mobile Number: \", \"Date Of Birth: \", \"City: \",\n \"Profile Pic (e.g. pic.png): \"};\n\t\tint input = labels.length;\n\n ArrayList<JTextField> fields = new ArrayList<JTextField>();\n\n\t\tJPanel create = new JPanel(new SpringLayout());\r\n\t\tfor (int i = 0; i < input; i++) {\r\n\t\t\tJLabel para = new JLabel(labels[i], JLabel.TRAILING);\r\n\t\t\tcreate.add(para);\r\n\t\t\tJTextField form = new JTextField(10);\n fields.add(form);\n\t\t\tpara.setLabelFor(form);\r\n\t\t\tcreate.add(form);\r\n\t\t\tsuper.add(create);\r\n\t\t}\r\n\t\tJButton fin = new JButton(\"Create\");\r\n\t\tfin.addActionListener(new ActionListener(){\r\n\t\t\tpublic void actionPerformed(ActionEvent sendMessage){\n try\n {\n String username = fields.get(0).getText();\n String firstname = fields.get(1).getText();\n String surname = fields.get(2).getText();\n String mobnum = fields.get(3).getText();\n String dob = fields.get(4).getText();\n String city = fields.get(5).getText();\n String imgpath = fields.get(6).getText();\n Account acc = new Account(username, firstname, surname,\n mobnum, dob, city, 0, null, imgpath);\n ReadWriteAccount rwa = new ReadWriteAccount(\"data.db\");\n rwa.write(acc);\n get_main().set_home(acc);\n dispose();\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n\t\t\t}\r\n\t\t});\r\n\t\tsuper.add(fin, BorderLayout.SOUTH);\r\n\t\tCreateAccountGUI.makeForm(create,\r\n\t\t\t\tinput, 2,\r\n\t\t\t\t6, 6,\r\n\t\t\t\t20, 20);\n\n setVisible(true);\n\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View layout = inflater.inflate(R.layout.fragment_sign_up, container, false);\n ButterKnife.bind(this, layout);\n\n return layout;\n }", "private void setViewLayout() {\n\t\tthis.setBorder(new EmptyBorder(15, 15, 15, 15));\n\t\tthis.setLayout(new GridLayout(2, 2, 15, 15));\n\t}", "private void initView() {\n btnLoginFacebook = (RelativeLayout) findViewById(R.id.btnLoginFacebook);\n btnLoginGoogle = (RelativeLayout) findViewById(R.id.btnLoginGoogle);\n txtRegister = (TextViewFontAwesome) findViewById(R.id.txtRegister);\n txtForgotPassword = (TextViewFontAwesome) findViewById(R.id.txtForgotPassword);\n txtLogin = (TextViewFontAwesome) findViewById(R.id.txtLogin);\n txtUsername = (EditText) findViewById(R.id.txtUsername);\n txtPassword = (EditText) findViewById(R.id.txtPassword);\n txtForgotPassword.setPaintFlags(txtForgotPassword.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_seller_edit_profile, container, false);\n ButterKnife.bind(this, view);\n NetworkUtils.grantPermession(getActivity());\n initViews();\n return view;\n }", "public ViewSavingAccountJPanel(Person person) {\n initComponents();\n DisplaySavingAccount(person);\n \n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setTransparentStatus();\n setContentView(R.layout.activity_login);\n ButterKnife.bind(this);\n\n mTabLayout.addTab(mTabLayout.newTab().setText(\"Email\"), true);\n mTabLayout.addTab(mTabLayout.newTab().setText(\"Phone\"));\n int dp20 = ScreenUtil.convertDpToPx(20, this);\n for (int i = 0; i < mTabLayout.getTabCount(); i++) {\n View tab = ((ViewGroup)mTabLayout.getChildAt(0)).getChildAt(i);\n ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) tab.getLayoutParams();\n lp.setMargins(dp20, 0, dp20, 0);\n tab.requestLayout();\n }\n }", "private void buildMainLayout(IAuthorizationContext pContext)\r\n throws UnauthorizedAccessAttemptException, IOException {\r\n\r\n createObjectEntry();\r\n\r\n if (parent.getParentUI().siteName.equals(parent.getParentUI().siteNameCVMA)) {\r\n defineInfoLayoutCVMA();\r\n } else {\r\n defineInfoLayoutStandard();\r\n }\r\n\r\n thumbLayout = new VerticalLayout();\r\n thumbLayout.setSizeFull();\r\n thumbLayout.setSpacing(false);\r\n thumbLayout.setMargin(false);\r\n thumbLayout.setStyleName(\"white\");\r\n thumbLayout.setHeight(\"150px\");\r\n thumbLayout.setWidth(\"161px\");\r\n\r\n // initialize thumbnail field and button\r\n setThumbButton();\r\n\r\n // build content layout\r\n buttonLayout = new VerticalLayout();\r\n buttonLayout.setSizeFull();\r\n buttonLayout.setSpacing(false);\r\n buttonLayout.setMargin(false);\r\n buttonLayout.setStyleName(\"white\");\r\n buttonLayout.setHeight(\"150px\");\r\n buttonLayout.setWidth(\"161px\");\r\n\r\n // set download button\r\n setDownloadButton();\r\n\r\n // set metadata viewer button\r\n setMetadataViewerButton();\r\n\r\n // download button\r\n setImageDownloadButton();\r\n\r\n // map button\r\n setMapButton();\r\n\r\n // build content layout\r\n contentLayout = new HorizontalLayout();\r\n contentLayout.setSizeFull();\r\n contentLayout.setMargin(false);\r\n contentLayout.setMargin(new MarginInfo(false, false, true, false));\r\n contentLayout.setStyleName(\"white\");\r\n contentLayout.addComponent(thumbLayout);\r\n contentLayout.addComponent(infoLayout);\r\n contentLayout.addComponent(buttonLayout);\r\n contentLayout.setComponentAlignment(thumbLayout, Alignment.TOP_LEFT);\r\n contentLayout.setComponentAlignment(infoLayout, Alignment.TOP_CENTER);\r\n contentLayout.setComponentAlignment(buttonLayout, Alignment.TOP_RIGHT);\r\n contentLayout.setExpandRatio(infoLayout, 11f);\r\n }", "@Override\n public void Create() {\n\n initView();\n }", "public Layout() {\n }", "public void createFirebaseAccountsUI() {\n mAccountsFragment.startActivityForResult(\n AuthUI.getInstance()\n .createSignInIntentBuilder()\n .setAvailableProviders(providers)\n .build(),\n mAccountsFragment.RC_SIGN_IN);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.be_admin_printers, container, false);\n\n /** RETURN THE VIEW INSTANCE TO SETUP THE LAYOUT **/\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootView = inflater.inflate(R.layout.activity_admin_dashboard, container, false);\n getActivity().setTitle(\"Dashboard\");\n myContext = getActivity();\n\n utill = new UTIL(getActivity());\n setView(rootView);\n return rootView;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_login, container, false);\n Toolbar toolbar = (Toolbar)view.findViewById(R.id.toolbarlogin);\n\n tabLayout = (TabLayout)view.findViewById(R.id.tablogin);\n tabLayout.setupWithViewPager(viewPager);\n\n viewPager = (ViewPager)view.findViewById(R.id.viewpagerlogin);\n\n ViewPagerAdapterLogin adapter = new ViewPagerAdapterLogin(getFragmentManager());\n adapter.AddFragment(new LoginPinFragment(),\"PIN\");\n adapter.AddFragment(new LoginPasswordFragment(),\"PASSWORD\");\n viewPager.setAdapter(adapter);\n tabLayout.setupWithViewPager(viewPager);\n tabLayout.setTabTextColors(getResources().getColor(R.color.colortextbg), getResources().getColor(R.color.colorPrimary));\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_transactions, container, false);\n ButterKnife.bind(this,view);\n userPreferences = new UserPreferences(getContext());\n init();\n\n\n return view;\n }", "public void createInitialLayout(IPageLayout layout) {\n \n\t}", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.fragment_account_tos, container, false);\n }", "private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }", "public String viewAccount() {\n ConversationContext<Account> ctx = AccountController.newEditContext(getPart().getAccount());\n ctx.setLabelWithKey(\"part_account\");\n getCurrentConversation().setNextContextSubReadOnly(ctx);\n return ctx.view();\n }", "private VHorizontalLayout initLockInformationLayout() {\r\n VHorizontalLayout layout = new VHorizontalLayout();\r\n if(report.isLocked()) {\r\n Utils.removeAllThemes(layout);\r\n layout.getThemeList().add(ThemeAttribute.LOCKED);\r\n layout.add(getTranslation(\"reportView.reportLocked.label\", report.getLockOwner().getName() + \" \" +report.getLockOwner().getLastname()));\r\n }\r\n return layout;\r\n }", "@Override\n public\n void\n updateView()\n {\n // Stop responding to events.\n setAllowEvents(false);\n\n getAccountChooser().displayElements(getAccounts());\n getPanel().removeAll();\n\n // Get new reference to account incase the type or collection has changed.\n setAccount(getProperAccountReference());\n\n if(getAccount() != null)\n {\n setRegisterPanel(new RegisterPanel(getAccount()));\n\n getAccountChooser().setSelectedItem(getAccount().getIdentifier());\n getFilter().updateFormats();\n\n // Build panel.\n getPanel().setFill(GridBagConstraints.BOTH);\n getPanel().add(getRegisterPanel(), 0, 0, 1, 1, 100, 100);\n\n displayTransactions(null);\n }\n\n // Resume responding to events.\n setAllowEvents(true);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_account_details, container, false);\n emailTV=view.findViewById(R.id.user_email);\n unameTV=view.findViewById(R.id.user_name);\n dobTV=view.findViewById(R.id.user_dob);\n contactTV=view.findViewById(R.id.user_phone);\n genderTV=view.findViewById(R.id.user_gender);\n countryTV=view.findViewById(R.id.user_country);\n stateTV=view.findViewById(R.id.user_state);\n cityTV=view.findViewById(R.id.user_city);\n landTV=view.findViewById(R.id.user_landmark);\n streetTV=view.findViewById(R.id.user_street);\n hnoTV=view.findViewById(R.id.user_hno);\n pinTV=view.findViewById(R.id.user_pin_code);\n sharedPreferences=getActivity().getSharedPreferences(LoginSharedPref.SHARED_PREF_NAME,MODE_PRIVATE);\n populateDataFromSharedPreferences();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_info, container, false);\n\n TextView name = (TextView) v.findViewById(R.id.user_name);\n TextView email = (TextView) v.findViewById(R.id.user_email);\n TextView tvNbTrips = (TextView) v.findViewById(R.id.user_nb_trips);\n TextView login = (TextView) v.findViewById(R.id.user_login);\n String nbTrips = String.valueOf(MyApplication.getInstance().getTrips().size());\n String n = MyApplication.getInstance().getSP_FirstName() + \" \" + MyApplication.getInstance().getSP_LastName();\n String l = MyApplication.getInstance().getSP_Login();\n name.setText(name.getText() + \" \" + n);\n email.setText(email.getText() + \" \" + MyApplication.getInstance().getSP_Email());\n tvNbTrips.setText(tvNbTrips.getText() + \" \" + nbTrips);\n login.setText(login.getText() + \" \" + MyApplication.getInstance().getSP_Login());\n return v;\n }", "public menuPrincipalView() {\n initComponents();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_home, container, false);\n unbinder = ButterKnife.bind(this, view);\n\n\n generarLineaLayoutVertical();\n inicializarAdaptadorRV(crearAdaptador(HomeItemRepo.getModulos()));\n\n if(CredentialValues.getLoginData().getPerfilactual().getIdPerfil() == 1){\n //administrador\n textAdmin.setVisibility(View.VISIBLE);\n cardFecha.setVisibility(View.GONE);\n }\n\n if(!Utilities.getUltDownload(getContext()).equals(\"\"))\n download.setText(Utilities.getUltDownload(getContext()));\n\n if(!Utilities.getUltUpload(getContext()).equals(\"\"))\n upload.setText(Utilities.getUltUpload(getContext()));\n\n return view;\n }", "@Override\n public void layout() {\n // TODO: not implemented\n }", "public SeeAnAccount() {\n initComponents();\n }", "@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bank_detail, container, false);\n unbinder = ButterKnife.bind(this,view);\n DaoSession daoSession = ((PasswordKeeper) getActivity().getApplication()).getDaoSession();\n bankDetailsDao = daoSession.getBankDetailsDao();\n QueryBuilder<BankDetails> bankDetailsQueryBuilder = bankDetailsDao.queryBuilder()\n .where(BankDetailsDao.Properties.Id.eq(bankId));\n bankDetails = bankDetailsQueryBuilder.unique();\n if(bankDetails.getTitle()!=null && bankDetails.getTitle().length()>0){\n bankTitle.setTitle(bankDetails.getTitle());\n }\n else{\n bankTitle.setTitle(\"NO TITLE\");\n }\n accountNo.setText(bankDetails.getAccountNo());\n bankName.setText(bankDetails.getBankName());\n ifscName.setText(\"IFSC : \"+bankDetails.getIfsc());\n branchName.setText(bankDetails.getBankBranch());\n if(bankDetails.getOnlineUsername()!=null && bankDetails.getOnlineUsername().length()>0){\n\n onlineLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1,R.layout.online_detail);\n showOnlineDetails(bankDetails.getOnlineUsername(),bankDetails.getOnlinePassword());\n }\n if(bankDetails.getCards()!=null && bankDetails.getCards().size()>0) {\n for (CardDetails cardDetails : bankDetails.getCards()) {\n if (viewStubCompat1.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1, R.layout.cc_dc_detail);\n break;\n }\n } else if (viewStubCompat2.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat2, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat2, R.layout.cc_dc_detail);\n break;\n }\n } else if (viewStubCompat3.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat3, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat3, R.layout.cc_dc_detail);\n break;\n }\n }\n showCCDCDetails(cardDetails);\n }\n }\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_user_profile, container, false);\n ButterKnife.bind(this,view);\n SessionManager sessionManager = new SessionManager(getContext());\n tvId.setText(sessionManager.getUSER_Id());\n tvName.setText(sessionManager.getFULLNAME());\n tvMailId.setText(sessionManager.getEmail());\n tvMobileNum.setText(sessionManager.getMOBILENUM());\n tvBranch.setText(sessionManager.getBRANCH());\n\n return view;\n }", "public void layoutView()\n\t{\n\t\tthis.setLayout(new GridLayout(2,5));\n\t\tthis.add(expression);\n\t\tthis.add(var);\n\t\tthis.add(start);\n\t\tthis.add(end);\n\t\tthis.add(this.plot);\n\t\tthis.add(InputView.coords);\n\t\tthis.add(this.in);\n\t\tthis.add(this.out);\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tthis.requestWindowFeature(Window.FEATURE_NO_TITLE); \r\n\t\tsetContentView(R.layout.account);\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tfindView();\r\n\t\tinitData();\r\n\t\tsetListener();\r\n\t\tsetData();\r\n\t}", "public JPanel getModifyClientAccountPanel() {\n clientAccountView = new ClientAccountView();\n clientAccountView.setFormToModify();\n return clientAccountView;\n }", "private void initView() {\n\t\tuiBinder.createAndBindUi(this);\n\t\tRootPanel.get(\"rolePanelContainer\").add(cpanel);\n\t\t\n\t\tlb.setVisibleItemCount(VISIBLE_ITEM);\n\t\t\n\t\t// Fill the combo\n\t\tList<RoleEnum> comboList = RoleEnum.comboList();\n\t\tfor (int i = 0; i < comboList.size(); i++) {\n\t\t\tlbRoleCombo.addItem(comboList.get(i).value);\t\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n FacebookSdk.sdkInitialize(getActivity());\n callbackManager = CallbackManager.Factory.create();\n rootView = inflater.inflate(dk.eatmore.demo.R.layout.fragment_login_main, parent, false);\n setupUI(rootView);\n// setupUI(rootView.findViewById(R.id.signupcoordinatorLayout));\n initView();//initialization\n initObjects();\n initGesture();\n onClickListener();\n // iitDialog();\n initShimmerEffect();\n getRestroInfo();\n\n return rootView;\n }", "private void initViews(View v) {\n\t\tuser_head_img = (ImageView) v.findViewById(R.id.user_head_img);\r\n\t\tuser_head_img.setImageResource(R.drawable.icon_user_img);\r\n\t\tString id = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUseId();\r\n\t\tList<ImageBean> bean = dao.select(id);\r\n\t\tif (bean != null && bean.size() > 0) {\r\n\t\t\tImageLoader.getInstance().displayImage(bean.get(0).getUrl(),\r\n\t\t\t\t\tuser_head_img, ImageLoadOptions.getOptions());\r\n\t\t} else {\r\n\t\t\tuser_head_img.setImageResource(R.drawable.icon_user_img);\r\n\t\t}\r\n\t\ttv_account = (TextView) v.findViewById(R.id.tv_account);\r\n\t\tString account = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUserName();\r\n\t\ttv_account.setText(account);\r\n\t\ttv_tel = (TextView) v.findViewById(R.id.tv_tel);\r\n\t\tString tel = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUserTel();\r\n\t\ttv_tel.setText(StringUtils.getTelNum(tel));\r\n\t\ttxt_zcgl = (TextView) v.findViewById(R.id.txt_zcgl);\r\n\t\ttxt_tzgl = (TextView) v.findViewById(R.id.txt_tzgl);\r\n\t\ttxt_jlcx = (TextView) v.findViewById(R.id.txt_jlcx);\r\n\t\ttxt_wdyhk = (TextView) v.findViewById(R.id.txt_wdyhk);\r\n\t\ttxt_wdxx = (TextView) v.findViewById(R.id.txt_wdxx);\r\n\t\ttxt_myredpager = (TextView) v.findViewById(R.id.txt_myredpager);\r\n\t\tlayout_zhaq = (RelativeLayout) v.findViewById(R.id.layout_zhaq);\r\n\t\tlayout_ssmm = (RelativeLayout) v.findViewById(R.id.layout_ssmm);\r\n\t\ttv_safelevel = (TextView) v.findViewById(R.id.tv_safelevel);\r\n\t\tString safelevel = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getSafelevel();\r\n\t\ttv_safelevel.setText(safelevel);\r\n\t\ttv_zhye = (TextView) v.findViewById(R.id.tv_zhye);\r\n\t\tlinearlayout = (LinearLayout) v.findViewById(R.id.linearlayout);\r\n\t\ttv_ssmm = (TextView) v.findViewById(R.id.tv_ssmm);\r\n\t\tboolean isHasGesturePsd = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).isHasGesturePsd();\r\n\t\tif (isHasGesturePsd) {\r\n\t\t\ttv_ssmm.setText(R.string.ssmm_msg);\r\n\t\t} else {\r\n\t\t\ttv_ssmm.setText(R.string.no_setting);\r\n\t\t}\r\n\t}", "@Override\n public void createInitialLayout(IPageLayout layout) {\n defineActions(layout);\n defineLayout(layout);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_select_idp_callback, container, false);\n\n LinearLayout selectAuthenticationLayout = view.findViewById(R.id.selectAuthenticationLayout);\n LinearLayout selectIdpLayout = view.findViewById(R.id.selectIdpLayout);\n\n\n for (SelectIdPCallback.IdPValue idp : callback.getProviders()) {\n View v = getView(idp);\n if (v != null) {\n v.setOnClickListener(v1 -> {\n callback.setValue(idp.getProvider());\n onDataCollected();\n next();\n });\n selectIdpLayout.addView(v);\n Space space = new Space(getContext());\n space.setMinimumWidth(20);\n selectIdpLayout.addView(space);\n }\n }\n if (showLocalAuthentication()) {\n suspend();\n View v = getLocalAuthenticationView();\n v.setOnClickListener(v1 -> {\n callback.setValue(LOCAL_AUTHENTICATION);\n onDataCollected();\n next();\n });\n selectAuthenticationLayout.addView(v);\n }\n return view;\n }", "public RequestAccessView() {\r\n setHeightFull();\r\n setClassName(StyleConstants.FIRE_GRADIENT.getName());\r\n setAlignItems(Alignment.CENTER);\r\n setJustifyContentMode(JustifyContentMode.CENTER);\r\n add(initRegisterForm());\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_priv_profile, container, false);\n initializeViews(v);\n \n return v;\n }", "private void setupViews(View view) {\n FragmentManager manager = getChildFragmentManager();\n sportsSpinner = (ColoredSpinnerFragment)\n manager.findFragmentById(R.id.sportsSpinnerFragment);\n\n logOut = view.findViewById(R.id.signout);\n\n logOut.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FirebaseAuth.getInstance().signOut();\n }\n });\n backgroundPicture = view.findViewById(R.id.profile_background);\n usernameText = view.findViewById(R.id.userName);\n expText = view.findViewById(R.id.exp_search);\n followersText = view.findViewById(R.id.followers);\n tierText = view.findViewById(R.id.following);\n sportsmanshipBar = view.findViewById(R.id.ratingBar);\n profilePicture = view.findViewById(R.id.profilePic);\n badgeRecycler = view.findViewById(R.id.profileBadgeRecycler);\n }", "public LinearLayout rootView(){\n buttonIndex = 0;\n buttonPayIndex = 0;\n buttonFunctionIndex = 0;\n\n\n LinearLayout lrl = new LinearLayout(getContext());\n LinearLayout.LayoutParams rlp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n rlp.setMargins(0,5,0,0);\n lrl.setLayoutParams(rlp);\n lrl.setOrientation(LinearLayout.VERTICAL);\n lrl.setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n lrl.setWeightSum(rows);\n\n for(int index = 0; index < rows; index++){\n lrl.addView(createLinearLayout());\n }\n return lrl;\n }", "NodeLayout createNodeLayout();", "private void fillLayout(View view) {\n findViews(view);\n\n //collect our bundle and populate our layout\n Bundle bundle = getArguments();\n\n Long id = bundle.getLong(\"id\", 0);\n String companyName = bundle.getString(\"companyName\");\n String modelName = bundle.getString(\"modelName\");\n double tankVolume = bundle.getDouble(\"tankVolume\", 0);\n String gearbox = bundle.getString(\"gearbox\");\n int seats = bundle.getInt(\"seats\", 0);\n String pictureURL = bundle.getString(\"pictureURL\");\n\n //set elements\n new DownLoadImageTask(modelDetailImageView, id, view.getContext()).execute(pictureURL);\n modelDetailIdTextView.setText(Long.toString(id));\n modelDetailCompanyNameTextView.setText(companyName);\n modelDetailModelNameTextView.setText(modelName);\n modelDetailTankVolumeTextView.setText(Double.toString(tankVolume));\n modelDetailGearboxTextView.setText(gearbox);\n modelDetailSeatsTextView.setText(Integer.toString(seats));\n\n getActivity().setTitle(\"Model #\" + id);\n }" ]
[ "0.65698695", "0.6442298", "0.62980723", "0.6271836", "0.6254957", "0.621452", "0.6193965", "0.6165388", "0.6140791", "0.6127326", "0.6125541", "0.6105059", "0.60762167", "0.5954792", "0.5926029", "0.58992356", "0.5899184", "0.5897521", "0.58907014", "0.58830637", "0.5864406", "0.5846551", "0.5831284", "0.58228666", "0.58201665", "0.581368", "0.58057874", "0.57974833", "0.5781003", "0.57648855", "0.57574177", "0.5755042", "0.57401085", "0.5719971", "0.5711935", "0.57086396", "0.57032794", "0.5691779", "0.5689379", "0.5679762", "0.56768996", "0.56714296", "0.5667712", "0.56577206", "0.56530935", "0.56361824", "0.5633758", "0.56312203", "0.5625247", "0.56199837", "0.5610947", "0.5596716", "0.5588518", "0.5577008", "0.55684495", "0.5566647", "0.5564916", "0.5561026", "0.5556858", "0.5545994", "0.55361456", "0.5525001", "0.5510451", "0.5509227", "0.55054116", "0.5499396", "0.54979515", "0.54947215", "0.5493469", "0.54735315", "0.5470109", "0.54638106", "0.54613745", "0.5458429", "0.54549116", "0.5453355", "0.5444239", "0.54416126", "0.5437766", "0.5437437", "0.54369175", "0.543459", "0.5426003", "0.54165614", "0.54075813", "0.5405068", "0.54018444", "0.53971654", "0.5395722", "0.5395348", "0.5391395", "0.53906965", "0.539059", "0.538324", "0.5377151", "0.53722966", "0.5371446", "0.53651", "0.5355448", "0.5355041" ]
0.82650983
0
Create the balance view.
private View createBalance() { TextView balance = new TextView(getContext()); LayoutParams blp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT, 1); balance.setGravity(Gravity.RIGHT); balance.setLayoutParams(blp); balance.setText("" + account.getBalance()); balance.setTextSize(16); balance.setTypeface(Typeface.DEFAULT_BOLD); if (account.getBalance() < 0) { balance.setTextColor(getContext().getResources().getColor(R.color.negative)); } else { balance.setTextColor(getContext().getResources().getColor(R.color.positive)); } return balance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayTotalBalance(View view) {\n AdminAllBalanceFragment balanceFragment = new AdminAllBalanceFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n DatabaseHelper db = new DatabaseHelper(this);\n atm.setCurrentUser(db.getUserDetails(atm.getCurrentUser().getId()));\n transaction.replace(R.id.atm_fragment_container, balanceFragment);\n transaction.addToBackStack(null);\n\n transaction.commit();\n }", "private void buildAccountBalancePane() // buildAccountBalancePane method start\n\t{\n\t\t// creating object\n\t\tbalanceOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tbalanceOutput.setEditable(false);\n\t\tbalanceOutput.setFont(font);\n\t\tbalanceOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\taccountBalancePane.add(balanceOutput);\n\t\taccountBalancePane.add(new JScrollPane(balanceOutput));\n\t}", "public void displayUserBalance(View view) {\n final AdminBalanceFragment balanceFragment = new AdminBalanceFragment();\n balanceFragment.setContext(this);\n\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n DatabaseHelper db = new DatabaseHelper(this);\n atm.setCurrentUser(db.getUserDetails(atm.getCurrentUser().getId()));\n transaction.replace(R.id.atm_fragment_container, balanceFragment);\n transaction.addToBackStack(null);\n\n transaction.commit();\n }", "public void viewBalance() {\n\t\tSystem.out.println(\"This is your current Balance $\" + tuitionBalance);\n\t}", "public BalanceView(Integer productCode, NomenclatureView parent, SalesView salesView) {\n\n initComponents();\n\n Util.initJIF(this, \"Баланс\", parent, salesView);\n Util.initJTable(jtBalance);\n\n this.productCode = productCode;\n this.parent = parent;\n this.salesView = salesView;\n\n showTable();\n }", "public fechBalance() {\n initComponents(); \n \n bd=new coneccionBD();\n acum1=0;\n acum2=0;\n acum3=0;\n acum4=0;\n acum5=0;\n padreNivel=\"\";\n }", "private void listBalances() {\n\t\t\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.BalanceFilter createBalanceFilter()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BalanceFilterImpl();\n }", "@Override\n public View onCreateView(@Nonnull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_wallet, container, false);\n\n // Retrieve data\n mExchangeRates = Data.getRates();\n mCollectedCoins = Data.getCollectedCoins();\n mReceivedCoins = Data.getReceivedCoins();\n\n // Fetch most up to date received coins list in background\n updateReceivedCoinsInBackground();\n\n // Initialise buttons and progress bar\n FloatingActionButton fabSend = view.findViewById(R.id.sendcoins);\n Button btnCollected = view.findViewById(R.id.btn_collected);\n Button btnReceived = view.findViewById(R.id.btn_received);\n mProgressBar = view.findViewById(R.id.progressBar);\n\n // Initialise recycler views\n mRecyclerViewCol = view.findViewById(R.id.col_recycler_view);\n mRecyclerViewRec = view.findViewById(R.id.rec_recycler_view);\n mRecyclerViewRec.setVisibility(View.INVISIBLE);\n\n // Set layout manager\n RecyclerView.LayoutManager mLayoutCol = new LinearLayoutManager(inflater.getContext());\n mRecyclerViewCol.setLayoutManager(mLayoutCol);\n RecyclerView.LayoutManager mLayoutRec = new LinearLayoutManager(inflater.getContext());\n mRecyclerViewRec.setLayoutManager(mLayoutRec);\n\n // Initialise adapter with coins ArrayList\n mCollectedAdapter = new CoinAdapter(mCollectedCoins, inflater.getContext());\n mReceivedAdapter = new CoinAdapter(mReceivedCoins, inflater.getContext());\n\n // Add line a line between each object in the recycler view list\n mRecyclerViewCol.addItemDecoration(\n new DividerItemDecoration(inflater.getContext(), LinearLayoutManager.VERTICAL));\n mRecyclerViewRec.addItemDecoration(\n new DividerItemDecoration(inflater.getContext(), LinearLayoutManager.VERTICAL));\n\n // Set adapters\n mRecyclerViewCol.setAdapter(mCollectedAdapter);\n mRecyclerViewRec.setAdapter(mReceivedAdapter);\n\n fabSend.setOnClickListener(this);\n btnCollected.setOnClickListener(this);\n btnReceived.setOnClickListener(this);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_withdraw, container, false);\n\n image.add(R.drawable.permata);\n image.add(R.drawable.bri);\n image.add(R.drawable.bni);\n\n title.add(\"Bank Permata Tbk x3722\");\n title.add(\"Bank Rakyat Indonesia x5500\");\n title.add(\"Bank Nasional Indonesia x3239\");\n\n recyclerViewWithdraw = view.findViewById(R.id.withdrawRecyclerView);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);\n recyclerViewWithdraw.setLayoutManager(linearLayoutManager);\n withdrawAdapter = new WithdrawAdapter(getActivity(), image, title);\n withdrawAdapter.setClickListener(this);\n recyclerViewWithdraw.setAdapter(withdrawAdapter);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v = inflater.inflate(R.layout.fragment_budget, container, false);\n bdb = new BudgetDBHandler(v.getContext(), \"we\", null, 1);\n SimpleDateFormat df = new SimpleDateFormat(\"MM-dd-yyyy\");\n SimpleDateFormat dt = new SimpleDateFormat(\"EEE MMM dd yyyy\");\n amount = v.findViewById(R.id.budAmount);\n curBud = v.findViewById(R.id.textView3);\n curBudDate = v.findViewById(R.id.textView4);\n Budget bud = bdb.GetAllRecords();\n if (bud.GetAmount() == 0){\n v.findViewById(R.id.setBud).setVisibility(v.VISIBLE);\n v.findViewById(R.id.showBud).setVisibility(v.INVISIBLE);\n } else {\n Log.d(\"DDate1\",bud.GetDate());\n v.findViewById(R.id.setBud).setVisibility(v.INVISIBLE);\n v.findViewById(R.id.showBud).setVisibility(v.VISIBLE);\n }\n curBud.setText(\"Current Budget: \" + String.format(\"$%.2f\", bud.GetAmount()));\n try{\n Date nDate = df.parse(bud.GetDate());\n Log.d(\"BudDate\", dt.format(nDate));\n curBudDate.setText(\"Budget End Date:\\n\\n \" + dt.format(nDate));\n }catch(Exception e){\n Log.d(\"curBudDate\",e.toString());\n }\n bdb.close();\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_wallet, null, false);\n provider = new PreferenceProvider(getActivity());\n alertDialog = CommonAlertDialog.CreateDialog(getActivity(), getString(R.string.please_wait));\n\n other = v.findViewById(R.id.other);\n other.setOnClickListener(this);\n addMoneyTv = v.findViewById(R.id.addMoneyTv);\n addMoneyTv.setOnClickListener(this);\n rs_100 = v.findViewById(R.id.rs_100);\n rs_100.setOnClickListener(this);\n rs_200 = v.findViewById(R.id.rs_200);\n rs_200.setOnClickListener(this);\n rs_500 = v.findViewById(R.id.rs_500);\n rs_500.setOnClickListener(this);\n rs_1000 = v.findViewById(R.id.rs_1000);\n rs_1000.setOnClickListener(this);\n CurrentBalance = v.findViewById(R.id.CurrentBalance);\n rs_100.setText(String.format(getString(R.string.rs100), 100));\n rs_200.setText(String.format(getString(R.string.rs100), 200));\n rs_500.setText(String.format(getString(R.string.rs100), 500));\n rs_1000.setText(String.format(getString(R.string.rs100), 1000));\n\n int currentBalance = Integer.parseInt(\"122\");\n CurrentBalance.setText(String.format(getString(R.string.rs100),currentBalance));\n\n return v;\n\n }", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public void showAccountBalance(){\n balance();\n\n }", "private View createCurrency() {\r\n\t\tTextView t = new TextView(getContext());\r\n\t\tLayoutParams blp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\tblp.leftMargin = 5;\r\n\t\tt.setLayoutParams(blp);\r\n\r\n\t\tif (account.getCurrency().length() > 3) {\r\n\t\t\tt.setText(account.getCurrency().substring(3));\r\n\t\t} else {\r\n\t\t\tt.setText(account.getCurrency());\r\n\t\t}\r\n\t\tt.setTextSize(16);\r\n\t\tTypeface font = CurrencyUtil.currencyFace;\r\n\t\tt.setTypeface(font);\r\n\t\tif (account.getBalance() < 0) {\r\n\t\t\tt.setTextColor(getContext().getResources().getColor(R.color.negative));\r\n\t\t} else {\r\n\t\t\tt.setTextColor(getContext().getResources().getColor(R.color.positive));\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "public View() {\n\t\tlastBlk = new HashMap<>();\n\t\tstate = new HashMap<>();\n\t\tbalance = new HashMap<>();\n\t\tmode = new HashMap<>();\n\t\ttoken = new HashMap<>();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n final View netBankingFragment = inflater.inflate(R.layout.fragment_net_banking, container, false);\n\n pb = (ProgressBar) netBankingFragment.findViewById(R.id.pb);\n\n netBankingFragment.findViewById(R.id.nbPayButton).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n final HashMap<String, Object> data = new HashMap<String, Object>();\n try {\n\n data.put(\"bankcode\", bankCode);\n data.put(\"key\", ((HomeActivity) getActivity()).getBankObject().getJSONObject(\"paymentOption\").getString(\"publicKey\").replaceAll(\"\\\\r\", \"\"));\n\n pb.setVisibility(View.VISIBLE);\n mCallback.goToPayment(\"NB\", data);\n // Session.getInstance(getActivity()).sendToPayUWithWallet(((HomeActivity)getActivity()).getBankObject(),\"NB\",data,getArguments().getDouble(\"cashback_amt\"),getArguments().getDouble(\"wallet\"));\n } catch (JSONException e) {\n pb.setVisibility(View.GONE);\n Toast.makeText(getActivity(), \"Something went wrong\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n\n }\n });\n /* netBankingFragment.findViewById(R.id.useNewCardButton).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n getActivity().getFragmentManager().popBackStack();\n }\n });*/\n\n return netBankingFragment;\n\n }", "public Balance() {\r\n value = BigDecimal.ZERO;\r\n }", "private View createAccountLayout() {\r\n\t\tLinearLayout accountLayout = new LinearLayout(getContext());\r\n\t\tLayoutParams aclp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT, 3);\r\n\t\taccountLayout.setOrientation(VERTICAL);\r\n\t\taccountLayout.setLayoutParams(aclp);\r\n\t\tTextView t = new TextView(getContext());\r\n\t\tLayoutParams tlp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\r\n\t\tt.setLayoutParams(tlp);\r\n\t\tt.setText(account.getName());\r\n\t\tt.setTextSize(16);\r\n\t\tt.setTypeface(Typeface.DEFAULT_BOLD);\r\n\t\tt.setTextColor(getContext().getResources().getColor(R.color.black));\r\n\t\taccountLayout.addView(t);\r\n\r\n\t\tTextView desc = new TextView(getContext());\r\n\t\tif (account.getLastOperation() != null) {\r\n\t\t\tdesc.setText(\"\" + DateUtil.defaultDateFormat.format(account.getLastOperation()));\r\n\t\t}\r\n\t\taccountLayout.addView(desc);\r\n\t\treturn accountLayout;\r\n\t}", "public InvoiceBalance()\n {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main, container, false);\n NavigationView navigationView = getActivity().findViewById( R.id.nav_view );\n View headerView = navigationView.getHeaderView(0);\n\n userNameText = headerView.findViewById(R.id.userName);\n userEmailText = headerView.findViewById(R.id.userEmail);\n\n transactionsCalendar = view.findViewById(R.id.transactionsCalendar);\n // loadingText = view.findViewById(R.id.loadingText);\n balanceValue = view.findViewById(R.id.balanceValue);\n recyclerTransactions = view.findViewById(R.id.recyclerTransactions);\n balanceMonthText = view.findViewById(R.id.balanceMonthText);\n\n configCalendarView();\n // swipe();\n\n transactionsAdapter = new TransactionsAdapter(transactionsList, getActivity().getApplicationContext() );\n\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity().getApplicationContext());\n recyclerTransactions.setLayoutManager(layoutManager);\n recyclerTransactions.setHasFixedSize(true);\n recyclerTransactions.addItemDecoration( new DividerItemDecoration( getActivity().getApplicationContext(), LinearLayout.VERTICAL) );\n recyclerTransactions.setAdapter(transactionsAdapter);\n\n return view;\n }", "private void buildAdjustedTrialBalancePane() // buildAdjustedTrialBalancePane method start\n\t{\n\t\t// creating object\n\t\tATBOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tATBOutput.setText(log.adjustedTrialBalance());\n\t\tATBOutput.setEditable(false);\n\t\tATBOutput.setFont(font);\n\t\tATBOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\tadjustedTrialBalancePane.add(ATBOutput);\n\t\tadjustedTrialBalancePane.add(new JScrollPane(ATBOutput));\n\t}", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_amount, container, false);\n }", "public interface MyAcountView extends BaseView{\n void renderBalance(BalanceBean bean);\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_update_account, container, false);\n mActivity.initToolBar(\"\",false);\n mActivity.hideToolbar();\n initViews(view);\n initListeners();\n getAllCurrency();\n return view;\n }", "public AccountViewModel(Model model, ViewState viewState) {\n this.model = model;\n this.viewState = viewState;\n value = new SimpleDoubleProperty();\n total = new SimpleDoubleProperty();\n balance = new SimpleDoubleProperty();\n user = new SimpleStringProperty();\n }", "public ContractView() {\n initComponents();\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(44, 47, 90, 24);\r\n\t\tlabel.setText(\"充值金额:\");\r\n\t\t\r\n\t\ttext_balance = new Text(shell, SWT.BORDER);\r\n\t\ttext_balance.setBounds(156, 47, 198, 30);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\t//确认充值\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tString balance=text_balance.getText().trim();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint i=dao.add(balance);\r\n\t\t\t\t\tif(i>0){\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"成功提示\", \"充值成功\");\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"错误提示\", \"所充值不能为零\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(140, 131, 114, 34);\r\n\t\tbutton.setText(\"确认充值\");\r\n\r\n\t}", "public Deposit() {\n initComponents();\n \n l1.setOpaque(true);\n l1.setBorder(new LineBorder(Color.BLACK,5));\n t1.setEditable(false);\n t2.setEditable(false);\n setResizable(false);\n getContentPane().setBackground(new Color(0,51,102));\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View RootView = inflater.inflate(R.layout.fragment_vendor_bank_detail, container, false);\n\n bank_NameTxt = RootView.findViewById(R.id.bank_NameTxt);\n bank_accountNumTxt = RootView.findViewById(R.id.bank_accountNumTxt);\n bank_IfscTxt = RootView.findViewById(R.id.bank_IfscTxt);\n bank_Submit = RootView.findViewById(R.id.bank_Submit);\n\n bank_NameTxt.setText(bankName);\n bank_accountNumTxt.setText(accountNum);\n bank_IfscTxt.setText(ifsc);\n\n bank_Submit.setOnClickListener(this);\n\n return RootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_credit, container, false);\n\n\n recyclerView = v.findViewById(R.id.rcv);\n layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);\n //gridLayoutManager = new GridLayoutManager(getContext(), 2, GridLayoutManager.VERTICAL, false);\n recyclerView.setLayoutManager(layoutManager);\n credit_amount = v.findViewById(R.id.tv_amt_credit);\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(retrofitClient.BaseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n apiAccess = retrofit.create(Api.class);\n try {\n Thread.sleep(200);\n credit();\n // sum(tmodel);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return v;\n }", "public void balanceMenu(){\n\t\tstate = ATM_State.BALANCE;\n\t\tdouble balance = Bank.getBalance(accountID); \n\t\tgui.setDisplay(\"Current balance: \\n$\" + balance);\t\n\t}", "public interface WalletBalanceView extends BaseView {\n void renderAccountInfo(NewAccountInfo info);\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_checkout_total, container, false);\n }", "public void createNewAccountWithOpeningBalanceHelper() {\n\t\tparseDateTextFieldHelper();\n\t\tBalance balance = data.createNewAccountWithOpeningBalance();\n\t\tLocalDate date = LocalDate.of(year, month, dayOfMonth);\n\t\tbalance.setDate(date);\n\t\tJTextField amount = data.getTextFieldBalance();\n\t\t// this before was not being set, i thought i set it in expectedResult but\n\t\t// that's a different object!\n\t\tbalance.setAmount(Float.parseFloat(amount.getText()));\n\t\t// I think you can actually just insert the values here instead if using get()\n\t\tBalance resultExpected = new Balance(bankTest, accountTest,\n\t\t\t\tdate.getYear(), date.getMonthValue(), date.getDayOfMonth(),\n\t\t\t\tFloat.parseFloat(amount.getText()), TEST_TXTR_EXTRA_NOTES);\n\t\tassertEquals(resultExpected, balance);\n\t}", "public Person balance(NotNegInt balance)\n {\n if(balance == null) throw new NullPointerException(\"The field balance in the Person ValueDomain may not be null\");\n edma_value[4] = ((IValueInstance) balance).edma_getValue();\n return new PersonImpl(PersonImpl.edma_create(edma_value));\n }", "public BankPanel() {\r\n\t super();\r\n\t}", "interface WalletView extends MvpView\n{\n\tvoid setBaseCurrency(CurrencyEnum baseCurrency);\n\n\tvoid setDateRange(DateRange dateRange);\n\n\t@StateStrategyType(AddToEndSingleStrategy.class)\n\tvoid setBalance(WalletSummary data);\n\n\tvoid showProgress(boolean show);\n\n\tvoid setRefreshing(boolean refreshing);\n\n\tvoid showSnackbarMessage(String message);\n\n\tvoid setTransactions(List<WalletTransaction> transactions, List<SimpleSectionedRecyclerViewAdapter.Section> sections);\n\n\tvoid addTransactions(List<WalletTransaction> transactions, List<SimpleSectionedRecyclerViewAdapter.Section> sections);\n}", "public Deposit(int userAccountNumber, Screen atmScreen, BankDataBase bankDatabase, UserInterface UI, DepositSlot atmDepositSlot)\n {\n super( userAccountNumber, atmScreen, bankDatabase);\n face = UI;\n depositSlot = atmDepositSlot;\n }", "public Builder clearBalance() {\n \n balance_ = getDefaultInstance().getBalance();\n onChanged();\n return this;\n }", "public AccountSummaryView(Context context, Account account) {\r\n\t\tsuper(context);\r\n\t\tthis.account = account;\r\n\t\tLayoutParams lp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\tsetLayoutParams(lp);\r\n\t\tsetBackgroundDrawable(context.getResources().getDrawable(R.drawable.list_item_background_states));\r\n\r\n\t\taddView(createIcon());\r\n\r\n\t\taddView(createAccountLayout());\r\n\r\n\t\taddView(createBalance());\r\n\t\taddView(createCurrency());\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_stats_layout, container, false);\n Log.d(TAG,\"onCreateView: Starting...\");\n\n initComponents(view);\n FileUtils services = new FileUtils();\n\n List<Integer> listNumberOfCoins = services.readFromFileTotalNumberOfEachCoin();\n setCoinPercentageValuesOnTextViews(listNumberOfCoins);\n\n return view;\n }", "@Test\n\tpublic void createNewAccountWithOpeningBalanceDebitTest() {\n\t\tcreateAccountDebtsTest();\n\t\tcreateNewAccountWithOpeningBalanceHelper();\n\t}", "public BankModel() {\n accounts = new ArrayList<AccountModel>();\n\n // Master account inbedded into system for easy access to test features.\n accounts.add(new AccountModel(\"c\", \"123\", 500));\n }", "public void setBalance(float balance) {\n this.balance = balance;\n }", "public ViewEntry() {\n initComponents();\n pnlRates.add(new ViewRateSchedule()); \n pnlRates.validate();\n }", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "@Override\r\n\tpublic double showbalanceDao() {\n\t\t\r\n\t\treturn temp.getCustBal();\r\n\t}", "private void buildBalanceSheetPane() // buildBalanceSheetPane method start\n\t{\n\t\t// creating object\n\t\tBSOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tBSOutput.setText(log.balanceSheet());\n\t\tBSOutput.setEditable(false);\n\t\tBSOutput.setFont(font);\n\t\tBSOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\tbalanceSheetPane.add(BSOutput);\n\t\tbalanceSheetPane.add(new JScrollPane(BSOutput));\n\t}", "transactionDisplayer(IOTransactionLogic t) {\n\t\t\t\n\t\t\ttransaction = t;\n\t\t\tdouble width = paneList.getWidth() / 3;\n\t\t\tlblDate = new Label(transaction.getDate().toString());\n\t\t\tlblCaption = new Label(transaction.getName());\n\t\t\tlblPrix = new Label(\n\t\t\t\t\tDouble.toString(transaction.getAmount()) + \" CHF\");\n\t\t\tpaneDisplay = new GridPane();\n\t\t\t\n\t\t\tpaneDisplay.getChildren().add(lblDate);\n\t\t\tpaneDisplay.getChildren().add(lblCaption);\n\t\t\tpaneDisplay.getChildren().add(lblPrix);\n\t\t\tpaneDisplay.setPadding(new Insets(10));\n\t\t\t\n\t\t\tlblPrix.setStyle(\" -fx-text-fill: \" + Utility.textColorBasedOnGB(\n\t\t\t\t\tColor.valueOf(t.getCategory().getColor())));\n\t\t\tlblCaption.setStyle(\" -fx-text-fill: \" + Utility.textColorBasedOnGB(\n\t\t\t\t\tColor.valueOf(t.getCategory().getColor())));\n\t\t\tlblDate.setStyle(\" -fx-text-fill: \" + Utility.textColorBasedOnGB(\n\t\t\t\t\tColor.valueOf(t.getCategory().getColor())));\n\t\t\t\n\t\t\tpaneDisplay\n\t\t\t\t\t.setConstraints(lblDate, 0, 0, 1, 1, HPos.LEFT, VPos.CENTER,\n\t\t\t\t\t\t\tPriority.SOMETIMES, Priority.ALWAYS);\n\t\t\tpaneDisplay.setConstraints(lblCaption, 1, 0, 1, 1, HPos.LEFT,\n\t\t\t\t\tVPos.CENTER, Priority.SOMETIMES, Priority.ALWAYS);\n\t\t\tpaneDisplay.setConstraints(lblPrix, 2, 0, 1, 1, HPos.RIGHT,\n\t\t\t\t\tVPos.CENTER, Priority.SOMETIMES, Priority.ALWAYS);\n\t\t\t\n\t\t\t/*if (transaction.isIncome()) {\n\t\t\t\tpaneDisplay.setStyle(\"-fx-background-radius: 10px; -fx-background-color: \" + incomeColor + \";\");\n\t\t\t} else {\n\t\t\t\tpaneDisplay.setStyle(\"-fx-background-radius: 10px; -fx-background-color: \" + outgoColor + \";\");\n\t\t\t}*/\n\t\t\t\n\t\t\tpaneDisplay.setStyle(\n\t\t\t\t\t\"-fx-background-radius: 10px; -fx-background-color: \"\n\t\t\t\t\t\t\t+ Utility.toRGBCode(\n\t\t\t\t\t\t\tColor.valueOf(t.getCategory().getColor())) + \";\");\n\t\t\t\n\t\t\tController_dashboard.this.paneList.getChildren().add(paneDisplay);\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Withdraw Deposit\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosed(java.awt.event.WindowEvent evt) {\n formWindowClosed(evt);\n }\n });\n\n jTextArea1.setEditable(false);\n jTextArea1.setBackground(new java.awt.Color(153, 255, 204));\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n jButton1.setText(\"Withdraw\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Deposit\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Get Balance\");\n jButton3.setMaximumSize(new java.awt.Dimension(79, 79));\n jButton3.setMinimumSize(new java.awt.Dimension(25, 25));\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))\n .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public Balance(final BigDecimal value) {\r\n this.value = value;\r\n }", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}", "public BankAccount(String holderName, String number, float balance){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = balance;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bank_detail, container, false);\n unbinder = ButterKnife.bind(this,view);\n DaoSession daoSession = ((PasswordKeeper) getActivity().getApplication()).getDaoSession();\n bankDetailsDao = daoSession.getBankDetailsDao();\n QueryBuilder<BankDetails> bankDetailsQueryBuilder = bankDetailsDao.queryBuilder()\n .where(BankDetailsDao.Properties.Id.eq(bankId));\n bankDetails = bankDetailsQueryBuilder.unique();\n if(bankDetails.getTitle()!=null && bankDetails.getTitle().length()>0){\n bankTitle.setTitle(bankDetails.getTitle());\n }\n else{\n bankTitle.setTitle(\"NO TITLE\");\n }\n accountNo.setText(bankDetails.getAccountNo());\n bankName.setText(bankDetails.getBankName());\n ifscName.setText(\"IFSC : \"+bankDetails.getIfsc());\n branchName.setText(bankDetails.getBankBranch());\n if(bankDetails.getOnlineUsername()!=null && bankDetails.getOnlineUsername().length()>0){\n\n onlineLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1,R.layout.online_detail);\n showOnlineDetails(bankDetails.getOnlineUsername(),bankDetails.getOnlinePassword());\n }\n if(bankDetails.getCards()!=null && bankDetails.getCards().size()>0) {\n for (CardDetails cardDetails : bankDetails.getCards()) {\n if (viewStubCompat1.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1, R.layout.cc_dc_detail);\n break;\n }\n } else if (viewStubCompat2.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat2, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat2, R.layout.cc_dc_detail);\n break;\n }\n } else if (viewStubCompat3.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat3, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat3, R.layout.cc_dc_detail);\n break;\n }\n }\n showCCDCDetails(cardDetails);\n }\n }\n\n return view;\n }", "@Post(uri = \"/{accountId}/deposits\", consumes = MediaType.APPLICATION_JSON)\n @Operation(summary = \"Creates deposit\")\n void create(@Parameter(description = \"Account ID\") BigInteger accountId,\n @Parameter(description = \"Deposit model\") BalanceChangeRequest balanceChangeRequest);", "@Override\n public void Create() {\n\n initView();\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_account, container, false);\r\n }", "public TotalRevenueView() {\n\t\t\ttotalPrice = new Amount(0);\n\t}", "public Account(){\n this.id = 0;\n this.balance = 0;\n this.annualInterestRate = 0;\n this.dateCreated = new Date();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "public void setBalance(){\n balance.setBalance();\n }", "public double getBalance()\n \n {\n \n return balance;\n \n }", "public Wallet() {\n total_bal = 10;\n }", "public GraphView(List<Account> accounts, List<Block> blocks) {\n this.accounts = accounts;\n this.blocks = blocks;\n walletPositions = new List();\n initComponent();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_new_diary, container, false);\n\n tradeData = view.findViewById(R.id.tradeData);\n clear();\n ioacc.add(\"對方帳戶  \");\n trade.add(\"交易方向  \");\n amount.add(\"金額  \");\n remain.add(\"餘額\");\n ConnectMySql connectMySql = new ConnectMySql();\n connectMySql.execute(\"\");\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_account_income,\n container, false);\n init(view);\n setListener();\n\n return view;\n }", "View createView();", "@Override\n\tpublic void createItem(Object result) {\n\t\t\n\t\tunloadform();\n\t\tif (result != null) {\n\t\t\tIOTransactionLogic tr = (IOTransactionLogic) result;\n\t\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\t\tint month = Calendar.getInstance().get(Calendar.MONTH);\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(tr.getDate());\n\t\t\tint trYear = cal.get(Calendar.YEAR);\n\t\t\tint trMonth = cal.get(Calendar.MONTH);\n\t\t\t\n\t\t\tif ((year == trYear) && (month == trMonth)\n\t\t\t\t\t&& tr.getBankAccountID() == bal.getId()) {\n\t\t\t\ttransactionDisplayer trDisplayer = new transactionDisplayer(tr);\n\t\t\t\tsetDataLineChart();\n\t\t\t\tsetDataPieChart();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }", "Account(int id, double balance){\r\n\t\t//sets the default values and than the specified values of the id and balance\r\n\t\tsetId(id);\r\n\t\tsetBalance(balance);\t\t \r\n\t\tsetAnnualInterestRate(0);\r\n\t\tthis.dateCreated = new Date(System.currentTimeMillis());\r\n\t }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_bill_distribution_history, container, false);\n //delete records not in scope\n DatabaseManager.deleteUploadsBillHistory(this.getContext(), LandingActivity.meter_reader_id);\n\n ArrayList<UploadBillHistory> uploadBillHistories = DatabaseManager.getHistoryBillCards(this.getContext(), LandingActivity.meter_reader_id);\n\n BillDistributionHistoryAdapter adapter = new BillDistributionHistoryAdapter(this.getContext(), uploadBillHistories);\n\n lblBlankScreenMsg = rootView.findViewById(R.id.lbl_blank_msg);\n Typeface reg = App.getSansationRegularFont();\n lblBlankScreenMsg.setTypeface(reg);\n recyclerView = rootView.findViewById(R.id.recycler_view);\n layoutManager = new LinearLayoutManager(getActivity().getApplicationContext());\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n if(uploadBillHistories != null && uploadBillHistories.size() > 0)\n lblBlankScreenMsg.setVisibility(View.GONE);\n else\n lblBlankScreenMsg.setVisibility(View.VISIBLE);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_zestmoney, container, false);\n setUpUI(view);\n mPaymentParams = getArguments().getParcelable(PayuConstants.KEY);\n payuConfig = getArguments().getParcelable(PayuConstants.PAYU_CONFIG);\n salt = getArguments().getString(PayuConstants.SALT);\n return view;\n\n }", "public void onClick(View v){\n updateBalance();\n }", "public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }", "public interface BalanceActivityView extends BaseIView {\n void moneybalance(BalanceBean balanceBean);\n}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_bulan1, container, false);\r\n\r\n mBeratBibit1EditText = (EditText) rootView.findViewById(R.id.berat_bibit1_edit_text);\r\n mBeratBibit2EditText = (EditText) rootView.findViewById(R.id.berat_bibit2_edit_text);\r\n mBeratBibit3EditText = (EditText) rootView.findViewById(R.id.berat_bibit3_edit_text);\r\n mBeratPakan1TextView = (TextView) rootView.findViewById(R.id.berat_pakan1_text_view);\r\n mBeratPakan2TextView = (TextView) rootView.findViewById(R.id.berat_pakan2_text_view);\r\n mBeratPakan3TextView = (TextView) rootView.findViewById(R.id.berat_pakan3_text_view);\r\n mSaveProgressButton = (Button) rootView.findViewById(R.id.save_progress_button);\r\n\r\n db = new DatabaseHelper(getContext());\r\n\r\n Bundle extra = getActivity().getIntent().getExtras();\r\n if (extra != null) {\r\n pond_id = extra.getInt(Constant.ID);\r\n readPond();\r\n readProgress();\r\n }\r\n\r\n mSaveProgressButton.setOnClickListener(this);\r\n\r\n return rootView;\r\n }", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public static AmountFragment newInstance() {\n return new AmountFragment();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_detail_transaction, container, false);\n initView(view);\n\n if(transaction.getType()==0){\n rlProductName.setVisibility(View.GONE);\n rlQuantity.setVisibility(View.GONE);\n rlUnitPrice.setVisibility(View.GONE);\n rlTotal.setVisibility(View.GONE);\n rlCustomer.setVisibility(View.GONE);\n rlSalesMan.setVisibility(View.GONE);\n }else if(transaction.getType()==1){\n rlPayTo.setVisibility(View.GONE);\n rlPayment.setVisibility(View.GONE);\n rlHead.setVisibility(View.GONE);\n\n }\n\n setData();\n return view;\n }", "@Override\r\n public View onCreateView(final LayoutInflater inflater, final ViewGroup container,\r\n Bundle savedInstanceState) {\n Bundle bundle = getArguments();\r\n if (bundle != null) {\r\n bank_id = bundle.getInt(\"BANK_ID\");//String bankNam=db.getBankName(bank_id);\r\n Log.e(\"Bank in af\", String.valueOf(bank_id));\r\n }\r\n\r\n\r\n // Inflate the layout for this fragment\r\n View view = inflater.inflate(R.layout.fragment_address, container, false);\r\n\r\n btnBranch = (Button) view.findViewById(R.id.btnBranch);\r\n btnATM = (Button) view.findViewById(R.id.btnATM);\r\n btnExchange = (Button) view.findViewById(R.id.btnExchange);\r\n\r\n\r\n displayView(R.id.btnBranch);\r\n\r\n btnBranch.setSelected(true);\r\n btnBranch.setOnClickListener(this);\r\n btnATM.setOnClickListener(this);\r\n btnExchange.setOnClickListener(this);\r\n // etSearch.setFocusableInTouchMode(true);\r\n //etSearch.requestFocus();\r\n\r\n\r\n return view;\r\n }", "public float showBalance() {\n\t\treturn dao.showBalance();\r\n\t}", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_account, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n accountInfoBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account_info, container, false);\n return accountInfoBinding.getRoot();\n }", "private void makeDeposit() {\n\t\t\r\n\t}", "public void openOrderBalanceDialog() {\n\t\torderBalanceDialogBox = new DialogBox(true);\n\t\torderBalanceDialogBox.setGlassEnabled(true);\n\t\torderBalanceDialogBox.setText(\"Rentabilidad Pedido\");\n\t\torderBalanceDialogBox.setSize(\"250px\", \"150px\");\n\n\t\tVerticalPanel vp = new VerticalPanel();\n\t\tvp.setSize(\"250px\", \"150px\");\n\t\torderBalanceDialogBox.setWidget(vp);\n\n\t\tFlowPanel orderPanel = new FlowPanel();\n\t\torderPanel.setWidth(\"250px\");\n\n\t\t// Obten info del filtro forzado\n\t\tBmFilter forceFilter = getUiParams().getUiProgramParams(getBmObject().getProgramCode()).getForceFilter();\n\n\t\tUiRequisitionOrderView uiRequisitionOrderView = new UiRequisitionOrderView(getUiParams(), orderPanel, forceFilter.getValue());\n\t\tuiRequisitionOrderView.show();\t\t\t\t\t\n\n\t\tHorizontalPanel buttonPanel = new HorizontalPanel();\n\t\tbuttonPanel.add(orderBalanceCloseDialogButton);\n\n\t\tvp.add(orderPanel);\n\t\tvp.add(buttonPanel);\n\n\t\torderBalanceDialogBox.center();\n\t\torderBalanceDialogBox.show();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_transactions, container, false);\n ButterKnife.bind(this,view);\n userPreferences = new UserPreferences(getContext());\n init();\n\n\n return view;\n }", "public double getBalance(){\n return balance;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_loyalty_coin, container, false);\n }", "public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}", "public double getBalance(){\r\n\t\treturn balance;\r\n\t}", "private View create(PersistedView pView) {\n DsmSorting sorting = nameToSorting.get(pView.dsmSortingName);\n if (null == sorting) {\n sorting = DsmSorting.values()[0];\n }\n\n View view = new View();\n view.setName(decodeString(pView.name));\n view.setSorting(sorting);\n\n return view;\n }", "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }" ]
[ "0.6540715", "0.6335997", "0.61849356", "0.6100843", "0.5986788", "0.57963663", "0.5755976", "0.5753337", "0.5747602", "0.5716941", "0.5713456", "0.57044333", "0.5678916", "0.5673939", "0.5646856", "0.5639951", "0.5625573", "0.56254464", "0.56126046", "0.5599624", "0.5587319", "0.5563515", "0.5537969", "0.55355024", "0.5521787", "0.55054355", "0.5502274", "0.5497541", "0.54862434", "0.5481582", "0.5478114", "0.5476582", "0.5455736", "0.545294", "0.5437439", "0.54216856", "0.5417675", "0.5382243", "0.537723", "0.5376473", "0.5374662", "0.53678536", "0.5366142", "0.5348743", "0.5342699", "0.53324085", "0.53255993", "0.5321264", "0.53050387", "0.5303813", "0.52953714", "0.5295108", "0.5288222", "0.5287767", "0.5284409", "0.5273803", "0.5266438", "0.5264656", "0.5259628", "0.52555585", "0.5252897", "0.5250878", "0.5249578", "0.5246796", "0.5246717", "0.5245581", "0.52422446", "0.5240488", "0.5234164", "0.5230487", "0.5229911", "0.52250016", "0.5221468", "0.5221468", "0.5220889", "0.5205899", "0.5195343", "0.5189686", "0.5188311", "0.51821274", "0.51783067", "0.51778865", "0.51778865", "0.51683134", "0.5166584", "0.51660365", "0.51651007", "0.5164509", "0.5164509", "0.51630807", "0.5154653", "0.5152517", "0.5152233", "0.51520276", "0.51499486", "0.51453215", "0.5144133", "0.51429063", "0.5142769", "0.51384836" ]
0.7341546
0
Create the balance view.
private View createCurrency() { TextView t = new TextView(getContext()); LayoutParams blp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT); blp.leftMargin = 5; t.setLayoutParams(blp); if (account.getCurrency().length() > 3) { t.setText(account.getCurrency().substring(3)); } else { t.setText(account.getCurrency()); } t.setTextSize(16); Typeface font = CurrencyUtil.currencyFace; t.setTypeface(font); if (account.getBalance() < 0) { t.setTextColor(getContext().getResources().getColor(R.color.negative)); } else { t.setTextColor(getContext().getResources().getColor(R.color.positive)); } return t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private View createBalance() {\r\n\t\tTextView balance = new TextView(getContext());\r\n\t\tLayoutParams blp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT, 1);\r\n\t\tbalance.setGravity(Gravity.RIGHT);\r\n\t\tbalance.setLayoutParams(blp);\r\n\t\tbalance.setText(\"\" + account.getBalance());\r\n\t\tbalance.setTextSize(16);\r\n\t\tbalance.setTypeface(Typeface.DEFAULT_BOLD);\r\n\t\tif (account.getBalance() < 0) {\r\n\t\t\tbalance.setTextColor(getContext().getResources().getColor(R.color.negative));\r\n\t\t} else {\r\n\t\t\tbalance.setTextColor(getContext().getResources().getColor(R.color.positive));\r\n\t\t}\r\n\t\treturn balance;\r\n\t}", "public void displayTotalBalance(View view) {\n AdminAllBalanceFragment balanceFragment = new AdminAllBalanceFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n DatabaseHelper db = new DatabaseHelper(this);\n atm.setCurrentUser(db.getUserDetails(atm.getCurrentUser().getId()));\n transaction.replace(R.id.atm_fragment_container, balanceFragment);\n transaction.addToBackStack(null);\n\n transaction.commit();\n }", "private void buildAccountBalancePane() // buildAccountBalancePane method start\n\t{\n\t\t// creating object\n\t\tbalanceOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tbalanceOutput.setEditable(false);\n\t\tbalanceOutput.setFont(font);\n\t\tbalanceOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\taccountBalancePane.add(balanceOutput);\n\t\taccountBalancePane.add(new JScrollPane(balanceOutput));\n\t}", "public void displayUserBalance(View view) {\n final AdminBalanceFragment balanceFragment = new AdminBalanceFragment();\n balanceFragment.setContext(this);\n\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n DatabaseHelper db = new DatabaseHelper(this);\n atm.setCurrentUser(db.getUserDetails(atm.getCurrentUser().getId()));\n transaction.replace(R.id.atm_fragment_container, balanceFragment);\n transaction.addToBackStack(null);\n\n transaction.commit();\n }", "public void viewBalance() {\n\t\tSystem.out.println(\"This is your current Balance $\" + tuitionBalance);\n\t}", "public BalanceView(Integer productCode, NomenclatureView parent, SalesView salesView) {\n\n initComponents();\n\n Util.initJIF(this, \"Баланс\", parent, salesView);\n Util.initJTable(jtBalance);\n\n this.productCode = productCode;\n this.parent = parent;\n this.salesView = salesView;\n\n showTable();\n }", "public fechBalance() {\n initComponents(); \n \n bd=new coneccionBD();\n acum1=0;\n acum2=0;\n acum3=0;\n acum4=0;\n acum5=0;\n padreNivel=\"\";\n }", "private void listBalances() {\n\t\t\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.BalanceFilter createBalanceFilter()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BalanceFilterImpl();\n }", "@Override\n public View onCreateView(@Nonnull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_wallet, container, false);\n\n // Retrieve data\n mExchangeRates = Data.getRates();\n mCollectedCoins = Data.getCollectedCoins();\n mReceivedCoins = Data.getReceivedCoins();\n\n // Fetch most up to date received coins list in background\n updateReceivedCoinsInBackground();\n\n // Initialise buttons and progress bar\n FloatingActionButton fabSend = view.findViewById(R.id.sendcoins);\n Button btnCollected = view.findViewById(R.id.btn_collected);\n Button btnReceived = view.findViewById(R.id.btn_received);\n mProgressBar = view.findViewById(R.id.progressBar);\n\n // Initialise recycler views\n mRecyclerViewCol = view.findViewById(R.id.col_recycler_view);\n mRecyclerViewRec = view.findViewById(R.id.rec_recycler_view);\n mRecyclerViewRec.setVisibility(View.INVISIBLE);\n\n // Set layout manager\n RecyclerView.LayoutManager mLayoutCol = new LinearLayoutManager(inflater.getContext());\n mRecyclerViewCol.setLayoutManager(mLayoutCol);\n RecyclerView.LayoutManager mLayoutRec = new LinearLayoutManager(inflater.getContext());\n mRecyclerViewRec.setLayoutManager(mLayoutRec);\n\n // Initialise adapter with coins ArrayList\n mCollectedAdapter = new CoinAdapter(mCollectedCoins, inflater.getContext());\n mReceivedAdapter = new CoinAdapter(mReceivedCoins, inflater.getContext());\n\n // Add line a line between each object in the recycler view list\n mRecyclerViewCol.addItemDecoration(\n new DividerItemDecoration(inflater.getContext(), LinearLayoutManager.VERTICAL));\n mRecyclerViewRec.addItemDecoration(\n new DividerItemDecoration(inflater.getContext(), LinearLayoutManager.VERTICAL));\n\n // Set adapters\n mRecyclerViewCol.setAdapter(mCollectedAdapter);\n mRecyclerViewRec.setAdapter(mReceivedAdapter);\n\n fabSend.setOnClickListener(this);\n btnCollected.setOnClickListener(this);\n btnReceived.setOnClickListener(this);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_withdraw, container, false);\n\n image.add(R.drawable.permata);\n image.add(R.drawable.bri);\n image.add(R.drawable.bni);\n\n title.add(\"Bank Permata Tbk x3722\");\n title.add(\"Bank Rakyat Indonesia x5500\");\n title.add(\"Bank Nasional Indonesia x3239\");\n\n recyclerViewWithdraw = view.findViewById(R.id.withdrawRecyclerView);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);\n recyclerViewWithdraw.setLayoutManager(linearLayoutManager);\n withdrawAdapter = new WithdrawAdapter(getActivity(), image, title);\n withdrawAdapter.setClickListener(this);\n recyclerViewWithdraw.setAdapter(withdrawAdapter);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v = inflater.inflate(R.layout.fragment_budget, container, false);\n bdb = new BudgetDBHandler(v.getContext(), \"we\", null, 1);\n SimpleDateFormat df = new SimpleDateFormat(\"MM-dd-yyyy\");\n SimpleDateFormat dt = new SimpleDateFormat(\"EEE MMM dd yyyy\");\n amount = v.findViewById(R.id.budAmount);\n curBud = v.findViewById(R.id.textView3);\n curBudDate = v.findViewById(R.id.textView4);\n Budget bud = bdb.GetAllRecords();\n if (bud.GetAmount() == 0){\n v.findViewById(R.id.setBud).setVisibility(v.VISIBLE);\n v.findViewById(R.id.showBud).setVisibility(v.INVISIBLE);\n } else {\n Log.d(\"DDate1\",bud.GetDate());\n v.findViewById(R.id.setBud).setVisibility(v.INVISIBLE);\n v.findViewById(R.id.showBud).setVisibility(v.VISIBLE);\n }\n curBud.setText(\"Current Budget: \" + String.format(\"$%.2f\", bud.GetAmount()));\n try{\n Date nDate = df.parse(bud.GetDate());\n Log.d(\"BudDate\", dt.format(nDate));\n curBudDate.setText(\"Budget End Date:\\n\\n \" + dt.format(nDate));\n }catch(Exception e){\n Log.d(\"curBudDate\",e.toString());\n }\n bdb.close();\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_wallet, null, false);\n provider = new PreferenceProvider(getActivity());\n alertDialog = CommonAlertDialog.CreateDialog(getActivity(), getString(R.string.please_wait));\n\n other = v.findViewById(R.id.other);\n other.setOnClickListener(this);\n addMoneyTv = v.findViewById(R.id.addMoneyTv);\n addMoneyTv.setOnClickListener(this);\n rs_100 = v.findViewById(R.id.rs_100);\n rs_100.setOnClickListener(this);\n rs_200 = v.findViewById(R.id.rs_200);\n rs_200.setOnClickListener(this);\n rs_500 = v.findViewById(R.id.rs_500);\n rs_500.setOnClickListener(this);\n rs_1000 = v.findViewById(R.id.rs_1000);\n rs_1000.setOnClickListener(this);\n CurrentBalance = v.findViewById(R.id.CurrentBalance);\n rs_100.setText(String.format(getString(R.string.rs100), 100));\n rs_200.setText(String.format(getString(R.string.rs100), 200));\n rs_500.setText(String.format(getString(R.string.rs100), 500));\n rs_1000.setText(String.format(getString(R.string.rs100), 1000));\n\n int currentBalance = Integer.parseInt(\"122\");\n CurrentBalance.setText(String.format(getString(R.string.rs100),currentBalance));\n\n return v;\n\n }", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public void showAccountBalance(){\n balance();\n\n }", "public View() {\n\t\tlastBlk = new HashMap<>();\n\t\tstate = new HashMap<>();\n\t\tbalance = new HashMap<>();\n\t\tmode = new HashMap<>();\n\t\ttoken = new HashMap<>();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n final View netBankingFragment = inflater.inflate(R.layout.fragment_net_banking, container, false);\n\n pb = (ProgressBar) netBankingFragment.findViewById(R.id.pb);\n\n netBankingFragment.findViewById(R.id.nbPayButton).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n final HashMap<String, Object> data = new HashMap<String, Object>();\n try {\n\n data.put(\"bankcode\", bankCode);\n data.put(\"key\", ((HomeActivity) getActivity()).getBankObject().getJSONObject(\"paymentOption\").getString(\"publicKey\").replaceAll(\"\\\\r\", \"\"));\n\n pb.setVisibility(View.VISIBLE);\n mCallback.goToPayment(\"NB\", data);\n // Session.getInstance(getActivity()).sendToPayUWithWallet(((HomeActivity)getActivity()).getBankObject(),\"NB\",data,getArguments().getDouble(\"cashback_amt\"),getArguments().getDouble(\"wallet\"));\n } catch (JSONException e) {\n pb.setVisibility(View.GONE);\n Toast.makeText(getActivity(), \"Something went wrong\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n\n }\n });\n /* netBankingFragment.findViewById(R.id.useNewCardButton).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n getActivity().getFragmentManager().popBackStack();\n }\n });*/\n\n return netBankingFragment;\n\n }", "public Balance() {\r\n value = BigDecimal.ZERO;\r\n }", "private View createAccountLayout() {\r\n\t\tLinearLayout accountLayout = new LinearLayout(getContext());\r\n\t\tLayoutParams aclp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT, 3);\r\n\t\taccountLayout.setOrientation(VERTICAL);\r\n\t\taccountLayout.setLayoutParams(aclp);\r\n\t\tTextView t = new TextView(getContext());\r\n\t\tLayoutParams tlp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\r\n\t\tt.setLayoutParams(tlp);\r\n\t\tt.setText(account.getName());\r\n\t\tt.setTextSize(16);\r\n\t\tt.setTypeface(Typeface.DEFAULT_BOLD);\r\n\t\tt.setTextColor(getContext().getResources().getColor(R.color.black));\r\n\t\taccountLayout.addView(t);\r\n\r\n\t\tTextView desc = new TextView(getContext());\r\n\t\tif (account.getLastOperation() != null) {\r\n\t\t\tdesc.setText(\"\" + DateUtil.defaultDateFormat.format(account.getLastOperation()));\r\n\t\t}\r\n\t\taccountLayout.addView(desc);\r\n\t\treturn accountLayout;\r\n\t}", "public InvoiceBalance()\n {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main, container, false);\n NavigationView navigationView = getActivity().findViewById( R.id.nav_view );\n View headerView = navigationView.getHeaderView(0);\n\n userNameText = headerView.findViewById(R.id.userName);\n userEmailText = headerView.findViewById(R.id.userEmail);\n\n transactionsCalendar = view.findViewById(R.id.transactionsCalendar);\n // loadingText = view.findViewById(R.id.loadingText);\n balanceValue = view.findViewById(R.id.balanceValue);\n recyclerTransactions = view.findViewById(R.id.recyclerTransactions);\n balanceMonthText = view.findViewById(R.id.balanceMonthText);\n\n configCalendarView();\n // swipe();\n\n transactionsAdapter = new TransactionsAdapter(transactionsList, getActivity().getApplicationContext() );\n\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity().getApplicationContext());\n recyclerTransactions.setLayoutManager(layoutManager);\n recyclerTransactions.setHasFixedSize(true);\n recyclerTransactions.addItemDecoration( new DividerItemDecoration( getActivity().getApplicationContext(), LinearLayout.VERTICAL) );\n recyclerTransactions.setAdapter(transactionsAdapter);\n\n return view;\n }", "private void buildAdjustedTrialBalancePane() // buildAdjustedTrialBalancePane method start\n\t{\n\t\t// creating object\n\t\tATBOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tATBOutput.setText(log.adjustedTrialBalance());\n\t\tATBOutput.setEditable(false);\n\t\tATBOutput.setFont(font);\n\t\tATBOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\tadjustedTrialBalancePane.add(ATBOutput);\n\t\tadjustedTrialBalancePane.add(new JScrollPane(ATBOutput));\n\t}", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_amount, container, false);\n }", "public interface MyAcountView extends BaseView{\n void renderBalance(BalanceBean bean);\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_update_account, container, false);\n mActivity.initToolBar(\"\",false);\n mActivity.hideToolbar();\n initViews(view);\n initListeners();\n getAllCurrency();\n return view;\n }", "public AccountViewModel(Model model, ViewState viewState) {\n this.model = model;\n this.viewState = viewState;\n value = new SimpleDoubleProperty();\n total = new SimpleDoubleProperty();\n balance = new SimpleDoubleProperty();\n user = new SimpleStringProperty();\n }", "public ContractView() {\n initComponents();\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(44, 47, 90, 24);\r\n\t\tlabel.setText(\"充值金额:\");\r\n\t\t\r\n\t\ttext_balance = new Text(shell, SWT.BORDER);\r\n\t\ttext_balance.setBounds(156, 47, 198, 30);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\t//确认充值\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tString balance=text_balance.getText().trim();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint i=dao.add(balance);\r\n\t\t\t\t\tif(i>0){\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"成功提示\", \"充值成功\");\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"错误提示\", \"所充值不能为零\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(140, 131, 114, 34);\r\n\t\tbutton.setText(\"确认充值\");\r\n\r\n\t}", "public Deposit() {\n initComponents();\n \n l1.setOpaque(true);\n l1.setBorder(new LineBorder(Color.BLACK,5));\n t1.setEditable(false);\n t2.setEditable(false);\n setResizable(false);\n getContentPane().setBackground(new Color(0,51,102));\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View RootView = inflater.inflate(R.layout.fragment_vendor_bank_detail, container, false);\n\n bank_NameTxt = RootView.findViewById(R.id.bank_NameTxt);\n bank_accountNumTxt = RootView.findViewById(R.id.bank_accountNumTxt);\n bank_IfscTxt = RootView.findViewById(R.id.bank_IfscTxt);\n bank_Submit = RootView.findViewById(R.id.bank_Submit);\n\n bank_NameTxt.setText(bankName);\n bank_accountNumTxt.setText(accountNum);\n bank_IfscTxt.setText(ifsc);\n\n bank_Submit.setOnClickListener(this);\n\n return RootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_credit, container, false);\n\n\n recyclerView = v.findViewById(R.id.rcv);\n layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);\n //gridLayoutManager = new GridLayoutManager(getContext(), 2, GridLayoutManager.VERTICAL, false);\n recyclerView.setLayoutManager(layoutManager);\n credit_amount = v.findViewById(R.id.tv_amt_credit);\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(retrofitClient.BaseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n apiAccess = retrofit.create(Api.class);\n try {\n Thread.sleep(200);\n credit();\n // sum(tmodel);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return v;\n }", "public void balanceMenu(){\n\t\tstate = ATM_State.BALANCE;\n\t\tdouble balance = Bank.getBalance(accountID); \n\t\tgui.setDisplay(\"Current balance: \\n$\" + balance);\t\n\t}", "public interface WalletBalanceView extends BaseView {\n void renderAccountInfo(NewAccountInfo info);\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_checkout_total, container, false);\n }", "public void createNewAccountWithOpeningBalanceHelper() {\n\t\tparseDateTextFieldHelper();\n\t\tBalance balance = data.createNewAccountWithOpeningBalance();\n\t\tLocalDate date = LocalDate.of(year, month, dayOfMonth);\n\t\tbalance.setDate(date);\n\t\tJTextField amount = data.getTextFieldBalance();\n\t\t// this before was not being set, i thought i set it in expectedResult but\n\t\t// that's a different object!\n\t\tbalance.setAmount(Float.parseFloat(amount.getText()));\n\t\t// I think you can actually just insert the values here instead if using get()\n\t\tBalance resultExpected = new Balance(bankTest, accountTest,\n\t\t\t\tdate.getYear(), date.getMonthValue(), date.getDayOfMonth(),\n\t\t\t\tFloat.parseFloat(amount.getText()), TEST_TXTR_EXTRA_NOTES);\n\t\tassertEquals(resultExpected, balance);\n\t}", "public Person balance(NotNegInt balance)\n {\n if(balance == null) throw new NullPointerException(\"The field balance in the Person ValueDomain may not be null\");\n edma_value[4] = ((IValueInstance) balance).edma_getValue();\n return new PersonImpl(PersonImpl.edma_create(edma_value));\n }", "public BankPanel() {\r\n\t super();\r\n\t}", "interface WalletView extends MvpView\n{\n\tvoid setBaseCurrency(CurrencyEnum baseCurrency);\n\n\tvoid setDateRange(DateRange dateRange);\n\n\t@StateStrategyType(AddToEndSingleStrategy.class)\n\tvoid setBalance(WalletSummary data);\n\n\tvoid showProgress(boolean show);\n\n\tvoid setRefreshing(boolean refreshing);\n\n\tvoid showSnackbarMessage(String message);\n\n\tvoid setTransactions(List<WalletTransaction> transactions, List<SimpleSectionedRecyclerViewAdapter.Section> sections);\n\n\tvoid addTransactions(List<WalletTransaction> transactions, List<SimpleSectionedRecyclerViewAdapter.Section> sections);\n}", "public Deposit(int userAccountNumber, Screen atmScreen, BankDataBase bankDatabase, UserInterface UI, DepositSlot atmDepositSlot)\n {\n super( userAccountNumber, atmScreen, bankDatabase);\n face = UI;\n depositSlot = atmDepositSlot;\n }", "public Builder clearBalance() {\n \n balance_ = getDefaultInstance().getBalance();\n onChanged();\n return this;\n }", "public AccountSummaryView(Context context, Account account) {\r\n\t\tsuper(context);\r\n\t\tthis.account = account;\r\n\t\tLayoutParams lp = new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\tsetLayoutParams(lp);\r\n\t\tsetBackgroundDrawable(context.getResources().getDrawable(R.drawable.list_item_background_states));\r\n\r\n\t\taddView(createIcon());\r\n\r\n\t\taddView(createAccountLayout());\r\n\r\n\t\taddView(createBalance());\r\n\t\taddView(createCurrency());\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_stats_layout, container, false);\n Log.d(TAG,\"onCreateView: Starting...\");\n\n initComponents(view);\n FileUtils services = new FileUtils();\n\n List<Integer> listNumberOfCoins = services.readFromFileTotalNumberOfEachCoin();\n setCoinPercentageValuesOnTextViews(listNumberOfCoins);\n\n return view;\n }", "@Test\n\tpublic void createNewAccountWithOpeningBalanceDebitTest() {\n\t\tcreateAccountDebtsTest();\n\t\tcreateNewAccountWithOpeningBalanceHelper();\n\t}", "public BankModel() {\n accounts = new ArrayList<AccountModel>();\n\n // Master account inbedded into system for easy access to test features.\n accounts.add(new AccountModel(\"c\", \"123\", 500));\n }", "public void setBalance(float balance) {\n this.balance = balance;\n }", "public ViewEntry() {\n initComponents();\n pnlRates.add(new ViewRateSchedule()); \n pnlRates.validate();\n }", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "@Override\r\n\tpublic double showbalanceDao() {\n\t\t\r\n\t\treturn temp.getCustBal();\r\n\t}", "private void buildBalanceSheetPane() // buildBalanceSheetPane method start\n\t{\n\t\t// creating object\n\t\tBSOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tBSOutput.setText(log.balanceSheet());\n\t\tBSOutput.setEditable(false);\n\t\tBSOutput.setFont(font);\n\t\tBSOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\tbalanceSheetPane.add(BSOutput);\n\t\tbalanceSheetPane.add(new JScrollPane(BSOutput));\n\t}", "transactionDisplayer(IOTransactionLogic t) {\n\t\t\t\n\t\t\ttransaction = t;\n\t\t\tdouble width = paneList.getWidth() / 3;\n\t\t\tlblDate = new Label(transaction.getDate().toString());\n\t\t\tlblCaption = new Label(transaction.getName());\n\t\t\tlblPrix = new Label(\n\t\t\t\t\tDouble.toString(transaction.getAmount()) + \" CHF\");\n\t\t\tpaneDisplay = new GridPane();\n\t\t\t\n\t\t\tpaneDisplay.getChildren().add(lblDate);\n\t\t\tpaneDisplay.getChildren().add(lblCaption);\n\t\t\tpaneDisplay.getChildren().add(lblPrix);\n\t\t\tpaneDisplay.setPadding(new Insets(10));\n\t\t\t\n\t\t\tlblPrix.setStyle(\" -fx-text-fill: \" + Utility.textColorBasedOnGB(\n\t\t\t\t\tColor.valueOf(t.getCategory().getColor())));\n\t\t\tlblCaption.setStyle(\" -fx-text-fill: \" + Utility.textColorBasedOnGB(\n\t\t\t\t\tColor.valueOf(t.getCategory().getColor())));\n\t\t\tlblDate.setStyle(\" -fx-text-fill: \" + Utility.textColorBasedOnGB(\n\t\t\t\t\tColor.valueOf(t.getCategory().getColor())));\n\t\t\t\n\t\t\tpaneDisplay\n\t\t\t\t\t.setConstraints(lblDate, 0, 0, 1, 1, HPos.LEFT, VPos.CENTER,\n\t\t\t\t\t\t\tPriority.SOMETIMES, Priority.ALWAYS);\n\t\t\tpaneDisplay.setConstraints(lblCaption, 1, 0, 1, 1, HPos.LEFT,\n\t\t\t\t\tVPos.CENTER, Priority.SOMETIMES, Priority.ALWAYS);\n\t\t\tpaneDisplay.setConstraints(lblPrix, 2, 0, 1, 1, HPos.RIGHT,\n\t\t\t\t\tVPos.CENTER, Priority.SOMETIMES, Priority.ALWAYS);\n\t\t\t\n\t\t\t/*if (transaction.isIncome()) {\n\t\t\t\tpaneDisplay.setStyle(\"-fx-background-radius: 10px; -fx-background-color: \" + incomeColor + \";\");\n\t\t\t} else {\n\t\t\t\tpaneDisplay.setStyle(\"-fx-background-radius: 10px; -fx-background-color: \" + outgoColor + \";\");\n\t\t\t}*/\n\t\t\t\n\t\t\tpaneDisplay.setStyle(\n\t\t\t\t\t\"-fx-background-radius: 10px; -fx-background-color: \"\n\t\t\t\t\t\t\t+ Utility.toRGBCode(\n\t\t\t\t\t\t\tColor.valueOf(t.getCategory().getColor())) + \";\");\n\t\t\t\n\t\t\tController_dashboard.this.paneList.getChildren().add(paneDisplay);\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Withdraw Deposit\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosed(java.awt.event.WindowEvent evt) {\n formWindowClosed(evt);\n }\n });\n\n jTextArea1.setEditable(false);\n jTextArea1.setBackground(new java.awt.Color(153, 255, 204));\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n jButton1.setText(\"Withdraw\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Deposit\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Get Balance\");\n jButton3.setMaximumSize(new java.awt.Dimension(79, 79));\n jButton3.setMinimumSize(new java.awt.Dimension(25, 25));\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))\n .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public Balance(final BigDecimal value) {\r\n this.value = value;\r\n }", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}", "public BankAccount(String holderName, String number, float balance){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = balance;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bank_detail, container, false);\n unbinder = ButterKnife.bind(this,view);\n DaoSession daoSession = ((PasswordKeeper) getActivity().getApplication()).getDaoSession();\n bankDetailsDao = daoSession.getBankDetailsDao();\n QueryBuilder<BankDetails> bankDetailsQueryBuilder = bankDetailsDao.queryBuilder()\n .where(BankDetailsDao.Properties.Id.eq(bankId));\n bankDetails = bankDetailsQueryBuilder.unique();\n if(bankDetails.getTitle()!=null && bankDetails.getTitle().length()>0){\n bankTitle.setTitle(bankDetails.getTitle());\n }\n else{\n bankTitle.setTitle(\"NO TITLE\");\n }\n accountNo.setText(bankDetails.getAccountNo());\n bankName.setText(bankDetails.getBankName());\n ifscName.setText(\"IFSC : \"+bankDetails.getIfsc());\n branchName.setText(bankDetails.getBankBranch());\n if(bankDetails.getOnlineUsername()!=null && bankDetails.getOnlineUsername().length()>0){\n\n onlineLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1,R.layout.online_detail);\n showOnlineDetails(bankDetails.getOnlineUsername(),bankDetails.getOnlinePassword());\n }\n if(bankDetails.getCards()!=null && bankDetails.getCards().size()>0) {\n for (CardDetails cardDetails : bankDetails.getCards()) {\n if (viewStubCompat1.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1, R.layout.cc_dc_detail);\n break;\n }\n } else if (viewStubCompat2.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat2, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat2, R.layout.cc_dc_detail);\n break;\n }\n } else if (viewStubCompat3.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat3, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat3, R.layout.cc_dc_detail);\n break;\n }\n }\n showCCDCDetails(cardDetails);\n }\n }\n\n return view;\n }", "@Post(uri = \"/{accountId}/deposits\", consumes = MediaType.APPLICATION_JSON)\n @Operation(summary = \"Creates deposit\")\n void create(@Parameter(description = \"Account ID\") BigInteger accountId,\n @Parameter(description = \"Deposit model\") BalanceChangeRequest balanceChangeRequest);", "@Override\n public void Create() {\n\n initView();\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_account, container, false);\r\n }", "public TotalRevenueView() {\n\t\t\ttotalPrice = new Amount(0);\n\t}", "public Account(){\n this.id = 0;\n this.balance = 0;\n this.annualInterestRate = 0;\n this.dateCreated = new Date();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "public void setBalance(){\n balance.setBalance();\n }", "public double getBalance()\n \n {\n \n return balance;\n \n }", "public Wallet() {\n total_bal = 10;\n }", "public GraphView(List<Account> accounts, List<Block> blocks) {\n this.accounts = accounts;\n this.blocks = blocks;\n walletPositions = new List();\n initComponent();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_new_diary, container, false);\n\n tradeData = view.findViewById(R.id.tradeData);\n clear();\n ioacc.add(\"對方帳戶  \");\n trade.add(\"交易方向  \");\n amount.add(\"金額  \");\n remain.add(\"餘額\");\n ConnectMySql connectMySql = new ConnectMySql();\n connectMySql.execute(\"\");\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_account_income,\n container, false);\n init(view);\n setListener();\n\n return view;\n }", "View createView();", "@Override\n\tpublic void createItem(Object result) {\n\t\t\n\t\tunloadform();\n\t\tif (result != null) {\n\t\t\tIOTransactionLogic tr = (IOTransactionLogic) result;\n\t\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\t\tint month = Calendar.getInstance().get(Calendar.MONTH);\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(tr.getDate());\n\t\t\tint trYear = cal.get(Calendar.YEAR);\n\t\t\tint trMonth = cal.get(Calendar.MONTH);\n\t\t\t\n\t\t\tif ((year == trYear) && (month == trMonth)\n\t\t\t\t\t&& tr.getBankAccountID() == bal.getId()) {\n\t\t\t\ttransactionDisplayer trDisplayer = new transactionDisplayer(tr);\n\t\t\t\tsetDataLineChart();\n\t\t\t\tsetDataPieChart();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }", "Account(int id, double balance){\r\n\t\t//sets the default values and than the specified values of the id and balance\r\n\t\tsetId(id);\r\n\t\tsetBalance(balance);\t\t \r\n\t\tsetAnnualInterestRate(0);\r\n\t\tthis.dateCreated = new Date(System.currentTimeMillis());\r\n\t }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_bill_distribution_history, container, false);\n //delete records not in scope\n DatabaseManager.deleteUploadsBillHistory(this.getContext(), LandingActivity.meter_reader_id);\n\n ArrayList<UploadBillHistory> uploadBillHistories = DatabaseManager.getHistoryBillCards(this.getContext(), LandingActivity.meter_reader_id);\n\n BillDistributionHistoryAdapter adapter = new BillDistributionHistoryAdapter(this.getContext(), uploadBillHistories);\n\n lblBlankScreenMsg = rootView.findViewById(R.id.lbl_blank_msg);\n Typeface reg = App.getSansationRegularFont();\n lblBlankScreenMsg.setTypeface(reg);\n recyclerView = rootView.findViewById(R.id.recycler_view);\n layoutManager = new LinearLayoutManager(getActivity().getApplicationContext());\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n if(uploadBillHistories != null && uploadBillHistories.size() > 0)\n lblBlankScreenMsg.setVisibility(View.GONE);\n else\n lblBlankScreenMsg.setVisibility(View.VISIBLE);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_zestmoney, container, false);\n setUpUI(view);\n mPaymentParams = getArguments().getParcelable(PayuConstants.KEY);\n payuConfig = getArguments().getParcelable(PayuConstants.PAYU_CONFIG);\n salt = getArguments().getString(PayuConstants.SALT);\n return view;\n\n }", "public void onClick(View v){\n updateBalance();\n }", "public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }", "public interface BalanceActivityView extends BaseIView {\n void moneybalance(BalanceBean balanceBean);\n}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_bulan1, container, false);\r\n\r\n mBeratBibit1EditText = (EditText) rootView.findViewById(R.id.berat_bibit1_edit_text);\r\n mBeratBibit2EditText = (EditText) rootView.findViewById(R.id.berat_bibit2_edit_text);\r\n mBeratBibit3EditText = (EditText) rootView.findViewById(R.id.berat_bibit3_edit_text);\r\n mBeratPakan1TextView = (TextView) rootView.findViewById(R.id.berat_pakan1_text_view);\r\n mBeratPakan2TextView = (TextView) rootView.findViewById(R.id.berat_pakan2_text_view);\r\n mBeratPakan3TextView = (TextView) rootView.findViewById(R.id.berat_pakan3_text_view);\r\n mSaveProgressButton = (Button) rootView.findViewById(R.id.save_progress_button);\r\n\r\n db = new DatabaseHelper(getContext());\r\n\r\n Bundle extra = getActivity().getIntent().getExtras();\r\n if (extra != null) {\r\n pond_id = extra.getInt(Constant.ID);\r\n readPond();\r\n readProgress();\r\n }\r\n\r\n mSaveProgressButton.setOnClickListener(this);\r\n\r\n return rootView;\r\n }", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public static AmountFragment newInstance() {\n return new AmountFragment();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_detail_transaction, container, false);\n initView(view);\n\n if(transaction.getType()==0){\n rlProductName.setVisibility(View.GONE);\n rlQuantity.setVisibility(View.GONE);\n rlUnitPrice.setVisibility(View.GONE);\n rlTotal.setVisibility(View.GONE);\n rlCustomer.setVisibility(View.GONE);\n rlSalesMan.setVisibility(View.GONE);\n }else if(transaction.getType()==1){\n rlPayTo.setVisibility(View.GONE);\n rlPayment.setVisibility(View.GONE);\n rlHead.setVisibility(View.GONE);\n\n }\n\n setData();\n return view;\n }", "@Override\r\n public View onCreateView(final LayoutInflater inflater, final ViewGroup container,\r\n Bundle savedInstanceState) {\n Bundle bundle = getArguments();\r\n if (bundle != null) {\r\n bank_id = bundle.getInt(\"BANK_ID\");//String bankNam=db.getBankName(bank_id);\r\n Log.e(\"Bank in af\", String.valueOf(bank_id));\r\n }\r\n\r\n\r\n // Inflate the layout for this fragment\r\n View view = inflater.inflate(R.layout.fragment_address, container, false);\r\n\r\n btnBranch = (Button) view.findViewById(R.id.btnBranch);\r\n btnATM = (Button) view.findViewById(R.id.btnATM);\r\n btnExchange = (Button) view.findViewById(R.id.btnExchange);\r\n\r\n\r\n displayView(R.id.btnBranch);\r\n\r\n btnBranch.setSelected(true);\r\n btnBranch.setOnClickListener(this);\r\n btnATM.setOnClickListener(this);\r\n btnExchange.setOnClickListener(this);\r\n // etSearch.setFocusableInTouchMode(true);\r\n //etSearch.requestFocus();\r\n\r\n\r\n return view;\r\n }", "public float showBalance() {\n\t\treturn dao.showBalance();\r\n\t}", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_account, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n accountInfoBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account_info, container, false);\n return accountInfoBinding.getRoot();\n }", "private void makeDeposit() {\n\t\t\r\n\t}", "public void openOrderBalanceDialog() {\n\t\torderBalanceDialogBox = new DialogBox(true);\n\t\torderBalanceDialogBox.setGlassEnabled(true);\n\t\torderBalanceDialogBox.setText(\"Rentabilidad Pedido\");\n\t\torderBalanceDialogBox.setSize(\"250px\", \"150px\");\n\n\t\tVerticalPanel vp = new VerticalPanel();\n\t\tvp.setSize(\"250px\", \"150px\");\n\t\torderBalanceDialogBox.setWidget(vp);\n\n\t\tFlowPanel orderPanel = new FlowPanel();\n\t\torderPanel.setWidth(\"250px\");\n\n\t\t// Obten info del filtro forzado\n\t\tBmFilter forceFilter = getUiParams().getUiProgramParams(getBmObject().getProgramCode()).getForceFilter();\n\n\t\tUiRequisitionOrderView uiRequisitionOrderView = new UiRequisitionOrderView(getUiParams(), orderPanel, forceFilter.getValue());\n\t\tuiRequisitionOrderView.show();\t\t\t\t\t\n\n\t\tHorizontalPanel buttonPanel = new HorizontalPanel();\n\t\tbuttonPanel.add(orderBalanceCloseDialogButton);\n\n\t\tvp.add(orderPanel);\n\t\tvp.add(buttonPanel);\n\n\t\torderBalanceDialogBox.center();\n\t\torderBalanceDialogBox.show();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_transactions, container, false);\n ButterKnife.bind(this,view);\n userPreferences = new UserPreferences(getContext());\n init();\n\n\n return view;\n }", "public double getBalance(){\n return balance;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_loyalty_coin, container, false);\n }", "public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}", "public double getBalance(){\r\n\t\treturn balance;\r\n\t}", "private View create(PersistedView pView) {\n DsmSorting sorting = nameToSorting.get(pView.dsmSortingName);\n if (null == sorting) {\n sorting = DsmSorting.values()[0];\n }\n\n View view = new View();\n view.setName(decodeString(pView.name));\n view.setSorting(sorting);\n\n return view;\n }", "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }" ]
[ "0.7341546", "0.6540715", "0.6335997", "0.61849356", "0.6100843", "0.5986788", "0.57963663", "0.5755976", "0.5753337", "0.5747602", "0.5716941", "0.5713456", "0.57044333", "0.5678916", "0.5673939", "0.5639951", "0.5625573", "0.56254464", "0.56126046", "0.5599624", "0.5587319", "0.5563515", "0.5537969", "0.55355024", "0.5521787", "0.55054355", "0.5502274", "0.5497541", "0.54862434", "0.5481582", "0.5478114", "0.5476582", "0.5455736", "0.545294", "0.5437439", "0.54216856", "0.5417675", "0.5382243", "0.537723", "0.5376473", "0.5374662", "0.53678536", "0.5366142", "0.5348743", "0.5342699", "0.53324085", "0.53255993", "0.5321264", "0.53050387", "0.5303813", "0.52953714", "0.5295108", "0.5288222", "0.5287767", "0.5284409", "0.5273803", "0.5266438", "0.5264656", "0.5259628", "0.52555585", "0.5252897", "0.5250878", "0.5249578", "0.5246796", "0.5246717", "0.5245581", "0.52422446", "0.5240488", "0.5234164", "0.5230487", "0.5229911", "0.52250016", "0.5221468", "0.5221468", "0.5220889", "0.5205899", "0.5195343", "0.5189686", "0.5188311", "0.51821274", "0.51783067", "0.51778865", "0.51778865", "0.51683134", "0.5166584", "0.51660365", "0.51651007", "0.5164509", "0.5164509", "0.51630807", "0.5154653", "0.5152517", "0.5152233", "0.51520276", "0.51499486", "0.51453215", "0.5144133", "0.51429063", "0.5142769", "0.51384836" ]
0.5646856
15
TODO Autogenerated method stub
public IdentifiedUser createNewUser() { return new Gamer(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
fill in matrix diagonally
public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter N:"); int n = sc.nextInt(); System.out.println("Enter M:"); int m = sc.nextInt(); int a = 1; int row = 0; int col = 0; int[][] arr = new int[n][m]; // nad obratnia diagonal for (int i = 0; i < n; i++) { for (int j = row; j >= 0; j--) { arr[j][col] = a; a++; col++; } row++; col = 0; } // ako e kvadratna matrica int rowLimit = 0; if (m % 2 == 0) { rowLimit = 1; } else { rowLimit = 0; } // pod obratnia diagonal row -= 1; col += 1; for (int i = 0; i < n; i++) { for (int j = row; j >= rowLimit; j--) { arr[j][col] = a; a++; col++; } row = n - 1; col = i + 2; rowLimit++; } // print for (int i = 0; i < arr.length; i++) { for (int j = 0; j < arr[0].length; j++) { System.out.print(arr[i][j] + " "); } System.out.println(); } sc.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T diag() {\n return wrapMatrix(ops.diag(mat));\n }", "private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}", "public static void generateMatrix() {\r\n Random random = new Random();\r\n for (int i = 0; i < dim; i++)\r\n {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n if (i != j)\r\n \r\n adjacencyMatrix[i][j] = I; \r\n }\r\n }\r\n for (int i = 0; i < dim * dim * fill; i++)\r\n {\r\n adjacencyMatrix[random.nextInt(dim)][random.nextInt(dim)] =\r\n random.nextInt(maxDistance + 1);\r\n }\r\n \r\n\r\n\r\n \r\n //print(adjacencyMatrix);\r\n \r\n \r\n //This makes the main matrix d[][] ready\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n d[i][j] = adjacencyMatrix[i][j];\r\n if (i == j)\r\n {\r\n d[i][j] = 0;\r\n }\r\n }\r\n }\r\n }", "public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }", "void resDiagonale(){ \r\n for (int i = 0; i<N; i=i+nCarre) \r\n \tresCarre(i, i); \r\n }", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "public void SetMatrixToZeros() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 0;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 0;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 0;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 0;\t\n \n }", "@Override\n\tpublic double calculaDiagonal() {\n\t\treturn 0;\n\t}", "private void fillAdjacencyMatrix( int x, int y )\n\t{\n\t\tfor( int i = 1; i < 9; i++ )\n\t\t{\n\t\t\tfor( int j = 1; j < 9; j++ )\n\t\t\t{\n\t\t\t\tif( x == i || y == j || (Math.floorDiv(x, 3) == Math.floorDiv(i, 3) && Math.floorDiv(y, 3) == Math.floorDiv(j,3)))\n\t\t\t\t\t;\n\t\t\t\telse\n\t\t\t\t\t;\n\t\t\t}\n\t\t}\n\t}", "private int[] diagnalUpward(List<Integer> resList, int rowIdx, int colIdx, int[][] matrix) {\n int row = matrix.length;\n int col = matrix[0].length;\n\n while ((rowIdx >= 0 && rowIdx < row) && (colIdx >= 0 && colIdx < col)) {\n resList.add(matrix[rowIdx][colIdx]);\n rowIdx--;\n colIdx++;\n }\n rowIdx++;\n colIdx--;\n // Compute new starting point: try to go right, if reaches the end then go down.\n if (colIdx == col - 1) return new int[]{rowIdx + 1, colIdx};\n return new int[]{rowIdx, colIdx + 1};\n }", "public void setZeroes2(int[][] matrix) {\n boolean row00 = false;\n boolean col00 = false;\n\n int row = 0, col = 0;\n int rows = matrix.length;\n int cols = matrix[0].length;\n while (col < cols && !row00) {\n row00 = matrix[0][col++] == 0;\n }\n while (row < rows && !col00) {\n col00 = matrix[row++][0] == 0;\n }\n\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n matrix[row][0] = 0;\n matrix[0][col] = 0;\n }\n }\n }\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[0][col] == 0 || matrix[row][0] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (row00) {\n for (col = 0; col < cols; ++col) {\n matrix[0][col] = 0;\n }\n }\n if (col00) {\n for (row = 0; row < rows; ++row) {\n matrix[row][0] = 0;\n }\n }\n }", "public void fill() {\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tmaze[x][y] = Block.WALL;\n\t\t\t}\n\t\t}\n\t}", "public void nullifyMatrix(int[][] mat) {\r\n //extra space\r\n boolean rows[] = new boolean[mat[0].length];\r\n boolean columns[] = new boolean[mat.length];\r\n \r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n rows[i] = true;\r\n columns[j] = true;\r\n }\r\n } \r\n }\r\n \r\n //Nullify rows\r\n for(int i=0; i<rows.length; i++) {\r\n if(rows[i])\r\n helperNullifyRow(mat, i);\r\n }\r\n //Nullify columns\r\n for(int i=0; i<columns.length; i++) {\r\n if(columns[i])\r\n helperNullifyColumn(mat,i);\r\n }\r\n printMat(mat);\r\n }", "private void fillAll() {\n this.fill_M0();\n this.fill_W();\n this.fill_C();\n }", "private void imprimirMatriz(int[][] m) {\n\n\t\tSystem.out.println(\"-------------------------------------------\");\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tSystem.out.println(\"M[\" + i + \"][\" + j + \"] = \" + m[i][j]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------------\");\n\t}", "static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}", "public static void makeRowsCols0(int [][]input) {\n\t\tint previ=-1,prevj=-1;\n\t\tfor(int i=0;i<input.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<input[0].length;j++)\n\t\t\t{\n\t\t\t\tif(input[i][j]==0)\n\t\t\t\t{\t\n\t\t\t\t\tif(i!=previ&&j!=prevj)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k=0;k<input.length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[k][j]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int k=0;k<input[0].length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[i][k]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprevi=i;\n\t\t\t\t\t\tprevj=j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testDiagonalIzquierda() {\n\n\t\ttablero.agregar(0, 0, jugador1);\n\t\ttablero.agregar(1, 2, jugador1);\n\t\ttablero.agregar(2, 1, jugador1);\n\n\t\tassertEquals(jugador1.getPieza(), reglas.getGanador(jugador1));\n\t}", "public void fill( double val ) {\n try {\n ops.fill(mat, val);\n } catch (ConvertToDenseException e) {\n convertToDense();\n fill(val);\n }\n }", "public void generateMatrix() {\n\n flow = new int[MATRIX_TAM][MATRIX_TAM];\n loc = new int[MATRIX_TAM][MATRIX_TAM];\n\n for (int i = 0; i < MATRIX_TAM; i++) {\n for (int j = 0; j < MATRIX_TAM; j++) {\n\n //fill the distances matrix\n if (i != j) {\n loc[i][j] = rn.nextInt(MAX_DISTANCE - MIN_DISTANCE + 1) + MIN_DISTANCE;\n } else {\n loc[i][j] = 0;\n }\n\n //fill the flow matrix\n if (i != j) {\n flow[i][j] = rn.nextInt(MAX_FLOW - MIN_FLOW + 1) + MIN_FLOW;\n } else {\n flow[i][j] = 0;\n }\n\n }\n }\n\n }", "public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }", "private void resetMatrix() {\n mSuppMatrix.reset();\n setImageViewMatrix(getDrawMatrix());\n checkMatrixBounds();\n }", "public void fillTheBoard() {\n for (int i = MIN; i <= MAX; i++) {\n for (int j = MIN; j <= MAX; j++) {\n this.getCells()[i][j] = new Tile(i, j, false);\n }\n }\n }", "public int fillingOfMatrix(){\n int count=0;\n for (int i=0;i<m;i++)\n count+=matrix[i].size();\n return count;\n }", "public void clear() {\n rows = cols = 0;\n matrix.clear();\n }", "public static Matrix diagonalMatrix(int nrow, double[] diag){\r\n \tif(diag.length!=nrow)throw new IllegalArgumentException(\"matrix dimension differs from diagonal array length\");\r\n \tMatrix u = new Matrix(nrow, nrow);\r\n \tdouble[][] uarray = u.getArrayReference();\r\n \tfor(int i=0; i<nrow; i++){\r\n \t\tuarray[i][i]=diag[i];\r\n \t}\r\n \treturn u;\r\n \t}", "public void clearA(){\n for (int i = 0; i < I+1; i++){\n for (int j = 0; j < I+1; j++){\n a[i][j][I] = 0.0;\n }\n }\n\t }", "public void setZeroes2(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0 ||\n matrix[0] == null || matrix[0].length == 0)\n return;\n\n int r = matrix.length, c = matrix[0].length;\n boolean[] rows = new boolean[r], cols = new boolean[c];\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n if (matrix[i][j] == 0) {\n rows[i] = true;\n cols[j] = true;\n }\n }\n }\n\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n if (rows[i] || cols[j])\n matrix[i][j] = 0;\n }\n }\n }", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "public void setZeroes(int[][] matrix) {\n if (matrix == null || matrix.length == 0) {\n return;\n }\n int[] m = new int[matrix.length];\n int[] n = new int[matrix[0].length];\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n m[i]++;\n n[j]++;\n }\n }\n }\n for (int i = 0; i < m.length; i++) {\n if (m[i] > 0) {\n Arrays.fill(matrix[i], 0);\n }\n }\n for (int j = 0; j < n.length; j++) {\n if (n[j] > 0) {\n for (int k = 0; k < matrix.length; k++) {\n matrix[k][j] = 0;\n }\n }\n }\n }", "public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }", "public static void main(String[] args) {\n int[][] inp = new int[][] {\n {1,2,3},\n {5,6,7},\n {9,10,11}};\n \n int temp;\n \n\t for(int i = inp.length-1,j=0; i>=0 ; i--,j=0)\n {\n System.out.print(inp[i][j] + \" \");\n\t\t \n temp = i; // store old row where we started \n \n\t\t while(i+1 < inp.length && j+1 < inp[0].length)\n {\n System.out.print(inp[i+1][j+1] + \" \"); // keep print right diagonal\n i++;j++;\n }\n \n\t\t i = temp; // restore old row\n \n\t\t System.out.println();\n\t\t \n\t\t // special case - when we switch from processing row to processing column\n if(i == 0)\n {\n\t\t\t // now, column will go from 1 to inp[0].length-1\n\t\t\t \n for (int k = 1; k < inp[0].length; k++) {\n\n\t\t\t\t temp = k; // save old column\n \n\t\t\t\t System.out.print(inp[i][k] + \" \");\n\t\t\t\t \n\t\t\t\t // keep getting right diagonal\n while (i + 1 < inp.length && k + 1 < inp[0].length) {\n System.out.print(inp[i + 1][k + 1] + \" \");\n i++;\n k++;\n }\n \n\t\t\t\t k = temp;\n \n\t\t\t\t i = 0;\n \n\t\t\t\t System.out.println();\n\n }\n }\n }\n \n }", "public static void zeroMatrix(int[][] matrix) {\n printMatrix(matrix);\n\n boolean [] rowZero = new boolean[matrix.length];\n boolean [] colZero = new boolean[matrix[0].length];\n\n for (int row = 0; row < matrix.length; row++) {\n for (int col = 0; col < matrix[0].length; col++) {\n if (matrix[row][col] == 0) {\n rowZero[row] = true;\n colZero[col] = true;\n }\n }\n }\n\n for (int r = 0; r < rowZero.length; r++) {\n if (rowZero[r]) {\n for (int i = 0; i < colZero.length; i++) {\n matrix[r][i] = 0;\n }\n }\n }\n\n for (int c = 0; c < colZero.length; c++) {\n if (colZero[c]) {\n for (int i = 0; i < rowZero.length; i++) {\n matrix[i][c] = 0;\n }\n }\n }\n\n printMatrix(matrix);\n }", "public void setMatrixZeroes(int[][] M) {\n int m = M.length;\n int n = M[0].length;\n\n boolean firstRowContainsZero = false;\n boolean firstColContainsZero = false;\n\n for(int j=0; j<n; j++) {\n if(M[0][j] == 0) {\n firstRowContainsZero = true;\n break;\n }\n }\n\n for(int i=0; i<m; i++) {\n if(M[i][0] == 0) {\n firstColContainsZero = true;\n break;\n }\n }\n\n for(int i=1; i<m; i++) {\n for(int j=1; j<n; j++) {\n if(M[i][j] == 0) {\n M[0][j] = 0;\n M[i][0] = 0;\n }\n }\n }\n\n for(int i=1; i<m; i++) {\n if(M[i][0] == 0) {\n for(int j=1; j<n; j++)\n M[i][j] = 0;\n }\n }\n\n for(int j=1; j<n; j++) {\n if(M[0][j] == 0) {\n for(int i=1; i<m; i++)\n M[i][j] = 0;\n }\n }\n\n if(firstRowContainsZero) {\n for(int j=0; j<n; j++)\n M[0][j] = 0;\n }\n\n if(firstColContainsZero) {\n for(int i=0; i<m; i++)\n M[i][0] = 0;\n }\n }", "private void fillBoard() {\n\n boardMapper.put(1, new int[]{0, 0});\n boardMapper.put(2, new int[]{0, 1});\n boardMapper.put(3, new int[]{0, 2});\n boardMapper.put(4, new int[]{1, 0});\n boardMapper.put(5, new int[]{1, 1});\n boardMapper.put(6, new int[]{1, 2});\n boardMapper.put(7, new int[]{2, 0});\n boardMapper.put(8, new int[]{2, 1});\n boardMapper.put(9, new int[]{2, 2});\n\n }", "private void setEmpty() {\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++)\n\t\t\t\tboard[r][c] = new Cell(false, false,\n\t\t\t\t\t\tfalse, false); // totally clear.\n\t}", "private static void fillArray(int[][] array) {\n for (int i = 0; i < array.length; i++)\n for (int j = 0; j < array[i].length; j++)\n array[i][j] = i + j;\n\n // The following lines do nothing\n array = new int[1][1];\n array[0][0] = 239;\n }", "private void fillBoard() {\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tboard[i] = ' ';\n\t\t}\n\t\tfor (int i = 0; i < isFree.length; i++) {\n\t\t\tisFree[i] = true;\n\t\t}\n\t}", "public void createBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n if(i==0 || j == 0 || i == rows-1|| j == colls-1){\n board[i][j] = '*';\n } else {\n board[i][j] = ' ';\n }\n }\n }\n }", "void markRowAndColumnZero(int[][] matrix) {\n HashSet<Integer> rows = new HashSet<Integer>();\n HashSet<Integer> columns = new HashSet<Integer>();\n for(int i=0; i< matrix.length;i++) {\n for(int j =0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) {\n rows.add(i);\n columns.add(j);\n }\n }\n }\n Iterator<Integer> rowsIterator = rows.iterator();\n while(rowsIterator.hasNext()) {\n int rowToBeSetToZero = rowsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[rowToBeSetToZero][0] = 0;\n }\n }\n\n Iterator<Integer> columnsIterator = columns.iterator();\n while(columnsIterator.hasNext()) {\n int columnToBeSetToZero = columnsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[i][columnToBeSetToZero] = 0;\n }\n }\n\n return;\n\n\n }", "public void Reset ( ) \r\n\t{\r\n\t\tcurrentCol = size / 2;\r\n\t\tcurrentRow = size / 2;\r\n\t\t\r\n\t\tint totalDistance;\r\n\t\tdo {\r\n\t\tint dist = size*size+1;\r\n\t\tmaze = new Room [size] [size];\r\n\t\tfor ( int row = 0; row < size; row++ )\r\n\t\t\tfor ( int col = 0; col < size; col++ )\r\n\t\t\t\tmaze [row] [col] = new Room ( dist);\r\n\t\ttotalDistance = CalcDistance();\r\n\t\t} while ( totalDistance >= size*size );\r\n\t\t\r\n\t\tmaze [currentRow] [currentCol].InsertWalker ( );\r\n\t}", "public void setZeroes(int[][] matrix) {\n\t\t\tint m = matrix.length;\n\t\t\tint n = matrix[0].length;\n\t\t\t\n\t\t\tboolean fc = false, fr = false; // first row, first column as markers\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (matrix[i][j] == 0) {\n\t\t\t\t\t\tif (i == 0) fr = true;\n\t\t\t\t\t\tif (j == 0) fc = true;\n\t\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 1; i < m; i++) {\n\t\t\t\tfor (int j = 1; j < n; j++) {\n\t\t\t\t\tif (matrix[0][j] == 0 || matrix[i][0] == 0) {\n\t\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fr) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fc) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }", "public void diagonalSum()\r\n {\r\n // Queue which stores tree nodes\r\n Queue<Node> queue = new LinkedList<Node>();\r\n \r\n // Map to store sum of node's data lying diagonally\r\n Map<Integer, Integer> map = new TreeMap<>();\r\n \r\n root.vd = 0;\r\n queue.add(root);\r\n \r\n while (!queue.isEmpty())\r\n {\r\n \tNode current = queue.remove();\r\n int vd = current.vd;\r\n \r\n while (current != null)\r\n {\r\n map.put(vd, map.getOrDefault(vd, 0)+current.data);\r\n \r\n if (current.leftChild != null)\r\n {\r\n current.leftChild.vd = vd+1;\r\n queue.add(current.leftChild);\r\n }\r\n \r\n current = current.rightChild;\r\n }\r\n }\r\n \r\n System.out.println(\"Diagonal sum : \");\r\n for(int val: map.values())\r\n {\r\n \tSystem.out.println(val);\r\n }\r\n }", "private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }", "void iniciaMatriz() {\r\n int i, j;\r\n for (i = 0; i < 5; i++) {\r\n for (j = 0; j <= i; j++) {\r\n if (j <= i) {\r\n m[i][j] = 1;\r\n } else {\r\n m[i][j] = 0;\r\n }\r\n }\r\n }\r\n m[0][1] = m[2][3] = 1;\r\n\r\n// Para los parentesis \r\n for (j = 0; j < 7; j++) {\r\n m[5][j] = 0;\r\n m[j][5] = 0;\r\n m[j][6] = 1;\r\n }\r\n m[5][6] = 0; // Porque el m[5][6] quedo en 1.\r\n \r\n for(int x=0; x<7; x++){\r\n for(int y=0; y<7; y++){\r\n // System.out.print(\" \"+m[x][y]);\r\n }\r\n //System.out.println(\"\");\r\n }\r\n \r\n }", "public void resetBoard() {\n\t\t\n\t\tfor(int row = 0; row < board.length; row++) {\n\t\t\tfor(int col = 0; col < board[row].length; col++) {\n\t\t\t\t\n\t\t\t\tboard[row][col] = 0;\n\t\t\t}\n\t\t}\n\t}", "public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public Squarelotron mainDiagonalFlip(int ring);", "public static void sequntailFloydW() {\r\n \t\r\n \t\r\n \t\r\n \r\n //This makes the main matrix d[][] ready\r\n \r\n \r\n //System.out.println(\"Printing... intial matrix\");\r\n \r\n for (int k = 0; k < dim; k++) {\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++) {\r\n if (d[i][k] == I || d[k][j] == I) {\r\n continue;\r\n } else if (d[i][j] > d[i][k] + d[k][j]) {\r\n d[i][j] = d[i][k] + d[k][j];\r\n }\r\n }\r\n }\r\n //System.out.println(\"sequntial pass \" + (k + 1) + \"/\" + dim);\r\n \r\n //System.out.println();\r\n }\r\n \r\n adjacencyMatrix = d.clone();// reuse adjacencyMatrix as a matrix for comparison with parallel execution, and clone as d[][] \r\n \t\t\t\t\t\t\t\r\n \r\n \r\n //print(adjacencyMatrix);\r\n }", "public abstract double getDiagonal();", "public void setZeroes_ok(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\n\t\tif (m == 1) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[0][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\t\tmatrix[0][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tif (matrix[i][0] == 0) {\n\t\t\t\t\tfor (int k = 0; k < m; k++) {\n\t\t\t\t\t\tmatrix[k][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint idx = 0;\n\t\tboolean[][] visit = new boolean[m][n];\n\t\twhile (idx <= m * n - 1) {\n\t\t\tint i = idx / n;\n\t\t\tint j = idx % n;\n\t\t\tif (i < m && j < n && matrix[i][j] == 0 && visit[i][j] == false) {\n\t\t\t\t// set whole row to 0\n\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\tif (matrix[i][k] != 0) {\n\t\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t\t\tvisit[i][k] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set whole col to 0\n\t\t\t\tfor (int l = 0; l < m; l++) {\n\t\t\t\t\tif (matrix[l][j] != 0) {\n\t\t\t\t\t\tmatrix[l][j] = 0;\n\t\t\t\t\t\tvisit[l][j] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t}", "public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }", "private void initMatrix(Canvas canvas) {\n\t\tint height = canvas.getHeight();\n\t\tint width = canvas.getWidth();\n\t\tchar[][] matrix = canvas.getMatrix();\n\n\t\tif (matrix == null) {\n\t\t\tmatrix = new char[width][height];\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\t\tmatrix[i][j] = SPACE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcanvas.setMatrix(matrix);\n\t\t}\n\t}", "public void setMatrix(int[] matrix) {\n this.matrix = matrix;\n this.emptyTileIndex = indexOfEmptyTile();\n if (this.emptyTileIndex == -1) throw new IllegalStateException(\"Board does not contains empty tile!\");\n }", "private void moveDiagonalMhos() {\n\n\t\t//Assign playerX and playerY to the X and Y of the player\n\t\tint playerX = getNewPlayerLocation()[0];\n\t\tint playerY = getNewPlayerLocation()[1];\n\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\n\t\t\t//set the default X and Y offsets to 0, and the move to NO_MOVEMENT\n\t\t\tint xOffset = 0;\n\t\t\tint yOffset = 0;\n\t\t\tchar move;\n\n\t\t\t//Check if the playerX is greater to mhoX (aligned on x-axis) (to find direction of diagonal move)\n\t\t\tif(playerX > mhoX) {\n\n\t\t\t\t//check if playerY is greater to mhoY (to find direction of diagonal move)\n\t\t\t\tif(playerY > mhoY) {\n\t\t\t\t\txOffset = 1;\n\t\t\t\t\tyOffset = 1;\n\t\t\t\t\tmove = Legend.DOWN_RIGHT;\n\t\t\t\t} else {\n\t\t\t\t\txOffset = 1;\n\t\t\t\t\tyOffset = -1;\n\t\t\t\t\tmove = Legend.UP_RIGHT;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t//check if playerY is greater to mhoY (to find direction of diagonal move)\n\t\t\t\tif(playerY > mhoY) {\n\t\t\t\t\txOffset = -1;\n\t\t\t\t\tyOffset = 1;\n\t\t\t\t\tmove = Legend.DOWN_LEFT;\n\t\t\t\t} else {\n\t\t\t\t\txOffset = -1;\n\t\t\t\t\tyOffset = -1;\n\t\t\t\t\tmove = Legend.UP_LEFT;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Only move the mho if its location is an instance of BlankSpace or Player\n\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof BlankSpace || newMap[mhoX+xOffset][mhoY+yOffset] instanceof Player) {\n\n\t\t\t\t//Assign the previous location as a BlankSpace\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\n\t\t\t\t//If the new location is a player, shrink the player and call gameOver()\n\t\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof Player) {\n\t\t\t\t\tmoveList[mhoX+xOffset][mhoY+yOffset] = Legend.SHRINK;\n\t\t\t\t\tgameOver();\n\t\t\t\t}\n\n\t\t\t\t//Assign the new location as a mho\n\t\t\t\tnewMap[mhoX+xOffset][mhoY+yOffset] = new Mho(mhoX+xOffset, mhoY+yOffset, board);\n\n\t\t\t\t//Assign move to the mho's old location\n\t\t\t\tmoveList[mhoX][mhoY] = move;\n\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\n\t\t\t\t//Call moveDiagonalMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveDiagonalMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "private static void changeSubMatrix(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++){\n if(matrix[i][0]==0 || matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n }", "public void fillMatrix(int row, int col, double value){\n arr[row][col] = value;\n }", "public void compactUp() {\n\t// Iteramos a través del tablero partiendo de la primera fila\n\t// y primera columna. Si esta contiene un 0 y la fila posterior\n\t// de la misma columna es distinta de 0, el valor se intercambia.\n\t// El proceso se repite hasta que todas las posiciones susceptibles\n\t// al cambio se hayan comprobado.\n\tfor (int i = 0; i < board.length; i++) {\n\t for (int j = 0; j < board.length - 1; j++) {\n\t\tif (board[j][i] == EMPTY && board[j + 1][i] != EMPTY) {\n\t\t board[j][i] = board[j + 1][i];\n\t\t board[j + 1][i] = EMPTY;\n\t\t compactUp();\n\t\t}\n\t }\n\t}\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "public static void solution(boolean[][] board, int row, int cols, int ndiag, int rdiag, String asf) {\n if(row == board.length){\n System.out.println(asf);\n return;\n }\n \n for(int col = 0; col < board.length; col++){\n if(\n ((cols & (1 << col)) == 0) &&\n ((ndiag & (1 << col + row)) == 0) &&\n ((rdiag & (1 << row - col + board.length - 1)) == 0)\n ){\n board[row][col] = true;\n cols ^= (1 << col);\n ndiag ^= (1 << (row + col));\n rdiag ^= (1 << (row - col + board.length - 1));\n solution(board, row + 1, cols, ndiag, rdiag, asf + row + \"-\" + col + \", \");\n cols ^= (1 << col);\n ndiag ^= (1 << (row + col));\n rdiag ^= (1 << (row - col + board.length - 1));\n board[row][col] = false;\n }\n }\n \n }", "public void compactDown() {\n\t// Iteramos a través del tablero partiendo de la primera fila\n\t// y última columna. Si esta contiene un 0 y la fila anterior\n\t// de la misma columna es distinta de 0, el valor se intercambia.\n\t// El proceso se repite hasta que todas las posiciones susceptibles\n\t// al cambio se hayan comprobado.\n\tfor (int i = 0; i < board.length; i++) {\n\t for (int j = board.length - 1; j > 0; j--) {\n\t\tif (board[j][i] == EMPTY && board[j - 1][i] != EMPTY) {\n\t\t board[j][i] = board[j - 1][i];\n\t\t board[j - 1][i] = EMPTY;\n\t\t compactDown();\n\t\t}\n\t }\n\t}\n }", "public void setToZero() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n data[i][j] = 0;\n }\n }\n }", "public static void cleandynamicboard(){\n\t\tfor(int x=0;x<boardwidth+2;x++){\n\t\t\tfor(int i=0;i<boardlength+2;i++){\n\t\t\t\tdynamicboard[x][i]=0;\n\t\t\t}\n\t\t}\n\t}", "public void nullifyMatrixEfficient(int[][] mat) {\r\n boolean hasRow=false, hasCol=false;\r\n //checking first row and colmun about having any zero so later we can nullify it\r\n for (int i=0;i<mat[0].length;i++ ) {\r\n if(mat[0][i] == 0) {\r\n hasRow = true;\r\n break;\r\n }\r\n }\r\n for (int i=0;i<mat.length;i++ ) {\r\n if(mat[i][0] == 0) {\r\n hasCol = true;\r\n break;\r\n }\r\n }\r\n //checking zeros existance and marking their coresponding first row and col to zero\r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n mat[0][j] = 0;\r\n mat[i][0] = 0;\r\n }\r\n }\r\n }\r\n //nullify all columns with first element is zero\r\n for(int i=0; i<mat[0].length; i++) {\r\n if(mat[0][i] == 0)\r\n helperNullifyColumn(mat, i);\r\n }\r\n \r\n //nullify all rows with first element is zero\r\n for(int i=0; i<mat.length; i++) {\r\n if(mat[i][0] == 0)\r\n helperNullifyRow(mat, i);\r\n }\r\n printMat(mat);\r\n }", "@Override\n\tpublic double diagonal() {\n\t\treturn getBase()*Math.sqrt(2);\n\t}", "public int rest_fill(char[][] table, String key1)\r\n {\r\n int l=key1.length();\r\n int u=0, v=0, temp=0;\r\n \r\n //counting the no. of I & J\r\n for(int i=0; i<l; i++)\r\n {\r\n if(key1.charAt(i)=='I')\r\n u++;\r\n else if(key1.charAt(i)=='J')\r\n v++;\r\n }\r\n \r\n \r\n int ni=0, nj=0;\r\n \r\n ni=l/5; //checking the no. of rows the key requires\r\n nj=l%5; //checking the no. of columns (other than the full rows) the key requires\r\n int c=65, n=0, x=0;\r\n \r\n //if key has i but no j\r\n if(u>0 && v==0)\r\n {\r\n //if the key requires more than or equal to 1 row and also it has some independent columns\r\n if(ni>0 && nj>0)\r\n {\r\n //starting to fill-up after the independent columns end\r\n for(int i=nj;i<5;i++)\r\n {\r\n //checking if the character is present in the key or if it's J\r\n for(int j=0; j<l; j++)\r\n {\r\n if((char)c==key1.charAt(j) || (char)c=='J')\r\n x++;\r\n }\r\n \r\n //if the character is present in the key or if it's J ignore it else add to matrix\r\n if(x==0)\r\n {\r\n table[ni][i]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n x=0;\r\n \r\n //start filling out rest of the rows\r\n for(int i=ni+1; i<5; i++)\r\n {\r\n for(int j=0; j<5; j++)\r\n {\r\n //checking if the character is present in the key or if it's J\r\n for(int k=0; k<l; k++)\r\n {\r\n if((char)c==key1.charAt(j) || (char)c=='J')\r\n x++;\r\n }\r\n \r\n //if the character is present in the key or if it's J ignore it else add to matrix\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n }\r\n }\r\n \r\n //if key gets completed in one row without using all the columns\r\n else if(ni==0 && nj>0)\r\n {\r\n //start filling out the rest of the columns in the first row\r\n for(int i=nj; i<5; i++)\r\n {\r\n for(int j=0;j<l;j++)\r\n {\r\n if((char)c==key1.charAt(j) || (char)c=='J');\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[0][i]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n x=0;\r\n \r\n //filing the rest of the rows\r\n for(int i=1;i<5;i++)\r\n {\r\n for(int j=0; j<5; j++)\r\n {\r\n for(int k=0; k<l; k++)\r\n {\r\n if((char)c==key1.charAt(i) || (char)c=='J')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n }\r\n }\r\n \r\n //if key takes full rows but needs no independent columns\r\n else if(ni>0 && nj==0)\r\n {\r\n for(int i=ni; i<5;i++)\r\n {\r\n for(int j=0; j<5;j++)\r\n {\r\n for(int k=0; k<l;k++)\r\n {\r\n if((char)c==key1.charAt(i) || (char)c=='J')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n }\r\n }\r\n temp=2;\r\n }\r\n \r\n //if key has no i but only j\r\n else if(u==0 && v>0)\r\n {\r\n //if key requires some complete rows and few independent columns\r\n if(ni>0 && nj>0)\r\n {\r\n //starting to fill-up after the independent columns end\r\n for(int i=nj;i<5;i++)\r\n {\r\n for(int j=0; j<l; j++)\r\n {\r\n if((char)c==key1.charAt(j) || (char)c=='I')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[ni][i]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n x=0;\r\n \r\n //filling up the remaining rows\r\n for(int i=ni+1; i<5; i++)\r\n {\r\n for(int j=0; j<5; j++)\r\n {\r\n for(int k=0; k<l; k++)\r\n {\r\n if((char)c==key1.charAt(j) || (char)c=='I')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n }\r\n }\r\n \r\n //if key gets completed within 1 row without all 5 columns\r\n else if(ni==0 && nj>0)\r\n {\r\n //filling out the rest columns in row1\r\n for(int i=nj; i<5; i++)\r\n {\r\n for(int j=0;j<l;j++)\r\n {\r\n if((char)c==key1.charAt(j) || (char)c=='I');\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[0][i]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n x=0;\r\n \r\n //filling out the rest of the rows\r\n for(int i=1;i<5;i++)\r\n {\r\n for(int j=0; j<5; j++)\r\n {\r\n for(int k=0; k<l; k++)\r\n {\r\n if((char)c==key1.charAt(i) || (char)c=='I')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n }\r\n }\r\n \r\n //if key gets completed in whole rows without any independent columns\r\n else if(ni>0 && nj==0)\r\n {\r\n \r\n //filling out the rest of the rows\r\n for(int i=ni; i<5;i++)\r\n {\r\n for(int j=0; j<5;j++)\r\n {\r\n for(int k=0; k<l;k++)\r\n {\r\n if((char)c==key1.charAt(i) || (char)c=='I')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n }\r\n }\r\n temp=1;\r\n }\r\n \r\n //if the key doesn't have i and j\r\n else if(u==0 && v==0)\r\n {\r\n //if key requires whole rows and few independent columns\r\n if(ni>0 && nj>0)\r\n {\r\n //filling out the rest of the columns\r\n for(int i=nj;i<5;i++)\r\n {\r\n for(int j=0; j<l; j++)\r\n {\r\n if((char)c==key1.charAt(j) || (char)c=='J')\r\n {\r\n x++;\r\n break;\r\n }\r\n }\r\n if(x==0)\r\n {\r\n table[ni][i]=(char)c;\r\n }\r\n c++;\r\n x=0;\r\n }\r\n x=0;\r\n \r\n //filling out the rest of the rows\r\n for(int i=ni+1; i<5; i++)\r\n {\r\n for(int j=0; j<5; j++)\r\n {\r\n for(int k=0; k<l; k++)\r\n {\r\n if((char)c==key1.charAt(k) || (char)c=='J')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n }\r\n c++;\r\n x=0;\r\n }\r\n }\r\n }\r\n \r\n //if the key gets over within few columns and no complete ros are required\r\n else if(ni==0 && nj>0)\r\n {\r\n //filling out the incomplete row\r\n for(int i=nj; i<5; i++)\r\n {\r\n for(int j=0;j<l;j++)\r\n {\r\n if((char)c==key1.charAt(j) || (char)c=='J');\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[0][i]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n x=0;\r\n \r\n //filling out the rest of the rows\r\n for(int i=1;i<5;i++)\r\n {\r\n for(int j=0; j<5; j++)\r\n {\r\n for(int k=0; k<l; k++)\r\n {\r\n if((char)c==key1.charAt(i) || (char)c=='J')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n }\r\n }\r\n \r\n //if the key requires only rows and no independent columns\r\n else if(ni>0 && nj==0)\r\n {\r\n //filling out the rest of the columns\r\n for(int i=ni; i<5;i++)\r\n {\r\n for(int j=0; j<5;j++)\r\n {\r\n for(int k=0; k<l;k++)\r\n {\r\n if((char)c==key1.charAt(i) || (char)c=='J')\r\n x++;\r\n }\r\n if(x==0)\r\n {\r\n table[i][j]=(char)c;\r\n c++;\r\n }\r\n x=0;\r\n }\r\n }\r\n }\r\n temp=2;\r\n }\r\n \r\n //printing the table\r\n for(int i=0; i<5;i++)\r\n {\r\n for(int j=0; j<5; j++)\r\n {\r\n System.out.print(table[i][j]+\" \");\r\n }\r\n System.out.println();\r\n }\r\n return temp; //if temp = 2 i is in matrix and j is ignored. if temp = 1 j is in matrix and i is ignored\r\n }", "public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }", "public static void matrixDis()\n\t{\n\t\t\n\t\tclade = clad[k];\n\t\t//System.err.println(\"\\n\\n\" + clade.cladeName);\n\n\t\tfor(c=0; c<clade.numSubClades; c++)\n\t\t{\n\t\t\tclade.Dc[c]=0;\n\t\t\tclade.Dn[c]=0;\n\t\t\t//clade.varDc[c]=0;\n\t\t\t//clade.varDn[c]=0;\n\t\t\tsum1 = sum2 = sum3 = 0;\n\t\t\tsumc1 = sumc2 = sumc3 = 0;\n\n\t\t\tfor(i=0; i<clade.numCladeLocations; i++) \t\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\tsum2 += clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2 ;\n\t\t\t\tsumc2 += (clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2) + \n\t\t\t (clade.obsMatrix[c][i] * (clade.columnTotal[i] - clade.obsMatrix[c][i]));\t\n\t\t\t\n\t\t\t\tfor (j=0; j<clade.numCladeLocations; j++)\n\t\t\t\t{\t\n\t\t\t\t\tpopA = clade.cladeLocIndex[i];\n\t\t\t\t\tpopB = clade.cladeLocIndex[j];\n\t\t\t\t\t\n\t\t\t\t\tif (j != i)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum1 += (double) clade.obsMatrix[c][i] * clade.obsMatrix[c][j] * distance[popA-1][popB-1];\n\t\t\t\t\t\tsum3 += clade.obsMatrix[c][i] * clade.obsMatrix[c][j];\t\t\t\n\t\t\t\t\t\tsumc1 += (double) clade.obsMatrix[c][i] * clade.columnTotal[j] * distance[popA-1][popB-1];\t\n\t\t\t\t\t\tsumc3 += clade.obsMatrix[c][i] * clade.columnTotal[j];\n\t\t\t\t\t\t//System.err.println(\"\\npopA = \" + popA + \" popB = \" + popB + \" dist= \" + distance[popA-1][popB-1]);\n\t\t\t\t\t\t//System.err.println(\"sumc1: \" + clade.obsMatrix[c][i] + \" * \" + clade.columnTotal[j] +\" * \" + distance[popA-1][popB-1] + \" = \" + sumc1); \n\t\t\t\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\t\t\t\t//System.err.println(\"\\nCT[\" + j +\"]= \" + clade.columnTotal[j]); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\n\t\t\t\n\t\t\tif (sum3 == 0.0)\n\t\t\t\tclade.Dc[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dc[c] = sum1 / (sum2 + sum3);\t\t\t\t\n\t\n\t\n\t\t\tif (sumc3 == 0.0)\n\t\t\t\tclade.Dn[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dn[c] = sumc1 / (sumc2 + sumc3);\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t//System.err.println(\"\\nClade \" + clade.cladeName + \" subclade \" + c + \n\t\t\t// \" Dc= \" + clade.Dc[c] + \" Dn= \" + clade.Dn[c]); \t\t\n\t\t\t//System.err.println(\"sum1= \" + sum1 + \" sum2= \" + sum2 + \" sum3= \" + sum3); \n\t\t\t//System.err.println(\"sumc1= \" + sumc1 + \" sumc2= \" + sumc2 + \" sumc3= \" + sumc3); \t\n\t\t}\t\t\n\n\t}", "private void printMatrixClockwisely(int[][] array, int start) {\n\t\tfor(int i=start;i<array[0].length-start;i++)\n\t\t{\n\t\t\tSystem.out.print(array[start][i]+\" \");\n\t\t}\n\t\tif(array.length-1-start>start)\n\t\t{\n\t\t\tfor(int i=start+1;i<array.length-start-1;i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(array[i][array[0].length-1-start]+\" \");\n\t\t\t}\n\t\t}\n\t\tif(array[0].length-start-1>start&&array.length-start-1>start)\n\t\t{\n\t\t\tfor(int i=array.length-start-1;i>start;i--)\n\t\t\t\tSystem.out.print(array[array.length-start-1][i]+\" \");\n\t\t}\n\t\tif(array.length-1-start>start&&array[0].length-1-start>start)\n\t\t{\n\t\t\tfor(int i=array.length-start-1;i>start;i--)\n\t\t\t\tSystem.out.print(array[i][start]+\" \");\n\t\t}\n\t}", "private static void setFirstRowToZero(int[][] matrix,int numberOfColumns){\n for(int i=0;i<numberOfColumns;i++){\n matrix[0][i]=0;\n }\n }", "public static void blockCells(int [][] board, int row, int column){\n\t\tfor (int k=0; k<8; k++) //rows+columns\n\t\t{\n\t\t\t//if (k != row && k != column) \n\t\t\t{\n\t\t\t\tboard [row][k] = 1;\n\t\t\t\tboard [k][column] = 1;\t\t\t\n\t\t\t}\n\t\t}\n\t\tfor (int m=1; m<(8-row)&&m<(8-column); m++) //diagonal\n\t\t{\n\t\t\tboard [row+m][column+m] = 1;\n\t\t}\n\t\tfor (int m=1; m<=row&&m<=column; m++) //diagonal again\n\t\t{\n\t\t\tboard [row-m][column-m] = 1;\n\t\t}\n\t\tfor (int m=1; m<(8-row)&&m<=column; m++) //diagonal again\n\t\t{\n\t\t\tboard [row+m][column-m] = 1;\n\t\t}\n\t\tfor (int m=1; m<=row&&m<(8-column); m++) //diagonal yet again\n\t\t{\n\t\t\tboard [row-m][column+m] = 1;\n\t\t}\n\t\t\tboard [row][column] = 2;\n\t}", "void fillMatrixFromQuaternion(DoubleBuffer matrix, double m_x, double m_y, double m_z, double m_w)\n\t{\t\t\n\t\t// First row\n\t\tmatrix.put(1.0 - 2.0 * ( m_y * m_y + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_x * m_y + m_z * m_w));\n\t\tmatrix.put(2.0 * (m_x * m_z - m_y * m_w));\n\t\tmatrix.put(0.0);\n\t\t\n\t\t// Second row\n\t\tmatrix.put(2.0 * ( m_x * m_y - m_z * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_z * m_y + m_x * m_w ));\n\t\tmatrix.put(0.0);\n\n\t\t// Third row\n\t\tmatrix.put(2.0 * ( m_x * m_z + m_y * m_w ));\n\t\tmatrix.put(2.0 * ( m_y * m_z - m_x * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_y * m_y ));\n\t\tmatrix.put(0.0);\n\n\t\t// Fourth row\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(1.0);\n\t\t\n\t\tmatrix.flip();\n\t}", "public static int noDiagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i != j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static SimpleMatrix diag( Class type, double... vals ) {\n SimpleMatrix M = new SimpleMatrix(vals.length, vals.length, type);\n for (int i = 0; i < vals.length; i++) {\n M.set(i, i, vals[i]);\n }\n return M;\n }", "public static Matrix scalarMatrix(int nrow, double diagconst){\r\n \tMatrix u = new Matrix(nrow, nrow);\r\n \tdouble[][] uarray = u.getArrayReference();\r\n \tfor(int i=0; i<nrow; i++){\r\n \t\tfor(int j=i; j<nrow; j++){\r\n \t\tif(i==j){\r\n \t\t\tuarray[i][j]= diagconst;\r\n \t\t}\r\n \t\t}\r\n \t}\r\n \treturn u;\r\n \t}", "public static int[] findDiagonalOrder(int[][] matrix){\n if( matrix == null || matrix.length == 0)\n return new int[0];\n int i = 0;\n int j =0;\n int k = 0;\n int size = matrix.length * matrix[0].length;\n int[] result = new int[size];\n boolean moveUp =true;\n while(k< size){\n\n if(moveUp){\n for(;i >=0 && j<= matrix[0].length-1;i--, j++){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving up there are two conditions\n// 1. only row moves beyod 0 th row and column is in range (check for both row and column)\n //2. both row and column moves out ( check for column only)\n //case 1\n if(i<0 && j <= matrix[0].length-1){\n i = 0; // reset row to 0 and move down\n moveUp = !moveUp;\n }\n //case 2\n if(j == matrix[0].length){\n i = i+2; // reset row\n j--; // reduce column and move down\n moveUp = !moveUp;\n }\n\n }\n else\n {\n // moving down increment row and decrement column\n for(;j>=0 && i <= matrix.length - 1; i++, j-- ){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving down there are two cases\n // 1. column goes out but rows in order (we need to check both)\n // 2. both column and row goes out (we can only have row check)\n if(j < 0 && i<= matrix.length-1){\n j = 0;\n moveUp = !moveUp;\n }\n if( i == matrix.length){\n j = j+2;\n i--;\n moveUp = !moveUp;\n }\n\n }\n\n\n }\n return result;\n }", "public static void setRowsToZeroes(int[][] matrix, int row) {\n for (int j = 0; j < matrix[0].length; j++) {\n matrix[row][j] = 0;\n }\n }", "private void resetRow(int i) {\n\t\tfor (int j = 0; j < width; j++) {\n\t\t\tmatrix[i][j] = UNKNOWN;\n\t\t\tpredictions[i][j] = UNKNOWN;\n\t\t}\n\t}", "public void identity(){\n for (int j = 0; j<4; j++){\n \tfor (int i = 0; i<4; i++){\n \t\tif (i == j)\n \t\t\tarray[i][j] = 1;\n \t\telse\n \t\t\tarray[i][j] = 0;\n \t }\n \t }\n\t}", "public void resetBoard(){\n totalmoves = 0;\n this.board = new Cell[3][3];\n //fill the board with \"-\"\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board[i][j]=new Cell(new Coordinates(i,j), \"-\");\n }\n }\n }", "public void setIdentity() {\n System.arraycopy(IDENTITY, 0, matrix, 0, 16);\n }", "private void boardInit() {\n for(int i = 0; i < this.boardHeight; i++)\n this.board[i][0] = ' ';\n for(int i = 0; i < this.boardWidth; i++)\n this.board[0][i] = ' ';\n \n for(int i = 1; i < this.boardHeight; i++) {\n for(int j = 1; j < this.boardWidth; j++) {\n this.board[i][j] = '*';\n }\n }\n }", "public void zeroMatrix(int[][] matrix, int m, int n){\n \t boolean row0=false;\n \t boolean co0=false;\n \t for(int i=0;i<n;i++){//Check if the 1st row has a zero\n \t\t if(matrix[0][i]==0){\n \t\t\t row0=true;\n \t\t\t break;\n \t\t }\n \t }\n \t for(int i=0;i<m;i++){//Check if the 1st column has a zero \n \t\t if(matrix[i][0]==0){\n \t\t\t co0=true;\n \t\t\t break;\n \t\t }\n \t }\n\n \t for(int i=1;i<m;i++){// Using 1st row and 1st column to record which row and which column has zero\n \t\tfor(int j=1;j<n;j++){\n \t\t\tif(matrix[i][j]==0){\n \t\t\t\tmatrix[0][j]=0;\n \t\t\t\tmatrix[i][0]=0;\n \t\t\t}\n \t\t}\n \t}\n \t for(int i = 1; i < matrix.length; i++) {//Set the matrix zero\n \t for(int j = 1; j < matrix[0].length; j++) {\n \t if(matrix[i][0] == 0 || matrix[0][j] == 0) {\n \t matrix[i][j] = 0;\n \t }\n \t }\n \t }\n \tif(row0){//Set the 1st row zero\n \t\tfor(int i = 0; i < n; i++) {\n matrix[0][i] = 0;\n }\n \t}\n \tif(co0){//Set the 1st column zero\n \t\tfor(int i = 0; i < m; i++) {\n matrix[i][0] = 0;\n }\n \t}\n }", "public boolean diag1(){\n\tboolean trouve=false;\n\tint i=0;\n\tObject tmp='@';\n\twhile(i<5 && !trouve){\n\t\tif(gc[i][i]==tmp)\n\t\t\ttrouve=true;\n\t\telse\n\t\t\ti++;\n\t}\n\treturn trouve;\n}", "private static void fillBorders()\n\t{\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tif(i==0 || i==board.length-1)\n\t\t\t\tArrays.fill(board[i], Cells.WALL);\n\t\t\telse\n\t\t\t{\n\t\t\t\tboard[i][0]=Cells.WALL;\n\t\t\t\tboard[i][board[i].length-1]=Cells.WALL;\n\t\t\t}\n\t\t}\n\t}", "public static void clearBoard() {\n for (int row = 0; row < SIZE_ROW; row++) {\n for (int col = 0; col < SIZE_COL; col++) {\n board[row][col] = 0;\n }\n }\n }", "public static void zeroMatrix(int[][] matrix) {\n ArrayList<ArrayList<Integer>> list = new ArrayList<>(); // creates array of array of integers to store coordinates\n for (int i = 0; i < matrix.length; i++) { // go through each point in matrix\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) { // if the point in the matrix contains 0...\n ArrayList<Integer> subList = new ArrayList<>(); // create ArrayList to store point values\n subList.add(i); // add y\n subList.add(j); // add x\n list.add(subList); // add these points to the array containing points\n }\n }\n }\n fill(list, matrix); // helper method to fill in the matrix\n }", "public static Matrix generateBigDiagonal(int size, boolean oppositedirection, double... ds) throws Exception {\n\t\tdouble[][] a = new double[size][size];\n\t\tint numparams = ds.length;\n\t\t\n\t\tif(!oppositedirection) {\n\t\t\tswitch(numparams) {\n\t\t\t\tcase 1: for(int i = 0; i<size; i++){\n\t\t\t \t\t\tfor(int j =0; j<size; j++){\n\t\t\t \t\t\t\tif(j == i) a[i][j] = ds[0];\n\t\t\t \t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 3: for(int i = 0; i<size; i++){\n\t\t\t \t\t\tfor(int j =0; j<size; j++){\n\t\t\t \t\t\t\tif(j == i-1) a[i][j] = ds[0];\n\t\t\t \t\t\t\tif(j == i) a[i][j] = ds[1];\n\t\t\t \t\t\t\tif(j == i+1) a[i][j] = ds[2];\n\t\t\t \t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 5: for(int i = 0; i<size; i++){\n\t \t\t\t\t\tfor(int j =0; j<size; j++){\n\t \t\t\t\t\t\tif(j == i-2) a[i][j] = ds[0];\n\t \t\t\t\t\t\tif(j == i-1) a[i][j] = ds[1];\n\t \t\t\t\t\t\tif(j == i) a[i][j] = ds[2];\n\t \t\t\t\t\t\tif(j == i+1) a[i][j] = ds[3];\n\t \t\t\t\t\t\tif(j == i+2) a[i][j] = ds[4];\n\t \t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault: throw new Exception(\"Invalid number of parameters\");\n\t\t\t}\n\t\t} else {\n\t\t\tswitch(numparams) {\n\t\t\tcase 1: for(int i = 0; i<size; i++){\n\t\t \t\t\tfor(int j =0; j<size; j++){\n\t\t \t\t\t\tif(j+i == size-1) a[i][j] = ds[0];\n\t\t \t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 3: for(int i = 0; i<size; i++){\n\t\t \t\t\tfor(int j =0; j<size; j++){\n\t\t \t\t\t\tif(j+i == size-2) a[i][j] = ds[0];\n\t\t \t\t\t\tif(j+i == size-1) a[i][j] = ds[1];\n\t\t \t\t\t\tif(j+i == size) a[i][j] = ds[2];\n\t\t \t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 5: for(int i = 0; i<size; i++){\n \t\t\t\t\tfor(int j =0; j<size; j++){\n \t\t\t\t\t\tif(j+i == size-3) a[i][j] = ds[0];\n \t\t\t\t\t\tif(j+i == size-2) a[i][j] = ds[1];\n \t\t\t\t\t\tif(j+i == size-1) a[i][j] = ds[2];\n \t\t\t\t\t\tif(j+i == size) a[i][j] = ds[3];\n \t\t\t\t\t\tif(j+i == size+1) a[i][j] = ds[4];\n \t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault: throw new Exception(\"Invalid number of parameters\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tMatrix A = new Matrix(a);\n\t\n\t\treturn A;\n\t}", "public void initializeMaze(){\n for(int i = 0; i < 20; i ++){\n for(int j = 0; j < 15; j ++){\n if((i % 2 == 1) && (j % 2 == 1)){\n maze[i][j] = NOTVISIBLESPACE;\n }\n else{\n maze[i][j] = NOTVISIBLEWALL;\n }\n }\n }\n\n for(int i = 0; i < 15; i ++){\n maze[19][i] = NOTVISIBLEWALL;\n }\n }", "private int checkDiagonal() {\n if ((this.board[0][0] == this.board[1][1]) && this.board[0][0] == this.board[2][2]) {\n return this.board[0][0];\n } else if ((this.board[0][2] == this.board[1][1]) && this.board[0][2] == this.board[2][0]) {\n return this.board[0][2];\n } else {\n return 0;\n }\n }", "private void buildMatrix() {\n\n int totalnumber=this.patents.size()*this.patents.size();\n\n\n\n int currentnumber=0;\n\n\n for(int i=0;i<this.patents.size();i++) {\n ArrayList<Double> temp_a=new ArrayList<>();\n for (int j=0;j<this.patents.size();j++) {\n if (i==j) temp_a.add(0.0); else if (i<j)\n {\n double temp = distance.distance(this.patents.get(i), this.patents.get(j));\n temp = (new BigDecimal(temp).setScale(2, RoundingMode.UP)).doubleValue();\n temp_a.add(temp);\n\n\n // simMatrix.get(i).set(j, temp);\n // simMatrix.get(j).set(i, temp);\n } else {\n temp_a.add(simMatrix.get(j).get(i));\n }\n currentnumber++;\n System.out.print(\"\\r\"+ProgressBar.barString((int)((currentnumber*100/totalnumber)))+\" \"+currentnumber);\n\n }\n simMatrix.add(temp_a);\n }\n System.out.println();\n\n }", "public static void fillMatrix()\n\t{\n\t\tn=in.nextInt();\n\t\tm=in.nextInt();\n\t\tmatrix = new char[n][m];\n\t\tin.nextLine();\n\t\tfor(int y=0;y<n;y++)\n\t\t\tmatrix[y] = in.nextLine().toCharArray();\n\t}", "public Squarelotron inverseDiagonalFlip(int ring);", "public void compactRight() {\n\t// Iteramos a través del tablero partiendo de la primera fila\n\t// y última columna. Si esta contiene un 0 y la columna anterior\n\t// de la misma fila es distinta de 0, el valor se intercambia.\n\t// El proceso se repite hasta que todas las posiciones susceptibles\n\t// al cambio se hayan comprobado.\n\n\tfor (int i = 0; i < board.length; i++) {\n\t for (int j = board.length - 1; j > 0; j--) {\n\t\tif (board[i][j] == EMPTY && board[i][j - 1] != EMPTY) {\n\t\t board[i][j] = board[i][j - 1];\n\t\t board[i][j - 1] = EMPTY;\n\t\t compactRight();\n\t\t}\n\t }\n\t}\n }", "private Sign[] flattenBoard(){\r\n Sign[] flatBoard = new Sign[10]; // an array to save the board as one dimensional array\r\n int count = 1; //counter to help the transition from matrix to array\r\n\r\n /* transfer the matrix to array */\r\n for (int i=0;i<3;i++)\r\n for (int j=0;j<3;j++)\r\n flatBoard[count++] = board[i][j];\r\n\r\n return flatBoard;\r\n }", "protected void expand() {\n matrix = matrix.power(e);\n }", "static void setFirstColumnToZero(int[][] matrix,int numberOfRows){\n for(int i=0;i<numberOfRows;i++){\n matrix[i][0]=0;\n }\n }", "public static void makeMatrix()\n {\n\n n = Graph.getN();\n m = Graph.getM();\n e = Graph.getE();\n\n connectMatrix = new int[n][n];\n\n // sets the row of value u and the column of value v to 1 (this means they are connected) and vice versa\n // vertices are not considered to be connected to themselves.\n for(int i = 0; i < m;i++)\n {\n connectMatrix[e[i].u-1][e[i].v-1] = 1;\n connectMatrix[e[i].v-1][e[i].u-1] = 1;\n }\n }", "private static char[][] fillMaze(char[][] maze) {\r\n\t\tint maxLinha = maze.length - 1;\r\n\t\tint maxColuna = maze[0].length - 1;\r\n\r\n\t\t// preenche as bordas do labirinto com #\r\n\t\tfor (int i = 0; i <= maxColuna; i++) {\r\n\t\t\tmaze[0][i] = '#';\r\n\t\t\tmaze[maxLinha][i] = '#';\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i <= maxLinha; i++) {\r\n\t\t\tmaze[i][0] = '#';\r\n\t\t\tmaze[i][maxColuna] = '#';\r\n\t\t}\r\n\r\n\t\t// preenche a parte interna do labirinto de modo aleatório\r\n\t\tfor (int i = 1; i < maxLinha; i++) {\r\n\t\t\tfor (int j = 1; j < maze[i].length - 1; j++)\r\n\t\t\t\tmaze[i][j] = random.nextInt(2) == 0 ? '#' : '.';\r\n\t\t}\r\n\r\n\t\treturn maze;\r\n\t}", "public void initialize(){ \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tfor (int j=0; j<3; j++){\r\n\t\t\t\tboard [i][j] = '-';\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.610147", "0.60873085", "0.607274", "0.60115266", "0.5920884", "0.59028256", "0.5813405", "0.5812236", "0.5795738", "0.57332647", "0.56236243", "0.5586084", "0.55767465", "0.5541988", "0.552128", "0.55008984", "0.5484391", "0.5466732", "0.5450192", "0.54443043", "0.54263884", "0.54216766", "0.54086405", "0.54017425", "0.5395357", "0.5381271", "0.5378166", "0.53708553", "0.53518474", "0.53432906", "0.5335101", "0.5328048", "0.5307305", "0.5303386", "0.529277", "0.52911705", "0.52772105", "0.5255573", "0.525198", "0.5247345", "0.52459335", "0.5229085", "0.52256614", "0.5216346", "0.520368", "0.52000487", "0.5198038", "0.5185775", "0.5180939", "0.5175402", "0.5168089", "0.5165714", "0.5159294", "0.51532245", "0.5147436", "0.51440156", "0.5139903", "0.5135662", "0.51327133", "0.513018", "0.5125112", "0.51111704", "0.51050067", "0.50828224", "0.50813735", "0.50811386", "0.50695616", "0.50603145", "0.5059567", "0.5058028", "0.5056725", "0.50535184", "0.50528884", "0.5051127", "0.50425035", "0.50368875", "0.5033276", "0.5028638", "0.50234747", "0.5019916", "0.50153285", "0.50128084", "0.5012797", "0.5011757", "0.50087065", "0.50050807", "0.4998175", "0.49917984", "0.49896976", "0.49894482", "0.49865848", "0.49827468", "0.49814868", "0.49814445", "0.4979416", "0.4977264", "0.49678758", "0.496689", "0.49650916", "0.49609023", "0.49582398" ]
0.0
-1
Given a coordinate interval, find what grid element matches it.
public int findCoordElement(CoordInterval target, boolean bounded) { switch (orgGridAxis.getSpacing()) { case regularInterval: // can use midpoint return findCoordElementRegular(target.midpoint(), bounded); case contiguousInterval: // can use midpoint return findCoordElementContiguous(target.midpoint(), bounded); case discontiguousInterval: // cant use midpoint return findCoordElementDiscontiguousInterval(target, bounded); } throw new IllegalStateException("unknown spacing" + orgGridAxis.getSpacing()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "public int findCoordElement(double target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n case regularPoint:\n return findCoordElementRegular(target, bounded);\n case irregularPoint:\n case contiguousInterval:\n return findCoordElementContiguous(target, bounded);\n case discontiguousInterval:\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "private boolean intervalContains(double target, int coordIdx) {\n double midVal1 = orgGridAxis.getCoordEdge1(coordIdx);\n double midVal2 = orgGridAxis.getCoordEdge2(coordIdx);\n boolean ascending = midVal1 < midVal2;\n return intervalContains(target, coordIdx, ascending, true);\n }", "public CellPosition isInside(Vector2i coord){\n\t\tCellPosition pos;\n\t\tpos = display.gridDisplay.isInside(coord);\n\t\tif(pos.isFound)\n\t\t\treturn pos;\n\t\t\n\t\tpos = canva.isInside(coord);\n\t\treturn pos;\n\t}", "public boolean getGrid(int x, int y){\n\t\treturn grid[x][y];\n\t}", "public static int getGridPosition(int x, int y, int width){\n\t\treturn (y*width)+x;\n\t}", "default int gridToSlot(int x, int y) {\n return y * 9 + x;\n }", "public boolean getGrid(int x, int y) {\n\t\tif ((x < 0) || (x > width)) {\n\t\t\treturn true;\n\t\t} else if ((y < 0) || (y > height)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn grid[x][y]; // YOUR CODE HERE\n\t\t}\n\t}", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }", "public Cell getCellAt (int x, int y) {\n return grid[x-1][y-1];\n }", "public abstract int findRowForWindow(int y);", "public Piece getPiece(int xgrid, int ygrid) {\n\t\tfor (int i = 0; i < pieces.size(); i++) {\n\t\t\tif (pieces.get(i).getX() == xgrid && pieces.get(i).getY() == ygrid) {\n\t\t\t\treturn pieces.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private int hitWhichSquare(float testX, float testY) {\r\n int row = 0;\r\n int col = 0;\r\n\r\n // width of each square in the board\r\n float tileWidth = scaleFactor * width / 4;\r\n float tileHeight = scaleFactor * height / 4;\r\n\r\n // where is the top and left of the board right now\r\n float leftX = dx + (1-scaleFactor) * width / 2;\r\n float topY = dy + (1-scaleFactor) * height / 2;\r\n\r\n\r\n for (int i = 0; i < 4; i += 1) {\r\n // test if we are in column i (between the i line and i+1 line)\r\n // leftmost vertical line = line 0\r\n // example: if we are between line 2 and line 3, we are in row 2\r\n if (testX < (i+1) * tileWidth + leftX && i * tileWidth + leftX < testX) {\r\n col = i;\r\n }\r\n\r\n // test if we are in row i (between the i line and i+1 line)\r\n // topmost horizontal line = line 0\r\n // example: if we are between line 0 and line 1, we are in row 0\r\n if (testY < (i+1) * tileHeight + topY && i * tileHeight + topY < testY) {\r\n row = i;\r\n }\r\n }\r\n return row * 4 + col;\r\n }", "Cell getCellAt(Coord coord);", "public Cell containingCell() {\n return new Cell(x() / SUBCELL_COUNT, y() / SUBCELL_COUNT);\n }", "private List<Cell> getSurroundingCells(int x, int y) {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n // Don't include the current position i != x && j != y &&\n if ( isValidCoordinate(i, j)) {\n if (i == x && j == y) {\n continue;\n } else {\n cells.add(gameState.map[j][i]);\n }\n }\n }\n }\n return cells;\n }", "public abstract boolean getCell(int x, int y);", "public abstract Regionlike getGridBounds();", "@Override\n public HashSet<int[]> coordinatesOfTilesInRange(int x, int y, Tile[][] board){\n HashSet<int[]> hashy = new HashSet<>();\n int[] c = {x,y};\n hashy.add(c);\n return findTiles(x, y, board, hashy);\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public int[] getPositionInGrid( int tile )\n\t{\n\t\tint[] position = new int[2];\n\t\t\n\t\tfor ( int y = 0; y < height; y++ )\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\tif ( grid[x][y] == tile ) \n\t\t\t\t{\n\t\t\t\t\tposition[0] = x;\n\t\t\t\t\tposition[1] = y;\n\t\t\t\t\t\n\t\t\t\t\t// Should break but meh\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn position;\n\t}", "private boolean withinGridDimensions(int startX, int startY, int endX, int endY) {\n boolean within = true;\n int largerX = Math.max(startX, endX);\n int smallerX = Math.min(startX, endX);\n int largerY = Math.max(startY, endY);\n int smallerY = Math.min(startY, endY);\n \n if (smallerX < 1 || smallerY < 1 || largerX > GRID_DIMENSIONS || largerY > GRID_DIMENSIONS) {\n within = false;\n }\n \n return within;\n }", "public abstract int findColForWindow(int x);", "public abstract Positionable findPositionForWindow(int y, int x);", "public int getLocation(int x, int y) {\n\t\treturn grid[x][y];\n\t}", "public interface Span {\n /**\n * Gets the coordinates of this span.\n * \n * @param cellWidth Width of a grid's cell\n * @param cellHeight Height of a grid's cell\n * @return coordinates\n */\n List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);\n}", "Map<BoardCellCoordinates, Set<Integer>> getWinningCoordinates();", "List<Coord> allActiveCells();", "public ArrayList<Entity> checkGrid(int x, int y) {\n \tArrayList<Entity> entitiesOnGrid = new ArrayList<Entity>();\n \tfor (Entity e: entities) {\n \t\tif (e != null) {\n \t\tif (e.getX() == x && e.getY() == y) {\n \t\t\tentitiesOnGrid.add(e);\n \t\t} \t\t\t\n \t\t}\n \t}\n \treturn entitiesOnGrid;\n }", "@Nullable\n private void findViewHelper(int x, int y) {\n View searchView;\n LinearLayout searchRow;\n for (int row = 0; row < maxN; row++) {\n searchRow = (LinearLayout) linBoardGame.getChildAt(row); //Current row it is checking\n if (y > searchRow.getTop() && y < searchRow.getBottom()) {//If the Y coordinates are within the row Check which cell\n for (int col = 0; col < maxN; col++) {\n searchView = searchRow.getChildAt(col); //Current View of the current searchRow\n if (x > searchView.getLeft() && x < searchView.getRight()) {//If the x coordinates are within the view, View found!\n if (searchView == ivCell[row][col]) { //View found\n\n touchCol = col;\n touchRow = row;\n\n if(!lockGrid){\n checkIfOccupied(row, col);\n newView = searchView;\n }else{\n checkIfOccupied(row, col);\n newTarget = (ImageView) searchView;\n }\n }//if\n }//if\n }//for search View\n }//if\n }//for searchRow\n }", "private static Iterable<Cell> getNeighbors(Grid<Cell> grid, Cell cell) {\n\t\tMooreQuery<Cell> query = new MooreQuery<Cell>(grid, cell);\n\t\tIterable<Cell> neighbors = query.query();\n\t\treturn neighbors;\n\t}", "public char getGrid(int x ,int y){\n\t\treturn Grid[x][y] ;\n\t}", "public int getHit(Rectangle[] bound, int mx, int my) {\n\t\t for (int i=0; i < bound.length; i++) {\n\t\t \tif (bound[i].contains(mx,my)) {\n\t\t \t\treturn i;\n\t\t \t}\n\t\t }\n\t\t return -1;\n\t}", "public int find(int element){\n while(grid[element] != element)\n element = grid[element];\n return element;\n }", "public Cell containingCell() {\n return new Cell(x / NBROFSUBCELLINCELL, y / NBROFSUBCELLINCELL);\n }", "public static ImmutableMap<Character, Integer> coordinateAreas(char[][] grid) {\r\n int height = grid.length;\r\n int width = grid[0].length;\r\n\r\n Map<Character, Integer> areas = new HashMap<>();\r\n\r\n for (int y = 0; y < height; y ++) {\r\n for (int x = 0; x < width; x ++) {\r\n char name = grid[y][x];\r\n if (name == '.') {\r\n continue;\r\n }\r\n\r\n if (y == 0 || x == 0 || y == height - 1 || x == width - 1) {\r\n // Coordinates on the edge are infinite.\r\n areas.put(name, INFINITE_AREA);\r\n } else {\r\n areas.compute(name, (sameName, oldValue) -> {\r\n if (oldValue == null) {\r\n return 1;\r\n } else if (oldValue == INFINITE_AREA) {\r\n return INFINITE_AREA;\r\n } else {\r\n return oldValue + 1;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n return ImmutableMap.copyOf(areas);\r\n }", "Map<Coord, ICell> getAllCells();", "public boolean onGrid(int xValue, int yValue);", "public Pair<Integer,Integer> getJButtonCoord(JButton button){\n int row=0,col=0;\n Boolean foundButton = false;\n for(row =0 ; row < ROWS; row ++){\n for(col = 0; col < COLS; col++){\n if (buttonGrid[row][col] == button){\n foundButton = true;\n break;\n }\n }\n if (foundButton) break;\n }\n Pair<Integer,Integer> coord = new Pair<Integer,Integer> (row,col);\n return coord;\n }", "private boolean subGridCheck() {\n\t\tint sqRt = (int)Math.sqrt(dimension);\n\t\tfor(int i = 0; i < sqRt; i++) {\n\t\t\tint increment = i * sqRt;\n\t\t\tfor(int val = 1; val <= dimension; val++) {\n\t\t\t\tint valCounter = 0;\n\t\t\t\tfor(int row = 0 + increment; row < sqRt + increment; row++) {\n\t\t\t\t\tfor(int col = 0 + increment; col < sqRt + increment; col++) {\n\t\t\t\t\t\tif(puzzle[row][col] == val)\n\t\t\t\t\t\t\tvalCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(valCounter >= 2)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "int getCell(int x, int y) {\n try {\n return hiddenGrid[x][y];\n } catch (IndexOutOfBoundsException hiddenIndex) {}\n return hiddenGrid[x][y];\n }", "private boolean intervalContains(double target, int coordIdx, boolean ascending, boolean closed) {\n // Target must be in the closed bounds defined by the discontiguous interval at index coordIdx.\n double lowerVal = ascending ? orgGridAxis.getCoordEdge1(coordIdx) : orgGridAxis.getCoordEdge2(coordIdx);\n double upperVal = ascending ? orgGridAxis.getCoordEdge2(coordIdx) : orgGridAxis.getCoordEdge1(coordIdx);\n\n if (closed) {\n return lowerVal <= target && target <= upperVal;\n } else {\n return lowerVal <= target && target < upperVal;\n }\n }", "public int getCell(int row, int col)\n {\n if (inBounds(row, col))\n return grid[row][col];\n else\n return OUT_OF_BOUNDS;\n }", "public boolean isOpen(int row, int col) {\n if (isInBounds(row-1, col-1)) {\n return grid[row-1][col-1];\n }\n else {\n throw new java.lang.IllegalArgumentException(\"Bad Coordinates\");\n }\n }", "boolean selectTo(double x, double y);", "private int searchNeighbours(int[][] neighbourCords, int cellX, int cellY) {\n int neighbours = 0;\n for (int[] offset : neighbourCords) {\n if (getCell(cellX + offset[0], cellY + offset[1]).isAlive()) {\n neighbours++;\n }\n }\n\n return neighbours;\n }", "public ArrayList<int[]> surroundingCoordinates(int row, int col){\n\t\t\t\n\t\tArrayList<int[]> coordinates = new ArrayList<int[]>();\n\t\tfor(int x = -1; x <= 1; x++) {\n\t\t\tfor(int y = -1; y <= 1; y++) {\n\t\t\t\tif(\t\t\n\t\t\t\t\t\t(row+x >= 0) && \n\t\t\t\t\t\t(col+y >= 0) &&\n\t\t\t\t\t\t(row+x < bm.getBoardSize()) &&\n\t\t\t\t\t\t(col+y < bm.getBoardSize()) &&\n\t\t\t\t\t\t(x != 0 || y != 0)\n\t\t\t\t){\n\t\t\t\t\tcoordinates.add(new int[]{row+x, col+y});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn coordinates;\n\t}", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "@Override\n public boolean isInBounds(int row, int col) {\n return row >= 0 && row < grid.length && col >= 0 && col < grid[0].length;\n }", "public boolean isOpen(int row, int col)\r\n {\r\n if (row < 1 || row > dimension || col < 1 || col > dimension)\r\n throw new IllegalArgumentException(\"error range\");\r\n\r\n return grids[(row - 1) * dimension + col];\r\n }", "boolean UsedInBox(int grid[][], int boxStartRow, int boxStartCol, int num)\n{\n for (int row = 0; row < 3; row++)\n for (int col = 0; col < 3; col++)\n if (grid[row+boxStartRow][col+boxStartCol] == num)\n return true;\n return false;\n}", "@Override\r\n\tpublic boolean results(Element element)\r\n\t{\r\n\t\t// checks whether the x coordinate of the given element lies between the x coordinates of the two positions of this inPartOfBoard-condition\r\n\t\tif(((element.getPosition().getCoordX() >= this.getPosition1().getCoordX()) && (element.getPosition().getCoordX() <= this.getPosition2().getCoordX()))\r\n\t\t\t\t|| ((element.getPosition().getCoordX() <= this.getPosition1().getCoordX()) && (element.getPosition().getCoordX() >= this.getPosition2().getCoordX())))\r\n\t\t{\r\n\t\t\t// checks whether the y coordinate of the given element lies between the y coordinates of the two positions of this inPartOfBoard-condition\r\n\t\t\tif(((element.getPosition().getCoordY() >= this.getPosition1().getCoordY()) && (element.getPosition().getCoordY() <= this.getPosition2().getCoordY()))\r\n\t\t\t\t\t|| ((element.getPosition().getCoordY() <= this.getPosition1().getCoordY()) && (element.getPosition().getCoordY() >= this.getPosition2().getCoordY())))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isOpen(int row, int col)\n {\n int oneDimensional = xyTo1D(row, col);\n return grid[oneDimensional];\n }", "public boolean getGrid(int x, int y) {\n\t\treturn (!isValid(x,y) || grid[x][y]);\n\t}", "boolean isCellAlive(int x, int y);", "IntervalTupleList evaluate(double low, double high);", "private int getContainingChildIndex(final int x, final int y) {\n if (mRect == null) {\n mRect = new Rect();\n }\n for (int index = 0; index < getChildCount(); index++) {\n getChildAt(index).getHitRect(mRect);\n if (mRect.contains(x, y)) {\n return index;\n }\n }\n return INVALID_INDEX;\n }", "public GridLocation getLocation();", "public Move getGridElement (int row, int column)\n {\n return mGrid[row][column];\n }", "public interface GridConstraint {\n\n\t/**\n\t * Length of the grid.\n\t */\n\tpublic static final int GRID_X_SIZE = 5;\n\n\t/**\n\t * Width of the grid.\n\t */\n\tpublic static final int GRID_Y_SIZE = 5;\n\n\t/**\n\t * Checks whether the given x and y values are on the grid and not off the grid.\n\t * \n\t * @param xValue\n\t * x coordinate\n\t * @param yValue\n\t * y coordinate\n\t * @return true if on the grid and false if off the grid\n\t */\n\tpublic boolean onGrid(int xValue, int yValue);\n}", "public boolean isOpen(int row, int col) {\n if(!inRange(row, col)) {\n throw new IllegalArgumentException();\n }\n return grid[row][col];\n }", "public int get(int xcord, int ycord) {\n\t\treturn grid[xcord][ycord];\n\t}", "IntervalTupleList evaluate(Interval x);", "public boolean inGrid(int row, int col) {\n return (row >= 0 && col >= 0) &&\n (row < cellNum && col < cellNum);\n }", "public LayoutThread find(int x, int y) {\n Iterator<LayoutThread> it = map.keySet().iterator(); while (it.hasNext()) {\n LayoutThread layout_thread = it.next(); if (map.get(layout_thread).contains(x,y)) return layout_thread;\n }\n return null;\n }", "@Override\r\n\tpublic Integer getCell(Integer x, Integer y) {\n\t\treturn game[x][y];\r\n\t}", "public boolean isOpen(int row, int col) {\n\t\tif(row < 0 || row >= N || col < 0 || col >= N) \n\t\t\tthrow new IllegalArgumentException();\n\n\t\tint index = xyTo1D(row, col);\n\t\treturn grid[index];\n\t}", "boolean selectAt(double x, double y);", "private static void SearchRowAndColwise(int[][] arr, int r, int c, int key) {\n\n\t\tint i = 0;\n\t\tint j = c - 1;\n\n\t\twhile (i <= r && j >= 0) {\n\n\t\t\tint mid = arr[i][j];\n\t\t\tif (key < mid) {\n\t\t\t\tj--;\n\t\t\t} else if (key > mid) {\n\t\t\t\ti++;\n\t\t\t} else if (key == mid) {\n\t\t\t\tSystem.out.println(\"key found at row\" + i + \"and at column\" + j);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"not found\");\n\n\t}", "private int getContainingChildIndex(final int x, final int y)\n\t{\n\t\tif (_rect == null)\n\t\t\t_rect = new Rect();\n\n\t\tfor (int index = 0; index < getChildCount(); index++)\n\t\t{\n\t\t\tgetChildAt(index).getHitRect(_rect);\n\t\t\tif (_rect.contains(x, y))\n\t\t\t\treturn index;\n\t\t}\n\t\treturn INVALID_INDEX;\n\t}", "private int checkCellClick(int xPos, int yPos) {\r\n\r\n\t\tfor (int i = 0; i < MAX_CELL_COUNT; ++i) {\r\n\r\n\t\t\tint x1 = ((width - SIZE_X) / 2) + 16;\r\n\t\t\tint y1 = ((height - SIZE_Y) / 2) + 16 + (i * CELL_SIZE_Y);\r\n\t\t\tint x2 = x1 + (SIZE_X - 42);\r\n\t\t\tint y2 = y1 + CELL_SIZE_Y;\r\n\r\n\t\t\tif (xPos >= x1 && xPos <= x2) {\r\n\t\t\t\tif (yPos >= y1 && yPos <= y2) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "public boolean inGrid(int y, int x) {\n\n if (y > 0 && x > 0 && y < height - 1 && x < width - 1) {\n return true;\n }\n\n return false;\n }", "Piece getClickedPiece(int x, int y) {\n\t\t// find the piece that was clicked\n\t\tHashtable<Piece, Point> pieces = bullpenView.getDrawnPieces();\n\t\tSet<Piece> keySet = pieces.keySet();\n\t\tactivePiece = null;\n\n\t\tint size = BullpenView.SQUARE_SIZE;\n\t\t// check anchor square and relative squares for each piece in the bullpen\n\t\tfor (Piece piece : keySet) {\n\t\t\tint aCol = pieces.get(piece).x;\n\t\t\tint aRow = pieces.get(piece).y;\n\n\t\t\t// Piece was clicked if the x coordinate is within the SQUARE_SIZE constant of each point's\n\t\t\t// x coordinate and the SQUARE_SIZE constant of each point's y coordinate\n\t\t\tfor (Square s : piece.getAllSquares()) {\n\t\t\t\tint sCol = s.getCol();\n\t\t\t\tint sRow = s.getRow();\n\n\t\t\t\tif ((aCol + (sCol * size) <= x) && \n\t\t\t\t\t\t(aCol + (sCol * size) + size >= x) && \n\t\t\t\t\t\t(aRow + (sRow * size) <= y) && \n\t\t\t\t\t\t(aRow + (sRow * size) + size >= y)) {\n\t\t\t\t\tactivePiece = piece;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we have found a piece, exit the for loop\n\t\t\tif (activePiece != null) {\n\t\t\t\treturn activePiece;\n\t\t\t}\n\t\t}\n\n\t\treturn activePiece;\n\t}", "private int getNeighbours(Cell cell) {\n\n //Get the X, Y co-ordinates of the cell\n int cellX = cell.getXCord();\n int cellY = cell.getYCord();\n\n // Helper variable initially set to check all neighbours.\n int[][] neighbourCords = allCords;\n\n //Checks what location the cell is and which of its neighbours to check\n //This avoids any array out of bounds issues by trying to look outside the grid\n if (cellX == 0 && cellY == 0) {\n neighbourCords = topLeftCords;\n } else if (cellX == this.width - 1 && cellY == this.height - 1) {\n neighbourCords = bottomRightCords;\n } else if (cellX == this.width - 1 && cellY == 0) {\n neighbourCords = topRightCords;\n } else if (cellX == 0 && cellY == this.height - 1) {\n neighbourCords = bottomLeftCords;\n } else if (cellY == 0) {\n neighbourCords = topCords;\n } else if (cellX == 0) {\n neighbourCords = leftCords;\n } else if (cellX == this.width - 1) {\n neighbourCords = rightCords;\n } else if (cellY == this.height - 1) {\n neighbourCords = bottomCords;\n }\n\n // Return the number of neighbours\n return searchNeighbours(neighbourCords, cellX, cellY);\n }", "public Point getCoordinates(int val) {\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() == val)\r\n\t\t\t\t\treturn new Point(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Point(-1,-1);\r\n\t}", "public static void searchAlgortihm(int x, int y)\n\t{\n\t\tint dx = x;\n\t\tint dy = y;\n\t\tint numMovements = 1; // variable to indicate the distance from the user\n\t\t\n\t\t//check starting position\n\t\tcheckLocation(dx,dy, x, y);\n\n\t\tint minCoords = MAX_COORDS;\n\t\tminCoords *= -1; // max negative value of the grid\n\n\t\t// while - will search through all coordinates until it finds 5 events \n\t\twhile(numMovements < (MAX_COORDS*2)+2 && (closestEvents.size() < 5))\n\t\t{\n\t\t\t//first loop - \n\t\t\tfor(int i = 1; i <= 4; i++)\n\t\t\t{\n\t\t\t\tif(i == 1){ // // moving south-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j-x;\n\t\t\t\t\t\tdx *= -1; // reverse sign\n\t\t\t\t\t\tdy = (numMovements-j)+y;\n\t\t\t\t\t\tif((dx >= minCoords) && (dy <= MAX_COORDS)) // only check the coordinates if they are on the grid\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"1 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 2){ // moving south-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)-x;\n\t\t\t\t\t\tdx *= -1; // change sign\n\t\t\t\t\t\tdy = j-y; \n\t\t\t\t\t\tdy *= -1; // change sign\n\t\t\t\t\t\tif((dx >= minCoords) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"2 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 3){ // moving north-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j+x;\n\t\t\t\t\t\tdy = (numMovements-j)-y;\n\t\t\t\t\t\tdy *= -1;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"3 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 4){ // moving north-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)+x;\n\t\t\t\t\t\tdy = j+y;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy <= MAX_COORDS))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"4 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// increment the number of movements, from user coordinate\n\t\t\tnumMovements++;\n\n\t\t} // End of while\n\t}", "public int numberAround(int row, int col) {\n int count = 0; //counter\r\n //Checks all potential eight surrounding locations \r\n //Counter goes up if the box is true\r\n // Upper Left square\r\n //check parameraters are valid\r\n if (grid[row - 1][col - 1] == true) {\r\n count = count + 1;\r\n }\r\n \r\n // Left square\r\n //check parameraters are valid\r\n if (grid[row][col - 1] == true) {\r\n count = count + 1;\r\n }\r\n \r\n // Bottom Left square\r\n //check parameraters are valid\r\n if (grid[row + 1][col - 1] == true) {\r\n count = count + 1;\r\n }\r\n \r\n // Square below\r\n //check parameraters are valid\r\n if (grid[row + 1][col] == true) {\r\n count = count + 1;\r\n }\r\n \r\n // Bottom Right square\r\n //check parameraters are valid\r\n if (grid[row + 1][col + 1] == true) {\r\n count = count + 1;\r\n }\r\n \r\n // Right square \r\n //check parameraters are valid\r\n if (grid[row][col + 1] == true) {\r\n count = count + 1;\r\n }\r\n \r\n // Upper Right square\r\n //heck parameters are valid\r\n if (grid[row - 1][col + 1] == true) {\r\n count = count + 1;\r\n }\r\n \r\n // Upper square \r\n \r\n if (grid[row - 1][col] == true) {\r\n count = count + 1;\r\n }\r\n \r\n return count;\r\n }", "public static ArrayList<int[]> getDissatisfiedCellCoords(int[][] grid) {\n ArrayList<int[]> dissatisfiedCells = new ArrayList<int[]>();\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n\n if (grid[i][j] != 0) {\n\n int totalCells = 0, totalSatisfactory = 0;\n\n for (int k = i - 1; k <= i + 1; k++) {\n for (int l = j - 1; l <= j + 1; l++) {\n if (k > -1 && l > -1 && k < grid.length && l < grid.length) {\n if (k != i || l != j) {\n totalCells++;\n if (grid[k][l] == grid[i][j]) {\n totalSatisfactory++;\n }\n }\n }\n }\n }\n\n double percentSatisfied = (double)totalSatisfactory / (double)totalCells;\n\n if (percentSatisfied < PERCENT_SATISFIED) {\n int[] arr = {i, j};\n dissatisfiedCells.add((int)(Math.random() * dissatisfiedCells.size()), arr);\n }\n }\n\n }\n \n }\n\n return dissatisfiedCells;\n }", "static boolean isInside(int x, int y, int N) {\n if (x >= 1 && x <= N && y >= 1 && y <= N) {\n return true;\n }\n return false;\n }", "public boolean checkForAdjacentHextiles(int x, int y, int radius, HexGrid hexGrid) {\r\n\t\t//System.out.println(\"x:\" + x + \" y: \" + y);\r\n\t\tint maxIndex = radius;\r\n\t\tint minIndex = radius * -1;\r\n\t\tboolean result = false;\r\n\t\t//System.out.println(\"x = \" + maxIndex + \"; y = \" + minIndex );\r\n\t\t//System.out.println(\"maxIndex = \" + maxIndex + \"; minIndex = \" + minIndex );\r\n\t\t// Top and bottom require the same calculations whether x is even or odd\r\n\t\t\r\n\t\t// Check if there exist a hextile above the one we are trying to place\r\n\t\tif ((y > minIndex) && (hexGrid.getHex(x, y - 1) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x, y - 1).getHextile(), Config.IncompleteRoadwayDirection.TOP)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile below the one we are trying to place\r\n\t\tif ((y < maxIndex) && (hexGrid.getHex(x, y + 1) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x, y + 1).getHextile(), Config.IncompleteRoadwayDirection.BOTTOM)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile above-right to the one we are trying to place\r\n\t\tif ((x < maxIndex) && (y > minIndex) && (hexGrid.getHex(x + 1, y - 1) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x + 1, y - 1).getHextile(), Config.IncompleteRoadwayDirection.TOP_RIGHT)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile below-right to the one we are trying to place\r\n\t\tif ((x < maxIndex) && (hexGrid.getHex(x + 1, y) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x + 1, y).getHextile(), Config.IncompleteRoadwayDirection.BOTTOM_RIGHT)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile below-left to the one we are trying to place\r\n\t\tif ((x > minIndex) && (y < maxIndex) && (hexGrid.getHex(x - 1, y + 1) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x - 1, y + 1).getHextile(), Config.IncompleteRoadwayDirection.BOTTOM_LEFT)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile above-left to the one we are trying to place\r\n\t\tif ((x > minIndex) && (hexGrid.getHex(x - 1, y) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x - 1, y).getHextile(), Config.IncompleteRoadwayDirection.TOP_LEFT)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public int whoWasIt(int x, int y) {\r\n\t\tint result = -1;\r\n\t\tfor (int i = 0; i < Util.NUMBER_OF_RELATIONSHIPS; i++) {\r\n\r\n\t\t\t// logger.log(Level.FINEST, \"trying \" + i);\r\n\t\t\tif (isBetween2D(x, y, sections[i].x1, sections[i].y1,\r\n\t\t\t\t\tsections[i].x2, sections[i].y2)) {\r\n\t\t\t\tresult = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "boolean isInInterval(int baseIndex);", "Coordinate[] getTilePosition(int x, int y) {\n\t\treturn guiTiles.get(y).get(x).getBoundary();\n\t}", "public Map<Integer, Boolean> getWithin(Geometry geom) throws SQLException {\n return retrieveExpected(createNativeWithinStatement(geom), BOOLEAN);\n }", "private boolean isInGrid(int row, int col) {\n return (row >= 1 && row <= size) && (col >= 1 && col <= size);\n }", "public boolean isOpen(int row, int col) {\n if (row - 1 >= grid.length || col - 1 >= grid.length || row - 1 < 0 || col - 1 < 0) {\n throw new IllegalArgumentException(\"index is out of boundary.\");\n }\n return grid[row - 1][col - 1];\n }", "public Square getSquareAtPosition(int x, int y) {\n\t\treturn this.grid[x][y];\n\t}", "public interface Grid {\n /**\n * @name getCell\n * @desc Ritorna la cella specificata dai parametri.\n * @param {int} x - Rappresenta la coordinata x della cella.\n * @param {int} y - Rappresenta la coordinata y della cella.\n * @returns {Client.Games.Battleship.Types.Cell}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell getCell(int x, int y);\n /**\n * @name getHeigth\n * @desc Ritorna l'altezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getHeight();\n /**\n * @name getLength\n * @desc Ritorna la lunghezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getLength();\n /**\n * @name Equals\n * @desc Ritorna true se i grid sono uguali.\n * @returns {boolean}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public boolean equals(Grid grid);\n /**\n * @name getGrid\n * @desc Ritorna la la griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell [][] getCells();\n}", "public boolean coordOnBoard(int row, int col, ArrayList<ArrayList<GamePiece>> board) {\n return (0 <= row && row < board.size()) && (0 <= col && col < board.get(0).size());\n }", "@Override\n\tpublic boolean contains(int x, int y) {\n\t\treturn (x > Math.min(x1, x2) && x < Math.max(x1, x2) && y > Math.min(y1, y2) && y < Math.max(y1, y2));\n\t}", "int matchingLandmark(int x, int y) {\n System.out.println(\"matching lansg \" + x + \" \" + y);\n for (int i = 0; i < 50; i++) {\n if (landmarks[i][0] == x && landmarks[i][1] == y) {\n return i;\n }\n }\n return -1;\n }", "boolean hasGrid();", "public static S2CellUnion findCellIds(S2LatLngRect latLngRect) {\n\n\t\tConcurrentLinkedQueue<S2CellId> queue = new ConcurrentLinkedQueue<S2CellId>();\n\t\tArrayList<S2CellId> cellIds = new ArrayList<S2CellId>();\n\n\t\tfor (S2CellId c = S2CellId.begin(0); !c.equals(S2CellId.end(0)); c = c.next()) {\n\t\t\tif (containsGeodataToFind(c, latLngRect)) {\n\t\t\t\tqueue.add(c);\n\t\t\t}\n\t\t}\n\n\t\tprocessQueue(queue, cellIds, latLngRect);\n\t\tassert queue.size() == 0;\n\t\tqueue = null;\n\n\t\tif (cellIds.size() > 0) {\n\t\t\tS2CellUnion cellUnion = new S2CellUnion();\n\t\t\tcellUnion.initFromCellIds(cellIds); // This normalize the cells.\n\t\t\t// cellUnion.initRawCellIds(cellIds); // This does not normalize the cells.\n\t\t\tcellIds = null;\n\n\t\t\treturn cellUnion;\n\t\t}\n\n\t\treturn null;\n\t}", "private int surroundingMines(int x, int y) {\r\n int startingX, startingY, endingX, endingY;\r\n int count = 0;\r\n \r\n // putting condition for edges\r\n startingX = startEdgeConditon(x);\r\n startingY = startEdgeConditon(y);\r\n endingX = endEdgeConditon(x);\r\n endingY = endEdgeConditon(y);\r\n \r\n // check surrounding cells\r\n for (int i = startingX; i < endingX; i++) {\r\n for (int j = startingY; j < endingY; j++) {\r\n if (mines[i][j]) {\r\n count++;\r\n }\r\n }\r\n }\r\n return count;\r\n }", "public BoxContainer getElement(int x, int y){\n\t\t\tArrayList<Integer> coordinates = new ArrayList<Integer>();\n\t\t\tcoordinates.add(x);\n\t\t\tcoordinates.add(y);\n\t\t\tBoxContainer point = map.get(coordinates);\n\t\t\tif (point == null){\n\t\t\t\treturn BoxContainer.Unkown;\n\t\t\t} else {\n\t\t\t\treturn point;\n\t\t\t}\n\t\t}" ]
[ "0.66912293", "0.63584226", "0.6275488", "0.60797644", "0.59665525", "0.59622973", "0.5784582", "0.57769513", "0.5695738", "0.564973", "0.56391513", "0.56332034", "0.5592835", "0.5568767", "0.5552358", "0.554155", "0.55337983", "0.552664", "0.5480128", "0.5466125", "0.54602575", "0.5452908", "0.5452824", "0.5419997", "0.54157984", "0.54135025", "0.54075146", "0.54022384", "0.5397727", "0.5395069", "0.5373127", "0.53368425", "0.5330164", "0.5316363", "0.53099805", "0.53019685", "0.5297532", "0.5277758", "0.5271129", "0.52436805", "0.523419", "0.52240425", "0.5220399", "0.5212481", "0.5209493", "0.52080715", "0.5197516", "0.5194193", "0.51927495", "0.51821065", "0.5155997", "0.515151", "0.5129192", "0.5119679", "0.51070964", "0.510403", "0.5103352", "0.50776273", "0.5068976", "0.5067487", "0.50667334", "0.50622183", "0.50555485", "0.505546", "0.5053366", "0.5034432", "0.5019019", "0.50126857", "0.50087535", "0.5002108", "0.49974513", "0.49956626", "0.49942964", "0.4985633", "0.498237", "0.4978579", "0.49712965", "0.49702278", "0.49700516", "0.49696687", "0.49573016", "0.49496698", "0.4948542", "0.49463478", "0.4940262", "0.49382752", "0.49362803", "0.49313095", "0.49311173", "0.49307603", "0.49270958", "0.49184364", "0.49092954", "0.49062213", "0.4898877", "0.48976335", "0.48889226", "0.48881015", "0.48856312", "0.4884597" ]
0.68071645
0
Given a coordinate position, find what grid element contains it. This means that edge[i] target >= edge[i+1] (if values are descending)
public int findCoordElement(double target, boolean bounded) { switch (orgGridAxis.getSpacing()) { case regularInterval: case regularPoint: return findCoordElementRegular(target, bounded); case irregularPoint: case contiguousInterval: return findCoordElementContiguous(target, bounded); case discontiguousInterval: return findCoordElementDiscontiguousInterval(target, bounded); } throw new IllegalStateException("unknown spacing" + orgGridAxis.getSpacing()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}", "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "public boolean isInEdge(int width, int height, Position position);", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "public int maxDistance(int[][] grid) {\n boolean[][] visited = new boolean[grid.length][grid[0].length]; // mark which cells have been already been visited\n Queue<int[]> queue = new LinkedList<>();\n\n //put 1 cells into queue to start with and mark then visited\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (grid[i][j] == 1) {\n queue.add(new int[]{i,j});\n visited[i][j] = true; //mark cell as visited\n }\n }\n }\n\n int distance = -1;\n int[][] directions = {{-1,0}, {0,1}, {1,0}, {0,-1}}; //all possible 4 directions\n while (!queue.isEmpty()) {\n int size = queue.size(); //since this is BFS we need to traverse level by level\n\n while (size > 0) { //iterate only till nodes in current level\n int[] pair = queue.poll();\n\n for (int[] direction : directions) { // check in all possible directions\n int x = pair[0] + direction[0];\n int y = pair[1] + direction[1];\n\n //if target cell is with in bounds and is not visited, add it to queue\n if (x >= 0 && x < grid.length && y >= 0 && y < grid[0].length && !visited[x][y]) {\n queue.add(new int[]{x,y});\n visited[x][y] = true;\n }\n }\n size--;\n }\n distance++; //increment the size only after level traversal is complete\n }\n\n //this is required because distance can be zero. This is possible if grid contains all 1's and all 1's are\n //consider level 1 as we are starting with them. So, need to return -1\n return distance == 0 ? -1 : distance;\n }", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "private int checkCellClick(int xPos, int yPos) {\r\n\r\n\t\tfor (int i = 0; i < MAX_CELL_COUNT; ++i) {\r\n\r\n\t\t\tint x1 = ((width - SIZE_X) / 2) + 16;\r\n\t\t\tint y1 = ((height - SIZE_Y) / 2) + 16 + (i * CELL_SIZE_Y);\r\n\t\t\tint x2 = x1 + (SIZE_X - 42);\r\n\t\t\tint y2 = y1 + CELL_SIZE_Y;\r\n\r\n\t\t\tif (xPos >= x1 && xPos <= x2) {\r\n\t\t\t\tif (yPos >= y1 && yPos <= y2) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "private int search(Bitboard board, int posMask, int turn) {\n // if this player doesn't even \"own\" any connected components, they're in bad shape...\n if (!ownerToCCs.containsKey(turn)) {\n return 100;\n }\n\n // perform basic BFS to explore the connected component\n // we're finding distance to an \"owned\" connected component\n int target = ownerToCCs.get(turn);\n int orthogonal, nextMask, altDist;\n int myVisit = 0;\n\n searchQueue.clear();\n prev.clear();\n dist.clear();\n\n searchQueue.add(posMask);\n dist.put(posMask, 0);\n\n while (!searchQueue.isEmpty()) {\n // get next position off of queue\n posMask = searchQueue.poll();\n\n // ignore if visited, invalid location, or opponent owns\n if ((myVisit & posMask) != 0 || !board.isValid(posMask)\n || board.owns(posMask, 1 - turn))\n continue;\n myVisit |= posMask;\n\n // check if it's a target\n if ((target & posMask) != 0) {\n // return distance to posMask\n return dist.get(prev.get(posMask)) + 1;\n }\n\n // continue BFS\n orthogonal = BitMasks.orthogonal.get(posMask);\n while (orthogonal != 0) {\n nextMask = orthogonal & ~(orthogonal - 1);\n orthogonal ^= nextMask;\n\n altDist = dist.get(posMask) + 1;\n if (altDist < dist.getOrDefault(nextMask, Integer.MAX_VALUE)) {\n prev.put(nextMask, posMask);\n dist.put(nextMask, altDist);\n }\n searchQueue.add(nextMask);\n }\n }\n // no path found to a target (the circle is isolated)\n return 100;\n }", "public static List<Vec2i> solve(int[][] grid, Vec2i start, Vec2i goal, Heuristic h){\n if(h == null){ //if null replace with default heuristic\n h = new Heuristic() {\n @Override\n\n public double eval(Vec2i loc) {\n double dx = (loc.x - goal.x);\n double dy = (loc.y - goal.y);\n return Math.sqrt(dx*dx + dy*dy);\n }\n };\n }\n\n PriorityQueue<GridLocation> edge = new PriorityQueue<GridLocation>(10, AStarGrid::compareGridLocations);\n edge.add(new GridLocation(start,0));\n\n Map<Vec2i, Vec2i> cameFrom = new HashMap<Vec2i, Vec2i>();\n Map<Vec2i, Double> g = new HashMap<Vec2i, Double>(); //distance to node\n g.put(start,0.0);\n Map<Vec2i, Double> f = new HashMap<Vec2i, Double>(); //distance from start to goal through this node\n f.put(start,h.eval(start));\n //f = g + h\n\n while(!edge.isEmpty()){\n\n Vec2i current = edge.poll().loc;\n if(current.x == goal.x && current.y == goal.y){\n return reconstructPath(cameFrom, current);\n }\n\n LinkedList<Vec2i> neighbors = new LinkedList<Vec2i>();\n if(current.x != 0 && grid[current.x - 1][current.y] == 0)\n neighbors.add(new Vec2i(current.x - 1,current.y));\n if(current.x != grid.length-1 && grid[current.x + 1][current.y] == 0)\n neighbors.add(new Vec2i(current.x + 1,current.y));\n if(current.y != 0 && grid[current.x][current.y - 1] == 0)\n neighbors.add(new Vec2i(current.x,current.y - 1));\n if(current.y != grid[0].length-1 && grid[current.x][current.y + 1] == 0)\n neighbors.add(new Vec2i(current.x,current.y + 1));\n\n\n for(Vec2i neighbor: neighbors){\n double score = g.get(current) + 1;\n if(!g.containsKey(neighbor) || score < g.get(neighbor)){\n cameFrom.put(neighbor,current);\n g.put(neighbor, score);\n f.put(neighbor, score + h.eval(neighbor));\n if(!edge.contains(neighbor)){\n edge.add(new GridLocation(neighbor,score + h.eval(neighbor)));\n }\n }\n }\n }\n //No path was found\n return null;\n }", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }", "private int hitWhichSquare(float testX, float testY) {\r\n int row = 0;\r\n int col = 0;\r\n\r\n // width of each square in the board\r\n float tileWidth = scaleFactor * width / 4;\r\n float tileHeight = scaleFactor * height / 4;\r\n\r\n // where is the top and left of the board right now\r\n float leftX = dx + (1-scaleFactor) * width / 2;\r\n float topY = dy + (1-scaleFactor) * height / 2;\r\n\r\n\r\n for (int i = 0; i < 4; i += 1) {\r\n // test if we are in column i (between the i line and i+1 line)\r\n // leftmost vertical line = line 0\r\n // example: if we are between line 2 and line 3, we are in row 2\r\n if (testX < (i+1) * tileWidth + leftX && i * tileWidth + leftX < testX) {\r\n col = i;\r\n }\r\n\r\n // test if we are in row i (between the i line and i+1 line)\r\n // topmost horizontal line = line 0\r\n // example: if we are between line 0 and line 1, we are in row 0\r\n if (testY < (i+1) * tileHeight + topY && i * tileHeight + topY < testY) {\r\n row = i;\r\n }\r\n }\r\n return row * 4 + col;\r\n }", "public Id GetNearestEdge(Coordinate coord) {\n\t\tfloat distsq = Float.MAX_VALUE;\n\t\tId nearest = null;\n\t\tfor (Edge e : listOfEdges) {\n\t\t\tif (e == null) continue;\n\t\t\tfloat mydistsq = e.getDistanceSq(coord, this);\n\t\t\tif (mydistsq < distsq && mydistsq >= 0.0f) {\n\t\t\t\tdistsq = mydistsq;\n\t\t\t\tnearest = e.getId();\n\t\t\t}\n\t\t}\n\t\treturn nearest;\n\t}", "public int find(int element){\n while(grid[element] != element)\n element = grid[element];\n return element;\n }", "private boolean intervalContains(double target, int coordIdx) {\n double midVal1 = orgGridAxis.getCoordEdge1(coordIdx);\n double midVal2 = orgGridAxis.getCoordEdge2(coordIdx);\n boolean ascending = midVal1 < midVal2;\n return intervalContains(target, coordIdx, ascending, true);\n }", "private Position positionFinder(int src, int dest) {\n int rowIndex = -1;\n for (int i = 0; i < rowList.size(); i++) {\n Node rowNode = rowList.get(i);\n if (rowNode.edge.getSource() == src) {\n rowIndex = i;\n break;\n }\n }\n\n int colIndex = -1;\n for (int i = 0; i < colList.size(); i++) {\n Node colNode = colList.get(i);\n if (colNode.edge.getSource() == dest) {\n colIndex = i;\n break;\n }\n }\n\n return new Position(rowIndex, colIndex);\n }", "public void findTheWay(int x, int y) {\n\n Queue<Tile> elements = new LinkedList<Tile>();\n\n if (!getTile(x, y).canTileMove()) {\n System.out.println(\"Impossible to move\");\n return;\n }\n\n elements.add(getTile(x, y));\n getTile(x, y).setVisited(true);\n\n System.out.println(\"The starting tile is \" + getTile(x, y).getX() + \" \" + getTile(x, y).getY());\n\n while (!elements.isEmpty()) {\n Tile current = elements.poll();\n System.out.println(\"Current tile \" + current.getX() + \" \" + current.getY() + \" from the queue\");\n if (current.getX() == MAX && current.getY() == MAX) {\n System.out.println(\"Reached bottom right corner\");\n return;\n }\n\n for (int i = 0; i < ALLX.length; i++) {\n int newX = current.getX() + ALLX[i];\n int newY = current.getY() + ALLY[i];\n\n if (isInside(newX, newY)) {\n if (!getTile(newX, newY).isVisited()) {\n\n getTile(newX, newY).setVisited(true);\n System.out.println(\"Next added tile to the queue is \" + newX + \" \" + newY);\n\n elements.add(getTile(newX, newY));\n }\n }\n }\n }\n\n }", "public int get_edge(int from, int to){\n int temp=0;\n try{\n temp=adj_matrix[from][to];\n }\n catch(ArrayIndexOutOfBoundsException index){ // If invalid index\n System.out.println(\" Invalid Vertex!\");\n }\n return temp;\n }", "public Cell getCellAt (int x, int y) {\n return grid[x-1][y-1];\n }", "public ArrayList<Position> getAdjacents(Board board){\r\n\t\tArrayList<Position> adjacents = new ArrayList<Position>(0);\r\n\t\t/* First get tiles to left and right */\r\n\t\tif(this.x>0){\r\n\t\t\tadjacents.add(board.getNodes()[this.y][this.x-1]);\r\n\t\t}\r\n\t\t/* Length of a row is given by\r\n\t\t * Math.min(size+y, 2*size-1)\r\n\t\t */\r\n\t\tif(this.x<Math.min(board.getArraySize()+this.y, 2*board.getArraySize()-2)){\r\n\t\t\tadjacents.add(board.getNodes()[this.y][this.x+1]);\r\n\t\t}\r\n\t\t/* Next, find the adjacent positions in the rows above and below\r\n\t\t * For the tile at [y,x] these are located at\r\n\t\t * [y-1,x-1],[y-1,x],[y+1,x] and [y+1,x+1] \r\n\t\t */\r\n\t\tif(this.y>0){\r\n\t\t\t// Row above exists\r\n\t\t\tif(this.x < board.getArraySize()-1+this.y){\r\n\t\t\t\t// Check tile above and to the right exists\r\n\t\t\t\tadjacents.add(board.getNodes()[this.y-1][this.x]);\r\n\t\t\t}\r\n\t\t\tif(this.x > 0){\r\n\t\t\t\t// Check tile above and to the left exists\r\n\t\t\t\tadjacents.add(board.getNodes()[this.y-1][this.x-1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.y<2*board.getArraySize()-2){\r\n\t\t\t// Row below exists\r\n\t\t\tif(this.x < 2*board.getArraySize()-2){\r\n\t\t\t\t// Check tile below and to the right exists\r\n\t\t\t\tadjacents.add(board.getNodes()[y+1][x+1]);\r\n\t\t\t}\r\n\t\t\tif(this.x > this.y-board.getArraySize()+1){\r\n\t\t\t\t// Check tile below and to the left exists\r\n\t\t\t\tadjacents.add(board.getNodes()[y+1][x]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn adjacents;\r\n\t}", "public void findUpperAndLowerEdge() throws NoSudokuFoundException{\n int bestUpperHit = 0;\n int bestLowerHit = 0;\n double t = INTERSECT_TOLERANCE;\n for (int h=0; h<nextH; h++) {\n int upperHit = 0;\n int lowerHit = 0;\n // for every horizontal line, check if vertical edge points A and B \n // are on that line.\n double[] hline = horizontalLines[h];\n double hy1 = hline[1],\n hy2 = hline[3];\n for (int v=0; v<nextV; v++){\n double[] vec = verticalLines[v];\n double ay = vec[1],\n by = vec[3];\n // if they are, count them\n if(ay < by) { // A is above B\n if ((hy1<=ay+t && ay<=hy2+t) || (hy1+t>=ay && ay+t>=hy2)){\n // A is between the left and right edge point.\n // only count it if it is above the screen center.\n if(hy1 < centerY && hy2 < centerY) {\n upperHit++;\n }\n } else if ((hy1<=by+t && by<=hy2+t) || (hy1+t>=by && by+t>=hy2)) {\n if(hy1 > centerY && hy2 > centerY) {\n lowerHit++;\n }\n }\n } else { // B is above A\n if ((hy1<=by+t && by<=hy2+t) || (hy1+t>=by && by+t>=hy2)) {\n if(hy1 < centerY && hy2 < centerY) {\n upperHit++;\n }\n } else if ((hy1<=ay+t && ay<=hy2+t) || (hy1+t>=ay && ay+t>=hy2)) {\n if(hy1 > centerY && hy2 > centerY) {\n lowerHit++;\n }\n } \n }\n }\n // take the lines with the highest counts\n if(upperHit > bestUpperHit) {\n edges[0] = horizontalLines[h];\n bestUpperHit = upperHit;\n } else if (lowerHit > bestLowerHit){\n edges[2] = horizontalLines[h];\n bestLowerHit = lowerHit;\n }\n }\n if(bestUpperHit < LINE_THRESHOLD || bestLowerHit < LINE_THRESHOLD){\n throw new NoSudokuFoundException(\"Number of upper (\"+bestUpperHit+\") or lower (\"+bestLowerHit+\") line ends below threshold. h\");\n }\n // Log.v(TAG, \"Best upper hit: \" + bestUpperHit + \", best lower: \" + bestLowerHit);\n }", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "Map<BoardCellCoordinates, Set<Integer>> getWinningCoordinates();", "public CellPosition isInside(Vector2i coord){\n\t\tCellPosition pos;\n\t\tpos = display.gridDisplay.isInside(coord);\n\t\tif(pos.isFound)\n\t\t\treturn pos;\n\t\t\n\t\tpos = canva.isInside(coord);\n\t\treturn pos;\n\t}", "int getCell(int x, int y) {\n try {\n return hiddenGrid[x][y];\n } catch (IndexOutOfBoundsException hiddenIndex) {}\n return hiddenGrid[x][y];\n }", "public abstract boolean hasEdge(int from, int to);", "boolean isCellBelowNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x, this.y + 1));\r\n }", "private static int findMaxPointsFromBottomRightToTopLeft(char[][] matrix, int startingCellX, int startingCellY, int endCellX, int endCellY, boolean[][] visited) {\n if (!inRange(matrix, startingCellX, startingCellY)) {\n return 0;\n }\n\n if (visited[endCellX][endCellY]) {\n return 0;\n }\n\n char ch = matrix[endCellX][endCellY];\n\n visited[endCellX][endCellY] = true;\n\n if (ch == '#') {\n return 0;\n }\n\n if (startingCellX == endCellX && startingCellY == endCellY) {\n if (ch == '#' || ch == '.') {\n return 0;\n }\n return 1; // if '*'\n }\n\n if (ch == '*') {\n\n int maxPointsFromUp = findMaxPointsFromBottomRightToTopLeft(matrix, startingCellX, startingCellY, endCellX - 1, endCellY, visited);\n int maxPointsFromLeft = findMaxPointsFromBottomRightToTopLeft(matrix, startingCellX, startingCellY, endCellX, endCellY - 1, visited);\n\n if (maxPointsFromLeft < maxPointsFromUp) {\n if (inRange(matrix, endCellX, endCellY - 1)) {\n visited[startingCellX][startingCellY + 1] = false;\n }\n } else {\n if (inRange(matrix, endCellX - 1, endCellY)) {\n visited[endCellX - 1][endCellY] = false;\n }\n }\n\n int maxPoints = 1 + Math.max(maxPointsFromLeft, maxPointsFromUp);\n return maxPoints;\n\n } else if (ch == '.') {\n\n int maxPointsFromUp = findMaxPointsFromBottomRightToTopLeft(matrix, startingCellX, startingCellY, endCellX - 1, endCellY, visited);\n int maxPointsFromLeft = findMaxPointsFromBottomRightToTopLeft(matrix, startingCellX, startingCellY, endCellX, endCellY - 1, visited);\n\n if (maxPointsFromLeft < maxPointsFromUp) {\n if (inRange(matrix, endCellX, endCellY - 1)) {\n visited[startingCellX][startingCellY + 1] = false;\n }\n } else {\n if (inRange(matrix, endCellX - 1, endCellY)) {\n visited[endCellX - 1][endCellY] = false;\n }\n }\n\n int maxPoints = Math.max(maxPointsFromLeft, maxPointsFromUp);\n\n return maxPoints;\n } else { // if ch == '#'\n return 0;\n }\n }", "private static boolean isCellAlive(int[][] coordinates, int row, int column) {\n\t\tboolean cellAlive = coordinates[row][column] == 1;\r\n\t\tint numberOfNeighbours = 0;\r\n\t\t//check one to the right of col\r\n\t\tif (coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one to the left of col\r\n\t\tif (coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one above col\r\n\t\tif (coordinates.length > row - 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one below col\r\n\t\tif (coordinates.length > row + 1) {\r\n\t\t\tif (coordinates[row + 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top left diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column - 1 && row - 1 >= 0 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top right diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column + 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom left diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row + 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom right diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row + 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t System.out.println(\"Number of neighbours for \" + row + \", \" + column\r\n\t\t + \" was \" + numberOfNeighbours);\r\n\t\t//if the number of neighbours was 2 or 3, the cell is alive\r\n\t\tif ((numberOfNeighbours == 2) && cellAlive) {\r\n\t\t\treturn true;\r\n\t\t} else if (numberOfNeighbours == 3) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean[] hasNeighbor(Coord coord) {\n\t\t// first index repreests the vertical neighbors and the second\n\t\t// index represents the horizontal neighbors\n\t\tboolean[] hasAdj = new boolean[2];\n\t\tint r = coord.getRow();\n\t\tint c = coord.getCol();\n\t\t// check if a letter exists above or below the given coordinate\n\t\tif ((r - 1 >= 0 && board[r - 1][c].getLetter() != null)\n\t\t\t\t|| (r + 1 < len && board[r + 1][c].getLetter() != null))\n\t\t\thasAdj[0] = true;\n\t\t// check if a letter exists left or right of the given coordinate\n\t\tif ((c - 1 >= 0 && board[r][c - 1].getLetter() != null)\n\t\t\t\t|| (c + 1 < len && board[r][c + 1].getLetter() != null))\n\t\t\thasAdj[1] = true;\n\t\treturn hasAdj;\n\t}", "public void findNeighbours(ArrayList<int[]> visited , Grid curMap) {\r\n\t\tArrayList<int[]> visitd = visited;\r\n\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS cur pos:\" +Arrays.toString(nodePos));\r\n\t\t//for(int j=0; j<visitd.size();j++) {\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +Arrays.toString(visited.get(j)));\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS getvstd\" +Arrays.toString(visited.get(j)));\r\n\t\t//}\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +visited);\r\n\t\tCell left=curMap.getCell(0, 0);\r\n\t\tCell right=curMap.getCell(0, 0);\r\n\t\tCell upper=curMap.getCell(0, 0);\r\n\t\tCell down=curMap.getCell(0, 0);\r\n\t\t//the getStart() method returns x,y coordinates representing the point in x,y axes\r\n\t\t//so if either of [0] or [1] coordinate is zero then we have one less neighbor\r\n\t\tif (nodePos[1]> 0) {\r\n\t\t\tupper=curMap.getCell(nodePos[0], nodePos[1]-1) ; \r\n\t\t}\r\n\t\tif (nodePos[1] < M-1) {\r\n\t\t\tdown=curMap.getCell(nodePos[0], nodePos[1]+1);\r\n\t\t}\r\n\t\tif (nodePos[0] > 0) {\r\n\t\t\tleft=curMap.getCell(nodePos[0] - 1, nodePos[1]);\r\n\t\t}\r\n\t\tif (nodePos[0] < N-1) {\r\n\t\t\tright=curMap.getCell(nodePos[0]+1, nodePos[1]);\r\n\t\t}\r\n\t\t//for(int i=0;i<visitd.size();i++) {\r\n\t\t\t//System.out.println(Arrays.toString(visitd.get(i)));\t\r\n\t\t//}\r\n\t\t\r\n\t\t//check if the neighbor is wall,if its not add to the list\r\n\t\tif(nodePos[1]>0 && !upper.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] - 1}))) {\r\n\t\t\t//Node e=new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1},curMap);\r\n\t\t\t//if(e.getVisited()!=true) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1}, curMap)); // father of the new nodes is this node\r\n\t\t\t//}\r\n\t\t}\r\n\t\tif(nodePos[1]<M-1 &&!down.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] + 1}))){\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] + 1}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]>0 && !left.isWall() && (!exists(visitd,new int[] {nodePos[0] - 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] - 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]<N-1 && !right.isWall() && (!exists(visitd,new int[] {nodePos[0] + 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] + 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\t//for(int i=0; i<NodeChildren.size();i++) {\r\n\t\t\t//System.out.println(\"Paidia sth find:\" + Arrays.toString(NodeChildren.get(i).getNodePos()));\r\n\t\t//}\r\n\t\t\t\t\t\t\r\n\t}", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "int toIndex(int x, int y);", "private int surroundingMines(int x, int y) {\r\n int startingX, startingY, endingX, endingY;\r\n int count = 0;\r\n \r\n // putting condition for edges\r\n startingX = startEdgeConditon(x);\r\n startingY = startEdgeConditon(y);\r\n endingX = endEdgeConditon(x);\r\n endingY = endEdgeConditon(y);\r\n \r\n // check surrounding cells\r\n for (int i = startingX; i < endingX; i++) {\r\n for (int j = startingY; j < endingY; j++) {\r\n if (mines[i][j]) {\r\n count++;\r\n }\r\n }\r\n }\r\n return count;\r\n }", "public int search(int[] A, int target) {\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n while (start + 1 < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n }\n if (A[start] < A[mid]) {\n // situation 1, red line\n if (A[start] <= target && target <= A[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n } else {\n // situation 2, green line\n if (A[mid] <= target && target <= A[end]) {\n start = mid;\n } else {\n end = mid;\n }\n }\n } // while\n\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n return -1;\n }", "public abstract int getNumberOfLivingNeighbours(int x, int y);", "public static void searchAlgortihm(int x, int y)\n\t{\n\t\tint dx = x;\n\t\tint dy = y;\n\t\tint numMovements = 1; // variable to indicate the distance from the user\n\t\t\n\t\t//check starting position\n\t\tcheckLocation(dx,dy, x, y);\n\n\t\tint minCoords = MAX_COORDS;\n\t\tminCoords *= -1; // max negative value of the grid\n\n\t\t// while - will search through all coordinates until it finds 5 events \n\t\twhile(numMovements < (MAX_COORDS*2)+2 && (closestEvents.size() < 5))\n\t\t{\n\t\t\t//first loop - \n\t\t\tfor(int i = 1; i <= 4; i++)\n\t\t\t{\n\t\t\t\tif(i == 1){ // // moving south-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j-x;\n\t\t\t\t\t\tdx *= -1; // reverse sign\n\t\t\t\t\t\tdy = (numMovements-j)+y;\n\t\t\t\t\t\tif((dx >= minCoords) && (dy <= MAX_COORDS)) // only check the coordinates if they are on the grid\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"1 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 2){ // moving south-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)-x;\n\t\t\t\t\t\tdx *= -1; // change sign\n\t\t\t\t\t\tdy = j-y; \n\t\t\t\t\t\tdy *= -1; // change sign\n\t\t\t\t\t\tif((dx >= minCoords) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"2 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 3){ // moving north-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j+x;\n\t\t\t\t\t\tdy = (numMovements-j)-y;\n\t\t\t\t\t\tdy *= -1;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"3 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 4){ // moving north-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)+x;\n\t\t\t\t\t\tdy = j+y;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy <= MAX_COORDS))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"4 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// increment the number of movements, from user coordinate\n\t\t\tnumMovements++;\n\n\t\t} // End of while\n\t}", "public abstract int findRowForWindow(int y);", "public int[] getPositionInGrid( int tile )\n\t{\n\t\tint[] position = new int[2];\n\t\t\n\t\tfor ( int y = 0; y < height; y++ )\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\tif ( grid[x][y] == tile ) \n\t\t\t\t{\n\t\t\t\t\tposition[0] = x;\n\t\t\t\t\tposition[1] = y;\n\t\t\t\t\t\n\t\t\t\t\t// Should break but meh\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn position;\n\t}", "int findVertex(Point2D.Float p) {\n double close = 5*scale;\n for (int i = 0; i < points.size(); ++i) {\n if (points.get(i).distance(p) < close) {\n return i;\n }\n }\n return -1;\n }", "public int getShipIndex(Point point) {\n\t\tPoint tempPoint;\n\t\tif (startPos.x == endPos.x) {\n\t\t\t// must be horizontal\n\t\t\tfor (int i = startPos.y , j = 0; i <= endPos.y ; i++, j++) {\n\t\t\t\ttempPoint = new Point(startPos.x, i);\n\t\t\t\tif (tempPoint.equals(point))\n\t\t\t\t\treturn j;\n\t\t\t}\n\t\t}\n\t\telse if (startPos.y == endPos.y) {\n\t\t\t// must be vertical\n\t\t\tfor (int i = startPos.x, j = 0; i <= endPos.x ; i++, j++) {\n\t\t\t\ttempPoint = new Point(i , startPos.y);\n\t\t\t\tif (tempPoint.equals(point))\n\t\t\t\t\treturn j;\n\t\t\t}\n\t\t}\n\t\telse { // must be diagonal \n\t\t\tfor (int i = startPos.x, j = startPos.y , z = 0; i <= endPos.x ; i++, j++, z++) {\n\t\t\t\ttempPoint = new Point(i , j);\n\t\t\t\tif (tempPoint.equals(point))\n\t\t\t\t\treturn z;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn -1;\n\t}", "private int searchNeighbours(int[][] neighbourCords, int cellX, int cellY) {\n int neighbours = 0;\n for (int[] offset : neighbourCords) {\n if (getCell(cellX + offset[0], cellY + offset[1]).isAlive()) {\n neighbours++;\n }\n }\n\n return neighbours;\n }", "private int getStateOfPositionFromBoard(positionTicTacToe position, List<positionTicTacToe> targetBoard)\n\t{\n\t\tint index = position.x*16+position.y*4+position.z;\n\t\treturn targetBoard.get(index).state;\n\t}", "private static boolean DFS(char[][] grid, int i, int j, String word, int index, List<Pair<Integer, Integer>> coordinates) {\n if (index == word.length()) {\n return true;\n } else if (i >= grid.length || j >= grid[0].length) {\n return false;\n } else {\n if (grid[i][j] == word.charAt(index)) {\n coordinates.add(new Pair<>(i, j));\n boolean isPresentOnRight = DFS(grid, i, j + 1, word, index + 1, coordinates);\n if (isPresentOnRight) {\n return true;\n } else {\n boolean isPresentOnBottom = DFS(grid, i + 1, j, word, index + 1, coordinates);\n if (isPresentOnBottom) {\n return true;\n } else {\n //Neither left, not bottom gave us a valid result, have to backtrack and remove coordinate of current word\n coordinates.remove(coordinates.get(coordinates.size() - 1));\n return false;\n }\n }\n } else {\n //current word is not present, simply return false\n return false;\n }\n }\n }", "public static int indexOfLowestElevPath(Graphics g, int[][] grid){\n int lowest = 9999999;\n int row = -1;\n \n for(int i = 1; i < 480; i++)\n {\n if(drawLowestElevPath(g, grid, i) < lowest)\n {\n lowest = drawLowestElevPath(g, grid, i);\n row = i;\n }\n }\n \n return row;\n }", "private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }", "public HexCell getAdjacentCell(HexCell currentCell, MyValues.HEX_POSITION position){\n int cellX = currentCell.x;\n int cellY = currentCell.y;\n HexCell adjacentCell = null;\n switch (position){\n case TOP:\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX,\n cellY-1);\n }\n break;\n case BOT:\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX, cellY+1);\n }\n break;\n case TOP_LEFT:\n if(isInBound(cellX -1, x)){\n if(cellX % 2 ==0){\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX-1, cellY-1);\n }\n } else{\n adjacentCell = getCell(cellX-1, cellY);\n }\n }\n break;\n case TOP_RIGHT:\n if(isInBound(cellX +1, x)){\n if(cellX % 2 ==0){\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX+1, cellY-1);\n }\n } else{\n adjacentCell = getCell(cellX+1, cellY);\n }\n }\n break;\n case BOT_LEFT:\n if(isInBound(cellX -1, x)){\n if(cellX % 2 ==1){\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX-1, cellY+1);\n }\n } else{\n adjacentCell = getCell(cellX-1, cellY);\n }\n }\n break;\n case BOT_RIGHT:\n if(isInBound(cellX +1, x)){\n if(cellX % 2 ==1){\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX+1, cellY+1);\n }\n } else{\n adjacentCell = getCell(cellX+1, cellY);\n }\n }\n break;\n }\n return adjacentCell;\n }", "public static int getGridPosition(int x, int y, int width){\n\t\treturn (y*width)+x;\n\t}", "public static int search(int[] nums, int target) {\n\n int length = nums.length;\n int i = 0;\n int j = length - 1;\n if (length == 0) return -1;\n\n while (true) {\n int index = (i + j) / 2;\n\n int value = nums[index];\n if (value == target) return index;\n\n //Using the invariant that either i - mid OR mid-j has\n //to be sorted at any point of the computation\n if (nums[j] >= value) {\n if (target > value && target <= nums[j]) i = index;\n else if (target > value && target > nums[j]) j = index;\n else j = index;\n }\n else {\n if (target < value && target >= nums[i]) j = index;\n else if (target < value && target < nums[i]) i = index;\n else i = index;\n }\n\n if (i + 1 == j) {\n if (nums[i] == target) return i;\n if (nums[j] == target) return j;\n return -1;\n }\n\n if (i == j || i >= length || j >= length) return -1;\n }\n\n }", "public boolean searchMatrixMyOwn(int[][] matrix, int target) {\n int rows = matrix.length;\n if(rows == 0){\n return false;\n }\n int cols = matrix[0].length;\n if(cols == 0){\n return false;\n }\n\n int minRow=0, maxRow=rows-1;\n for(int i=0; i<rows; i++){\n if(matrix[i][cols-1] < target){\n minRow = i+1;\n }\n if(matrix[i][0] > target && i<maxRow){\n maxRow = i-1;\n }\n }\n\n int minCol = 0, maxCol = cols-1;\n for(int i=0; i<cols; i++){\n if(matrix[rows-1][i] < target){\n minCol = i+1;\n }\n if(matrix[0][i] > target && i<maxCol){\n maxCol = i-1;\n }\n }\n\n// System.out.println(\"minRow=\" + minRow + \", maxRow=\" + maxRow + \", minCol=\" + minCol + \", maxCol=\" + maxCol);\n\n if(maxCol - minCol > maxRow - minRow) {\n for (int i = minRow; i <= maxRow; i++) {\n int minC = minCol, maxC = maxCol;\n while (minC <= maxC) {\n if (minC == maxC) {\n if(matrix[i][minC] == target){\n return true;\n } else {\n break;\n }\n } else if (minC + 1 == maxC) {\n if (matrix[i][minC] == target || matrix[i][maxC] == target) {\n return true;\n } else {\n break;\n }\n }\n int midC = (minC + maxC) / 2;\n if (matrix[i][midC] > target) {\n maxC = midC;\n } else if (matrix[i][midC] < target) {\n minC = midC;\n } else if (matrix[i][midC] == target) {\n return true;\n }\n }\n }\n } else {\n for(int j = minCol; j<=maxCol; j++) {\n int minR = minRow, maxR = maxRow;\n while(minR <= maxR){\n if(minR == maxR){\n if(matrix[minR][j] == target){\n return true;\n }else {\n break;\n }\n } else if(minR +1 == maxR){\n if(matrix[minR][j] == target || matrix[maxR][j] == target){\n return true;\n }else {\n break;\n }\n }\n int midR = (minR + maxR) / 2;\n if(matrix[midR][j] > target){\n maxR = midR;\n } else if(matrix[midR][j] < target){\n minR = midR;\n } else if(matrix[midR][j] == target){\n return true;\n }\n }\n }\n }\n return false;\n }", "private GridPiece getOppositeActive() {\n\n\t\t/*System.out.println(\"GS| origin row: \" + origin.row);\n\t\tSystem.out.println(\"GS| origin col: \" + origin.column);\n\t\tSystem.out.println(\"GS| origin center x,y: \" + origin.getCenter());*/\n\n\n if (game.gridPieces[game.getGridPiece(touchPos)] == origin) {\n return origin;\n }\n float degrees;\n\n // Get degrees\n degrees = MathUtils.atan2(touchPos.y - origin.getCenter().y, touchPos.x - origin.getCenter().x);\n\n float quarterPi = 0.78539816339f;\n\n if (!originOpposite.contains(falsePiece)) {\n for (GridPiece gridPiece : originOpposite) {\n\n //System.out.println(\"GS| degrees: \" + degrees);\n\t\t\t/*System.out.println(\"GS| gridpiece row: \" + gridPiece.row);\n\t\t\tSystem.out.println(\"GS| gridpiece col: \" + gridPiece.column);\n\t\t\tSystem.out.println(\"GS| gridpiece center x,y: \" + gridPiece.getCenter());*/\n\n // Right\n if (degrees >= 0 && degrees < quarterPi || degrees < 0 && degrees >= -quarterPi) {\n if (gridPiece.row == origin.row && gridPiece.getCenter().x > origin.getCenter().x) {\n return gridPiece;\n }\n }\n\n // Down\n else if (degrees <= -quarterPi && degrees > -quarterPi * 3) {\n if (gridPiece.column == origin.column && gridPiece.getCenter().y < origin.getCenter().y) {\n return gridPiece;\n }\n }\n\n // Left\n else if (degrees > quarterPi * 3 && degrees <= quarterPi * 4\n || degrees < -quarterPi * 3 && degrees >= -quarterPi * 4) {\n if (gridPiece.row == origin.row && gridPiece.getCenter().x < origin.getCenter().x) {\n return gridPiece;\n }\n }\n\n // Up\n else if (degrees >= quarterPi && degrees < quarterPi * 3) {\n if (gridPiece.column == origin.column && gridPiece.getCenter().y > origin.getCenter().y) {\n return gridPiece;\n }\n }\n\n }\n }\n return origin;\n }", "private SearchNode findNodeWithCoords(HashSet<SearchNode> set, int x, int y){\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (cur.posX == x && cur.posY == y)\n\t\t\t\t\treturn cur;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public int findPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "private boolean intervalContains(double target, int coordIdx, boolean ascending, boolean closed) {\n // Target must be in the closed bounds defined by the discontiguous interval at index coordIdx.\n double lowerVal = ascending ? orgGridAxis.getCoordEdge1(coordIdx) : orgGridAxis.getCoordEdge2(coordIdx);\n double upperVal = ascending ? orgGridAxis.getCoordEdge2(coordIdx) : orgGridAxis.getCoordEdge1(coordIdx);\n\n if (closed) {\n return lowerVal <= target && target <= upperVal;\n } else {\n return lowerVal <= target && target < upperVal;\n }\n }", "public List<Location> neighbors (Location pos);", "private static boolean computeBelongingToPolygon(\n final int[] xArr,\n final int[] yArr,\n final int pointCount,\n //\n final int x,\n final int y) {\n\n int hits = 0;\n\n int lastx = xArr[pointCount - 1];\n int lasty = yArr[pointCount - 1];\n int curx;\n int cury;\n\n // Looping on edges.\n for (int i = 0; i < pointCount; lastx = curx, lasty = cury, i++) {\n curx = xArr[i];\n cury = yArr[i];\n\n if (cury == lasty) {\n // Point on same line.\n continue;\n }\n\n int leftx;\n if (curx < lastx) {\n // Going left.\n if (x >= lastx) {\n // But not as far as before.\n continue;\n }\n // New leftmost.\n leftx = curx;\n } else {\n // Going rightish.\n if (x >= curx) {\n continue;\n }\n leftx = lastx;\n }\n\n double test1;\n double test2;\n if (cury < lasty) {\n if ((y < cury) || (y >= lasty)) {\n continue;\n }\n if (x < leftx) {\n hits++;\n continue;\n }\n test1 = x - curx;\n test2 = y - cury;\n } else {\n if ((y < lasty) || (y >= cury)) {\n continue;\n }\n if (x < leftx) {\n hits++;\n continue;\n }\n test1 = x - lastx;\n test2 = y - lasty;\n }\n\n /*\n * JDK code uses \"test1 < (test2 / dy * dx)\" here,\n * but we want to avoid the division.\n */\n final int dx = (lastx - curx);\n final int dy = (lasty - cury);\n if (dy < 0) {\n if (test1 * dy > test2 * dx) {\n hits++;\n }\n } else {\n if (test1 * dy < test2 * dx) {\n hits++;\n }\n }\n }\n\n return ((hits & 1) != 0);\n }", "private static Cell isAdjacent(char[][] board, Character ch, int row, int col, Set<Cell> visited) {\n if(isValidCell(row-1, col, board) && board[row-1][col] == ch && !visited.contains(new Cell(row-1, col))) return new Cell(row-1, col);\n //if(isValidCell(row-1, col+1, board) && board[row-1][col+1] == ch && !visited.contains(new Cell(row-1, col+1))) return new Cell(row-1, col+1);\n if(isValidCell(row, col-1, board) && board[row][col-1] == ch && !visited.contains(new Cell(row, col-1))) return new Cell(row, col-1);\n if(isValidCell(row, col+1, board) && board[row][col+1] == ch && !visited.contains(new Cell(row, col+1))) return new Cell(row, col+1);\n //if(isValidCell(row+1, col-1, board) && board[row+1][col-1] == ch && !visited.contains(new Cell(row+1, col-1))) return new Cell(row+1, col-1);\n if(isValidCell(row+1, col, board) && board[row+1][col] == ch && !visited.contains(new Cell(row+1, col))) return new Cell(row+1, col);\n //if(isValidCell(row+1, col+1, board) && board[row+1][col+1] == ch && !visited.contains(new Cell(row+1, col+1))) return new Cell(row+1, col+1);\n return null;\n }", "private int getContainingChildIndex(final int x, final int y) {\n if (mRect == null) {\n mRect = new Rect();\n }\n for (int index = 0; index < getChildCount(); index++) {\n getChildAt(index).getHitRect(mRect);\n if (mRect.contains(x, y)) {\n return index;\n }\n }\n return INVALID_INDEX;\n }", "boolean contains(ShortPoint2D position);", "@Override\n\tpublic List<Cell> calcNeighbors(int row, int col) {\n\t\tList<Cell> neighborLocs = new ArrayList<>();\n\t\tint shift_constant = 1 - 2*((row+col) % 2);\n\t\tif(!includesDiagonals) {\n\t\t\tfor(int a = col - 1; a <= col + 1; a++) {\n\t\t\t\tif(a == col)\n\t\t\t\t\taddLocation(row + shift_constant,a,neighborLocs);\n\t\t\t\telse \n\t\t\t\t\taddLocation(row,a,neighborLocs);\n\t\t\t}\n\t\t\treturn neighborLocs;\n\t\t}\n\t\tfor(int b = col - 2; b <= col + 2; b++) {\n\t\t\tfor(int a = row; a != row + 2*shift_constant; a += shift_constant) {\n\t\t\t\tif(a == row && b == col)\n\t\t\t\t\tcontinue;\n\t\t\t\taddLocation(a,b,neighborLocs);\n\t\t\t}\n\t\t}\n\t\tfor(int b = col -1; b <= col + 1; b++) {\n\t\t\taddLocation(row - shift_constant,b,neighborLocs);\n\t\t}\n\t\treturn neighborLocs;\n\t}", "public Point getCoordinates(int val) {\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() == val)\r\n\t\t\t\t\treturn new Point(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Point(-1,-1);\r\n\t}", "public Set<? extends Position> findNearest(Position position, int k);", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "@Override\n public boolean contain(int x, int y) {\n return(x>=this.x && y>=this.y && x<=this.x+(int)a && y<=this.y+(int)b);\n }", "private int findExtremePosition(int[] nums, int target, boolean left){\n int low = 0, high = nums.length-1, mid, index=-1;\n while(low<=high){\n mid = low + (high-low)/2;\n // target is found\n if(target==nums[mid]){\n // store the index\n index = mid;\n // continue moving left to find leftmost index of target element\n if(left){\n high = mid-1;\n // continue moving right to find rightmost index of target element\n }else {\n low = mid+1;\n }\n } else if(target<nums[mid]) {\n high = mid-1;\n } else {\n low = mid+1;\n }\n }\n //loop breaks when low>high, return the last recorded index\n return index;\n }", "public abstract boolean getCell(int x, int y);", "public static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }", "public abstract boolean getEdge(Point a, Point b);", "public int getLocation(int x, int y) {\n\t\treturn grid[x][y];\n\t}", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "private int getContainingChildIndex(final int x, final int y)\n\t{\n\t\tif (_rect == null)\n\t\t\t_rect = new Rect();\n\n\t\tfor (int index = 0; index < getChildCount(); index++)\n\t\t{\n\t\t\tgetChildAt(index).getHitRect(_rect);\n\t\t\tif (_rect.contains(x, y))\n\t\t\t\treturn index;\n\t\t}\n\t\treturn INVALID_INDEX;\n\t}", "public Pair<Integer,Integer> getJButtonCoord(JButton button){\n int row=0,col=0;\n Boolean foundButton = false;\n for(row =0 ; row < ROWS; row ++){\n for(col = 0; col < COLS; col++){\n if (buttonGrid[row][col] == button){\n foundButton = true;\n break;\n }\n }\n if (foundButton) break;\n }\n Pair<Integer,Integer> coord = new Pair<Integer,Integer> (row,col);\n return coord;\n }", "public int getSideIndex(Tile adjacent){\r\n for(int i = 0; i < adjTiles.length; i++){\r\n if(adjTiles[i] == adjacent) return i;\r\n }\r\n return -1;\r\n }", "public abstract int getNeighboursNumber(int index);", "private static int findMaxPointsFromTopLeftToBottomRight(char[][] matrix, int startingCellX, int startingCellY, int endCellX, int endCellY, int[][] memory) {\n if (!inRange(matrix, startingCellX, startingCellY)) {\n return 0;\n }\n\n/*\n if (visited[startingCellX][startingCellY]) {\n return 0;\n }\n*/\n\n if (memory[startingCellX][startingCellY] != -1) {\n return memory[startingCellX][startingCellY];\n }\n\n char ch = matrix[startingCellX][startingCellY];\n\n //visited[startingCellX][startingCellY] = true;\n\n if (ch == '#') {\n return 0;\n }\n\n if (startingCellX == endCellX && startingCellY == endCellY) {\n if (ch == '#' || ch == '.') {\n return 0;\n }\n return 1; // if '*'\n }\n\n if (ch == '*') {\n\n int maxPointsFromDown = findMaxPointsFromTopLeftToBottomRight(matrix, startingCellX + 1, startingCellY, endCellX, endCellY, memory);\n int maxPointsFromRight = findMaxPointsFromTopLeftToBottomRight(matrix, startingCellX, startingCellY + 1, endCellX, endCellY, memory);\n\n /* if (maxPointsFromRight < maxPointsFromDown) {\n if (inRange(matrix, startingCellX, startingCellY + 1)) {\n visited[startingCellX][startingCellY + 1] = false;\n }\n } else {\n if (inRange(matrix, startingCellX + 1, startingCellY)) {\n visited[startingCellX + 1][startingCellY] = false;\n }\n }\n*/\n int maxPoints = 1 + Math.max(maxPointsFromRight, maxPointsFromDown);\n\n // memoization for top-down approach\n memory[startingCellX][startingCellY] = maxPoints;\n\n return maxPoints;\n\n } else if (ch == '.') {\n\n int maxPointsFromDown = findMaxPointsFromTopLeftToBottomRight(matrix, startingCellX + 1, startingCellY, endCellX, endCellY, memory);\n int maxPointsFromRight = findMaxPointsFromTopLeftToBottomRight(matrix, startingCellX, startingCellY + 1, endCellX, endCellY, memory);\n\n /* if (maxPointsFromRight < maxPointsFromDown) {\n if (inRange(matrix, startingCellX, startingCellY + 1)) {\n visited[startingCellX][startingCellY + 1] = false;\n }\n } else {\n if (inRange(matrix, startingCellX + 1, startingCellY)) {\n visited[startingCellX + 1][startingCellY] = false;\n }\n }*/\n\n int maxPoints = Math.max(maxPointsFromRight, maxPointsFromDown);\n\n // memoization for top-down approach\n memory[startingCellX][startingCellY] = maxPoints;\n\n return maxPoints;\n } else { // if ch == '#'\n\n int maxPoints = 0;\n\n // memoization for top-down approach\n memory[startingCellX][startingCellY] = 0;\n\n return 0;\n }\n }", "public Grid getEntrance(){\n\t\treturn getpos((byte)2);\n\t}", "public ArrayList<Integer> searchPosition(Estados e) { //considerando um ponto so\n ArrayList<Integer> positions = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n if (matrix[i][j] == e) {\n positions.add(i);\n positions.add(j);\n }\n\n }\n\n }\n return positions;\n\n }", "public boolean contains(Index position) { // TODO rename: adjoinsOrContains\n return position != null && position.getX() + 1 >= start.getX() && position.getY() + 1 >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }", "public boolean getGrid(int x, int y){\n\t\treturn grid[x][y];\n\t}", "public static void solve(char[][] board) {\n\t\t\n\t\tint height = board.length;\n\t\tif(height==0){\n\t\t\treturn;\n\t\t}\n\t\tint width = board[0].length;\n\t\t\n\t\tLinkedList<int[]> queue = new LinkedList<int[]>();\n\t\t//top edge & bottom edge\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tif(board[0][i]=='O'){\n\t\t\t\tint[] coord = {0, i};\n\t\t\t\tqueue.add(coord);\n\t\t\t}\n\t\t\t\n\t\t\tif(board[height-1][i]=='O'){\n\t\t\t\tint[] coord = {height-1, i};\n\t\t\t\tqueue.add(coord);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//left edge & right edge\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tif(board[i][0]=='O'){\n\t\t\t\tint[] coord = {i, 0};\n\t\t\t\tqueue.add(coord);\n\t\t\t}\n\t\t\t\n\t\t\tif(board[i][width-1]=='O'){\n\t\t\t\tint[] coord = {i, width-1};\n\t\t\t\tqueue.add(coord);\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile(queue.size()>0){\n\t\t\tint[] coord = queue.removeLast();\n\t\t\tint row = coord[0];\n\t\t\tint column = coord[1];\n\t\t\tif(board[row][column]=='O'){\n\t\t\t\tboard[row][column]='.';\n\t\t\t}\n\t\t\t//check left cell.\n\t\t\tif(column-1>0 && board[row][column-1]=='O'){\n\t\t\t\tint[] newCoord = {row, column-1};\n\t\t\t\tqueue.add(newCoord);\n\t\t\t}\n\t\t\t\n\t\t\t//check right cell.\n\t\t\tif(column+1 < width-1&& board[row][column+1]=='O'){\n\t\t\t\tint[] newCoord = {row, column+1};\n\t\t\t\tqueue.add(newCoord);\n\t\t\t}\n\t\t\t\n\t\t\t//check upper cell.\n\t\t\tif(row-1>0 && board[row-1][column]=='O'){\n\t\t\t\tint[] newCoord = {row-1, column};\n\t\t\t\tqueue.add(newCoord);\n\t\t\t}\n\t\t\t\n\t\t\t//check lower cell.\n\t\t\tif(row+1<height-1 && board[row+1][column]=='O'){\n\t\t\t\tint[] newCoord = {row+1, column};\n\t\t\t\tqueue.add(newCoord);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//convert \".\" to \"O\" and \"O\" to \"X\".\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\tif(board[i][j]=='.'){\n\t\t\t\t\tboard[i][j] = 'O';\n\t\t\t\t}else if(board[i][j]=='O'){\n\t\t\t\t\tboard[i][j] = 'X';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static Node searchBFS(int mat[][], int i, int j, int x, int y) {\n\t\tfor (int n = 1; n < 30; n++) {\n\t\t\tfor (int p = 1; p < 30; p++) {\n\t\t\t\tvisited[n][p] = false;\n\t\t\t}\n\t\t}\n\n\t\t// create an empty queue\n\t\tQueue<Node> q = queue;\n\t\tq.clear();\n\t\t// mark source cell as visited and enqueue the source node\n\t\tvisited[j][i] = true;\n\t\tNode root = NodeFactory.createNode(i, j, 0, null, null);\n\t\tq.add(root);\n\n\t\t// stores length of longest path from source to destination\n\t\tint min_dist = Integer.MAX_VALUE;\n\t\tNode node = null;\n\n\t\t// run till queue is not empty\n\t\twhile (!q.isEmpty()) {\n\t\t\t// pop front node from queue and process it\n\n\t\t\tnode = q.poll();\n\t\t\ti = node.x;\n\t\t\tj = node.y;\n\t\t\tint dist = node.dist;\n\n\t\t\tif (i == x && j == y) {\n\t\t\t\tmin_dist = dist;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor (Direction dir : DIRECTIONS) {\n\t\t\t\tint nx = i + dir.x;\n\t\t\t\tint ny = j + dir.y;\n\n\t\t\t\tif (isValid(mat, visited, nx, ny)) {\n\t\t\t\t\t// mark next cell as visited and enqueue it\n\n\t\t\t\t\tvisited[ny][nx] = true;\n\t\t\t\t\tint ndist = dist + 1;\n\n\t\t\t\t\tNode newNode = NodeFactory.createNode(nx, ny, ndist, dir,\n\t\t\t\t\t\t\tnode);\n\n\t\t\t\t\t// Node newNode =new Node(node, nx, ny, ndist, dir);\n\n\t\t\t\t\tq.add(newNode);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (min_dist == Integer.MAX_VALUE){\n\t\t\treturn null;\n\t\t}\n\t\treturn node;\n\t}", "private int getPath(int row, int col) {\n\tif (row > X || col > Y || row < 0 || col < 0) return 0;\n\tif (row == X && col == Y) return 1;\n\tif (grid[row][col] == -1) return 0;\n\n\tif (memo[row][col] != -1) return memo[row][col];\n\n\tint isPossible = getPath(row + y_dir[0], col + x_dir[0]);\n\tif (isPossible != 1) {\n\t isPossible = getPath(row + y_dir[1], col + x_dir[1]);\n\t}\n\n\tif (isPossible == 1) {\n\t path.add(new Point(row, col));\n\t}\n\t\n\treturn memo[row][col] = isPossible;\n }", "public Square[] adjacentCells() {\n\t\tArrayList<Square> cells = new ArrayList <Square>();\n\t\tSquare aux;\n\t\tfor (int i = -1;i <= 1; i++) {\n\t\t\tfor (int j = -1; j <= 1 ; j++) {\n\t\t\t\taux = new Square(tractor.getRow()+i, tractor.getColumn()+j); \n\t\t\t\tif (isInside(aux) && abs(i+j) == 1) { \n\t\t\t\t\tcells.add(getSquare(aux));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cells.toArray(new Square[cells.size()]);\n\t}", "static int findPos(int []arr, int key)\n\t{\n\t\tint low=0, high =1;\n\t\tint val =arr[0];\n\t\t\n\t\twhile(val<key)\n\t\t{\n\t\t\tlow= high; //// store previous high check that 2*h doesn't exceeds array length to prevent ArrayOutOfBoundException\n\t\t\tif (2*high < arr.length -1)\n\t\t\t\thigh =2*high;\n\t\t\telse\n\t\t\t\thigh =arr.length -1;\n\t\t\t\n\t\t\tval = arr[high];\n\t\t}\n\t\treturn binarySearch(arr,low,high,key);\n\t}", "public ArrayList<int[]> surroundingCoordinates(int row, int col){\n\t\t\t\n\t\tArrayList<int[]> coordinates = new ArrayList<int[]>();\n\t\tfor(int x = -1; x <= 1; x++) {\n\t\t\tfor(int y = -1; y <= 1; y++) {\n\t\t\t\tif(\t\t\n\t\t\t\t\t\t(row+x >= 0) && \n\t\t\t\t\t\t(col+y >= 0) &&\n\t\t\t\t\t\t(row+x < bm.getBoardSize()) &&\n\t\t\t\t\t\t(col+y < bm.getBoardSize()) &&\n\t\t\t\t\t\t(x != 0 || y != 0)\n\t\t\t\t){\n\t\t\t\t\tcoordinates.add(new int[]{row+x, col+y});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn coordinates;\n\t}", "public boolean search(int[] nums, int target) {\n if (nums == null || nums.length == 0) return false;\n int l = 0;\n int r = nums.length - 1;\n int m;\n while (l <= r) {\n m = (l + r) / 2; \n if (nums[m] == target) return true;\n int low, high;\n if (nums[m] >=nums[l]) {\n if(nums[m] == nums[l]){\n l++;\n }\n else{\n if (nums[l] <= target && target < nums[m]) {\n r = m - 1;\n }\n else {\n l = m + 1;\n }\n }\n }\n else {\n if (nums[m] == nums[r]){\n r--;\n } \n else{\n if (nums[m] < target && target <= nums[r]) {\n l = m + 1;\n }\n else {\n r = m - 1;\n }\n }\n }\n }\n return false;\n }", "public static int binarySearchIter(int[] arr, int from, int to, int key) {\n\t\t\n\t\tint shouldBeIndex;\n\t\twhile (from<=to){\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) from=mid+1;//upper\n\t\t\telse if (arr[mid]>key) to=mid-1;//lower\n\t\t\telse return mid;//found\n\t\t}\n\t\t//not found\n\t\tshouldBeIndex=from;\n\t\treturn -shouldBeIndex-1;\n\t}", "List<Point> getPath(int grid[][], Point src, Point dest);", "public int search(int[] A, int target) {\n\n\t\tint s = 0;\n\t\tint e = A.length - 1;\n\n\t\twhile (s <= e) {\n\t\t\tint m = (s + e) / 2;\n\n\t\t\tif (target == A[m])\n\t\t\t\treturn m;\n\t\t\telse if (A[s] <= A[m]) {\n\t\t\t\tif (A[s] <= target && target < A[m])\n\t\t\t\t\te = m;\n\t\t\t\telse\n\t\t\t\t\ts = m + 1;\n\t\t\t} else {\n\t\t\t\tif (A[m] < target && target <= A[e])\n\t\t\t\t\ts = m + 1;\n\t\t\t\telse\n\t\t\t\t\te = m;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "static int findFirstPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the first target from left\n if(mid==0 ||nums[mid-1]<nums[mid])\n return mid;\n else{\n //there are more targets available at left\n right=mid-1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "@Override\n public HashSet<int[]> coordinatesOfTilesInRange(int x, int y, Tile[][] board){\n HashSet<int[]> hashy = new HashSet<>();\n int[] c = {x,y};\n hashy.add(c);\n return findTiles(x, y, board, hashy);\n }", "public boolean onGrid(int xValue, int yValue);", "public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }", "public int whoWasIt(int x, int y) {\r\n\t\tint result = -1;\r\n\t\tfor (int i = 0; i < Util.NUMBER_OF_RELATIONSHIPS; i++) {\r\n\r\n\t\t\t// logger.log(Level.FINEST, \"trying \" + i);\r\n\t\t\tif (isBetween2D(x, y, sections[i].x1, sections[i].y1,\r\n\t\t\t\t\tsections[i].x2, sections[i].y2)) {\r\n\t\t\t\tresult = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}" ]
[ "0.6731364", "0.6350258", "0.61478543", "0.6108449", "0.59124124", "0.5844111", "0.5722104", "0.57172334", "0.567363", "0.56249595", "0.56244075", "0.56140614", "0.56022483", "0.55216163", "0.550844", "0.5431451", "0.5424571", "0.5414189", "0.54081887", "0.5406586", "0.5394536", "0.5378961", "0.53779393", "0.5377583", "0.53758955", "0.5361937", "0.5355268", "0.5347133", "0.5344201", "0.53332376", "0.5325539", "0.5287467", "0.5273761", "0.5266748", "0.52661026", "0.5262377", "0.5261996", "0.52321076", "0.52237606", "0.52233815", "0.52188694", "0.52117467", "0.52100974", "0.52100396", "0.5208005", "0.5205502", "0.5204827", "0.5202468", "0.5194285", "0.51707697", "0.5170324", "0.51619446", "0.51537526", "0.5151584", "0.5143204", "0.5139289", "0.51326597", "0.51256573", "0.5125232", "0.51242054", "0.51203567", "0.5115814", "0.5114244", "0.51100826", "0.51065296", "0.5095356", "0.5086248", "0.50802886", "0.5079426", "0.5070969", "0.50688165", "0.50686437", "0.5066638", "0.5065223", "0.50637394", "0.5060101", "0.5059272", "0.5055499", "0.5055324", "0.5045681", "0.5036591", "0.50355065", "0.5027759", "0.5026598", "0.502461", "0.50214064", "0.5019003", "0.5013437", "0.501114", "0.5010269", "0.5002698", "0.50014544", "0.4999544", "0.49958616", "0.4992943", "0.49923956", "0.49796474", "0.49681926", "0.4968126", "0.49681023" ]
0.59461695
4
same contract as findCoordElement()
private int findCoordElementRegular(double coordValue, boolean bounded) { int n = orgGridAxis.getNcoords(); if (n == 1 && bounded) return 0; double distance = coordValue - orgGridAxis.getCoordEdge1(0); double exactNumSteps = distance / orgGridAxis.getResolution(); // int index = (int) Math.round(exactNumSteps); // ties round to +Inf int index = (int) exactNumSteps; // truncate down if (bounded && index < 0) return 0; if (bounded && index >= n) return n - 1; // check that found point is within interval if (index >= 0 && index < n) { double lower = orgGridAxis.getCoordEdge1(index); double upper = orgGridAxis.getCoordEdge2(index); if (orgGridAxis.isAscending()) { assert lower <= coordValue : lower + " should be le " + coordValue; assert upper >= coordValue : upper + " should be ge " + coordValue; } else { assert lower >= coordValue : lower + " should be ge " + coordValue; assert upper <= coordValue : upper + " should be le " + coordValue; } } return index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Element getElement(Point2D point) throws PositionEX;", "Element getElement(Position pos);", "public int findCoordElement(double target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n case regularPoint:\n return findCoordElementRegular(target, bounded);\n case irregularPoint:\n case contiguousInterval:\n return findCoordElementContiguous(target, bounded);\n case discontiguousInterval:\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "private SearchNode findNodeWithCoords(HashSet<SearchNode> set, int x, int y){\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (cur.posX == x && cur.posY == y)\n\t\t\t\t\treturn cur;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "protodef.b_math.coord getCoordInfo();", "int getPosition(Object elementID) throws Exception;", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "long getCoordinates();", "long getCoordinates();", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "public abstract int[] getCoords();", "public Coordinate getPosition();", "public BoxContainer getElement(int x, int y){\n\t\t\tArrayList<Integer> coordinates = new ArrayList<Integer>();\n\t\t\tcoordinates.add(x);\n\t\t\tcoordinates.add(y);\n\t\t\tBoxContainer point = map.get(coordinates);\n\t\t\tif (point == null){\n\t\t\t\treturn BoxContainer.Unkown;\n\t\t\t} else {\n\t\t\t\treturn point;\n\t\t\t}\n\t\t}", "Elem getPointedElem();", "Coordinates getCoordinates(int rowIndex);", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "public static void getCoordinates(WebElement element) throws Exception {\n\t\tPoint classname = element.getLocation();\n\t\tint xcordi = classname.getX();\n\t\tSystem.out.println(element.getTagName() + \" Element's Position from left side\" + xcordi + \" pixels.\");\n\t\tint ycordi = classname.getY();\n\t\tSystem.out.println(element.getTagName() + \" Element's Position from top\" + ycordi + \" pixels.\");\n\t}", "public Point2D getCellCoordinates(JmtCell cell) {\r\n \t\tRectangle2D bounds = GraphConstants.getBounds(cell.getAttributes());\r\n \t\treturn new Point2D.Double(bounds.getMinX(), bounds.getMinY());\r\n \t}", "public abstract Element getElement(int id) throws PositionEX;", "public int getXY(int x, int y);", "public double[] getHitGeoCoord();", "private void intElementCoordinates() throws InvalidLevelCharacterException, NoGhostSpawnPointException, NoPacmanSpawnPointException, NoItemsException {\n\n\t\tint ps = 0;// player spawn point counter\n\t\tint gs = 0;// ghost spawn point counter\n\t\tint item = 0;// item counter\n\t\t\n\t\t\tfor (int i = 0; i < height; i++) {\n\t\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\t\t// j*MAPDENSITY as x coordinate, i*MAPDENSITY as y\n\t\t\t\t\t// coordinate\n\t\t\t\t\tfloat[] xy = { j * MAPDENSITY, i * MAPDENSITY };\n\t\t\t\t\t// add coordinates in to right category\n\t\t\t\t\tif (mapElementStringArray[i][j].equals(\"X\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new Wall(new Vector2f(xy), getWallType(\n\t\t\t\t\t\t\t\ti, j));\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\" \")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new Dot(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tdots.add((Dot)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"P\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new PlayerSpawnPoint(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tplayerSpawnPoints.add((PlayerSpawnPoint)mapElementArray[i][j]);\n\t\t\t\t\t\taPlayerSpawnPointRow=i;\n\t\t\t\t\t\taPlayerSpawnPointCol=j;\n\t\t\t\t\t\tps++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"G\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new GhostSpawnPoint(new Vector2f(xy),getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tghostSpawnPoints.add((GhostSpawnPoint)mapElementArray[i][j]);\n\t\t\t\t\t\tgs++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"B\"))\n\t\t\t\t\t\tmapElementArray[i][j] = new InvisibleWall(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\telse if (mapElementStringArray[i][j].equals(\"S\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new SpeedUp(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tspeedUps.add((SpeedUp)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"T\")){\n\t\t\t\t\t\tmapElementArray[i][j] = new Teleporter(new Vector2f(xy),getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tteleporters.add((Teleporter)mapElementArray[i][j]);\n\t\t\t\t\t}\n\t\t\t\t\telse if (mapElementStringArray[i][j].equals(\"U\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new PowerUp(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tpowerUps.add((PowerUp)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else\n\t\t\t\t\t\t// thrwo invalidLevelCharacterException\n\t\t\t\t\t\tthrow new InvalidLevelCharacterException(\n\t\t\t\t\t\t\t\tmapElementStringArray[i][j].charAt(0));\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check for PacmanSpawnPoint, GhostSpawnPoint and item exceptions\n\t\t\tif (gs == 0)\n\t\t\t\tthrow new NoGhostSpawnPointException();\n\t\t\tif (ps == 0)\n\t\t\t\tthrow new NoPacmanSpawnPointException();\n\t\t\tif (item == 0)\n\t\t\t\tthrow new NoItemsException();\n\t\t\n\t}", "public Point2D getNodePositionXY () { return n.getXYPositionMap(); }", "public Coords getCoord() {\r\n\t\treturn coord;\r\n\t}", "public abstract Point2D getPosition();", "void getPosRelPoint(double px, double py, double pz, DVector3 result);", "public void getCoordbyId(int id, Double X, Double Y) {\n CasellaGraphic casella = getCasellabyId(id);\n X = casella.getLayoutX();\n Y = casella.getLayoutY();\n }", "public Point2D getLocation();", "public double[] element() {\n\t\treturn _coordinates;\n\t}", "private boolean containsSameCoord(Point p) {\n boolean elementsContainsP = false;\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point pt = it.next();\n if (x(pt) == x(p) && y(pt) == y(p)) {\n elementsContainsP = true;\n break;\n }\n }\n return elementsContainsP;\n }", "int placeElement(String elementName, Point2D startCoordinates);", "Object getPosition();", "Cell getCellAt(Coord coord);", "@Override\r\n\tpublic void findElement() {\n\t\t\r\n\t}", "public int getX() { return loc.x; }", "public interface Locateable extends GeoElementND {\n\t/**\n\t * @param p\n\t * start point\n\t * @throws CircularDefinitionException\n\t * in case the start point depends on this object\n\t */\n\tpublic void setStartPoint(GeoPointND p) throws CircularDefinitionException;\n\n\t/**\n\t * Unregisters start point\n\t * \n\t * @param p\n\t * start point to remove\n\t */\n\tdefault void removeStartPoint(GeoPointND p) {\n\t\tif (p == getStartPoint()) {\n\t\t\tinitStartPoint(p.copy(), 0);\n\t\t}\n\t}\n\n\t/**\n\t * Returns (first) start point\n\t * \n\t * @return start point\n\t */\n\tpublic GeoPointND getStartPoint();\n\n\t/**\n\t * @param p\n\t * start point\n\t * @param number\n\t * index (GeoImage has three startPoints (i.e. corners))\n\t * @throws CircularDefinitionException\n\t * in case the start point depends on this object\n\t */\n\tpublic void setStartPoint(GeoPointND p, int number)\n\t\t\tthrows CircularDefinitionException;\n\n\tdefault int getStartPointCount() {\n\t\treturn 1;\n\t}\n\n\tdefault GeoElementND getStartPoint(int idx) {\n\t\treturn getStartPoint();\n\t}\n\n\t/**\n\t * Sets the startpoint without performing any checks. This is needed for\n\t * macros.\n\t * \n\t * @param p\n\t * start point\n\t * @param number\n\t * index\n\t */\n\tpublic void initStartPoint(GeoPointND p, int number);\n\n\t/**\n\t * @return true iff the location is absolute\n\t */\n\tpublic boolean hasStaticLocation();\n\n\t/**\n\t * @return true iff object is always fixed\n\t */\n\tpublic boolean isAlwaysFixed();\n\n\t/**\n\t * Use this method to tell the locateable that its startpoint will be set\n\t * soon. (This is needed during XML parsing, as startpoints are processed at\n\t * the end of a construction, @see geogebra.io.MyXMLHandler)\n\t */\n\tdefault void setWaitForStartPoint() {\n\t\t// only relevant for vectors\n\t}\n\n\t/**\n\t * Update that does not change value, but only location\n\t */\n\tpublic void updateLocation();\n\n}", "public Coordinate getCoordinate() {\n\t\treturn super.listCoordinates().get(0);\n\t}", "Optional<Point> getCoordinate(int id);", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "public int x (int index) { return coords[index][0]; }", "IntPoint getLocation();", "void locate(int pos, int [] ind)\n\t{\n\t\tind[0] = (int) pos / dimy; // x\n\t\tind[1] = pos % dimy; // y\t\n\t}", "public Widget findOne(Point p) {\n // we need to deal with scaled points because of zoom feature\n Point2D.Double scaledPos = new Point2D.Double();\n scaledPos.x = (double)p.x;\n scaledPos.y = (double)p.y;\n if (zoomFactor > 1) // transforms are only needed in zoom mode\n inv_at.transform(scaledPos, scaledPos);\n Point2D.Double mappedPos = u.fromWinPoint(scaledPos);\n// System.out.println(\"findOne: Z=\" + zoomFactor + \" p=[\" + p.x + \",\" + p.y + \"] \" \n// + \" s=[\" + scaledPos.getX() + \",\" + scaledPos.getY() + \"]\"\n// + \" m=[\" + mappedPos.getX() + \",\" + mappedPos.getY() + \"]\");\n Widget ret = null;\n for (Widget w : widgets) {\n if (w.contains(mappedPos)) {\n// System.out.println(\"found: \" + w.getKey() + \" p= \" + p + w.getBounded());\n ret = w;\n }\n }\n return ret;\n }", "public abstract Positionable findPositionForWindow(int y, int x);", "public Coordinate getLocation();", "protodef.b_math.coordOrBuilder getCoordInfoOrBuilder();", "public Pair<Integer,Integer> getJButtonCoord(JButton button){\n int row=0,col=0;\n Boolean foundButton = false;\n for(row =0 ; row < ROWS; row ++){\n for(col = 0; col < COLS; col++){\n if (buttonGrid[row][col] == button){\n foundButton = true;\n break;\n }\n }\n if (foundButton) break;\n }\n Pair<Integer,Integer> coord = new Pair<Integer,Integer> (row,col);\n return coord;\n }", "Tile getPosition();", "Point getPosition();", "Point getPosition();", "private void getCoordinates(Roi roi, ArrayList<Point> lstPt) {\n ImageProcessor mask = roi.getMask();\n Rectangle r = roi.getBounds();\n int pos_x = 0;\n int pos_y = 0;\n\n for(int y = 0; y < r.height; y++) {\n for(int x = 0; x < r.width; x++) {\n if(mask == null || mask.getPixel(x, y) != 0) {\n pos_x = r.x + x;\n pos_y = r.y + y;\n lstPt.add(new Point(pos_x, pos_y));\n }\n }\n }\n }", "public ArrayList<T> getElements(Point2D point);", "public int locationOf(E elem) {\r\n\t\tInteger tentativeLoc = this.locations.get(elem);\r\n\t\tif (tentativeLoc == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.locations.get(elem);\r\n\t}", "public interface Coordinates {\n\n /**\n * Gets coordinates on the element relative to the top-left corner of the monitor (screen). This\n * method automatically scrolls the page and/or frames to make element visible in viewport before\n * calculating its coordinates.\n *\n * @return coordinates on the element relative to the top-left corner of the monitor (screen).\n * @throws org.openqa.selenium.ElementNotInteractableException if the element can't be scrolled\n * into view.\n */\n Point onScreen();\n\n /**\n * Gets coordinates on the element relative to the top-left corner of OS-window being used to\n * display the content. Usually it is the browser window's viewport. This method automatically\n * scrolls the page and/or frames to make element visible in viewport before calculating its\n * coordinates.\n *\n * @return coordinates on the element relative to the top-left corner of the browser window's\n * viewport.\n * @throws org.openqa.selenium.ElementNotInteractableException if the element can't be scrolled\n * into view.\n */\n Point inViewPort();\n\n /**\n * Gets coordinates on the element relative to the top-left corner of the page.\n *\n * @return coordinates on the element relative to the top-left corner of the page.\n */\n Point onPage();\n\n Object getAuxiliary();\n}", "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "private Point getDraggingXY(int ox, int oy, int dx, int dy) {\n\t\tint x, y;\n\n\t\t// if the element has a rope holder or umlenkrolle on top of its head\n\t\t// the element is higher than normal -> extraHeight\n\t\tint extraHeight = 0;\n\t\tif (this instanceof EndElement) {\n\t\t\tEndElement endElement = (EndElement) this;\n\t\t\tif (endElement.getUmlenkrolle() != null)\n\t\t\t\textraHeight = endElement.getUmlenkrolle().getHeight();\n\t\t\tif (endElement.getSeilaufhaenger() != null)\n\t\t\t\textraHeight = endElement.getSeilaufhaenger().getHeight();\n\t\t}\n\n\t\t// if the old coordinate + difference is not outside the area border it\n\t\t// is okay\n\t\t// otherwise the coordinates are set at the border\n\t\tif (ox + dx >= 1 && ox + dx <= aufzugschacht.getWidth() - 1 - getWidth())\n\t\t\tx = ox + dx;\n\t\telse if (ox + dx < 1)\n\t\t\tx = 1;\n\t\telse\n\t\t\tx = aufzugschacht.getWidth() - 1 - getWidth();\n\n\t\tif (oy + dy - extraHeight >= 1 && oy + dy <= aufzugschacht.getHeight() - 1 - getHeight())\n\t\t\ty = oy + dy;\n\t\telse if (oy + dy - extraHeight < 1)\n\t\t\ty = 1 + extraHeight;\n\t\telse\n\t\t\ty = aufzugschacht.getHeight() - 1 - getHeight();\n\n\t\treturn new Point(x, y);\n\t}", "void locate(int pos, int[] ind) {\r\n\t\tind[0] = (int) pos / (dimx * dimy); // t\r\n\t\tind[1] = (pos % (dimx * dimy)) / dimy; // x\r\n\t\tind[2] = pos % (dimy); // y\r\n\t}", "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "public Integer[] getCoordenada() {\n return this.elementos.clone();\n }", "public Point getPosition();", "N getOrigin();", "public Point getCoordinates(int val) {\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() == val)\r\n\t\t\t\t\treturn new Point(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Point(-1,-1);\r\n\t}", "public boolean needCoordinates() { return needCoords; }", "private int getElement(int row, int col) {\n if (!this.isValid(row, col))\n throw new IndexOutOfBoundsException(\"row or col is out of side length!\");\n\n // in our system, index is calculated from 0 but row and col is calculated from 1\n return this.side * (row - 1) + col - 1;\n }", "public GridCoord getCoord() {\n return coord;\n }", "public Coordinates getCoordinates()\r\n {\r\n return new Coordinates(r.getX(), r.getY());\r\n }", "public Vector2D getPosition ();", "double getX() { return pos[0]; }", "boolean hasCoordInfo();", "public Object getObjectAtLocation(Point p);", "public int getXcoord(){\n\t\treturn this.coordinates[0];\n\t}", "public Location getElement(){\n\t\t\treturn element;\n\t\t}", "public RTWLocation element(RTWElementRef e);", "Collection<? extends Object> getHasXCoordinate();", "public GridCoord getCoord() {\n\t\treturn this.coord;\n\t}", "public Coordinates getCoordinates() {\n if (this.coordinates == null)\n return new Coordinates(-1, -1);\n return this.coordinates;\n }", "List<Coord> getDependents(int col, int row);", "@Override \n public Vector getLocation() {\n return this.getR();\n }", "public Point getLocation();", "godot.wire.Wire.Vector2 getPosition();", "Collection<Point> getAllCoordinates();", "public Vector getLocation();", "public int PositionGet();", "List<Coord> allActiveCells();", "boolean hasCoordinates();", "boolean hasCoordinates();", "boolean hasCoordinates();", "public Coordonnees getCoordonnees(int x, int y) {\r\n\t\tif(y >= 0 && y < hauteur && x >= 0 && x < largeur)\r\n\t\t\treturn this.plateau[y][x].getCoordonnees();\r\n\t\treturn null;\r\n\t}", "public float[] findXY(){\n //Initialize the xy coordinates and the array\n int x = -1;\n int y = -1;\n float[] location = new float[2];\n\n //Find the blank card\n for(int i = 0; i < cardArray.length; i++){\n for(int j = 0; j < cardArray.length; j++){\n if(cardArray[i][j].getCardNum() == 16){\n x = i;\n y = j;\n }\n }\n }\n\n /* For each of the following cases, find the neighbors of the\n blank card. Select only neighbors that are in the incorrect spot so that\n the computer player does not mess up the game. If both are in the correct spot\n choose one to move\n */\n //Case 1: it is in the top left corner, find a neighbor\n if((x == 0) && (y == 0)){\n if(cardArray[x+1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 2: it is in the top right corner, find a neighbor\n if((x == 0) && (y == cardArray.length - 1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 3: It is in the bottom left corner, find a neighbor\n if((x == cardArray.length - 1) && (y == 0)){\n if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 4: It is in the bottom right corner, find a neighbor\n if((x == cardArray.length - 1) && (y == cardArray.length - 1)){\n if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 5: It is in the top row, find a neighbor\n if((x == 0) && (y > 0) && ( y < cardArray.length - 1)){\n if(cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else if(cardArray[x][y - 1].getColor() == 255){\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n else{\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n }\n\n //Case 6: It is on the bottom row, find a neighbor\n if((x == cardArray.length - 1) && (y > 0) && (y < cardArray.length- 1)){\n if (cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else if (cardArray[x][y - 1].getColor() == 255){\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n else{\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n }\n\n //Case 7: It is on the left column, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y == 0)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 8: It is on the right column, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y == cardArray.length - 1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 9: It is not an edge or corner, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y > 0) && (y < cardArray.length -1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else if(cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Return the array containing the xy coordinates of the blank square's neighbor\n return location;\n }", "public Point3 getPoint(int pointNr);", "Square getCurrentPosition();", "public abstract Node getBoundingNode();", "godot.wire.Wire.Vector2 getOrigin();", "public Coordinate getCoordenadasActuales() ;", "synchronized protected int findPoint(final int x_p, final int y_p, final long layer_id, final double mag) {\n \t\tint index = -1;\n \t\tdouble d = (10.0D / mag);\n \t\tif (d < 2) d = 2;\n \t\tdouble min_dist = Double.MAX_VALUE;\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tdouble dist = Math.abs(x_p - p[0][i]) + Math.abs(y_p - p[1][i]);\n \t\t\tif (layer_id == p_layer[i] && dist <= d && dist <= min_dist) {\n \t\t\t\tmin_dist = dist;\n \t\t\t\tindex = i;\n \t\t\t}\n \t\t}\n \t\treturn index;\n \t}", "public Node findPiece(int xcoords, int ycoords) throws PieceNotFoundException{\n\t\tNode N = head;\n\t\tfor(int i = 1; i < numItems; i++){\n\t\t\tif (xcoords == N.x && ycoords == N.y){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tN = N.next;\n\t\t}\n return N;\n\n\t}", "Map<BoardCellCoordinates, Set<Integer>> getWinningCoordinates();", "Piece getPieceAt(int col, int row);", "public abstract boolean getCell(int x, int y);", "Pair<Integer, Integer> getPosition();" ]
[ "0.7037987", "0.654441", "0.65062165", "0.64128363", "0.64066243", "0.63694423", "0.6301204", "0.6288266", "0.6288266", "0.6167537", "0.6154407", "0.61177653", "0.6114047", "0.6066178", "0.6035795", "0.5981397", "0.59602416", "0.5943183", "0.5936478", "0.5935951", "0.59280473", "0.5911448", "0.5897458", "0.5892185", "0.58913195", "0.5890873", "0.58770347", "0.5861887", "0.5860028", "0.5855475", "0.5844505", "0.5843421", "0.5832295", "0.5819107", "0.5810465", "0.5797481", "0.5784859", "0.57807666", "0.57462585", "0.5721929", "0.571504", "0.5713903", "0.57076466", "0.57014275", "0.56992894", "0.56973374", "0.56909424", "0.5684282", "0.56797504", "0.56797504", "0.5679097", "0.567158", "0.5671143", "0.566646", "0.5661449", "0.5657131", "0.5648448", "0.56469584", "0.56315064", "0.5614234", "0.5614217", "0.5613339", "0.56103915", "0.56071335", "0.55992484", "0.55917436", "0.5588928", "0.5584077", "0.55780137", "0.5577539", "0.55774134", "0.5575879", "0.5571748", "0.55715764", "0.5568941", "0.5548561", "0.5543825", "0.5532117", "0.552774", "0.5524705", "0.5509801", "0.55032164", "0.55031484", "0.5502938", "0.55008614", "0.55008614", "0.55008614", "0.54945546", "0.54821634", "0.5479525", "0.5478997", "0.54739434", "0.5468182", "0.5466492", "0.54648393", "0.5459665", "0.54554826", "0.54536796", "0.5445657", "0.5445465" ]
0.65490866
1
Binary search to find the index whose value is contained in the contiguous intervals. irregularPoint, // irregular spaced points (values, npts), edges halfway between coords contiguousInterval, // irregular contiguous spaced intervals (values, npts), values are the edges, and there are npts+1, coord halfway between edges same contract as findCoordElement()
private int findCoordElementContiguous(double target, boolean bounded) { int n = orgGridAxis.getNcoords(); // Check that the point is within range MinMax minmax = orgGridAxis.getCoordEdgeMinMax(); if (target < minmax.min()) { return bounded ? 0 : -1; } else if (target > minmax.max()) { return bounded ? n - 1 : n; } int low = 0; int high = n - 1; if (orgGridAxis.isAscending()) { // do a binary search to find the nearest index int mid; while (high > low + 1) { mid = (low + high) / 2; // binary search if (intervalContains(target, mid, true, false)) return mid; else if (orgGridAxis.getCoordEdge2(mid) < target) low = mid; else high = mid; } return intervalContains(target, low, true, false) ? low : high; } else { // descending // do a binary search to find the nearest index int mid; while (high > low + 1) { mid = (low + high) / 2; // binary search if (intervalContains(target, mid, false, false)) return mid; else if (orgGridAxis.getCoordEdge2(mid) < target) high = mid; else low = mid; } return intervalContains(target, low, false, false) ? low : high; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "boolean isInInterval(int baseIndex);", "private boolean intervalContains(double target, int coordIdx, boolean ascending, boolean closed) {\n // Target must be in the closed bounds defined by the discontiguous interval at index coordIdx.\n double lowerVal = ascending ? orgGridAxis.getCoordEdge1(coordIdx) : orgGridAxis.getCoordEdge2(coordIdx);\n double upperVal = ascending ? orgGridAxis.getCoordEdge2(coordIdx) : orgGridAxis.getCoordEdge1(coordIdx);\n\n if (closed) {\n return lowerVal <= target && target <= upperVal;\n } else {\n return lowerVal <= target && target < upperVal;\n }\n }", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "private static final boolean isArrayValueAtIndexInsideOrInsideAdjacent(DataSet aDataSet, int i, int pointCount, double aMin, double aMax)\n {\n // If val at index in range, return true\n double val = aDataSet.getX(i);\n if (val >= aMin && val <= aMax)\n return true;\n\n // If val at next index in range, return true\n if (i+1 < pointCount)\n {\n double nextVal = aDataSet.getX(i + 1);\n if (val < aMin && nextVal >= aMin || val > aMax && nextVal <= aMax)\n return true;\n }\n\n // If val at previous index in range, return true\n if (i > 0)\n {\n double prevVal = aDataSet.getX(i - 1);\n if ( val < aMin && prevVal >= aMin || val > aMax && prevVal <= aMax)\n return true;\n }\n\n // Return false since nothing in range\n return false;\n }", "public static boolean binarySearch(int[] input, int element,int lower, int upper)\n {\n int midPoint = (upper-lower)/2 + lower;\n int midval = input[midPoint];\n if(input[midPoint] == element)\n return true;\n if(upper==lower)\n return false;\n if((lower) > input.length)\n return false;\n else if(element > input[midPoint] )\n {\n return binarySearch(input, element, midPoint, upper);\n }\n else\n {\n return binarySearch(input, element, lower, midPoint);\n }\n }", "public static double inInterval(double lowerBound, double value, double upperBound) {\n/* 67 */ if (value < lowerBound)\n/* 68 */ return lowerBound; \n/* 69 */ if (upperBound < value)\n/* 70 */ return upperBound; \n/* 71 */ return value;\n/* */ }", "private boolean intervalContains(double target, int coordIdx) {\n double midVal1 = orgGridAxis.getCoordEdge1(coordIdx);\n double midVal2 = orgGridAxis.getCoordEdge2(coordIdx);\n boolean ascending = midVal1 < midVal2;\n return intervalContains(target, coordIdx, ascending, true);\n }", "private void intervalsRootScan(SearchContext ctx, Intervals result) {\n\t\tfinal int dimension = numDim;\n\t\tfinal int[] mins = ctx.qmins;\n\t\tfinal int[] maxs = ctx.qmaxs;\n\t\tfinal SearchNode curNode = ctx.current();\n\t\tfinal int contained = curNode.contained;\n\t\tfinal int rootStart = curNode.rootStart;\n\t\tfinal int rootEnd = rootStart + curNode.width;\n\t\tfinal int notContained = dimension - Integer.bitCount(contained);;\n\t\tint intervalStart = -1;\n\t\tif (notContained == 1) {\n\t\t\t// sequential-scan on final dimension\n\t\t\tfinal int last1d = Integer.numberOfLeadingZeros(~contained);\n\t\t\tfinal int[] basearray = zoPoints[last1d];\n\t\t\tfinal int min = mins[last1d];\n\t\t\tfinal int max = maxs[last1d];\n\t\t\tfor (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tint val = basearray[j];\n\t\t\t\tif (val >= min && val <= max) {\n\t\t\t\t\tif (intervalStart < 0) {\n\t\t\t\t\t\tintervalStart = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (intervalStart >= 0) {\n\t\t\t\t\t\tresult.addRoot(intervalStart, j);\n\t\t\t\t\t\tintervalStart = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// sequential-scan on not contained dimensions\n\t\t\tfinal int[] dims = ctx.work1;\n\t\t\tfor (int ptr = 0, d = 0; d < dimension; d++) {\n\t\t\t\tif (contained << d < 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdims[ptr++] = d;\n\t\t\t}\n\t\t\tJLOOP: for (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tfor (int ptr = 0; ptr < notContained; ptr++) {\n\t\t\t\t\tfinal int d = dims[ptr];\n\t\t\t\t\tfinal int val = zoPoints[d][j];\n\t\t\t\t\tif (val < mins[d] || val > maxs[d]) {\n\t\t\t\t\t\tif (intervalStart >= 0) {\n\t\t\t\t\t\t\tresult.addRoot(intervalStart, j);\n\t\t\t\t\t\t\tintervalStart = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue JLOOP;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (intervalStart < 0) {\n\t\t\t\t\tintervalStart = j;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (intervalStart >= 0) {\n\t\t\tresult.addRoot(intervalStart, rootEnd);\n\t\t}\n\t}", "public interface Interval extends Comparable<Interval> {\n\n /**\n * Returns the start coordinate of this interval.\n * \n * @return the start coordinate of this interval\n */\n int getStart();\n\n /**\n * Returns the end coordinate of this interval.\n * <p>\n * An interval is closed-open. It does not include the returned point.\n * \n * @return the end coordinate of this interval\n */\n int getEnd();\n\n default int length() {\n return getEnd() - getStart();\n }\n\n /**\n * Returns whether this interval is adjacent to another.\n * <p>\n * Two intervals are adjacent if either one ends where the other starts.\n * \n * @param interval - the interval to compare this one to\n * @return <code>true</code> if the intervals are adjacent; otherwise\n * <code>false</code>\n */\n default boolean isAdjacent(Interval other) {\n return getStart() == other.getEnd() || getEnd() == other.getStart();\n }\n \n /**\n * Returns whether this interval overlaps another.\n * \n * This method assumes that intervals are contiguous, i.e., there are no\n * breaks or gaps in them.\n * \n * @param o - the interval to compare this one to\n * @return <code>true</code> if the intervals overlap; otherwise\n * <code>false</code>\n */\n default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }\n \n /**\n * Compares this interval with another.\n * <p>\n * Ordering of intervals is done first by start coordinate, then by end\n * coordinate.\n * \n * @param o - the interval to compare this one to\n * @return -1 if this interval is less than the other; 1 if greater\n * than; 0 if equal\n */\n default int compareTo(Interval o) {\n if (getStart() > o.getStart()) {\n return 1;\n } else if (getStart() < o.getStart()) {\n return -1;\n } else if (getEnd() > o.getEnd()) {\n return 1;\n } else if (getEnd() < o.getEnd()) {\n return -1;\n } else {\n return 0;\n }\n }\n}", "private static int binarySearch0(double[] a, int fromIndex, int toIndex,\n\t\t\tdouble key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\t\t\tdouble midVal = a[mid];\n\n\t\t\t\tint cmp;\n\t\t\t\tif (midVal < key) {\n\t\t\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t\t\t} else if (midVal > key) {\n\t\t\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t\t\t} else {\n\t\t\t\t\tlong midBits = Double.doubleToLongBits(midVal);\n\t\t\t\t\tlong keyBits = Double.doubleToLongBits(key);\n\t\t\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t\t\t}\n\n\t\t\t\tif (cmp < 0)\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\telse if (cmp > 0)\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\telse\n\t\t\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "@Test\n public void testBoundsAsCompositesWithOneInRestrictionsAndOneClusteringColumn()\n {\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n Restriction in = newSingleIN(cfMetaData, 0, value1, value2, value3);\n\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(in);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(3, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.START);\n assertComposite(bounds.get(1), value2, EOC.START);\n assertComposite(bounds.get(2), value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(3, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n assertComposite(bounds.get(1), value2, EOC.END);\n assertComposite(bounds.get(2), value3, EOC.END);\n }", "public static int binarySearchInBetween(double[] dArray, double value, int low, int high)\n\t{\n\t\tif (high < low)\n\t\t\treturn -1;\n\t\tint mid = low + ((high - low) / 2);\n\t\tif (dArray[mid] > value)\n\t\t{\n\t\t\tif (mid != 0 && dArray[mid - 1] < value)\n\t\t\t{\n\t\t\t\treturn (mid - 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn binarySearchInBetween(dArray, value, low, mid - 1);\n\t\t\t}\n\t\t}\n\t\telse if (dArray[mid] < value)\n\t\t{\n\t\t\tif (mid != dArray.length - 1 && dArray[mid + 1] > value)\n\t\t\t{\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn binarySearchInBetween(dArray, value, mid + 1, high);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// the value is equal to the value of dArray[mid]\n\t\t\treturn mid;\n\t\t}\n\t}", "static Integer BinarySearchRec(Integer[] tablica, int value, int low, int high) {\n if (high < low) {\n return -1;\n }\n\n int mid = (low + high) / 2;\n\n if (tablica[mid] > value) {\n return BinarySearchRec(tablica, value, low, mid - 1);\n } else if (tablica[mid] < value) {\n return BinarySearchRec(tablica, value, mid + 1, high);\n } else {\n return mid;\n }\n }", "private static boolean checkAndMapPointToExistingRegion(int row, int col, HashMap<Integer, ArrayList<String>> boundedRegions) {\n\t\t\n\t\tboolean found = false;\n \n\t\t// Iterate over the existing bounded regions and check if current point falls under adjacent point of any region\n for(Integer key : boundedRegions.keySet()) {\n ArrayList<String> boundedPointsPerRegionList = boundedRegions.get(key);\n \n if(boundedPointsPerRegionList != null) {\n \tlogDebug(\"checkAndMapPointToExistingRegion() | Is list contains -> \"+row + \":\" + col+\", \"+(row-1) + \":\" + col+\" OR \"+row + \":\" + (col-1));\n \t\n \t// If adjacent point, add into the list of same region otherwise create new region later. \t\n if(boundedPointsPerRegionList.contains(row + \":\" + (col-1)) || boundedPointsPerRegionList.contains((row-1) + \":\" + col)) {\n boundedPointsPerRegionList.add(row + \":\" + col);\n boundedRegions.put(key, boundedPointsPerRegionList);\n found = true;\n }\n } \n }\n \n return found;\n\t}", "public static int binarySearch(int[] array, int value, int start, int end){\n if(start <= end){\n int mid = (start+end)/2;\n if (array[mid] == value) return mid;\n else if(array[mid] < value) start = mid+1;\n else end = mid-1;\n return binarySearch(array, value, start, end);\n }\n return -1;\n }", "private int findClosestDiscontiguousInterval(double target) {\n boolean isTemporal = orgGridAxis.getAxisType().equals(AxisType.Time);\n return isTemporal ? findClosestDiscontiguousTimeInterval(target) : findClosestDiscontiguousNonTimeInterval(target);\n }", "public static int interpolationSearch(int[] nums, int val){\n\n int lo = 0, mid = 0, hi = nums.length - 1;\n int range = nums[hi] - nums[lo];\n int normmailized = (hi - lo);\n while(nums[lo] <= val && nums[hi] >= val){\n mid = lo + ((val - nums[lo]) * normmailized)/ range; // normalization\n if(nums[mid] < val){\n lo = mid + 1;\n } else if(nums[mid] > val){\n hi = mid - 1;\n } else return mid;\n }\n if(nums[lo] == val) return lo;\n return -1;\n }", "int binarySearch(int arr[], int x)\n {\n int l = 0, r = arr.length - 1;\n while (l <= r) {\n int m = l + (r - l) / 2;\n\n // Check if x is present at mid\n if (arr[m] == x)\n return m;\n\n // If x greater, ignore left half\n if (arr[m] < x)\n l = m + 1;\n\n // If x is smaller, ignore right half\n else\n r = m - 1;\n }\n\n // if we reach here, then element was\n // not present\n return -1;\n }", "int binarySearch(int[] arr, int low, int high, int key){\n while(low <= high){\n int mid = (low + high) / 2;\n if (key < arr[mid])\n high = mid - 1;\n else if (key > arr[mid])\n low = mid + 1;\n else\n return mid;\n }\n return -1;\n }", "private static boolean checkHalfway(int[] arr, int searchValue, int begin, int end) {\r\n\t\treturn searchValue < arr[(begin+end+1)/2];\r\n\t}", "public static int binarySearchIter(int[] arr, int from, int to, int key) {\n\t\t\n\t\tint shouldBeIndex;\n\t\twhile (from<=to){\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) from=mid+1;//upper\n\t\t\telse if (arr[mid]>key) to=mid-1;//lower\n\t\t\telse return mid;//found\n\t\t}\n\t\t//not found\n\t\tshouldBeIndex=from;\n\t\treturn -shouldBeIndex-1;\n\t}", "private static int binarySearch0(float[] a, int fromIndex, int toIndex,\n\t\t\tfloat key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\tfloat midVal = a[mid];\n\n\t\tint cmp;\n\t\tif (midVal < key) {\n\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t} else if (midVal > key) {\n\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t} else {\n\t\t\tint midBits = Float.floatToIntBits(midVal);\n\t\t\tint keyBits = Float.floatToIntBits(key);\n\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t}\n\n\t\tif (cmp < 0)\n\t\t\tlow = mid + 1;\n\t\telse if (cmp > 0)\n\t\t\thigh = mid - 1;\n\t\telse\n\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "public void findBoundaryGivenPhi() {\n \r\n boundary.removeAllElements();\r\n \r\n \tfor(int i=0; i<pixelsWide-1; i++)\r\n \t\tfor(int j=0; j<pixelsHigh-1; j++) {\r\n Int2d pi = new Int2d(i,j);\r\n \r\n double sgnIJ = Math.signum( phi[i][j] );\r\n if( sgnIJ != Math.signum( phi[i+1][j] ) ) {\r\n if(!boundary.contains(pi)) boundary.add(pi);\r\n Int2d p2 = new Int2d(i+1,j);\r\n if(!boundary.contains(p2)) boundary.add(p2);\r\n }\r\n if( sgnIJ != Math.signum( phi[i][j+1] ) ) {\r\n if(!boundary.contains(pi)) boundary.add(pi);\r\n Int2d p2 = new Int2d(i,j+1);\r\n if(!boundary.contains(p2)) boundary.add(p2); \r\n }\r\n \r\n }\r\n \r\n \r\n }", "private int recFind(int searchKey, int lowerbound, int upperbound) {\n\t\tint curIn = (lowerbound + upperbound) / 2;\n\t\tif (arr[curIn] == searchKey)\n\t\t\treturn curIn;\n\t\telse if (lowerbound > upperbound)\n\t\t\treturn n;\n\t\telse {\n\t\t\tif (arr[curIn] < searchKey)\n\t\t\t\treturn recFind(searchKey, curIn + 1, upperbound);\n\t\t\telse\n\t\t\t\treturn recFind(searchKey, lowerbound, curIn - 1);\n\t\t}\n\t}", "static int binarySearch(int[] array, int start, int end, int value) {\r\n\t\tif(end>=start) {\r\n\t\t\tint mid = (start+end)/2;\r\n\t\t\tif(array[mid]==value)\r\n\t\t\t\treturn mid;\r\n if(array[mid]>value)\r\n \treturn binarySearch(array, start, mid-1, value);\r\n return binarySearch(array, mid+1, end, value);\r\n\t\t}\r\n return -1;\r\n\t}", "public int findCoordElement(double target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n case regularPoint:\n return findCoordElementRegular(target, bounded);\n case irregularPoint:\n case contiguousInterval:\n return findCoordElementContiguous(target, bounded);\n case discontiguousInterval:\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "public int binarySearch(ArrayList<Integer> a, int val){\n int low = 0;\n int high = a.size() - 1;\n \n while(high - low > 3){\n int mid = (low + high)/2;\n if(a.get(mid) > val){\n high = mid - 1;\n }\n else{\n low = mid; \n }\n }\n int i;\n for(i=low; i<=high; ++i){\n if(a.get(i) > val)\n return i;\n }\n return i;\n }", "static public int FindSpan(double u, int deg, double[] knots) {\n\t\tint low, high, mid;\n\n\t\tint n = knots.length - deg - 2;\n\t\t// special case\n\t\tif (u >= knots[n + 1])\n\t\t\treturn n;\n\t\tif (u <= knots[deg])\n\t\t\treturn deg;\n\n\t\t// do binary search\n\t\tlow = deg;\n\t\thigh = n + 1;\n\t\tmid = (low + high) / 2;\n\t\twhile (u < knots[mid] || u >= knots[mid + 1]) {\n\t\t\tif (u < knots[mid])\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid;\n\t\t\tmid = (low + high) / 2;\n\t\t}\n\t\treturn (mid);\n\t}", "private int betweenPoints(int value,Individual ind) {\n\t\tfor(int i=_point1; i<_point2;i++) {\n\t\t\tif(value==ind.getGene(i)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n else if (cmp < 0) {\n start = mid + 1;\n }\n else {\n end = mid;\n }\n }\n return start;\n }", "public abstract HalfOpenIntRange approximateSpan();", "static int search(int[] in, int j, int start, int end) {\n\t\tint k=start;\n\t\twhile(k<end) {\n\t\t\tif(in[k]== j) {\n\t\t\t\treturn k;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t\treturn 0;\n\t}", "public static int binarySearch(int[] A, int x) {\n int low = 0;\n int high = A.length - 1;\n int mid = -1;\n while (low <= high) {\n mid = low + (high-low)/2;\n if (x >= A[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n if (mid >= 0 && x == A[mid]) {\n return mid;\n }\n return -1;\n }", "public int getIndexForXVal(double xVal) {\n\t\tint upper = pointList.size()-1;\n\t\tint lower = 0;\n\t\t\n\t\tif (pointList.size()==0)\n\t\t\treturn 0;\n\t\t\n\t\t//TODO Are we sure an binarySearch(pointList, xVal) wouldn't be a better choice here?\n\t\t//it can gracefully handle cases where the key isn't in the list of values...\n\t\tdouble stepWidth = (pointList.get(pointList.size()-1).getX()-pointList.get(0).getX())/(double)pointList.size();\n\t\t\n\t\tint index = (int)Math.floor( (xVal-pointList.get(0).getX())/stepWidth );\n\t\t//System.out.println(\"Start index: \" + index);\n\t\t\n\t\t//Check to see if we got it right\n\t\tif (index>=0 && (index<pointList.size()-1) && pointList.get(index).getX() < xVal && pointList.get(index+1).getX()>xVal) {\n\t\t\t//System.out.println(\"Got it right on the first check, returning index : \" + index);\n\t\t\treturn index;\n\t\t}\n\t\t\t\t\n\t\t//Make sure the starting index is sane (between upper and lower)\n\t\tif (index<0 || index>=pointList.size() )\n\t\t\tindex = (upper+lower)/2; \n\t\t\n\t\tif (xVal < pointList.get(0).getX()) {\n\t\t\treturn 0;\n\t\t}\n\t\t\t\n\t\tif(xVal > pointList.get(pointList.size()-1).getX()) {\n\t\t\treturn pointList.size()-1;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\twhile( upper-lower > 1) {\n\t\t\tif (xVal < pointList.get(index).getX()) {\n\t\t\t\tupper = index;\n\t\t\t}\n\t\t\telse\n\t\t\t\tlower = index;\n\t\t\tindex = (upper+lower)/2;\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\treturn index;\n\t}", "abstract int binSearch(int[] array, int num, int left, int right);", "IntervalTupleList evaluate(double low, double high);", "public static Interval intersection(Interval in1, Interval in2){\r\n double a = in1.getFirstExtreme();\r\n double b = in1.getSecondExtreme();\r\n double c = in2.getFirstExtreme();\r\n double d = in2.getSecondExtreme();\r\n char p1 = in1.getFEincluded();\r\n char p2 = in1.getSEincluded();\r\n char p3 = in2.getFEincluded();\r\n char p4 = in2.getSEincluded();\r\n \r\n if (a==c && b==d){\r\n if (a==b){\r\n if (p1=='[' && p3=='[' && p2==']' && p4==']'){\r\n return new Interval(in1);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else{\r\n return new Interval(a,b,p1==p3?p1:'(',p2==p4?p2:')');\r\n }\r\n }else if (a<c && b<=c){\r\n if (b==c && p2==']' && p3=='['){\r\n return new Interval(b,b,p3,p2);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else if (a<=c && b<d){\r\n if (a==c){\r\n return new Interval(a,b,p1==p3?p1:'(',p2);\r\n }else{\r\n return new Interval(c,b,p3,p2);\r\n }\r\n }else if(a<c && b==d){\r\n return new Interval(c,b,p3,p2==p4?p2:')');\r\n }else if(a<=c && b>d){\r\n if (a==c){\r\n return new Interval(a,d,p1==p3?p1:'(',p4);\r\n }else{\r\n return new Interval(in2);\r\n }\r\n }else if (a>c && b<=d){\r\n if (b==d){\r\n return new Interval(a,b,p1,p2==p4?p2:')');\r\n }else{\r\n return new Interval(in1);\r\n }\r\n }else if (a<=d && b>d){\r\n if (a==d){\r\n if (p1=='[' && p4==']'){\r\n return new Interval(a,a,p1,p4);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else{\r\n return new Interval(a,d,p1,p4);\r\n }\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }", "static int findPos(int []arr, int key)\n\t{\n\t\tint low=0, high =1;\n\t\tint val =arr[0];\n\t\t\n\t\twhile(val<key)\n\t\t{\n\t\t\tlow= high; //// store previous high check that 2*h doesn't exceeds array length to prevent ArrayOutOfBoundException\n\t\t\tif (2*high < arr.length -1)\n\t\t\t\thigh =2*high;\n\t\t\telse\n\t\t\t\thigh =arr.length -1;\n\t\t\t\n\t\t\tval = arr[high];\n\t\t}\n\t\treturn binarySearch(arr,low,high,key);\n\t}", "public int get(int i) {\n\t\tint n = intervals.size();\n\t\tint index = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tInterval I = intervals.get(j);\n\t\t\tint a = I.a;\n\t\t\tint b = I.b;\n\t\t\tfor (int v = a; v <= b; v++) {\n\t\t\t\tif (index == i) {\n\t\t\t\t\treturn v;\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int binarySearchRec(int[] arr, int from, int to, int key) {\n\t\t\n\t\tif (from<=to) {\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) \t\treturn binarySearchRec(arr, ++mid, to, key);//upper\t\n\t\t\telse if (arr[mid]>key) \treturn binarySearchRec(arr, from, --mid, key); //lower\n\t\t\telse \t\t\t\t\treturn mid;//found\n\t\t}\n\t\telse {//not found\n\t\t\tint shouldBeIndex=from;\n\t\t\treturn -shouldBeIndex-1;\n\t\t}\n\t}", "private int binarySearch(List<Span> spans, int line) {\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).getLine();\n if(row == line) {\n return mid;\n }else if(row < line){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n return Math.max(0,Math.min(left,max));\n }", "public int binarySearchRotated(int [] nums) {\n\t\tint n = nums.length;\n\t\tint low = 0;\n\t\tint high = n -1;\n\t\twhile(low <= high) {\n\t\t\tif(nums[low] <= nums[high]) return low;\n\t\t\tint mid = (low + high) >> 1;\n\t\t\tint next = (mid + 1) % n;\n\t\t\tint prev = (mid - 1) % n;\n\t\t\tif(nums[mid] <= nums[next] && nums[mid] <= nums[prev]) return mid;\n\t\t\telse if(nums[mid] <= nums[high]) high = mid-1;\n\t\t\telse if(nums[mid] >= nums[low]) low = mid+1;\n\t\t}\n\t\t\n\t\treturn -1;\n\t\t\n\t}", "static void binarySearch(int mat[][], int i, int j_low, int j_high, int x){\n\t\t\n\t\twhile(j_low < j_high){\n\t\t\t\n\t\t}\n\t}", "public XnRegion keysOf(int start, int stop) {\n\t\tint offset = start;\n\t\tint left = -1;\n\t\tStepper stepper = myRegion.simpleRegions(myOrdering);\n\t\ttry {\n\t\t\tXnRegion region;\n\t\t\twhile ((region = (XnRegion) stepper.fetch()) != null) {\n\t\t\t\tif (region.count().isLE(IntegerValue.make(offset))) {\n\t\t\t\t\toffset = offset - region.count().asInt32();\n\t\t\t\t} else {\n\t\t\t\t\tif (left == -1) {\n\t\t\t\t\t\tleft = ((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().asInt32() + offset;\n\t\t\t\t\t\toffset = stop - (start - offset);\n\t\t\t\t\t\tif (offset <= region.count().asInt32()) {\n\t\t\t\t\t\t\treturn IntegerRegion.make(\n\t\t\t\t\t\t\t\tIntegerValue.make(left),\n\t\t\t\t\t\t\t\t(((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().plus(IntegerValue.make(offset))));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint right = ((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().asInt32() + offset;\n\t\t\t\t\t\treturn IntegerRegion.make(IntegerValue.make(left), IntegerValue.make(right));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstepper.step();\n\t\t\t}\n\t\t} finally {\n\t\t\tstepper.destroy();\n\t\t}\n\t\tthrow new AboraRuntimeException(AboraRuntimeException.NOT_IN_TABLE);\n\t\t/*\n\t\tudanax-top.st:12729:IntegerArrangement methodsFor: 'accessing'!\n\t\t{XnRegion} keysOf: start {Int32} with: stop {Int32}\n\t\t\t\"Return the region that corresponds to a range of indices.\"\n\t\t\t| offset {Int32} left {Int32} right {Int32} | \n\t\t\toffset _ start.\n\t\t\tleft _ -1.\n\t\t\t(myRegion simpleRegions: myOrdering) forEach: \n\t\t\t\t[:region {XnRegion} |\n\t\t\t\tregion count <= offset \n\t\t\t\t\tifTrue: [offset _ offset - region count DOTasLong]\n\t\t\t\t\tifFalse:\n\t\t\t\t\t\t[left == -1 \n\t\t\t\t\t\t\tifTrue: \n\t\t\t\t\t\t\t\t[left _ ((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar DOTasLong + offset.\n\t\t\t\t\t\t\t\toffset _ stop - (start - offset).\n\t\t\t\t\t\t\t\toffset <= region count DOTasLong ifTrue: \n\t\t\t\t\t\t\t\t\t[^IntegerRegion make: left \n\t\t\t\t\t\t\t\t\t\t\twith: (((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar + offset)]]\n\t\t\t\t\t\t\tifFalse:\n\t\t\t\t\t\t\t\t[right _ ((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar DOTasLong + offset.\n\t\t\t\t\t\t\t\t^IntegerRegion make: left with: right]]].\n\t\t\tHeaper BLAST: #NotInTable.\n\t\t\t^ NULL \"compiler fodder\"!\n\t\t*/\n\t}", "private static int binarySearch0_BranchFreeUnrolledStatic16(int[] a, int key) {\n\t\tint low = 8;\n\t\tint midVal;\n\t\tint highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 4;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 8 & highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 2;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 4 & highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 1;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 2 & highMask;\n\n\t\tmidVal = a[low];\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 1 & highMask;\n\n\t\treturn a[low] == key ? low : -(low + 1);\n\n\t}", "static int binarySearch(int[] paramArrayOfint, int paramInt1, int paramInt2) {\n }", "private int findXInCircularSortedArray(int[] array, int x, int size){\n\t\tint start = 0;\n\t\tint end = size-1;\n\t\twhile(start <= end){\n\t\t\tint mid = (start + end)/2;\n\t\t\tif(array[mid] == x){\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif(array[mid] <= array[end]){\n\t\t\t\tif(x > array[mid] && x<= array[end])\n\t\t\t\t\tstart = mid+1;\n\t\t\t\telse\n\t\t\t\t\tend = mid -1;\n\t\t\t}else if (array[mid] >= array[start]){\n\t\t\t\tif(x >= array[start] && x < array[mid]){\n\t\t\t\t\tend = mid-1;\n\t\t\t\t}else\n\t\t\t\t\tstart = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private int[] getBoundaryPositions(ByteBuffer b, byte[] boundary) {\n\t\t\tint[] res = new int[0];\n\t\t\tif (b.remaining() < boundary.length) {\n\t\t\t\treturn res;\n\t\t\t}\n\n\t\t\tint search_window_pos = 0;\n\t\t\tbyte[] search_window = new byte[4 * 1024 + boundary.length];\n\n\t\t\tint first_fill = (b.remaining() < search_window.length) ? b.remaining()\n\t\t\t\t\t: search_window.length;\n\t\t\tb.get(search_window, 0, first_fill);\n\t\t\tint new_bytes = first_fill - boundary.length;\n\n\t\t\tdo {\n\t\t\t\t// Search the search_window\n\t\t\t\tfor (int j = 0; j < new_bytes; j++) {\n\t\t\t\t\tfor (int i = 0; i < boundary.length; i++) {\n\t\t\t\t\t\tif (search_window[j + i] != boundary[i])\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tif (i == boundary.length - 1) {\n\t\t\t\t\t\t\t// Match found, add it to results\n\t\t\t\t\t\t\tint[] new_res = new int[res.length + 1];\n\t\t\t\t\t\t\tSystem.arraycopy(res, 0, new_res, 0, res.length);\n\t\t\t\t\t\t\tnew_res[res.length] = search_window_pos + j;\n\t\t\t\t\t\t\tres = new_res;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsearch_window_pos += new_bytes;\n\n\t\t\t\t// Copy the end of the buffer to the start\n\t\t\t\tSystem.arraycopy(search_window, search_window.length - boundary.length,\n\t\t\t\t\t\tsearch_window, 0, boundary.length);\n\n\t\t\t\t// Refill search_window\n\t\t\t\tnew_bytes = search_window.length - boundary.length;\n\t\t\t\tnew_bytes = (b.remaining() < new_bytes) ? b.remaining() : new_bytes;\n\t\t\t\tb.get(search_window, boundary.length, new_bytes);\n\t\t\t} while (new_bytes > 0);\n\t\t\treturn res;\n\t\t}", "public static boolean binarySearch(int[] arr, int value) {\n int l =0;\n int r = arr.length-1;\n \n // while there's still a section to examine\n while(l <= r) { \n // calculate the middle index (note that it's floored bc integer division)\n int m = (l+r)/2;\n \n if(value > arr[m]) {\n l = m+1; \n // move l up past m, because value > arr[m]\n } else if (value < arr[m]) {\n r = m-1;\n } else {\n return true;\n }\n }\n \n return false;\n }", "public boolean cond(int i, double curLat, double curLon, double foundLat, double foundLon){\r\n boolean condResult = true;\r\n switch (i){\r\n case 0:\r\n condResult = curLon < foundLon;\r\n break;\r\n case 1:\r\n condResult = curLon > foundLon;\r\n break;\r\n case 2:\r\n condResult = curLat > foundLat;\r\n break;\r\n case 3:\r\n condResult = curLat < foundLat;\r\n break;\r\n case 4:\r\n condResult = false;\r\n break;\r\n }\r\n return condResult;\r\n }", "public static int binarySearch(int[] elements, int start, int end, int findMe) {\n if (start > end) {\n return -1;\n }\n Integer mid = (start + end) / 2;\n Integer midElement = elements[mid];\n //is mid the element we are looking?\n if (findMe == midElement) {\n return mid;\n }\n if (findMe < midElement) {\n //its in left half\n return binarySearch(elements, start, mid - 1, findMe);\n } else {\n //in right half of array\n return binarySearch(elements, mid + 1, end, findMe);\n }\n }", "public Integer binSearch(Integer target, Integer[] data, Integer left, Integer right) {\n if (right - left == 1) {\n if (data[left] == target) return left;\n if (data[right] == target) return right;\n }\n if (right - left == 0) {\n if (data[left] == target) return left;\n }\n Integer midpt = (right + left) / 2 ;\n if (target == data[midpt]) return midpt ;\n if (target > data[midpt] ) return binSearch(target, data, midpt, right) ;\n if (target < data[midpt] ) return binSearch(target, data, left, midpt) ;\n\n return -1;\n }", "public static int binSearch(int[] a, int first, int last, int key)\n\t{\t\n\t\tif(first <= last)\n\t\t{\n\t\t\tint mid = (first + last) / 2; //Divides the beginning of the array and the length of the array into 2\n\t\t\t\n\t\t\tif (a[mid] == key)\n\t\t\t{\n\t\t\t\treturn mid; \n\t\t\t}\n\t\t\t\n\t\t\telse if (a[mid] > key) //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS GREATER THAN THE KEY\n\t\t\t{\n\t\t\t\treturn last = mid - 1; //RETURNS THE LENGTH OF THE ARRAY WHICH IS THE DECREMENTED MID\n\t\t\t}\n\t\t\t\n\t\t\telse //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS LESS THAN THE KEY\n\t\t\t{\n\t\t\t\treturn first = mid + 1; //RETURNS THE FIRST = INCREMENTED MID\t\t\n\t\t\t}\n\t\t}\n\t\treturn -1;\t\n\t}", "public static Boolean binarySearch(int[] arr, int n){\r\n if(arr.length == 0) return false;\r\n if(arr.length == 1 && arr[0] != n) return false; \r\n if(arr.length == 1 && arr[0] == n) return true; \r\n int start = 0;\r\n int mid = arr.length/2;\r\n int end = arr.length;\r\n int pos = mid;\r\n while(arr[pos] != n){\r\n if(n > arr[pos]){\r\n start = mid;\r\n mid = (end-start)/2+start;\r\n } else if(n < arr[pos]){\r\n end = mid;\r\n mid = (end-start)/2+start;\r\n System.out.println(\"here \" + start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n }\r\n pos = mid;\r\n if(arr[pos] == n) return true;\r\n if(start+1 == end){\r\n System.out.println(start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "@SuppressWarnings(\"unchecked\") // stops Java complaining about the call to compare\n private int findIndexOf(Comparable<E> item) {\n if (count == 0) { //this is where the binary search happens that reduces the time and computational power it takes to search the collection\n return count; // if count == 0 it returns the count variable to break the loop and show that the collection is empty\n }\n int low = 0; //Sets up three variables to keep track of the start and end values of index and the middle of the collection, this helps\n int high = count - 1; //the search algorithm becase the array always knows where the middle is and so the collection can contnually half using the three\n int mid; //variables to find a single value, while the low is less or equal to the high variable,\n while (low <= high) {\n\n mid = (low + high) / 2;\n\n int compareValue = item.compareTo(data[mid]); // the value we are trying to find\n if (compareValue == 0) return mid; //returns the middle value,\n if (compareValue > 0) low = mid + 1; //if greater than it changes low value to equal the middle, plus one(as mid is already checked)\n else high = mid - 1; //else it changes to the lower half of the collecton to search there.\n }\n return low; //Hopefully if found it will then return low,\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private int binarySearchByIndex(List<Span> spans, int index){\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).startIndex;\n if(row == index) {\n return mid;\n }else if(row < index){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n int result = Math.max(0,Math.min(left,max));\n while(result > 0) {\n if(spans.get(result).startIndex > index) {\n result--;\n }else{\n break;\n }\n }\n while(result < right) {\n if(getSpanEnd(result,spans) < index) {\n result++;\n }else{\n break;\n }\n }\n return result;\n }", "int findElement(int a[], int x) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\t//If we found the element simply return the index\n\t\t\tif (a[mid] == x) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// Check for the sorted half\n\t\t\telse if (a[mid] < a[high]) {\n\t\t\t\tif (x > a[mid] && x <= a[high]) {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t} else {\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\t}\n\t\t\t} else if (a[low] < a[mid]) {\n\t\t\t\tif (x >= a[low] && x < a[mid]) {\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\t} else {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int[] findRightInterval(int[][] intervals) {\n\tTreeMap<Integer, Integer> tMap = new TreeMap<>();\n\tfor (int i=0; i<intervals.length; i++) {\n\t tMap.put(intervals[i][0], i);\n\t}\n\t\n\tint[] result = new int[intervals.length];\n\tfor (int i = 0; i < intervals.length; i++) {\n\t int right = intervals[i][1];\n\t Map.Entry<Integer, Integer> entry = tMap.ceilingEntry(right);\n\t int index = entry == null ? -1 : entry.getValue();\n\t result[i] = index;\n\t}\n\n\treturn result;\n }", "public static int binSearch(int[] a, int x, int l, int r) {\r\n if (l == r) {\r\n return r;\r\n }\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n return binSearch(a, x, l, m);\r\n }\r\n else {\r\n return binSearch(a, x, m + 1, r);\r\n }\r\n }", "private static int search(long[] numbers, int start, int end, long value) {\n if (start > end){\n return -1;\n }\n\n int middle = (start + end) / 2;\n\n if (numbers[middle] == value) {\n return middle;\n }\n\n if (numbers[middle] > value) {\n return search(numbers, start, middle - 1, value);\n }\n\n return search(numbers, middle + 1, end, value);\n }", "public void binarySearchForValue(int value){\n int lowIndex = 0;\n int highIndex = arraySize -1;\n\n while(lowIndex <= highIndex){\n int middleIndex = (lowIndex + highIndex)/2;\n\n if(theArray[middleIndex] < value){\n lowIndex = middleIndex + 1;\n } else if(theArray[middleIndex] > value) {\n highIndex = middleIndex -1;\n } else {\n System.out.println(\"Found a match for \" + value + \" at Index \" + middleIndex);\n // Exit the while loop.\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "private int searchR(Searching[] array, int start, int half, int end, int value) {\n if (value > array[end].getValue() || value < array[start].getValue()) {\n return -1;\n }\n int a = end - start;\n int b = array[end].getValue() - array[start].getValue();\n int c = value - array[start].getValue();\n int d = (c * a) / b;\n int slide = d + start;\n if (slide > end || slide < start) {\n return -1;\n }\n if (array[slide].getValue() == value) {\n return slide;\n }\n if (value < array[slide].getValue()) {\n end = slide;\n return searchR(array, start, half, end, value);\n } else {\n start = slide;\n return searchR(array, start, half, end, value);\n }\n }", "public int binarySearchAlgo(int a[], int low, int high, int x) {\n\t\tint mid = (low + high) / 2;\n\t\t// If mid is x simply return the value\n\t\tif (a[mid] == x) {\n\t\t\treturn mid;\n\t\t}\n\t\t// If we didn't find any element simply return -1\n\t\tif (low == high) {\n\t\t\treturn -1;\n\t\t}\n\t\t// If mid element value is less then x go search higher(right) indices\n\t\tif (a[mid] < x) {\n\t\t\treturn binarySearchAlgo(a, mid + 1, high, x);\n\t\t}\n\t\t// If mid element value is less then x go search lower(left) indices\n\t\telse /* if (a[mid] > x) */ {\n\t\t\treturn binarySearchAlgo(a, low, mid - 1, x);\n\t\t}\n\n\t}", "private int findPosition(int[] src, int start, int end, int key) {\n\t\tif (end < start || start < 0)\n\t\t\treturn -1;\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\tif (src[i] == key) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t} \n\n\t\treturn -1;\n\t}", "public static int floorSearch(int[] arr, int low, int high, int x) {\n\t\tif(low==high){\n\t\t\tif(x>=arr[low])\n\t\t\t\treturn arr[low];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\t\tif(low<high){\n\t\t\tint mid=(low+high)/2;\n\t\t\tif(arr[mid]==x)\n\t\t\t\treturn arr[mid];\n\t\t\tif((mid+1<=high) && (x>arr[mid] && x<arr[mid+1])){\n\t\t\t\treturn arr[mid];\n\t\t\t}\n\t\t\tif(mid-1>=low && x>arr[mid-1] && x<arr[mid]){\n\t\t\t\treturn arr[mid-1];\n\t\t\t}\n\t\t\tif(x>arr[mid])\n\t\t\t\treturn floorSearch(arr,mid+1,high,x);\n\t\t\telse\n\t\t\t\treturn floorSearch(arr,low,mid-1,x);\n\t\t}\n\t\treturn -1;\n\t}", "private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }", "public int binarySearchInteger(int[] arr,int start,int end,int search){\r\n\t\tint found=0;\r\n\t\tif(start>end){\r\n\t\t\tfound=-1;\r\n\t\t}else{\r\n\t\t\tint mid=(start+end)/2;\r\n\t\t\tif(search==arr[mid]){\r\n\t\t\t\tfound=mid;\r\n\t\t\t}else if(search>arr[mid]){\r\n\t\t\t\tfound=binarySearchInteger(arr, mid+1, end, search);\r\n\t\t\t}else if(search<arr[mid]){\r\n\t\t\t\tfound=binarySearchInteger(arr, start, mid, search);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}", "private static int binarySearchForX(XYDataset data, int series, double x) {\n int lo = 0, hi = data.getItemCount(series); \n while (lo < hi) {\n int mid = (lo + hi) / 2;\n double midX = data.getXValue(series, mid);\n if (x < midX)\n\thi = mid;\n else if (x > midX)\n\tlo = mid + 1;\n else\n\treturn mid;\n }\n return lo; // not found, return index of next date\n }", "protected static int branchyUnsignedBinarySearch(final ByteBuffer array, int position,\n final int begin, final int end, final char k) {\n if ((end > 0) && ((array.getChar(position + (end - 1)*2)) < (int) (k))) {\n return -end - 1;\n }\n int low = begin;\n int high = end - 1;\n while (low <= high) {\n final int middleIndex = (low + high) >>> 1;\n final int middleValue = (array.getChar(position + 2* middleIndex));\n\n if (middleValue < (int) (k)) {\n low = middleIndex + 1;\n } else if (middleValue > (int) (k)) {\n high = middleIndex - 1;\n } else {\n return middleIndex;\n }\n }\n return -(low + 1);\n }", "private static int bSearch(int[] elements, int key) {\n int left = 0, right = elements.length - 1, mid = 0;\n while (left <= right) {\n mid = (left + right) / 2;\n\n if (key < elements[mid]) {\n right = mid - 1;\n } else if (key == elements[mid]) {\n return mid;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "public static int search(int[] a, int x) {\n int lo = 0;\n int hi = a.length;\n \n while (lo < hi) { // step 1\n // INVARIANT: if a[j]==x then lo <= j < hi; // step 3\n int i = (lo + hi)/2; // step 4\n if (a[i] == x) {\n return i; // step 5\n } else if (a[i] < x) {\n lo = i+1; // step 6\n } else {\n hi = i; // step 7\n }\n }\n return -1; // step 2\n }", "public void binarySearchForValue(int value) {\n int lowIndex = 0;\n int highIndex = arraySize - 1;\n\n while (lowIndex <= highIndex) {\n int middleIndex = (highIndex + lowIndex) / 2;\n\n if (theArray[middleIndex] < value) {\n lowIndex = middleIndex + 1;\n } else if (theArray[middleIndex] > value) {\n highIndex = middleIndex - 1;\n } else {\n System.out.println(\"\\nFound a match for \" + value + \" at index \" + middleIndex);\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "public static int ceilSearch(int[] arr, int low, int high, int x) {\n\t\tif(low==high){\n\t\t\tif(x<=arr[low])\n\t\t\t\treturn arr[low];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\t\tif(low<high){\n\t\t\tint mid=(low+high)/2;\n\t\t\tif(arr[mid]==x)\n\t\t\t\treturn arr[mid];\n\t\t\tif((mid+1<=high) && (x>arr[mid] && x<arr[mid+1])){\n\t\t\t\treturn arr[mid+1];\n\t\t\t}\n\t\t\tif(mid-1>=low && x>arr[mid-1] && x<arr[mid]){\n\t\t\t\treturn arr[mid];\n\t\t\t}\n\t\t\tif(x>arr[mid])\n\t\t\t\treturn ceilSearch(arr,mid+1,high,x);\n\t\t\telse\n\t\t\t\treturn ceilSearch(arr,low,mid-1,x);\n\t\t}\n\t\treturn -1;\n\t}", "protected abstract Iterable<E> getIntersecting(D lower, D upper);", "public static int binarySearch(int[] list, int key) {\n int low = 0;\n int high = list.length - 1;\n \n while (high >= low) {\n int mid = (low + high) / 2;\n if (key < list[mid])\n high = mid - 1;\n else if (key == list[mid])\n return mid;\n else\n low = mid + 1;\n }\n return -1 - 1; // now high < low, key not found\n }", "public static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }", "int binarySearchWithRecursion(int[] arr, int low, int high, int key){\n if (high < low)\n return -1;\n int mid = (low + high) / 2;\n if (key == arr[mid])\n return mid;\n if (key > arr[mid])\n return binarySearchWithRecursion(arr,(mid + 1), high, key);\n return binarySearchWithRecursion(arr, low, (mid - 1), key);\n }", "private static boolean binarySearch(int[] arr, int num, int start, int end) {\n\t\tif(arr==null || arr.length==0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tint mid;\r\n\t\t\r\n\t\twhile(start<=end){\r\n\t\t\t\r\n\t\t\tmid= start+ (end-start)/2;\r\n\t\t\t\r\n\t\t\tif(arr[mid]==num){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if(num < arr[mid]){\r\n\t\t\t\tend=mid-1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstart=mid+1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static int binSearch(int[] a, int x) {\r\n int l = 0;\r\n int r = a.length;\r\n while (l != r) {\r\n // inv: l <= res <= r\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n r = m;\r\n }\r\n else {\r\n l = m + 1;\r\n }\r\n }\r\n return r;\r\n }", "static int binarySearch(int arr[], int l, int r, int x) {\n if (r >= l) { \r\n int mid = l + (r - l) / 2; \r\n if (arr[mid] == x) \r\n return mid; \r\n \r\n if (arr[mid] > x) \r\n return binarySearch(arr, l, mid - 1, x); \r\n \r\n \r\n return binarySearch(arr, mid + 1, r, x); \r\n } \r\n \r\n \r\n return -1; \r\n }", "public int binarySearch(int x) {\n\n int l = 0, h = length - 1, mid;\n while (l <= h) {\n mid = l + (h-l)/2;\n if (arr[mid] == x) return mid;\n else if (x < arr[mid]) h = mid - 1;\n else if (x > arr[mid]) l = mid + 1;\n }\n return -1;\n }", "protected static int branchyUnsignedBinarySearch(final CharBuffer array, final int begin,\n final int end, final char k) {\n if ((end > 0) && ((array.get(end - 1)) < (int) (k))) {\n return -end - 1;\n }\n int low = begin;\n int high = end - 1;\n while (low <= high) {\n final int middleIndex = (low + high) >>> 1;\n final int middleValue = (array.get(middleIndex));\n\n if (middleValue < (int) (k)) {\n low = middleIndex + 1;\n } else if (middleValue > (int) (k)) {\n high = middleIndex - 1;\n } else {\n return middleIndex;\n }\n }\n return -(low + 1);\n }", "public static int binSearchRotatedIter(int src[], int lo, int hi, int target){\n\n while(lo<=hi){\n int mid = lo + (hi-lo)/2;\n if(src[mid]==target) return mid;\n //if bottom half is sorted\n if(src[lo]<=src[mid]){\n \n if(src[lo]<=target && target<src[mid]){\n hi=mid-1;\n }else{\n lo=mid+1;\n }\n }\n //if upper half is sorted\n else{\n if(src[mid]<target && target<=src[hi]){\n lo=mid+1;\n }else{\n hi=mid-1;\n }\n }\n }\n return -1;\n}", "public int search(int[] A, int target) {\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n while (start + 1 < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n }\n if (A[start] < A[mid]) {\n // situation 1, red line\n if (A[start] <= target && target <= A[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n } else {\n // situation 2, green line\n if (A[mid] <= target && target <= A[end]) {\n start = mid;\n } else {\n end = mid;\n }\n }\n } // while\n\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n return -1;\n }", "static boolean binarySearch(int[] a, int x)\n {\n //TODO: implement this method\n \tboolean contained = false;\n \tint lo = 0;\n \tint hi = a.length - 1;\n \t\n \twhile (lo <= hi && !contained)\n \t{\n \t\tint mid = lo + (hi - lo)/2;\n \t\tif (a[mid] > x)\n \t\thi = mid - 1;\n \telse if (a[mid] < x)\n \t\tlo = mid + 1;\n \telse contained = true;\n \t}\n \t\n \treturn contained;\n }", "public Enumeration inIncidentEdges(Position vp) throws InvalidPositionException;", "@Override\n public int compareTo(SkipInterval interval) {\n if(this.startAddr >= interval.startAddr && this.endAddr <= interval.endAddr){\n return 0;\n }\n if(this.startAddr > interval.startAddr){\n return 1;\n } else if(this.startAddr < interval.startAddr){\n return -1;\n } else if(this.endAddr > interval.endAddr){\n return 1;\n } else if(this.endAddr < interval.endAddr){\n return -1;\n } else\n return 0;\n \n// \n// if(this.startAddr >= interval.startAddr && this.endAddr <= interval.endAddr){\n// return 0;\n// } else if(this.startAddr > interval.endAddr){\n// return 1;\n// } else{\n// return -1;\n// }\n }", "private double checkBounds(double param, int i) {\n if (param < low[i]) {\n return low[i];\n } else if (param > high[i]) {\n return high[i];\n } else {\n return param;\n }\n }", "public void findNeighbours(ArrayList<int[]> visited , Grid curMap) {\r\n\t\tArrayList<int[]> visitd = visited;\r\n\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS cur pos:\" +Arrays.toString(nodePos));\r\n\t\t//for(int j=0; j<visitd.size();j++) {\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +Arrays.toString(visited.get(j)));\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS getvstd\" +Arrays.toString(visited.get(j)));\r\n\t\t//}\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +visited);\r\n\t\tCell left=curMap.getCell(0, 0);\r\n\t\tCell right=curMap.getCell(0, 0);\r\n\t\tCell upper=curMap.getCell(0, 0);\r\n\t\tCell down=curMap.getCell(0, 0);\r\n\t\t//the getStart() method returns x,y coordinates representing the point in x,y axes\r\n\t\t//so if either of [0] or [1] coordinate is zero then we have one less neighbor\r\n\t\tif (nodePos[1]> 0) {\r\n\t\t\tupper=curMap.getCell(nodePos[0], nodePos[1]-1) ; \r\n\t\t}\r\n\t\tif (nodePos[1] < M-1) {\r\n\t\t\tdown=curMap.getCell(nodePos[0], nodePos[1]+1);\r\n\t\t}\r\n\t\tif (nodePos[0] > 0) {\r\n\t\t\tleft=curMap.getCell(nodePos[0] - 1, nodePos[1]);\r\n\t\t}\r\n\t\tif (nodePos[0] < N-1) {\r\n\t\t\tright=curMap.getCell(nodePos[0]+1, nodePos[1]);\r\n\t\t}\r\n\t\t//for(int i=0;i<visitd.size();i++) {\r\n\t\t\t//System.out.println(Arrays.toString(visitd.get(i)));\t\r\n\t\t//}\r\n\t\t\r\n\t\t//check if the neighbor is wall,if its not add to the list\r\n\t\tif(nodePos[1]>0 && !upper.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] - 1}))) {\r\n\t\t\t//Node e=new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1},curMap);\r\n\t\t\t//if(e.getVisited()!=true) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1}, curMap)); // father of the new nodes is this node\r\n\t\t\t//}\r\n\t\t}\r\n\t\tif(nodePos[1]<M-1 &&!down.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] + 1}))){\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] + 1}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]>0 && !left.isWall() && (!exists(visitd,new int[] {nodePos[0] - 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] - 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]<N-1 && !right.isWall() && (!exists(visitd,new int[] {nodePos[0] + 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] + 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\t//for(int i=0; i<NodeChildren.size();i++) {\r\n\t\t\t//System.out.println(\"Paidia sth find:\" + Arrays.toString(NodeChildren.get(i).getNodePos()));\r\n\t\t//}\r\n\t\t\t\t\t\t\r\n\t}", "public static int BinarySearch(int[] arr,int data){\n int si = 0, ei = arr.length - 1;\n while(si <= ei){\n int mid = (si + ei) / 2;\n if(arr[mid] == data)\n return mid;\n else if(data < arr[mid]){\n ei = mid - 1;\n }else si = mid + 1;\n }\n\n return -1;\n }", "@Test\n public void testBoundsAsCompositesWithMultiInRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n Restriction in = newMultiIN(cfMetaData, 0, asList(value1, value2), asList(value2, value3));\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(in);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(2, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.START);\n assertComposite(bounds.get(1), value2, value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(2, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.END);\n assertComposite(bounds.get(1), value2, value3, EOC.END);\n }", "private static int binarySearchRecursively(int[] sortedArray, int input, int first, int last) {\n int mid = (first + last) / 2;\n\n if (last < first) {\n return -1;\n }\n if (input == sortedArray[mid]) {\n return mid;\n } else if (input < sortedArray[mid]) {\n return binarySearchRecursively(sortedArray, input, last, mid - 1);\n } else {\n return binarySearchRecursively(sortedArray, input, mid + 1, last);\n }\n }", "static int BinarySearch(int[] arr, int target, int start, int end) {\n boolean isAsc = arr[start] < arr[end];\n\n while(start <= end) {\n // find the middle element\n// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java\n int mid = start + (end - start) / 2;\n\n if (arr[mid] == target) {\n return mid;\n }\n\n if (isAsc) {\n if (target < arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n } else {\n if (target > arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n }\n return -1;\n }", "public final Constant getelementptr_expr() throws RecognitionException {\r\n Constant expr = null;\r\n\r\n\r\n Token INTEGER101=null;\r\n Type pointer_type99 =null;\r\n\r\n Constant expression100 =null;\r\n\r\n\r\n\r\n boolean inbounds = false;\r\n Type type;\r\n Constant subExpr;\r\n List<Integer> indices = new ArrayList<Integer>();\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:591:5: ( 'getelementptr' ( 'inbounds' )? '(' pointer_type expression ( ',' INTEGER_TYPE INTEGER )+ ')' )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:591:7: 'getelementptr' ( 'inbounds' )? '(' pointer_type expression ( ',' INTEGER_TYPE INTEGER )+ ')'\r\n {\r\n match(input,66,FOLLOW_66_in_getelementptr_expr3205); \r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:591:23: ( 'inbounds' )?\r\n int alt77=2;\r\n int LA77_0 = input.LA(1);\r\n\r\n if ( (LA77_0==69) ) {\r\n alt77=1;\r\n }\r\n switch (alt77) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:591:24: 'inbounds'\r\n {\r\n match(input,69,FOLLOW_69_in_getelementptr_expr3208); \r\n\r\n inbounds = true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input,41,FOLLOW_41_in_getelementptr_expr3221); \r\n\r\n pushFollow(FOLLOW_pointer_type_in_getelementptr_expr3223);\r\n pointer_type99=pointer_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n type = pointer_type99;\r\n\r\n pushFollow(FOLLOW_expression_in_getelementptr_expr3234);\r\n expression100=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n subExpr = expression100;\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:594:7: ( ',' INTEGER_TYPE INTEGER )+\r\n int cnt78=0;\r\n loop78:\r\n do {\r\n int alt78=2;\r\n int LA78_0 = input.LA(1);\r\n\r\n if ( (LA78_0==44) ) {\r\n alt78=1;\r\n }\r\n\r\n\r\n switch (alt78) {\r\n \tcase 1 :\r\n \t // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:594:8: ',' INTEGER_TYPE INTEGER\r\n \t {\r\n \t match(input,44,FOLLOW_44_in_getelementptr_expr3246); \r\n\r\n \t match(input,INTEGER_TYPE,FOLLOW_INTEGER_TYPE_in_getelementptr_expr3248); \r\n\r\n \t INTEGER101=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_getelementptr_expr3250); \r\n\r\n \t indices.add(Integer.parseInt((INTEGER101!=null?INTEGER101.getText():null)));\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t if ( cnt78 >= 1 ) break loop78;\r\n EarlyExitException eee =\r\n new EarlyExitException(78, input);\r\n throw eee;\r\n }\r\n cnt78++;\r\n } while (true);\r\n\r\n\r\n match(input,42,FOLLOW_42_in_getelementptr_expr3264); \r\n\r\n }\r\n\r\n\r\n expr = valueFactory.createGetEleExpression(inbounds, type, subExpr, indices);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return expr;\r\n }" ]
[ "0.6774925", "0.6272073", "0.59947985", "0.58632314", "0.570387", "0.56131566", "0.54861397", "0.5434714", "0.5390072", "0.53761345", "0.5368384", "0.5363157", "0.530059", "0.52951974", "0.5193223", "0.51850104", "0.5179803", "0.51790595", "0.5163816", "0.512747", "0.5112998", "0.51097167", "0.5095292", "0.50899506", "0.50853413", "0.5081979", "0.50645334", "0.50566655", "0.5054569", "0.50407815", "0.49988323", "0.49979517", "0.49875313", "0.4976865", "0.49711847", "0.49611366", "0.49374855", "0.49354285", "0.4931283", "0.492125", "0.49103847", "0.49065933", "0.49030468", "0.48969996", "0.48924172", "0.48789087", "0.48777935", "0.48757797", "0.4874438", "0.48725343", "0.48697564", "0.48697218", "0.4869573", "0.48693007", "0.48641127", "0.48595184", "0.48533285", "0.48507208", "0.4847014", "0.48460045", "0.48448202", "0.4832094", "0.48244303", "0.4820295", "0.4812494", "0.48124367", "0.4808226", "0.47939417", "0.47922266", "0.47900808", "0.4782706", "0.47818163", "0.47793758", "0.4767431", "0.4764505", "0.47618297", "0.47545633", "0.47536662", "0.4748737", "0.47305602", "0.47254503", "0.4724097", "0.47199342", "0.47148904", "0.4704476", "0.46974665", "0.46945024", "0.4694492", "0.4693067", "0.46905807", "0.46863908", "0.4686291", "0.46849564", "0.46825767", "0.46754426", "0.46754307", "0.46729434", "0.46681288", "0.46649164", "0.46501678" ]
0.62365335
2
same contract as findCoordElement(); in addition, 1 is returned when the target is not found will return immediately if an exact match is found (i.e. interval with edges equal to target) If bounded is true, then we will also look for the interval closest to the midpoint of the target
private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) { Preconditions.checkNotNull(target); // Check that the target is within range int n = orgGridAxis.getNcoords(); double lowerValue = Math.min(target.start(), target.end()); double upperValue = Math.max(target.start(), target.end()); MinMax minmax = orgGridAxis.getCoordEdgeMinMax(); if (upperValue < minmax.min()) { return bounded ? 0 : -1; } else if (lowerValue > minmax.max()) { return bounded ? n - 1 : n; } // see if we can find an exact match int index = -1; for (int i = 0; i < orgGridAxis.getNcoords(); i++) { if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) { return i; } } // ok, give up on exact match, try to find interval closest to midpoint of the target if (bounded) { index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded); } return index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "public int findCoordElement(double target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n case regularPoint:\n return findCoordElementRegular(target, bounded);\n case irregularPoint:\n case contiguousInterval:\n return findCoordElementContiguous(target, bounded);\n case discontiguousInterval:\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private boolean intervalContains(double target, int coordIdx) {\n double midVal1 = orgGridAxis.getCoordEdge1(coordIdx);\n double midVal2 = orgGridAxis.getCoordEdge2(coordIdx);\n boolean ascending = midVal1 < midVal2;\n return intervalContains(target, coordIdx, ascending, true);\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "private int findClosestDiscontiguousInterval(double target) {\n boolean isTemporal = orgGridAxis.getAxisType().equals(AxisType.Time);\n return isTemporal ? findClosestDiscontiguousTimeInterval(target) : findClosestDiscontiguousNonTimeInterval(target);\n }", "private int binarySearch(int[] array, int min, int max, int target){\r\n\r\n //because there is often not an answer that is equal to our target,\r\n //this algorithm is deisgned to find the element that it would go after in the array\r\n //because sometimes that is smaller than anything in the list it could bisect at a value that is not ideal.\r\n //however the final check handles 4 possible answers so this is not really an issue.\r\n if(target >= array[max]) return max;\r\n else if(target < array[min]) return min;\r\n if(min + 1 == max) return min;\r\n\r\n int midPoint = (min + max) / 2;\r\n\r\n if(target > array[midPoint]){\r\n return binarySearch(array, midPoint, max, target);\r\n }else return binarySearch(array, min, midPoint, target);\r\n }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "public int find(int[] nums, int target, int start, int end){\n int middle = (start + end) / 2;\n\n while (start <= end){\n middle = (start + end) >> 1;\n if(nums[middle] == target){\n return middle;\n }\n else if(nums[middle] > target){\n end = middle - 1;\n }\n else {\n start = middle + 1;\n }\n }\n return -1;\n }", "public int search(int[] A, int target) {\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n while (start + 1 < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n }\n if (A[start] < A[mid]) {\n // situation 1, red line\n if (A[start] <= target && target <= A[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n } else {\n // situation 2, green line\n if (A[mid] <= target && target <= A[end]) {\n start = mid;\n } else {\n end = mid;\n }\n }\n } // while\n\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n return -1;\n }", "private boolean intervalContains(double target, int coordIdx, boolean ascending, boolean closed) {\n // Target must be in the closed bounds defined by the discontiguous interval at index coordIdx.\n double lowerVal = ascending ? orgGridAxis.getCoordEdge1(coordIdx) : orgGridAxis.getCoordEdge2(coordIdx);\n double upperVal = ascending ? orgGridAxis.getCoordEdge2(coordIdx) : orgGridAxis.getCoordEdge1(coordIdx);\n\n if (closed) {\n return lowerVal <= target && target <= upperVal;\n } else {\n return lowerVal <= target && target < upperVal;\n }\n }", "public int[] searchRange(int[] nums, int target) {\r\n\r\n int[] res = {-1, -1};\r\n int left = lowerBound(nums, target);\r\n if (left != -1) {\r\n res[0] = left;\r\n res[1] = upperBound(nums, target);\r\n }\r\n return res;\r\n\r\n\r\n }", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "public static boolean binarySearch(int target, int[] nums) {\n int floorIndex = -1;\n int ceilingIndex = nums.length;\n\n // if there isn't at least 1 index between floor and ceiling,\n // we've run out of guesses and the number must not be present\n while (floorIndex + 1 < ceilingIndex) {\n\n // find the index ~halfway between the floor and ceilingR\n // we use integer division, so we'll never get a \"half index\"\n int distance = ceilingIndex - floorIndex;\n int halfDistance = distance / 2;\n int guessIndex = floorIndex + halfDistance;\n\n int guessValue = nums[guessIndex];\n\n if (guessValue == target) {\n System.out.println(\"Number found:\" + target);\n return true;\n }\n\n if (guessValue > target) {\n\n // target is to the left, so move ceiling to the left\n ceilingIndex = guessIndex;\n\n } else {\n\n // target is to the right, so move floor to the right\n floorIndex = guessIndex;\n }\n }\n System.out.println(\"Number not found:\"+ target);\n return false;\n }", "private static int search(int[] nums, int target, int start, int end)\r\n\t{\n\t\tif (end == start)\r\n\t\t\treturn nums[start] == target ? start : -1;\r\n\t\t\r\n\t\tif(end - start == 1)\r\n\t\t{\r\n\t\t\tif(nums[start] == target)\r\n\t\t\t\treturn start;\r\n\t\t\tif(nums[end] == target)\r\n\t\t\t\treturn end;\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\t// If there are more than two elements\r\n\t\tint mid = (start + end) / 2;\r\n\t\tif (nums[mid] == target)\r\n\t\t\treturn mid;\r\n\t\telse if (nums[mid] > target)\r\n\t\t\treturn search(nums, target, start, mid - 1);\r\n\t\telse\r\n\t\t\treturn search(nums, target, mid + 1, end);\r\n\t}", "public abstract Node getBoundingNode();", "public int search(int[] nums, int target) {\n if (null == nums || nums.length == 0) {\n return -1;\n }\n int start = 0;\n int end = nums.length - 1;\n while (start <= end) {\n int mid = (start + end) / 2;\n if (nums[mid] == target)\n return mid;\n if (nums[start] <= nums[mid]) {\n if (target < nums[mid] && target >= nums[start])\n end = mid - 1;\n else\n start = mid + 1;\n }\n if (nums[mid] <= nums[end]) {\n if (target > nums[mid] && target <= nums[end])\n start = mid + 1;\n else\n end = mid - 1;\n }\n }\n return -1;\n }", "public static int binarySearch(int[] ary, int target, int start, int end){\r\n\t\t//get the middle index\r\n\t\tint middle = (end-start)/2 + start;\r\n\t\tint result = 0;\r\n\t\t\r\n\t\t//Some end cases (error, out of scope, etc)\r\n\t\tif(end-start<0||target<ary[0]||target>ary[ary.length-1])\r\n\t\t\t\r\n\t\t\t//If element is not in the array display \r\n\t\t\treturn -1;\r\n\r\n\r\n\t\t//Recursive case 1: If target is less than, the next search occurs within start and middle-1\r\n\r\n\t\tif (target < ary[middle]) {\r\n\t\t\tresult = binarySearch(ary, target, start, middle-1 );\r\n\t\t}\r\n\t\t\r\n\t\t//Recursive case 2: If target is greater than, the next search occurs within middle+1 and end \r\n\t\telse if(target > ary[middle]) {\r\n\t\t\tresult = binarySearch(ary, target, middle+1, end);\r\n\t\t\r\n\t\t//End cases: If target is equal, done.\r\n\t\t}\r\n\t\telse if (target == ary[middle]) {\r\n\t\t\tresult = middle;\r\n\t\t}\r\n\r\n\t\t//Return results\r\n\t\treturn result;\r\n\t}", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public int[] searchRange(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return new int[] {-1, -1};\n int left = 0, right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] >= target) {\n right = mid;\n }\n else{\n left = mid;\n }\n }\n int leftBound = -1, rightBound = -1;\n if (A[left] == target)\n leftBound = left;\n else if (A[right] == target)\n leftBound = right;\n\n left = 0;\n right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] <= target) {\n left = mid;\n }\n else {\n right = mid;\n }\n }\n if (A[right] == target) rightBound = right;\n else if (A[left] == target) rightBound = left;\n return new int[] {leftBound, rightBound};\n }", "static int binarySearch(int arr[], int start, int end, int target ){\n if(start>end){\n return -1;\n }\n int mid = start+(end-start)/2;\n \n if(arr[mid] == target && (mid==0 || arr[mid-1]!=target)){\n return mid;\n }\n if(arr[mid] == target){\n return mid;\n }\n if(arr[mid]>=target && arr[mid]>arr[start]){\n return binarySearch(arr,start,mid-1,target);\n }\n // else if(arr[mid]<arr[start] && arr[mid]<target){\n // return binarySearch(arr,mid+1,end,target);\n // }\n return binarySearch(arr,mid+1,end,target);\n }", "public static int binarySearch2(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n int mid = -1;\n while (min <= max) {\n mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n mid = (max + min) / 2;\n }\n \n return -min - 1; // not found\n }", "public int[] searchRange(int[] nums, int target) {\n int[] result = { -1, -1 };\n if (nums == null) {\n return result;\n }\n\n int left = 0;\n int right = nums.length - 1;\n\n // search for left bound.\n int start = 0;\n int end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] < target) {\n start = mid;\n } else {\n end = mid;\n }\n }\n\n if (nums[start] == target) {\n left = start;\n } else {\n left = start + 1;\n }\n\n // search for right bound.\n end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] > target) {\n end = mid;\n } else {\n start = mid;\n }\n }\n\n if (nums[end] == target) {\n right = end;\n } else {\n right = end - 1;\n }\n\n if (left > right) {\n return result;\n } else {\n result[0] = left;\n result[1] = right;\n return result;\n }\n }", "public static int binarySearch(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n while (min <= max) {\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n }\n \n return -1; // not found\n }", "public static int binarySearch(int[] arr, int target){\n\t\tint start = 0;\n\t\tint end = arr.length - 1;\n\n\t\twhile (start <= end){\n\t\t\tint mid = (end + start) / 2;\n\t\t\tif(arr[mid] == target){\n\t\t\t\treturn mid;\n\t\t\t} else if(target < arr[mid]){\n\t\t\t\tend = mid - 1;\n\t\t\t} else if(target > arr[mid]){\n\t\t\t\tstart = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "static int BinarySearch(int[] arr, int target, int start, int end) {\n boolean isAsc = arr[start] < arr[end];\n\n while(start <= end) {\n // find the middle element\n// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java\n int mid = start + (end - start) / 2;\n\n if (arr[mid] == target) {\n return mid;\n }\n\n if (isAsc) {\n if (target < arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n } else {\n if (target > arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n }\n return -1;\n }", "public int getHit(Rectangle[] bound, int mx, int my) {\n\t\t for (int i=0; i < bound.length; i++) {\n\t\t \tif (bound[i].contains(mx,my)) {\n\t\t \t\treturn i;\n\t\t \t}\n\t\t }\n\t\t return -1;\n\t}", "public static int binarySearchWithTheClosestNum(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// when we reach here, means target is not in the array, so we need to find the closet element from num[left] or num[right]\n\t\t// notice that, right is smailler than left now, according to the while condition, if it breaks, left > right\n\t\treturn Math.abs(target - num[left]) > Math.abs(target - num[right]) ? right : left;\n\t}", "public int binarySearch(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n end = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[start] == target) return start;\n if (nums[end] == target) return end;\n return -1;\n }", "public static void searchRange(int[] nums, int target){\n int index = binarySearch(nums, target);\n System.out.println(index);\n\n }", "private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }", "boolean selectTo(double x, double y);", "public int findPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "public static double inInterval(double lowerBound, double value, double upperBound) {\n/* 67 */ if (value < lowerBound)\n/* 68 */ return lowerBound; \n/* 69 */ if (upperBound < value)\n/* 70 */ return upperBound; \n/* 71 */ return value;\n/* */ }", "public int getBound();", "public SegmentTreeNode<T> getNode (int target) {\n\t\t// have we narrowed down?\n\t\tif (left == target) {\n\t\t\tif (right == left+1) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// press onwards\n\t\tint mid = (left+right)/2;\n\n\t\tif (target < mid) { return lson.getNode (target); }\n\t\treturn rson.getNode (target);\n\t}", "public static int search(int[] nums, int target) {\n\n int length = nums.length;\n int i = 0;\n int j = length - 1;\n if (length == 0) return -1;\n\n while (true) {\n int index = (i + j) / 2;\n\n int value = nums[index];\n if (value == target) return index;\n\n //Using the invariant that either i - mid OR mid-j has\n //to be sorted at any point of the computation\n if (nums[j] >= value) {\n if (target > value && target <= nums[j]) i = index;\n else if (target > value && target > nums[j]) j = index;\n else j = index;\n }\n else {\n if (target < value && target >= nums[i]) j = index;\n else if (target < value && target < nums[i]) i = index;\n else i = index;\n }\n\n if (i + 1 == j) {\n if (nums[i] == target) return i;\n if (nums[j] == target) return j;\n return -1;\n }\n\n if (i == j || i >= length || j >= length) return -1;\n }\n\n }", "public int[] searchRange(int[] A, int target) {\n int start = 0;\n int end = A.length - 1;\n int mid = 0;\n int[] res = {-1, -1};\n \n while (start < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n int s = mid;\n while (s >= start && A[s] == target) {\n s --;\n }\n int e = mid;\n //Note: here \"<= end\" instead of \"<\"\n while (e <= end && A[e] == target) {\n e ++;\n }\n res[0] = s + 1;\n res[1] = e - 1;\n return res;\n } else if (A[mid] < target) {\n start = mid + 1;\n } else {\n end = mid - 1;\n }\n }\n if (A[start] == target) {\n res[0] = start;\n res[1] = end;\n } \n \n return res;\n }", "private static int upperBound(int[] A, int target) {\n int max = A.length;\n int min = -1;\n while (max - min > 1) {\n int mid = ( max + min ) / 2;\n if(A[mid] <= target) {\n min = mid;\n } else {\n max = mid;\n }\n }\n\n return max;\n\n }", "static int Floor(int[] arr, int target){\r\n int start = 0;\r\n int end = arr.length - 1;\r\n\r\n while(start <= end){\r\n //Find the middle element\r\n int mid = start + (end - start) / 2;\r\n if (target < arr[mid]){\r\n end = mid - 1;\r\n }else if (target > arr[mid]){\r\n start = mid + 1;\r\n }else {\r\n return mid;\r\n }\r\n }\r\n return start;\r\n }", "private static int binarySearch(int[] arr, int low, int high, int target) {\n\n\t\tif (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\n\t\t\tif (arr[mid] < target) {\n\t\t\t\treturn binarySearch(arr, mid + 1, high, target);\n\t\t\t} else {\n\t\t\t\treturn binarySearch(arr, low, mid - 1, target);\n\t\t\t}\n\n\t\t}\n\n\t\treturn -1;\n\t}", "public int[] searchRange(int[] A, int target) {\n int ans[] = new int[2], len = A.length, low = 0, high = len - 1, mid;\n ans[0] = -1;\n ans[1] = -1;\n while (low <= high) {\n mid = low + (high - low) / 2;\n if (A[mid] == target) {\n int left[] = searchRange(Arrays.copyOfRange(A, low, mid), target);\n int right[] = searchRange(Arrays.copyOfRange(A, mid + 1, high + 1), target);\n ans[0] = left[0] == -1 ? mid : low + left[0];\n ans[1] = right[1] == -1 ? mid : mid + 1 + right[1];\n break;\n } else if (A[mid] > target) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public int search(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return -1;\n int start = 0, end = A.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (A[mid] == target) return mid;\n if (A[mid] < A[start]) {\n if (target <= A[end] && target > A[mid]){\n start = mid;\n }\n else {\n end = mid;\n }\n }\n else {\n if (target >= A[start] && target < A[mid]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n }\n if (A[start] == target) return start;\n if (A[end] == target) return end;\n return -1;\n }", "public static int binarySearch(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public static int searchInMountainArray(int[] arr, int target){\n int indexOfPeak = peakIndexInMountainArray(arr);\n\n int firstIndex = BinarySearch(arr, target, 0, indexOfPeak);\n if(firstIndex != -1){\n return firstIndex;\n }\n //try to search in second half.\n return BinarySearch(arr, target, indexOfPeak, arr.length-1);\n }", "private int findUpperBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] > target) right = mid;\n else left = mid + 1;\n }\n return (left > 0 && nums[left - 1] == target) ? left - 1 : -1;\n }", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }", "public static int search(int[] nums, int target) {\n int low=0;\n int high=nums.length-1;\n int middle=(high+low)>>1;\n\n for(int i=0;i<nums.length;i++){\n int num = nums[middle];\n if(target>num){\n low=middle+1;\n middle=(high+low)>>1;\n }else if(target<num){\n high=middle-1;\n middle=(high+low)>>1;\n } else{\n return middle;\n }\n\n }\n\n return -1;\n }", "private Node getNodeBetweenBounds(Node node, int x, int y) {\n boolean childBetweenBounds = true;\n while (childBetweenBounds) {\n childBetweenBounds = false;\n NodeList nodeList = node.getChildNodes();\n for (int i = 0; i < nodeList.getLength(); i++) {\n if (isBetweenBounds(x, y, getBounds(nodeList.item(i)))) {\n childBetweenBounds = true;\n node = nodeList.item(i);\n break;\n }\n }\n }\n return node;\n }", "public int search(int[] nums, int target) {\n int left = 0;\n int right = nums.length - 1;\n while (left < right) {\n int mid = (left + right) / 2;\n if (nums[mid] > nums[right]) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n int pivot = left;\n left = 0;\n right = nums.length - 1;\n while (left <= right) {\n int mid = (left + right) / 2;\n int realmid = (mid + pivot) % nums.length;\n if (nums[realmid] == target) {\n return realmid;\n } else if (nums[realmid] < target) {\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n }\n return -1;\n }", "public int[] searchRange_v2(int[] A, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] res = new int[2];\n res[0] = findLow(A, 0, A.length - 1, target);\n res[1] = findHigh(A, 0, A.length - 1, target);\n return res;\n }", "public int[] searchRange(int[] nums, int target) {\n final int len = null != nums ? nums.length : 0;\n if (len <= 0) {\n return new int[]{-1, -1};\n }\n \n int[] result = new int[2];\n int start = 0, end = len-1, idx = -1;\n int mid = 0;\n while (start <= end) {\n mid = start + ((end - start) >> 1);\n if (nums[mid] == target) {\n idx = mid;\n }\n if(nums[mid] >= target){\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n result[0] = idx;\n \n //reset start and end value\n start = 0;\n end = len-1;\n idx = -1;\n while (start <= end) {\n mid = start + ((end - start) >> 1);\n if (nums[mid] == target) {\n idx = mid;\n }\n if(nums[mid] <= target){\n start = mid + 1;\n }else{\n end = mid - 1;\n }\n }\n result[1] = idx;\n return result;\n }", "public Integer binSearch(Integer target, Integer[] data, Integer left, Integer right) {\n if (right - left == 1) {\n if (data[left] == target) return left;\n if (data[right] == target) return right;\n }\n if (right - left == 0) {\n if (data[left] == target) return left;\n }\n Integer midpt = (right + left) / 2 ;\n if (target == data[midpt]) return midpt ;\n if (target > data[midpt] ) return binSearch(target, data, midpt, right) ;\n if (target < data[midpt] ) return binSearch(target, data, left, midpt) ;\n\n return -1;\n }", "public abstract IAttackable getEnemyInSearchArea(ShortPoint2D centerPos, IAttackable movable, short minSearchRadius, short maxSearchRadius,\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean includeTowers);", "public int search(int[] A, int target) {\n\n\t\tint s = 0;\n\t\tint e = A.length - 1;\n\n\t\twhile (s <= e) {\n\t\t\tint m = (s + e) / 2;\n\n\t\t\tif (target == A[m])\n\t\t\t\treturn m;\n\t\t\telse if (A[s] <= A[m]) {\n\t\t\t\tif (A[s] <= target && target < A[m])\n\t\t\t\t\te = m;\n\t\t\t\telse\n\t\t\t\t\ts = m + 1;\n\t\t\t} else {\n\t\t\t\tif (A[m] < target && target <= A[e])\n\t\t\t\t\ts = m + 1;\n\t\t\t\telse\n\t\t\t\t\te = m;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public int getLowerBound ();", "private int binarySearch(int[] nums, int target, int low, int high) {\n while (low <= high) {\n int mid = low + (high - low) / 2; // find mid\n\n if (nums[mid] == target) { // if number found\n if (mid == low || nums[mid] > nums[mid - 1]) // check if it is the first occurence\n return mid; // if it is return mid\n else\n high = mid - 1; // decrease high to reach the index\n } else if (nums[mid] > target) // if the value in num is greater\n high = mid - 1; // decrease high\n else\n low = mid + 1; // else increase low\n\n }\n\n return -1; // number not found\n }", "public static int binarySearchR(int[] numbers, int target,\n int min, int max) {\n // base case\n if (min > max) {\n return -1; // not found\n } else {\n // recursive case\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid;\n } else if (numbers[mid] < target) {\n return binarySearchR(numbers, target,\n mid + 1, max);\n } else {\n return binarySearchR(numbers, target,\n min, mid - 1);\n }\n }\n }", "public int[] searchRange(int[] A, int target) {\n\t\tif (A.length == 0) {\n\t\t\treturn new int[] { -1, -1 };\n\t\t}\n\n\t\tint[] range = new int[2];\n\t\tint start = 0;\n\t\tint end = A.length - 1;\n\t\tint mid;\n\t\tint left = -1;\n\t\tint right = -1;\n\n\t\twhile (start <= end) {\n\t\t\tSystem.out.println(\"start \" + start);\n\t\t\tSystem.out.println(\"end \" + end);\n\t\t\tmid = (start + end) / 2;\n\t\t\tif (A[mid] == target) {\n\t\t\t\tleft = mid;\n\t\t\t\tright = mid;\n\t\t\t\tfor (int j = mid - 1; j >= 0; j--) {\n\t\t\t\t\tif (A[j] != target) {\n\t\t\t\t\t\tleft = j + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int k = mid + 1; k < A.length; k++) {\n\t\t\t\t\tif (A[k] != target) {\n\t\t\t\t\t\tright = k - 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (target > A[mid]) {\n\t\t\t\tstart = mid + 1;\n\t\t\t} else {\n\t\t\t\tend = mid - 1;\n\t\t\t}\n\n\t\t}\n\t\trange[0] = left;\n\t\trange[1] = right;\n\t\treturn range;\n\n\t}", "public Coordinate find(ManhattanSquare ms, int target) {\n\t\tsize = ms.N;\n\t\tCoordinate toReturn;\n\t\tmidPoint = middle(size-1);\n\n\t\t//This is to make sure that Slicer is large enough to contain target\n\t\tif ((Math.pow(size, 2) - 1) < target){\n\t\t\tthrow new IndexOutOfBoundsException(\"Target: \" + target + \" is outside of the bounds. \" +\n\t\t\t\t\t\"Max target = \" + (Math.pow(size, 2) - 1));\n\t\t} if (size < 3){\n\t\t\treturn size == 1 ? new Coordinate(0,0) : findTwoByTwo(ms, target);\n\t\t}\n\n\t\ttoReturn = findCoords(ms, target);\n\n\n\t\treturn toReturn;\n\t}", "private int binarySearch(int[] array, int left, int right, int target) {\n\t\tif (left > right) {\n\t\t\treturn -1;\n\t\t}\n\t\twhile (left <= right) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t} else if (array[mid] < target) {\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\tright = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private static <K extends Comparable<? super K>, V> @Nullable Node<K, V> findBestRoot(\n @Nullable Node<K, V> pRoot,\n @Nullable K pFromKey,\n boolean pFromInclusive,\n @Nullable K pToKey,\n boolean pToInclusive) {\n\n @Var Node<K, V> current = pRoot;\n while (current != null) {\n\n if (pFromKey != null && exceedsLowerBound(current.getKey(), pFromKey, pFromInclusive)) {\n // current and left subtree can be ignored\n current = current.right;\n } else if (pToKey != null && exceedsUpperBound(current.getKey(), pToKey, pToInclusive)) {\n // current and right subtree can be ignored\n current = current.left;\n } else {\n // current is in range\n return current;\n }\n }\n\n return null; // no mapping in range\n }", "public int binarySearch(int[] nums, int target, int left, int right) {\n int res = left - 1;\n while (left <= right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] <= target) {\n right = mid - 1;\n } else {\n res = mid;\n left = mid + 1;\n }\n }\n return res;\n }", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "boolean selectAt(double x, double y);", "private int recFind(int searchKey, int lowerbound, int upperbound) {\n\t\tint curIn = (lowerbound + upperbound) / 2;\n\t\tif (arr[curIn] == searchKey)\n\t\t\treturn curIn;\n\t\telse if (lowerbound > upperbound)\n\t\t\treturn n;\n\t\telse {\n\t\t\tif (arr[curIn] < searchKey)\n\t\t\t\treturn recFind(searchKey, curIn + 1, upperbound);\n\t\t\telse\n\t\t\t\treturn recFind(searchKey, lowerbound, curIn - 1);\n\t\t}\n\t}", "public boolean search(int[] nums, int target) {\n if (nums == null || nums.length == 0) return false;\n int l = 0;\n int r = nums.length - 1;\n int m;\n while (l <= r) {\n m = (l + r) / 2; \n if (nums[m] == target) return true;\n int low, high;\n if (nums[m] >=nums[l]) {\n if(nums[m] == nums[l]){\n l++;\n }\n else{\n if (nums[l] <= target && target < nums[m]) {\n r = m - 1;\n }\n else {\n l = m + 1;\n }\n }\n }\n else {\n if (nums[m] == nums[r]){\n r--;\n } \n else{\n if (nums[m] < target && target <= nums[r]) {\n l = m + 1;\n }\n else {\n r = m - 1;\n }\n }\n }\n }\n return false;\n }", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "int getTargetPos();", "public static int binSearchRotatedIter(int src[], int lo, int hi, int target){\n\n while(lo<=hi){\n int mid = lo + (hi-lo)/2;\n if(src[mid]==target) return mid;\n //if bottom half is sorted\n if(src[lo]<=src[mid]){\n \n if(src[lo]<=target && target<src[mid]){\n hi=mid-1;\n }else{\n lo=mid+1;\n }\n }\n //if upper half is sorted\n else{\n if(src[mid]<target && target<=src[hi]){\n lo=mid+1;\n }else{\n hi=mid-1;\n }\n }\n }\n return -1;\n}", "static int findFirstPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the first target from left\n if(mid==0 ||nums[mid-1]<nums[mid])\n return mid;\n else{\n //there are more targets available at left\n right=mid-1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "public static int binarySearch(List<Integer> values,\r\n int target) {\r\n /**\r\n * comparing with linear search, binarySearch is \r\n * more effective, and this method is also used to \r\n * find a certain number in the list of integers \r\n */\r\n int result = -1;\r\n /**\r\n * @return -1 if there is not exist a number which we find in\r\n * the list \r\n */\r\n\r\n int lo = 0;\r\n int hi = values.size() - 1;\r\n /**\r\n * declard two variables lo and hi and save the first and the last \r\n * position into these two variables \r\n */\r\n\r\n while (lo < hi && result < 0) {\r\n int mid = (lo + hi) / 2;\r\n if (target == values.get(lo)) {\r\n result = lo;\r\n } // if\r\n else if (target == values.get(mid)) {\r\n result = mid;\r\n } // else if\r\n else if (target == values.get(hi)) {\r\n result = hi;\r\n } // else if\r\n else if (target < values.get(mid)) {\r\n hi = mid - 1;\r\n } // else if\r\n else {\r\n lo = mid + 1;\r\n } // else\r\n } // while\r\n\r\n return result;\r\n }", "public static int interpolationSearch(int[] nums, int val){\n\n int lo = 0, mid = 0, hi = nums.length - 1;\n int range = nums[hi] - nums[lo];\n int normmailized = (hi - lo);\n while(nums[lo] <= val && nums[hi] >= val){\n mid = lo + ((val - nums[lo]) * normmailized)/ range; // normalization\n if(nums[mid] < val){\n lo = mid + 1;\n } else if(nums[mid] > val){\n hi = mid - 1;\n } else return mid;\n }\n if(nums[lo] == val) return lo;\n return -1;\n }", "private boolean isInBound(int current, int bound){\n return (current >= 0 && current < bound);\n }", "static int[][] bindtarg(double[] xx, double[] targ, double tol)\r\n {\r\n int[][] r = new int[2][];\r\n\r\n // Combine both arrays, preserving source with tags (1 == xx, 2 == targ), and sort\r\n TaggedDouble[] b = new TaggedDouble[xx.length + targ.length];\r\n for (int i = 0; i < xx.length; i++)\r\n b[i] = new TaggedDouble(xx[i], 1, i);\r\n for (int i = 0; i < targ.length; i++)\r\n b[i + xx.length] = new TaggedDouble(targ[i], 2, i);\r\n Arrays.sort(b, TaggedDouble.compareByDoubleAsc);\r\n\r\n // dbo = diff(bo)\r\n // hit=dbo<tol\r\n // ch=bido[1:(length(bido)-1)]!=bido[2:length(bido)]\r\n // hit=hit&ch\r\n double[] dbo = new double[b.length];\r\n boolean[] hit = new boolean[b.length];\r\n boolean[] ch = new boolean[b.length];\r\n for (int i = 1; i < b.length; i++)\r\n {\r\n dbo[i] = b[i].f - b[i - 1].f;\r\n ch[i] = b[i].tag != b[i - 1].tag;\r\n hit[i] = dbo[i] < tol && ch[i];\r\n }\r\n\r\n // rhit=c(hit[2:length(hit)],F)\r\n // rbet=c(dbo[2:length(dbo)]<dbo[1:(length(dbo)-1)],F)\r\n boolean[] rhit = new boolean[b.length];\r\n boolean[] rbet = new boolean[b.length];\r\n for (int i = 0; i < b.length - 1; i++)\r\n {\r\n rhit[i] = hit[i+1];\r\n rbet[i] = dbo[i+1]<dbo[i];\r\n }\r\n rhit[b.length-1] = false;\r\n rbet[b.length-1] = false;\r\n\r\n // lhit=c(F,hit[1:(length(hit)-1)])\r\n // lbet=c(F,dbo[2:length(dbo)]>dbo[1:(length(dbo)-1)])\r\n boolean[] lhit = new boolean[b.length];\r\n boolean[] lbet = new boolean[b.length];\r\n lhit[0] = false;\r\n lbet[0] = false;\r\n for (int i = 1; i < b.length; i++)\r\n {\r\n lhit[i] = hit[i-1];\r\n lbet[i] = dbo[i]>dbo[i-1];\r\n }\r\n\r\n // hit=hit&(!(rhit&rbet))&(!(lhit&lbet))\r\n int count = 0;\r\n int xxcount = 0;\r\n int targcount = 0;\r\n for (int i = 0; i < b.length; i++)\r\n {\r\n hit[i] = hit[i] && (!(rhit[i]&&rbet[i]) && !(lhit[i]&&lbet[i]));\r\n if (hit[i])\r\n {\r\n count++;\r\n if (1 == b[i].tag)\r\n xxcount++;\r\n if (2 == b[i].tag)\r\n targcount++;\r\n }\r\n }\r\n\r\n _log.debug(\"Found \" + count + \" hits (\" + xxcount + \" \" + targcount + \")\");\r\n\r\n r[0] = new int[count];\r\n r[1] = new int[count];\r\n int xc = 0;\r\n int tc = 0;\r\n for (int i = 0; i < b.length; i++)\r\n if (hit[i])\r\n if (1 == b[i].tag)\r\n {\r\n r[0][xc++] = b[i].index;\r\n r[1][tc++] = b[i-1].index;\r\n }\r\n else if (2 == b[i].tag)\r\n {\r\n r[1][tc++] = b[i].index;\r\n r[0][xc++] = b[i - 1].index;\r\n }\r\n\r\n return r;\r\n }", "public int[] searchRange(int[] A, int target) {\n int left = 0 ;\n int right = A.length - 1;\n int mid;\n int[] lr = new int[2];\n while(left <= right){\n \tmid = (left + right) /2 ;\n \tif(A[mid] == target){\n \t\tlr[0] = searchLeft(A,left,mid,target);\n \t\tlr[1] = searchRight(A,mid,right,target);\n \t\treturn lr;\n \t}\n \telse if (A[mid] < target){\n \t\tleft = mid + 1;\n \t}\n \telse{\n \t\tright = mid - 1;\n \t}\n }\n lr[0] = -1;\n lr[1] = -1;\n return lr;\n }", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "private int search(Bitboard board, int posMask, int turn) {\n // if this player doesn't even \"own\" any connected components, they're in bad shape...\n if (!ownerToCCs.containsKey(turn)) {\n return 100;\n }\n\n // perform basic BFS to explore the connected component\n // we're finding distance to an \"owned\" connected component\n int target = ownerToCCs.get(turn);\n int orthogonal, nextMask, altDist;\n int myVisit = 0;\n\n searchQueue.clear();\n prev.clear();\n dist.clear();\n\n searchQueue.add(posMask);\n dist.put(posMask, 0);\n\n while (!searchQueue.isEmpty()) {\n // get next position off of queue\n posMask = searchQueue.poll();\n\n // ignore if visited, invalid location, or opponent owns\n if ((myVisit & posMask) != 0 || !board.isValid(posMask)\n || board.owns(posMask, 1 - turn))\n continue;\n myVisit |= posMask;\n\n // check if it's a target\n if ((target & posMask) != 0) {\n // return distance to posMask\n return dist.get(prev.get(posMask)) + 1;\n }\n\n // continue BFS\n orthogonal = BitMasks.orthogonal.get(posMask);\n while (orthogonal != 0) {\n nextMask = orthogonal & ~(orthogonal - 1);\n orthogonal ^= nextMask;\n\n altDist = dist.get(posMask) + 1;\n if (altDist < dist.getOrDefault(nextMask, Integer.MAX_VALUE)) {\n prev.put(nextMask, posMask);\n dist.put(nextMask, altDist);\n }\n searchQueue.add(nextMask);\n }\n }\n // no path found to a target (the circle is isolated)\n return 100;\n }", "public abstract HalfOpenIntRange approximateSpan();", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "static int question2(int target, int[] arr) {\r\n\t\treturn binarySearch(arr, arr[0], arr[arr.length-1], target);\r\n\t}", "public int searchInNearlySortedArrayUtil(int[] nums, int low, int high, int target) {\n\n if (low > high)\n return -1;\n\n int mid = low + (high - low) / 2;\n\n if (nums[mid] == target) {\n return mid;\n }\n\n if (mid - 1 >= low && nums[mid - 1] == target) {\n return mid - 1;\n }\n\n if (mid + 1 <= high && nums[mid + 1] == target) {\n return mid + 1;\n }\n\n if (target < nums[mid]) {\n return searchInNearlySortedArrayUtil(nums, low, mid - 2, target);\n } else {\n return searchInNearlySortedArrayUtil(nums, mid + 2, high, target);\n }\n }", "@Override // com.google.common.collect.ImmutableSortedSet\n public int indexOf(Object target) {\n if (!contains(target)) {\n return -1;\n }\n Comparable comparable = (Comparable) target;\n long total = 0;\n UnmodifiableIterator it = ImmutableRangeSet.this.ranges.iterator();\n while (it.hasNext()) {\n Range range = (Range) it.next();\n if (range.contains(comparable)) {\n return Ints.saturatedCast(((long) ContiguousSet.create(range, this.domain).indexOf(comparable)) + total);\n }\n total += (long) ContiguousSet.create(range, this.domain).size();\n }\n throw new AssertionError(\"impossible\");\n }", "public static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }", "public static int iterativeBinarySearch(ArrayList<Pets> inputList, int targetId){\n\t\tint startIndex = 0;\n\t\tint endIndex = inputList.size()-1;\n\t\t\n\t\t// while the startIndex does not exceed the endIndex\n\t\twhile (startIndex <= endIndex){\n\t\t\t//calculate the midpoint\n\t\t\tint midpoint = (startIndex + endIndex)/2;\n\t\t\tif (targetId < inputList.get(midpoint).getId()){\n\t\t\t\t// if the targetId is smaller than the midpoint id, set the new endIndex to be the midpoint minus one.\n\t\t\t\tendIndex = midpoint-1;\n\t\t\t} else if (targetId > inputList.get(midpoint).getId()){\n\t\t\t\t// if the target Id is larger than the midpoint id, set the new startIndex to be the midpoint plus one.\n\t\t\t\tstartIndex = midpoint+1;\n\t\t\t} else {\n\t\t\t\t// last option is if the target id is equal to the midpoint id, we return our found result.\n\t\t\t\treturn midpoint;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if we do not find the id within the input list, return -1.\n\t\treturn -1;\n\t}", "private int getLowerBound(Object problem, int upperbound)\n {\n Graph tsp = (Graph)problem;\n if (weight == null)\n weight = new double[tsp.size()];\n hki = new HeldKarpIterative( tsp, included, includedT, excluded, excludedT, iterations, weight, upperbound);\n hki.compute();\n tour = hki.isTour();\n bound = hki.getBound();\n hasRun = true;\n// System.out.println(hki.debugDump());\n return bound;\n }", "@Override\r\n public E find(E target) {\r\n return findHelper(root,target,0);\r\n }", "public int binarySearchIterative(int[] array,int target) {\n var left = 0;\n var right = array.length -1;\n while (left <= right) {\n int middle = (left + right) / 2;\n if (array[middle] == target)\n return middle;\n if (array[middle] < target)\n left = middle + 1;\n else\n right = middle - 1;\n }\n return -1;\n }", "public static int[] searchRange(int[] nums, int target) {\n int right=nums.length-1;\n int[] result=new int[2];\n if(nums==null || nums.length==0)\n return new int[]{-1,-1};\n\n result[0]= findFirstPosition(nums,target,0,right);\n //if first position itself is -1 it means there is no target in the num\n if(result[0]!=-1)\n result[1]= findLastPosition(nums,target,result[0],right);\n else\n result[1]=-1;\n\n return result;\n }", "private static <T extends Comparable<T>> boolean search(T target, int min, int max, T... list) {\n if (min > max)\n return false;\n\n int middle = (min + max) / 2;\n\n if (list[middle].compareTo(target) == 0)\n return true;\n\n else if (list[middle].compareTo(target) < 0)\n return search(target, middle + 1, max, list);\n\n else\n return search(target, min, middle - 1, list);\n }", "private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n else if (cmp < 0) {\n start = mid + 1;\n }\n else {\n end = mid;\n }\n }\n return start;\n }", "public Rect getBound() {\n return new Rect((int) (x - radius), (int) (y - radius), (int) (x + radius), (int) (y + radius));\n }", "public int[] searchRange(int[] nums, int target) \n{\n return helper(nums, target, 0, nums.length - 1);\n}", "@Override\n public List<STPoint> nearestNeighbor(STPoint needle, STPoint boundValues, int n, int dim) {\n\n STPoint min = new STPoint(needle.getX()-boundValues.getX(), needle.getY()-boundValues.getY(), needle.getT()-boundValues.getT());\n STPoint max = new STPoint(needle.getX()+boundValues.getX(), needle.getY()+boundValues.getY(), needle.getT()+boundValues.getT());\n\n STRegion range = new STRegion(min, max);\n List<STPoint> allPoints = range(range);\n\n Quicksort qs = new Quicksort();\n\n qs.sortNearPoints(needle, allPoints, 0, allPoints.size() - 1, dim);\n\n allPoints.remove(0);//remove itself\n while(allPoints.size() > n){\n allPoints.remove(allPoints.size()-1);\n }\n\n if(allPoints.size()< 1){return null;}////\n\n return allPoints;\n }", "public Coords bound(final Coords point)\r\n {\r\n int xx = point.getX();\r\n int yy = point.getY();\r\n if(xx < x)\r\n {\r\n xx = x;\r\n }\r\n if(xx > x + width)\r\n {\r\n xx = x + width;\r\n }\r\n if(yy < y)\r\n {\r\n yy = y;\r\n }\r\n if(yy > y + height)\r\n {\r\n yy = y + height;\r\n }\r\n return new Coords(xx, yy);\r\n }" ]
[ "0.8574115", "0.8528217", "0.8267487", "0.80291265", "0.7377051", "0.70830834", "0.65069354", "0.6462995", "0.60836613", "0.6009745", "0.59601396", "0.57814085", "0.577707", "0.5773947", "0.57693696", "0.5667412", "0.56659406", "0.5664175", "0.5649442", "0.5636825", "0.56354624", "0.56228095", "0.5609538", "0.5603017", "0.5591593", "0.55894244", "0.55517256", "0.55467695", "0.55322766", "0.5518242", "0.54910916", "0.54906213", "0.547009", "0.54543734", "0.5451442", "0.54404813", "0.5411134", "0.5387008", "0.53831637", "0.537606", "0.53669584", "0.5364925", "0.5359671", "0.5355446", "0.5353534", "0.5351524", "0.53427166", "0.53293586", "0.5323849", "0.531648", "0.53122395", "0.5282258", "0.5276437", "0.52534676", "0.5253189", "0.5236102", "0.52187693", "0.52042055", "0.5195636", "0.51940966", "0.5189514", "0.5157711", "0.51477927", "0.51437986", "0.51411414", "0.5136293", "0.5122804", "0.5115025", "0.5111144", "0.5101634", "0.5098307", "0.5094593", "0.50721025", "0.5067769", "0.5061496", "0.5047489", "0.50210285", "0.5019918", "0.50188065", "0.5016234", "0.50148994", "0.5010822", "0.50089055", "0.5001612", "0.49995995", "0.49974686", "0.49904138", "0.499012", "0.49895144", "0.49882448", "0.49845216", "0.49819356", "0.49671713", "0.49663088", "0.4960237", "0.4939289", "0.4935999", "0.49327835", "0.49314284", "0.4931025" ]
0.78020716
4
same contract as findCoordElement(); in addition, 1 is returned when the target is not contained in any interval LOOK not using bounded
private int findCoordElementDiscontiguousInterval(double target, boolean bounded) { int idx = findSingleHit(target); if (idx >= 0) return idx; if (idx == -1) return -1; // no hits // multiple hits = choose closest (definition of closest will be based on axis type) return findClosestDiscontiguousInterval(target); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "public int findCoordElement(double target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n case regularPoint:\n return findCoordElementRegular(target, bounded);\n case irregularPoint:\n case contiguousInterval:\n return findCoordElementContiguous(target, bounded);\n case discontiguousInterval:\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }", "private int findClosestDiscontiguousInterval(double target) {\n boolean isTemporal = orgGridAxis.getAxisType().equals(AxisType.Time);\n return isTemporal ? findClosestDiscontiguousTimeInterval(target) : findClosestDiscontiguousNonTimeInterval(target);\n }", "private boolean intervalContains(double target, int coordIdx) {\n double midVal1 = orgGridAxis.getCoordEdge1(coordIdx);\n double midVal2 = orgGridAxis.getCoordEdge2(coordIdx);\n boolean ascending = midVal1 < midVal2;\n return intervalContains(target, coordIdx, ascending, true);\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "@Override // com.google.common.collect.ImmutableSortedSet\n public int indexOf(Object target) {\n if (!contains(target)) {\n return -1;\n }\n Comparable comparable = (Comparable) target;\n long total = 0;\n UnmodifiableIterator it = ImmutableRangeSet.this.ranges.iterator();\n while (it.hasNext()) {\n Range range = (Range) it.next();\n if (range.contains(comparable)) {\n return Ints.saturatedCast(((long) ContiguousSet.create(range, this.domain).indexOf(comparable)) + total);\n }\n total += (long) ContiguousSet.create(range, this.domain).size();\n }\n throw new AssertionError(\"impossible\");\n }", "public int getLowerBound ();", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public int findPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "public int getHit(Rectangle[] bound, int mx, int my) {\n\t\t for (int i=0; i < bound.length; i++) {\n\t\t \tif (bound[i].contains(mx,my)) {\n\t\t \t\treturn i;\n\t\t \t}\n\t\t }\n\t\t return -1;\n\t}", "private int betweenPoints(int value,Individual ind) {\n\t\tfor(int i=_point1; i<_point2;i++) {\n\t\t\tif(value==ind.getGene(i)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "public int getBound();", "int toIndex(int x, int y);", "synchronized protected int findPoint(final int x_p, final int y_p, final long layer_id, final double mag) {\n \t\tint index = -1;\n \t\tdouble d = (10.0D / mag);\n \t\tif (d < 2) d = 2;\n \t\tdouble min_dist = Double.MAX_VALUE;\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tdouble dist = Math.abs(x_p - p[0][i]) + Math.abs(y_p - p[1][i]);\n \t\t\tif (layer_id == p_layer[i] && dist <= d && dist <= min_dist) {\n \t\t\t\tmin_dist = dist;\n \t\t\t\tindex = i;\n \t\t\t}\n \t\t}\n \t\treturn index;\n \t}", "private boolean intervalContains(double target, int coordIdx, boolean ascending, boolean closed) {\n // Target must be in the closed bounds defined by the discontiguous interval at index coordIdx.\n double lowerVal = ascending ? orgGridAxis.getCoordEdge1(coordIdx) : orgGridAxis.getCoordEdge2(coordIdx);\n double upperVal = ascending ? orgGridAxis.getCoordEdge2(coordIdx) : orgGridAxis.getCoordEdge1(coordIdx);\n\n if (closed) {\n return lowerVal <= target && target <= upperVal;\n } else {\n return lowerVal <= target && target < upperVal;\n }\n }", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "public int search(int[] A, int target) {\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n while (start + 1 < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n }\n if (A[start] < A[mid]) {\n // situation 1, red line\n if (A[start] <= target && target <= A[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n } else {\n // situation 2, green line\n if (A[mid] <= target && target <= A[end]) {\n start = mid;\n } else {\n end = mid;\n }\n }\n } // while\n\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n return -1;\n }", "public int getXY(int x, int y);", "private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }", "public int find(int[] nums, int target, int start, int end){\n int middle = (start + end) / 2;\n\n while (start <= end){\n middle = (start + end) >> 1;\n if(nums[middle] == target){\n return middle;\n }\n else if(nums[middle] > target){\n end = middle - 1;\n }\n else {\n start = middle + 1;\n }\n }\n return -1;\n }", "public int[] searchRange(int[] nums, int target) {\r\n\r\n int[] res = {-1, -1};\r\n int left = lowerBound(nums, target);\r\n if (left != -1) {\r\n res[0] = left;\r\n res[1] = upperBound(nums, target);\r\n }\r\n return res;\r\n\r\n\r\n }", "public abstract HalfOpenIntRange approximateSpan();", "boolean selectTo(double x, double y);", "synchronized protected int findNearestPoint(final int x_p, final int y_p, final long layer_id) {\n \t\tint index = -1;\n \t\tdouble min_dist = Double.MAX_VALUE;\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tif (layer_id != p_layer[i]) continue;\n \t\t\tdouble sq_dist = Math.pow(p[0][i] - x_p, 2) + Math.pow(p[1][i] - y_p, 2);\n \t\t\tif (sq_dist < min_dist) {\n \t\t\t\tindex = i;\n \t\t\t\tmin_dist = sq_dist;\n \t\t\t}\n \t\t}\n \t\treturn index;\n \t}", "public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }", "int getTargetPos();", "static int findFirstPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the first target from left\n if(mid==0 ||nums[mid-1]<nums[mid])\n return mid;\n else{\n //there are more targets available at left\n right=mid-1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "public abstract Element getElement(Point2D point) throws PositionEX;", "public Coordinate find(ManhattanSquare ms, int target) {\n\t\tsize = ms.N;\n\t\tCoordinate toReturn;\n\t\tmidPoint = middle(size-1);\n\n\t\t//This is to make sure that Slicer is large enough to contain target\n\t\tif ((Math.pow(size, 2) - 1) < target){\n\t\t\tthrow new IndexOutOfBoundsException(\"Target: \" + target + \" is outside of the bounds. \" +\n\t\t\t\t\t\"Max target = \" + (Math.pow(size, 2) - 1));\n\t\t} if (size < 3){\n\t\t\treturn size == 1 ? new Coordinate(0,0) : findTwoByTwo(ms, target);\n\t\t}\n\n\t\ttoReturn = findCoords(ms, target);\n\n\n\t\treturn toReturn;\n\t}", "int getXMin();", "public int locationOf(E elem) {\r\n\t\tInteger tentativeLoc = this.locations.get(elem);\r\n\t\tif (tentativeLoc == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.locations.get(elem);\r\n\t}", "boolean selectAt(double x, double y);", "boolean isInInterval(int baseIndex);", "public int[] searchRange(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return new int[] {-1, -1};\n int left = 0, right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] >= target) {\n right = mid;\n }\n else{\n left = mid;\n }\n }\n int leftBound = -1, rightBound = -1;\n if (A[left] == target)\n leftBound = left;\n else if (A[right] == target)\n leftBound = right;\n\n left = 0;\n right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] <= target) {\n left = mid;\n }\n else {\n right = mid;\n }\n }\n if (A[right] == target) rightBound = right;\n else if (A[left] == target) rightBound = left;\n return new int[] {leftBound, rightBound};\n }", "private int findExtremePosition(int[] nums, int target, boolean left){\n int low = 0, high = nums.length-1, mid, index=-1;\n while(low<=high){\n mid = low + (high-low)/2;\n // target is found\n if(target==nums[mid]){\n // store the index\n index = mid;\n // continue moving left to find leftmost index of target element\n if(left){\n high = mid-1;\n // continue moving right to find rightmost index of target element\n }else {\n low = mid+1;\n }\n } else if(target<nums[mid]) {\n high = mid-1;\n } else {\n low = mid+1;\n }\n }\n //loop breaks when low>high, return the last recorded index\n return index;\n }", "public Ndimensional getStartPoint();", "public Point valueFor(Point punto) throws MmwInterpolationOutOfBoundsException { \n\t\t\n\t\tif((punto.getX().longValue() < punti.first().getX().longValue())||\n\t\t\t\t(punto.getX().longValue() > punti.last().getX().longValue())) {\n\t\t\t\n\t\t\tthrow new MmwInterpolationOutOfBoundsException(\"Fuori range\");\n\t\t}\n\t\tif(punto.getX().equals(punti.first().getX())) {\n\t\t\t\n\t\t\treturn punti.first();\n\t\t}\n\t\tif(punto.getX().equals(punti.last().getX())) {\n\t\t\t\n\t\t\treturn punti.last();\n\t\t}\n\t\t\n\t\tPoint prec = punti.floor(punto);\n\t\tPoint succ = punti.ceiling(punto);\n\t\tif (prec.equals(succ)) {//se precedente e successivo sono LO STESSO PUNTO(oggetto) vuol dire\n\t\t\t\t\t\t\t\t//che il punto da interpolare coincide con un campione reale presente nel Set\n\t\t\tpunto.setY(round(succ.getY()));\n\t\t\t//lo score di qualità è massimo perchè i punti coincidono\n\t\t\tpunto.setScore(1.0);\n\t\t} else { // se ho effettivamente due estremi diversi dell'intervallo \n\t\t\t\t\t//faccio l'interpolazione\n\t\t\tDouble m = (succ.getY()-prec.getY())/(succ.getX()-prec.getX()); //coeffic. angolare\n\t\t\tpunto.setY(round(prec.getY()+m*(punto.getX()-prec.getX())));\n\t\t\t\n\t\t\tpunto.setScore(round(this.score(prec.getX(), succ.getX(), punto.getX())));\n\t\t}\n\t\treturn punto;\n\t}", "int getHitpoints(Unit unit);", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "public abstract int getNumberOfLivingNeighbours(int x, int y);", "public int whoWasIt(int x, int y) {\r\n\t\tint result = -1;\r\n\t\tfor (int i = 0; i < Util.NUMBER_OF_RELATIONSHIPS; i++) {\r\n\r\n\t\t\t// logger.log(Level.FINEST, \"trying \" + i);\r\n\t\t\tif (isBetween2D(x, y, sections[i].x1, sections[i].y1,\r\n\t\t\t\t\tsections[i].x2, sections[i].y2)) {\r\n\t\t\t\tresult = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "static int Floor(int[] arr, int target){\r\n int start = 0;\r\n int end = arr.length - 1;\r\n\r\n while(start <= end){\r\n //Find the middle element\r\n int mid = start + (end - start) / 2;\r\n if (target < arr[mid]){\r\n end = mid - 1;\r\n }else if (target > arr[mid]){\r\n start = mid + 1;\r\n }else {\r\n return mid;\r\n }\r\n }\r\n return start;\r\n }", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "private int getIdx(int elem, int[][] jobs) {\n int start = 0;\n int end = jobs.length - 1;\n\n while (start <= end) {\n int mid = start + (end - start) / 2;\n int cur = jobs[mid][0];\n if (cur >= elem) {\n end = mid - 1;\n } else if (cur < elem) {\n start = mid + 1;\n }\n }\n\n return start;\n }", "public abstract Node getBoundingNode();", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "private int count1D(SearchContext ctx) {\n\t\tfinal SearchNode curNode = ctx.current();\n\n\t\tfinal int last1d = Integer.numberOfLeadingZeros(~curNode.contained);\n\t\tWaveletMatrix wm = zoWM[last1d];\n\t\tfinal WMNode wmNode = curNode.wmNodes[last1d];\n\t\tfinal int lv = wmNode.level;\n\t\tfinal int start = wmNode.start;\n\t\tfinal int end = start + curNode.width;\n\n\t\t// query range\n\t\tfinal int qmin = ctx.qmins[last1d];\n\t\tfinal int qmax = ctx.qmaxs[last1d];\n\n\t\t// path range (possible range of WaveletMatrix node)\n\t\tfinal int pmin = wmNode.path;\n\t\tfinal int pmax = pmin | ((1 << (lv+1)) - 1);\n\n\t\t// relation of query range and path range intersection\n\t\t// [qmin , qmax] query range\n\t\t// [pmin,pmax] path range contain minimum of query range\n\t\t// [pmin,pmax] path range contain maximum of query range\n\t\t// [pmin , pmax] path range fully contain query range\n\n\t\tif (pmax <= qmax) {\n\t\t\treturn end - start - little1D(lv, start, end, qmin, wm);\n\t\t}\n\t\telse if (qmin <= pmin) {\n\t\t\treturn little1D(lv, start, end, qmax + 1, wm);\n\t\t}\n\t\telse {\n\t\t\treturn little1D(lv, start, end, qmax + 1, wm) - little1D(lv, start, end, qmin, wm);\n\t\t}\n\t}", "private static int search(int[] nums, int target, int start, int end)\r\n\t{\n\t\tif (end == start)\r\n\t\t\treturn nums[start] == target ? start : -1;\r\n\t\t\r\n\t\tif(end - start == 1)\r\n\t\t{\r\n\t\t\tif(nums[start] == target)\r\n\t\t\t\treturn start;\r\n\t\t\tif(nums[end] == target)\r\n\t\t\t\treturn end;\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\t// If there are more than two elements\r\n\t\tint mid = (start + end) / 2;\r\n\t\tif (nums[mid] == target)\r\n\t\t\treturn mid;\r\n\t\telse if (nums[mid] > target)\r\n\t\t\treturn search(nums, target, start, mid - 1);\r\n\t\telse\r\n\t\t\treturn search(nums, target, mid + 1, end);\r\n\t}", "public static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }", "public int search(int[] A, int target) {\n\n\t\tint s = 0;\n\t\tint e = A.length - 1;\n\n\t\twhile (s <= e) {\n\t\t\tint m = (s + e) / 2;\n\n\t\t\tif (target == A[m])\n\t\t\t\treturn m;\n\t\t\telse if (A[s] <= A[m]) {\n\t\t\t\tif (A[s] <= target && target < A[m])\n\t\t\t\t\te = m;\n\t\t\t\telse\n\t\t\t\t\ts = m + 1;\n\t\t\t} else {\n\t\t\t\tif (A[m] < target && target <= A[e])\n\t\t\t\t\ts = m + 1;\n\t\t\t\telse\n\t\t\t\t\te = m;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public abstract double getDistance(int[] end);", "public int search(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return -1;\n int start = 0, end = A.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (A[mid] == target) return mid;\n if (A[mid] < A[start]) {\n if (target <= A[end] && target > A[mid]){\n start = mid;\n }\n else {\n end = mid;\n }\n }\n else {\n if (target >= A[start] && target < A[mid]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n }\n if (A[start] == target) return start;\n if (A[end] == target) return end;\n return -1;\n }", "public int findLHSOrigin(int[] nums) {\n if (nums.length < 2)\n return 0;\n\n Map<Double, Integer> map = new HashMap<>();\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < nums.length; i++) {\n map.put(nums[i] - 0.5, map.getOrDefault(nums[i] - 0.5, 0) + 1);\n map.put(nums[i] + 0.5, map.getOrDefault(nums[i] + 0.5, 0) + 1);\n set.add(nums[i]);\n }\n\n int ans = 0;\n for (Double d : map.keySet()) {\n// System.out.println(d +\" \"+ map.get(d));\n if (set.contains((int) (d - 0.5)) && set.contains((int) (d + 0.5))) {\n ans = ans < map.get(d) ? map.get(d) : ans;\n }\n }\n return ans;\n }", "private int findPosition(int[] src, int start, int end, int key) {\n\t\tif (end < start || start < 0)\n\t\t\treturn -1;\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\tif (src[i] == key) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t} \n\n\t\treturn -1;\n\t}", "int getBoundsX();", "public static void searchRange(int[] nums, int target){\n int index = binarySearch(nums, target);\n System.out.println(index);\n\n }", "private int findUpperBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] > target) right = mid;\n else left = mid + 1;\n }\n return (left > 0 && nums[left - 1] == target) ? left - 1 : -1;\n }", "protected Unit target() {\n\t\tUnit closest = null; // this variable will contain the closest Unit\n\t\tDouble min = (double) projectile_range; // this will contain the lowest distance\n\t\tList<Entity> entities = level.getEntities();\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\t\t\tEntity e = entities.get(i);\n\t\t\tUnit u = (Unit) e; // casts e to Unit\n\t\t\tif (u.equals(this)) continue; // discounts self\n\t\t\tif (u.UNIT_R != UNIT_G && u.UNIT_G != UNIT_R) continue; // discounts Units from own team\n\t\t\tif (!(e instanceof Unit)) continue; // discounts non-Unit entities\n\n\t\t\tdouble distance = MathMachine.distance((u.getX() - x), (u.getY() - y));\n\t\t\t/*\n\t\t\t * int r = 0; int g = 0; for (int y = 0; y < level.getHeight() * 16; y++) { for (int x = 0; x < level.getWidth() * 16; x++) { if (level.redPixels[x + y * level.getWidth() * 16] == true) r++; if (level.greenPixels[x + y * level.getWidth() * 16] == true )g++; System.out.println(\"r: \" + r + \", \" + g); } }\n\t\t\t */\n\t\t\tif (UNIT_R) { // if it is a red unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tint xt = (int) Math.round(u.getX());\n\t\t\t\t\tint yt = (int) Math.round(u.getY());\n\t\t\t\t\tif (level.redPixels[(int) Math.round(xt + level.getWidth() * 16.0 * yt)]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (UNIT_G) { // if it is a green unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tSystem.out.println(level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]);\n\n\t\t\t\t\tif (level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn closest; // the program is fucked if null happens. just a headsup. hopefully you will remember if you get a null pointer exception.\n\t}", "static int search(int[] A, int target) {\n if(A==null||A.length==0) return -1;\n if(A.length==1) return A[0]==target?0:-1;\n int maxidx = findMaxPos(A);\n //find the partition position\n if(maxidx==A.length-1) return findPos(A,0,A.length-1, target);\n else if(A[A.length-1]>=target) return findPos(A, maxidx+1, A.length-1, target);\n else return findPos(A,0, maxidx, target);\n }", "private int getPos(Label l) {\n\t\tRectangle2D pRect = l.getRect();\n\t\t//System.out.println(pRect);\n\t\tint index = -1;\n\t\tdouble verticalMidpoint = bounds.getX() + (bounds.getWidth() / 2.0d);\n\t\tdouble horizontalMidpoint = bounds.getY() + (bounds.getHeight() / 2.0d);\n\t \n\t\t//drawPoint(new Vector2f((double)verticalMidpoint,(double)horizontalMidpoint), 0.05f, Color.WHITE);\n\t\t\n\t\t// Object can completely fit within the top quadrants\n\t\tboolean topQuadrant = (\n\t\t\t\tpRect.getY() < \n\t\t\t\thorizontalMidpoint && \n\t\t\t\tpRect.getY() + \n\t\t\t\tpRect.getHeight() < \n\t\t\t\thorizontalMidpoint);\n\t\t// Object can completely fit within the bottom quadrants\n\t\tboolean bottomQuadrant = (pRect.getY() > horizontalMidpoint);\n\t\t\n\t\t//System.out.println(topQuadrant);\n\t\t\n\t\t// Object can completely fit within the left quadrants\n\t\tif (pRect.getX() < verticalMidpoint && pRect.getX() + pRect.getWidth() < verticalMidpoint) {\n\t\t\tif (topQuadrant) {\n\t\t\t\tindex = 1;\n\t\t\t}\n\t\t\telse if (bottomQuadrant) {\n\t\t\t\tindex = 2;\n\t\t\t}\n\t\t}\n\t\t// Object can completely fit within the right quadrants\n\t\telse if (pRect.getX() > verticalMidpoint) {\n\t\t\tif (topQuadrant) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\telse if (bottomQuadrant) {\n\t\t\t\tindex = 3;\n\t\t\t}\n\t\t}\n\t \n\t\treturn index;\n\t}", "@Test\n public void testOverboundsInside() {\n Coordinate a, b, c, d;\n a = new Coordinate2D(2, 2, 0);\n b = new Coordinate2D(3, 3, 0);\n c = new Coordinate2D(2, 0, 0);\n d = new Coordinate2D(4, 2, 0);\n\n int actual, expected;\n\n expected = 0;\n actual = hex.getDistanceOverBoundary(a);\n assertEquals(expected, actual);\n\n expected = 0;\n actual = hex.getDistanceOverBoundary(b);\n assertEquals(expected, actual);\n\n expected = 0;\n actual = hex.getDistanceOverBoundary(c);\n assertEquals(expected, actual);\n\n expected = 0;\n actual = hex.getDistanceOverBoundary(d);\n assertEquals(expected, actual);\n }", "private Coordinate getNeighbour(boolean locked) {\n\t\tSet<Coordinate> set = locked ? lockedNeighbours : unlockedNeighbours;\n\t\tif (set.isEmpty()) return null;\n\t\treturn (Coordinate) set.toArray()[new Random().nextInt(set.size())];\n\t}", "static int linearSearch(int[] arr, int target){\r\n if(arr.length == 0){\r\n return -1;\r\n }\r\n\r\n for (int i = 0; i < arr.length; i++) {\r\n if(arr[i] == target){\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }", "private int binarySearch(int[] array, int min, int max, int target){\r\n\r\n //because there is often not an answer that is equal to our target,\r\n //this algorithm is deisgned to find the element that it would go after in the array\r\n //because sometimes that is smaller than anything in the list it could bisect at a value that is not ideal.\r\n //however the final check handles 4 possible answers so this is not really an issue.\r\n if(target >= array[max]) return max;\r\n else if(target < array[min]) return min;\r\n if(min + 1 == max) return min;\r\n\r\n int midPoint = (min + max) / 2;\r\n\r\n if(target > array[midPoint]){\r\n return binarySearch(array, midPoint, max, target);\r\n }else return binarySearch(array, min, midPoint, target);\r\n }", "public int getOptimalNumNearest();", "public int isInBounds(T a);", "public int search(int[] nums, int target) {\n if (null == nums || nums.length == 0) {\n return -1;\n }\n int start = 0;\n int end = nums.length - 1;\n while (start <= end) {\n int mid = (start + end) / 2;\n if (nums[mid] == target)\n return mid;\n if (nums[start] <= nums[mid]) {\n if (target < nums[mid] && target >= nums[start])\n end = mid - 1;\n else\n start = mid + 1;\n }\n if (nums[mid] <= nums[end]) {\n if (target > nums[mid] && target <= nums[end])\n start = mid + 1;\n else\n end = mid - 1;\n }\n }\n return -1;\n }", "private static int upperBound(int[] A, int target) {\n int max = A.length;\n int min = -1;\n while (max - min > 1) {\n int mid = ( max + min ) / 2;\n if(A[mid] <= target) {\n min = mid;\n } else {\n max = mid;\n }\n }\n\n return max;\n\n }", "public static int search(int[] nums, int target) {\n int low=0;\n int high=nums.length-1;\n int middle=(high+low)>>1;\n\n for(int i=0;i<nums.length;i++){\n int num = nums[middle];\n if(target>num){\n low=middle+1;\n middle=(high+low)>>1;\n }else if(target<num){\n high=middle-1;\n middle=(high+low)>>1;\n } else{\n return middle;\n }\n\n }\n\n return -1;\n }", "public V getLowerBound();", "public static int searchInMountainArray(int[] arr, int target){\n int indexOfPeak = peakIndexInMountainArray(arr);\n\n int firstIndex = BinarySearch(arr, target, 0, indexOfPeak);\n if(firstIndex != -1){\n return firstIndex;\n }\n //try to search in second half.\n return BinarySearch(arr, target, indexOfPeak, arr.length-1);\n }", "public int\ngetNodeIndexMin();", "public int check_node(double x1,double y1) //checks the existence of a particular co-ordinate\r\n\t{\n\t\tfor(int i=0;i<nodes.size();i++)\t\t // it returns that index or returns -1;\r\n\t\t{\r\n\t\t\tif(nodes.get(i)[0]==x1 && nodes.get(i)[1]==y1 )\r\n\t\t\t\treturn i;\r\n\t\t}\r\n\t\t return -1;\r\n\t}", "public int index(int want) throws InvalidRangeException {\n if (want < first)\n throw new InvalidRangeException(\"elem must be >= first\");\n int result = (want - first) / stride;\n if (result > length)\n throw new InvalidRangeException(\"elem must be <= first = n * stride\");\n return result;\n }", "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "@Override\n\tpublic int findSegment(int x, int y) {\n\t\treturn -1;\n\t}", "public static int binarySearchWithTheClosestNum(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// when we reach here, means target is not in the array, so we need to find the closet element from num[left] or num[right]\n\t\t// notice that, right is smailler than left now, according to the while condition, if it breaks, left > right\n\t\treturn Math.abs(target - num[left]) > Math.abs(target - num[right]) ? right : left;\n\t}", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}", "public static int searchTriplet(int[] arr, int targetSum) {\n\n Arrays.sort(arr); // need to make fiding number easier n * log(n) with qsort\n // we fix one value\n\n // internal array would have: value, left, right, target\n // when sum value+left+right.\n // if exactly target => return result\n // if > than target sum: move right pointer. Calculate absolute difference.\n // if < than target sum: move left pointers. Calculate absolute difference.\n // if at any point absolute difference becomes larger -> there is no point to continue iteratig\n // (^ how true if that?)\n // at the end of one cycle return absolute difference. If it is zero -> early exist,\n // if not, try again with different fixed number\n\n int smallestDifference = Integer.MAX_VALUE;\n for (int i = 0; i < arr.length - 2; i++) {\n int left = i + 1;\n int right = arr.length - 1;\n\n while (left < right) {\n int diffWithTarget = targetSum - arr[i] - arr[left] - arr[right];\n if (diffWithTarget == 0) {\n return diffWithTarget;\n }\n\n if (Math.abs(diffWithTarget) < Math.abs(smallestDifference)) {\n smallestDifference = diffWithTarget;\n }\n\n if (diffWithTarget > 0) {\n left++;\n } else {\n right--;\n }\n }\n }\n return targetSum - smallestDifference;\n }", "private int getFirstAttackerAt(float x, float y) {\n\t\tint index = -1; // Start assuming no attacker intersects the point\n\t\tRectangle temp = new Rectangle();\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++) {\n\t\t\tif(mAttackers[i].isAlive()){\n\t\t\t\tAttacker a = mAttackers[i];\n\t\t\t\t// Populate the temporary rectangle with the attacker's parameters\n\t\t\t\ttemp.set(a.getX(), a.getY(), a.getWidth(), a.getHeight());\n\n\t\t\t\t// See if (x, y) lies within the rectangle described by a.x, a.y, a.width, a.height\n\t\t\t\tif(temp.contains(x, y)) {\n\t\t\t\t\t// Within this block, the point should lie within the rectangle -- Attacker has been tapped\n\t\t\t\t\tindex = i;\n\t\t\t\t\treturn index; // Loop exits here with index value OR never arrives here at all (-1)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn index; // This return value is -1, since execution should only arrive here when testing fails all attackers\n\t}", "public abstract int findRowForWindow(int y);", "int getPosition(Object elementID) throws Exception;", "static int question2(int target, int[] arr) {\r\n\t\treturn binarySearch(arr, arr[0], arr[arr.length-1], target);\r\n\t}", "private int search(Bitboard board, int posMask, int turn) {\n // if this player doesn't even \"own\" any connected components, they're in bad shape...\n if (!ownerToCCs.containsKey(turn)) {\n return 100;\n }\n\n // perform basic BFS to explore the connected component\n // we're finding distance to an \"owned\" connected component\n int target = ownerToCCs.get(turn);\n int orthogonal, nextMask, altDist;\n int myVisit = 0;\n\n searchQueue.clear();\n prev.clear();\n dist.clear();\n\n searchQueue.add(posMask);\n dist.put(posMask, 0);\n\n while (!searchQueue.isEmpty()) {\n // get next position off of queue\n posMask = searchQueue.poll();\n\n // ignore if visited, invalid location, or opponent owns\n if ((myVisit & posMask) != 0 || !board.isValid(posMask)\n || board.owns(posMask, 1 - turn))\n continue;\n myVisit |= posMask;\n\n // check if it's a target\n if ((target & posMask) != 0) {\n // return distance to posMask\n return dist.get(prev.get(posMask)) + 1;\n }\n\n // continue BFS\n orthogonal = BitMasks.orthogonal.get(posMask);\n while (orthogonal != 0) {\n nextMask = orthogonal & ~(orthogonal - 1);\n orthogonal ^= nextMask;\n\n altDist = dist.get(posMask) + 1;\n if (altDist < dist.getOrDefault(nextMask, Integer.MAX_VALUE)) {\n prev.put(nextMask, posMask);\n dist.put(nextMask, altDist);\n }\n searchQueue.add(nextMask);\n }\n }\n // no path found to a target (the circle is isolated)\n return 100;\n }", "private int checkCellClick(int xPos, int yPos) {\r\n\r\n\t\tfor (int i = 0; i < MAX_CELL_COUNT; ++i) {\r\n\r\n\t\t\tint x1 = ((width - SIZE_X) / 2) + 16;\r\n\t\t\tint y1 = ((height - SIZE_Y) / 2) + 16 + (i * CELL_SIZE_Y);\r\n\t\t\tint x2 = x1 + (SIZE_X - 42);\r\n\t\t\tint y2 = y1 + CELL_SIZE_Y;\r\n\r\n\t\t\tif (xPos >= x1 && xPos <= x2) {\r\n\t\t\t\tif (yPos >= y1 && yPos <= y2) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "int getBlockNumber(int x, int y);", "public int binarySearch(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n end = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[start] == target) return start;\n if (nums[end] == target) return end;\n return -1;\n }", "public int[] searchRange_v2(int[] A, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] res = new int[2];\n res[0] = findLow(A, 0, A.length - 1, target);\n res[1] = findHigh(A, 0, A.length - 1, target);\n return res;\n }", "IntervalTupleList evaluate(double low, double high);" ]
[ "0.8126573", "0.81233793", "0.791258", "0.7788192", "0.76218265", "0.7580043", "0.6564226", "0.6536093", "0.64370227", "0.60659575", "0.59037733", "0.58892995", "0.57768273", "0.5763531", "0.5748208", "0.57426614", "0.5741094", "0.57184654", "0.56938475", "0.56928784", "0.5674305", "0.56730366", "0.5667644", "0.56500804", "0.5633718", "0.5606519", "0.55274105", "0.55206317", "0.55175185", "0.5499339", "0.54960567", "0.549348", "0.5487001", "0.54859936", "0.54789203", "0.5475528", "0.5465512", "0.54643273", "0.5457706", "0.54471004", "0.54445386", "0.54350024", "0.54348516", "0.5431995", "0.5429921", "0.5411033", "0.5402879", "0.53999937", "0.53946745", "0.53848505", "0.5384275", "0.5381725", "0.53737783", "0.5371255", "0.53644073", "0.53551817", "0.53511417", "0.53501517", "0.5349408", "0.5339328", "0.53256804", "0.5315512", "0.5314982", "0.53113663", "0.5310422", "0.53074205", "0.53026575", "0.5298741", "0.5295581", "0.5292762", "0.5286706", "0.52849114", "0.5283542", "0.5266292", "0.52653056", "0.5264353", "0.5262004", "0.52606547", "0.52590466", "0.5257235", "0.52522933", "0.52251744", "0.5219512", "0.5218558", "0.5217399", "0.52124876", "0.52086484", "0.52074254", "0.5200474", "0.52003723", "0.5200025", "0.5189544", "0.518638", "0.51830053", "0.51827455", "0.51813805", "0.5175936", "0.51750094", "0.5172821", "0.51717126" ]
0.79362726
2
Target must be in the closed bounds defined by the discontiguous interval at index coordIdx.
private boolean intervalContains(double target, int coordIdx) { double midVal1 = orgGridAxis.getCoordEdge1(coordIdx); double midVal2 = orgGridAxis.getCoordEdge2(coordIdx); boolean ascending = midVal1 < midVal2; return intervalContains(target, coordIdx, ascending, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "private int findClosestDiscontiguousInterval(double target) {\n boolean isTemporal = orgGridAxis.getAxisType().equals(AxisType.Time);\n return isTemporal ? findClosestDiscontiguousTimeInterval(target) : findClosestDiscontiguousNonTimeInterval(target);\n }", "private boolean intervalContains(double target, int coordIdx, boolean ascending, boolean closed) {\n // Target must be in the closed bounds defined by the discontiguous interval at index coordIdx.\n double lowerVal = ascending ? orgGridAxis.getCoordEdge1(coordIdx) : orgGridAxis.getCoordEdge2(coordIdx);\n double upperVal = ascending ? orgGridAxis.getCoordEdge2(coordIdx) : orgGridAxis.getCoordEdge1(coordIdx);\n\n if (closed) {\n return lowerVal <= target && target <= upperVal;\n } else {\n return lowerVal <= target && target < upperVal;\n }\n }", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "public boolean withinBounds(int target_row, int target_col) {\n\r\n if (target_row < 0 || target_row > size - 1 || target_col < 0 || target_col > size - 1) {\r\n return false;\r\n }\r\n return isOpen(target_row, target_col) || isFull(target_row, target_col);\r\n }", "public int findCoordElement(double target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n case regularPoint:\n return findCoordElementRegular(target, bounded);\n case irregularPoint:\n case contiguousInterval:\n return findCoordElementContiguous(target, bounded);\n case discontiguousInterval:\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "private boolean isLegalCoordinate(int row, int col) {\n return row > 0 && row <= getSize() && col > 0 && col <= getSize();\n }", "private boolean validateOutOfRangeCoordinate() throws IOException {\n int maxValue = Integer.parseInt(Objects.requireNonNull(FileUtils.getProperty(\"max-coordinate-value\")));\n return (Math.abs(getX()) > maxValue) || (Math.abs(getY()) > maxValue);\n }", "public void setTargetCoordinate( Coordinate c ) {\n this.target = c;\n if (moveTimer == null) {\n moveTimer = new Timer();\n }\n if (isCancelled) {\n int movedelay = 100;\n \n final Collection<Seagull> sflock = this.flock;\n final Seagull current = this;\n final double closedistance = resolution * 10;\n \n moveTimer.scheduleAtFixedRate(new TimerTask(){\n\n @Override\n public void run() {\n Coordinate next = new Coordinate(location);\n \n // move 5% closer to the point \n double distance = target.x - location.x;\n next.x = location.x + distance * 0.05;\n \n distance = target.y - location.y;\n next.y = location.y + distance * 0.05;\n \n //see if the next x is 'too close' to one of the other seagulls\n //in the flock\n boolean move = true;\n if (sflock != null) {\n\n for( Iterator iterator = sflock.iterator(); iterator.hasNext(); ) {\n Seagull seagull = (Seagull) iterator.next();\n if (seagull != current) {\n // if i am too close then set move to false\n if (seagull.location.distance(next) < closedistance) {\n move = false;\n }\n }\n }\n }\n\n if (move) {\n location = next;\n\n if (location.distance(target) < 0.1) {\n // close enough;\n this.cancel();\n isCancelled = true;\n }\n }\n }\n }, new Date(), movedelay);\n \n isCancelled = false;\n }\n }", "protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}", "public boolean hitTarget(MouseEvent e) {\n\t\treturn (e.getX() > coord.x && e.getX() < endCoord.x && e.getY() > coord.y && e.getY() < endCoord.y);\n\t}", "private boolean checkIndexBounds(int idx) {\n return (idx >= 0) && (idx <= this.length);\n }", "public CellPosition isInside(Vector2i coord){\n\t\tCellPosition pos;\n\t\tpos = display.gridDisplay.isInside(coord);\n\t\tif(pos.isFound)\n\t\t\treturn pos;\n\t\t\n\t\tpos = canva.isInside(coord);\n\t\treturn pos;\n\t}", "public abstract boolean isOutOfBounds(int x, int y);", "public final boolean insideRadarRange(Target target)\n{\n\tif (_rules.getRadarRange() == 0)\n\t\treturn false;\n\n\tboolean inside = false;\n\tdouble newrange = _rules.getRadarRange() * (1 / 60.0) * (Math.PI / 180);\n\tfor (double lon = target.getLongitude() - 2*Math.PI; lon <= target.getLongitude() + 2*Math.PI; lon += 2*Math.PI)\n\t{\n\t\tdouble dLon = lon - _base.getLongitude();\n\t\tdouble dLat = target.getLatitude() - _base.getLatitude();\n\t\tinside = inside || (dLon * dLon + dLat * dLat <= newrange * newrange);\n\t}\n return inside;\n}", "private boolean isValidIndex(final int theY, final int theX) {\n return 0 <= theY && theY < myGrid.length\n && 0 <= theX && theX < myGrid[theY].length;\n }", "public boolean checkValidCoordinate(int i, int j)\n\t{\n\t\tif(i>=0 && i<this.numberOfRows && j>=0 && j<this.numberOfColumns)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}", "@Override\n\tpublic boolean outOfBounds() {\n\t\treturn this.getY() < 0;\n\t}", "private boolean isLegalPositon(Position checkPosition){\n if (checkPosition.equalPosition(start)||checkPosition.equalPosition(end))\n return true;\n if(checkPosition.getRow()<0 || checkPosition.getCol()<0 || checkPosition.getRow()>=this.rows || checkPosition.getCol() >= this.cols){\n return false;\n }\n\n if(maze[checkPosition.getRow()][checkPosition.getCol()]== WallType.wall){\n return false;\n }\n return true;\n }", "@Override\n public boolean isLocationValid(int x, int y)\n {\n return master.isLocationValid(x, y);\n }", "@Test \n\tpublic void testTargetsIntoRoom()\n\t{\n\t\t// One room is exactly 2 away\n\t\tboard.calcTargets(5, 24, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(3, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(5, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(4, 23)));\n\t}", "boolean hasTargetPos();", "@Override\n public boolean isInBounds(int row, int col) {\n return row >= 0 && row < grid.length && col >= 0 && col < grid[0].length;\n }", "public Coordinate setLegal() { setLegal( row, col ); return this; }", "@Test \r\n\tpublic void testTargetsIntoRoom()\r\n\t{\r\n\t\t// One room is exactly 2 away\r\n\t\tboard.calcTargets(19, 8, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\t// directly left (can't go right 2 steps)\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 6)));\r\n\t\t// directly up and down\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 8)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 8)));\r\n\t\t// one up/down, one left/right\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 7)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 7)));\r\n\t}", "private boolean isOutOfBounds(int row, int col) {\n if (row < 0 || row >= this.getRows()) {\n return true;\n }\n else if (col < 0 || col >= this.getColumns()) {\n return true;\n }\n else {\n return false; // the placement is valid\n }\n }", "static boolean isSafe(int x, int y, int sol[][]) {\n return (x >= 0 && x < N && y >= 0 &&\n y < N && sol[x][y] == -1);\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n long long0 = 785L;\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 9223372036854775806L, (-128L));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // given length -129 would make range [9223372036854775805 - ? ] beyond max allowed end offset\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "boolean hasDestRange();", "@Override\n public boolean isValidMove(Tile target, Board board) {\n if (target == null || board == null) {\n throw new NullPointerException(\"Arguments for the isValidMove method can not be null.\");\n }\n // current and target tiles have to be on a diagonal (delta between row and col index have to be identical)\n int currentCol = this.getTile().getCol();\n int currentRow = this.getTile().getRow();\n int targetCol = target.getCol();\n int targetRow = target.getRow();\n\n int deltaRow = Math.abs(currentRow - targetRow);\n int deltaCol = Math.abs(currentCol - targetCol);\n int minDelta = Math.min(deltaCol, deltaRow);\n\n boolean sameDiagonal = deltaCol == deltaRow;\n\n // check if there are pieces between the tiles\n boolean noPiecesBetween = true;\n // Directions -- (Up and to the left) , -+ (Up and to the right), ++, +-\n if (targetRow < currentRow && targetCol < currentCol) { // --\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n\n } else if (targetRow > currentRow && targetCol < currentCol) { // +-\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow > currentRow && targetCol > currentCol) { // ++\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow < currentRow && targetCol > currentCol) { // -+\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n }\n\n return sameDiagonal && noPiecesBetween;\n }", "private boolean checkSpaceAvailability(Point targetLocation, ICityFragment element) {\r\n //basic constraint:no other things here\r\n\r\n if (city.isAnythingHere(targetLocation, element.getBoundary().width, element.getBoundary().height, element)) {\r\n return false;\r\n }\r\n\r\n //crossroads:at least one road can connected\r\n if (element instanceof Crossroads) {\r\n var crossroad = (Crossroads) element;\r\n\r\n var accessibleRoad = findAccessibleRoads(crossroad, targetLocation);\r\n\r\n if (accessibleRoad == null || accessibleRoad.size() <= 1) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "private boolean isValidCoordinate(int x, int y) {\n return x >= 0 && x < gameState.mapSize\n && y >= 0 && y < gameState.mapSize;\n }", "private boolean cell_in_bounds(int row, int col) {\n return row >= 0\n && row < rowsCount\n && col >= 0\n && col < colsCount;\n }", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "public static boolean validIndex(int row,int col,int i,int j){\n\t\tif(i<0 || j<0 || i>=row || j >= col){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "private boolean inBounds(int row, int col)\n {\n return ((row >= 0) && (row < NUM_ROWS) &&\n (col >= 0) && (col < NUM_COLS)); \n }", "public boolean isValidMove(int targetX, int targetY){\n\t\t/*check boundary condition*/\n\t\tif(outBoundary(targetX, targetY)){\n\t\t\treturn false;\n\t\t}\n\t\tint xDiff = Math.abs(getPosition().getFirst()-targetX);\n\t\tint yDiff = Math.abs(getPosition().getSecond()-targetY);\n\t\treturn ((xDiff ==2 && yDiff ==1) ||(xDiff ==1 && yDiff ==2));\n\t}", "private void readCellRectangle(int x, int y, Rectangle target) {\r\n target.x = x * CELL_OUTER_SIZE;\r\n target.y = y * CELL_OUTER_SIZE;\r\n target.width = CELL_OUTER_SIZE;\r\n target.height = CELL_OUTER_SIZE;\r\n }", "@Test(expected=IndexOutOfBoundsException.class)\n\tpublic void testCoordinatesWithTheLargeIndex()\n\t{\n\t\tData d = new Data();\n\t\t\n\t\tCoordinate c = d.getCoordinate(1000);//the index is 1000, way more than the number of pieces\n\t}", "public boolean outOfRange(){\r\n\t\t\treturn (shape.x <=0 ? true : false);\r\n\t\t}", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 2147483646L, (-9223372036854775808L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Range coordinates 2147483646, -9223372036854775808 are not valid Zero Based coordinates\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, (-2147483648L), (-2147483649L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test\n\tpublic void selectTargetLocation() {\n\t\tboard.findAllTargets(playerComputer.getCurrentLocation(), 6);\n\t\tSet<BoardCell> targets = board.getTargets();\n\t\t\n\t\t//Tests to make sure the computers chosen cell is in targets\n\t\tBoardCell cell = ((computerPlayer) playerComputer).pickLocation(targets);\n\t\tassertTrue(targets.contains(cell));\n\t\t\n\t\t//This test ensures that if there is a room that hasn't been visited the computer picks that cell\n\t\tIterator<BoardCell> iterator = targets.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\t\tBoardCell cell2 = iterator.next();\n\t\t\tif(cell2.isRoom()) {\n\t\t\t\tif(cell2.getInitial() != ((computerPlayer) playerComputer).getLastVisited()) {\n\t\t\t\t\tassertEquals(cell2.getInitial(), cell.getInitial());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean canMoveTo (Coordinate c)\n\t{\n\t\tif (c.x < 0 || c.x >= GRID_SIZE){\n\t\t\treturn false;\n\t\t}\n\t\tif (c.y < 0 || c.y >= GRID_SIZE) {\n\t\t\treturn false;\n\t\t}\n\t\tif (grid[c.x][c.y] == GridChar.AVAILABLE || grid[c.x][c.y] == GridChar.END){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean isLegalPos(int row, int col){\r\n return !(row < 0 || row > 7 || col < 0 || col > 7);\r\n }", "public abstract S isNotCloseTo(A expected, A offset, boolean strict);", "@Override\n\tpublic boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint i = worldObj.getFirstUncoveredBlock(par1, par2);\n\t\tif (i == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn Block.blocksList[i].blockMaterial.blocksMovement();\n\t\t}\n\t}", "@Override\n public boolean isLocationValid(XYCoord coords)\n {\n return master.isLocationValid(coords);\n }", "public abstract void selectIndexRange(int min, int max);", "public boolean isValid(int x, int y)\n\t{\n\t\treturn (x < rowLen && y < columnLen && x >= 0 && y >= 0);\n\t}", "private boolean outOfBounds(int nidx1){\n\t\treturn (nidx1 < 0 || nidx1 >= numofvert);\n\t}", "int getTargetPos();", "@Test(timeout = 4000)\n public void test27() throws Throwable {\n Range range0 = Range.of(0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range0.getBegin(range_CoordinateSystem0);\n Range range1 = Range.of(0L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem1, 0L, 0L);\n Object object0 = new Object();\n range2.equals(object0);\n range2.complement(range1);\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.ZERO_BASED;\n Range range3 = Range.of(range_CoordinateSystem2, 1L, 1L);\n Range.Builder range_Builder0 = new Range.Builder(range3);\n // Undeclared exception!\n try { \n range_Builder0.contractEnd(977L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public boolean isCoordOnStreet(Coordinate coord) {\n double dxc = coord.getX() - begin.getX();\n double dyc = coord.getY() - begin.getY();\n\n double dxl = end.getX() - begin.getX();\n double dyl = end.getY() - begin.getY();\n\n if (Math.abs(dxc * dyl - dyc * dxl) > 1) {\n\n return false;\n\n } else {\n\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0 ? begin.getX() <= coord.getX() && coord.getX() <= end.getX()\n : end.getX() <= coord.getX() && coord.getX() <= begin.getX();\n } else {\n return dyl > 0 ? begin.getY() <= coord.getY() && coord.getY() <= end.getY()\n : end.getY() <= coord.getY() && coord.getY() <= begin.getY();\n }\n }\n }", "private boolean hasValidNumber(String[] coord, int numShip) {\n int[] indices = getIndexFromCoord(coord);\n int x0 = indices[0];\n int y0 = indices[1];\n int x1 = indices[2];\n int y1 = indices[3];\n\n if (x0 == x1) {\n // horizontal ships\n if (Math.abs(y0 - y1) + 1 != numShip) {\n System.out.println(\"Error! Wrong length of the Submarine! Try again:\");\n return false;\n }\n return true;\n } else {\n // vertical ships\n if (Math.abs(x0 - x1) + 1 != numShip) {\n System.out.println(\"Error! Wrong length of the Submarine! Try again:\");\n return false;\n }\n return true;\n }\n }", "public static boolean isASolution(int x, int y)\r\n {\r\n if (x == STOP_ROW && y == STOP_COL)\r\n return true;\r\n return false;\r\n }", "private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }", "private boolean withinGridDimensions(int startX, int startY, int endX, int endY) {\n boolean within = true;\n int largerX = Math.max(startX, endX);\n int smallerX = Math.min(startX, endX);\n int largerY = Math.max(startY, endY);\n int smallerY = Math.min(startY, endY);\n \n if (smallerX < 1 || smallerY < 1 || largerX > GRID_DIMENSIONS || largerY > GRID_DIMENSIONS) {\n within = false;\n }\n \n return within;\n }", "private void validate(int row, int col)\n {\n if (row <= 0 || row > gridSize) throw new IllegalArgumentException(\"row index out of bounds\");\n if (col <= 0 || col > gridSize) throw new IllegalArgumentException(\"col index out of bounds\");\n }", "private boolean checkRange(int rowIndex, int columnIndex) {\n return rowIndex >= 0 && rowIndex < matrix.length\n && columnIndex >= 0 && columnIndex < matrix[rowIndex].length;\n\n }", "private boolean isInBounds(int i, int j)\n {\n if (i < 0 || i > size-1 || j < 0 || j > size-1)\n {\n return false;\n }\n return true;\n }", "private boolean locateSafety(String[] coord) {\n\n int[] indices = getIndexFromCoord(coord);\n int x0 = indices[0];\n int y0 = indices[1];\n int x1 = indices[2];\n int y1 = indices[3];\n\n\n if (x0 == x1) {\n // horizontal\n int northIndex = x0 > 0 ? x0 - 1 : -1;\n int southIndex = x0 < Row.values().length - 1 ? x0 + 1 : -1;\n int leftIndex = y0 > 0 ? y0 - 1 : -1;\n int rightIndex = y1 < fields.length - 1 ? y1 + 1 : -1;\n // check north area\n if (northIndex != -1) {\n for (int i = y0; i <= y1; i++) {\n if (fields[northIndex][i].isShip()) {\n System.out.println(\"Error! You placed it too close to another one. Try again:\");\n return false;\n }\n }\n }\n // check south area\n if (southIndex != -1) {\n for (int i = y0; i <= y1; i++) {\n if (fields[southIndex][i].isShip()) {\n System.out.println(\"Error! You placed it too close to another one. Try again:\");\n return false;\n }\n }\n }\n // check left\n if (leftIndex != -1 && fields[x0][leftIndex].isShip()) {\n System.out.println(\"Error! You placed it too close to another one. Try again:\");\n return false;\n }\n // check right\n if (rightIndex != -1 && fields[x0][rightIndex].isShip()) {\n System.out.println(\"Error! You placed it too close to another one. Try again:\");\n return false;\n }\n\n } else {\n // vertical\n int leftCol = y0 > 0 ? y0 - 1 : -1;\n int rightCol = y0 < fields.length - 1 ? y0 + 1 : -1;\n int northIndex = x0 > 0 ? x0 - 1 : -1;\n int southIndex = x1 < Row.values().length -1 ? x1 + 1 : -1;\n\n // check north\n if (northIndex != -1 && fields[northIndex][y0].isShip()) {\n System.out.println(\"Error! You placed it too close to another one. Try again:\");\n return false;\n }\n // check south\n if (southIndex != -1 && fields[southIndex][y0].isShip()) {\n System.out.println(\"Error! You placed it too close to another one. Try again:\");\n return false;\n }\n // check left\n if (leftCol != -1) {\n for (int i = x0; i <= x1; i++) {\n if (fields[i][leftCol].isShip()) {\n System.out.println(\"Error! You placed it too close to another one. Try again:\");\n return false;\n }\n }\n }\n // check right\n if (rightCol != -1) {\n for (int i = x0; i <= x1; i++) {\n if (fields[i][rightCol].isShip()) {\n System.out.println(\"Error! You placed it too close to another one. Try again:\");\n return false;\n }\n }\n }\n }\n return true;\n }", "private boolean isOccupied(Location loc)\n\t{\n\t\treturn grid[loc.getRow()][loc.getCol()] != null;\n\t}", "@Override\n public int getTargetPosition() {\n return 0;\n }", "@Override\n public boolean moveIsPossible(Coordinate coord) {\n if(gameState.getTurnState().hasMoved()){\n return false;\n }\n Field field = gameState.getField();\n if(!field.getField().containsKey(coord)){\n return false;\n }\n Cell currentPosition = gameState.getTurnState().getCurrentPlayer()\n .getPosition();\n Cell destination = field.getCell(coord);\n return field.isReachable(currentPosition, destination, 3);\n }", "@Test\n\tpublic void testIfCoordinatesAreValid()\n\t{\n\t\tData d = new Data();\n\t\tCoordinate c = d.getCoordinate(0); // at index 0 is the king's default location (5, 5)\n\t\tassertEquals(c.getX(), 5);\n\t\tassertEquals(c.getY(), 5);\t\n\t}", "@Test\n \tpublic void testTargetLocationAlwaysSelected() {\n \t\tComputerPlayer player = new ComputerPlayer();\n \t\tplayer.setLastVistedRoom('L');\n \t\tint enteredRoom = 0;\n \t\tboard.calcTargets(6, 7, 4);\n \t\t//pick location with at least one room as a target\n \t\tfor(int i = 0; i < 100; i++) {\n \t\t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\t\tif (selected == board.getRoomCellAt(4, 6))\n \t\t\t\tenteredRoom++;\n \t\t}\n \t\t//ensure room is taken every time\n \t\tAssert.assertEquals(enteredRoom, 100);\n \t}", "public abstract S isCloseTo(A expected, A offset, boolean strict);", "private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }", "private static boolean isValid(int x, int y)\n\t {\n\t if (x < M && y < N && x >= 0 && y >= 0) {\n\t return true;\n\t }\n\t \n\t return false;\n\t }", "private boolean isInside(int i, int j) {\n\t\tif (i < 0 || j < 0 || i > side || j > side)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean validIndex(int idx) {\n return idx >= 0 && idx < len;\n }", "public boolean areValidCoordinates(int x, int y) {\n return (x >= 0 && x < WIDTH && y >= 0 && y < HEIGHT);\n }", "private void valid_rc(int row, int col) {\n\t\tif (row < 1 || row > n || col < 1 || col > n) \r\n\t\t\tthrow new IllegalArgumentException(\"Index is outside its prescribed range\");\r\n\t}", "public Spatial getTarget() {\r\n return target;\r\n }", "private void moveComponents(Container target, int x, int y, int width, int height, int rowStart, int rowEnd)\n {\n synchronized (target.getTreeLock())\n {\n switch (align)\n {\n case LEFT :\n break;\n case CENTER :\n x += width / 2;\n break;\n case RIGHT :\n x += width;\n break;\n }\n for (int i = rowStart; i < rowEnd; i++)\n {\n Component m = target.getComponent(i);\n if (m.isVisible())\n {\n m.setLocation(x, y + (height - m.getSize().height) / 2);// JDK1.2\n // porting:\n // replace\n // with\n // getHeight()\n x += hgap + m.getSize().width; // JDK1.2 porting: replace with\n // getWidth()\n }\n }\n }\n }", "private boolean isValid(int x, int y, int newX, int newY, int row, int col, int[][] rooms) {\n int INF = Integer.MAX_VALUE; // (2^31 - 1) = 2147483647\n return newX >= 0 && newY >= 0 && newX < row && newY < col && rooms[newX][newY] > 0 && rooms[x][y] != INF;\n }", "public boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint var3 = this.worldObj.getFirstUncoveredBlock(par1, par2);\n\t\treturn var3 == 0 ? false : Block.blocksList[var3].blockMaterial.blocksMovement();\n\t}", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Test\n\tpublic void testTargetsIntoRoomShortcut() \n\t{\n\t\tboard.calcTargets(9, 18, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(6, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(9, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(11, 18)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 18)));\n\t}", "@Test\r\n\tpublic void testTargetsIntoRoomShortcut() \r\n\t{\r\n\t\tboard.calcTargets(11, 24, 3);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\t//up and then left\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 22)));\r\n\t\t//up left down\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 23)));\r\n\t\t//left up right\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 24)));\r\n\t\t//left only\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 21)));\r\n\t\t// into the rooms\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 23)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 22)));\t\t\t\r\n\t}", "@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}", "private boolean checkInBounds(int startX, int startY, int finalX, int finalY) {\r\n\t\treturn startX < 0 || startX >= this.SIZE || startY < 0 || startY >= this.SIZE\r\n\t\t\t\t|| finalX < 0 || finalX >= this.SIZE || finalY < 0 || finalY >= this.SIZE;\r\n\t}", "public boolean isFull(int i, int j){\n \tif(i<=0 || i>this.gridLength || j<=0 || j>this.gridLength){\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n \tif(isOpen(i, j)){\n \t\treturn unionTest.connected(0, (i-1)*this.gridLength + j);\n \t}\n \treturn false;\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2117L, 2117L);\n // Undeclared exception!\n try { \n range0.getBegin((Range.CoordinateSystem) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // CoordinateSystem can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public static boolean hasEqual(int[] nums,int target,int curIndex) {\n \tif(curIndex==nums.length||target<0) return false;\r\n \tfor(int i=curIndex;i<nums.length;i++) {\r\n \t\tif(nums[i] == target) return true;\r\n \t\tif(hasEqual(nums, target, i+1)||hasEqual(nums, target-nums[curIndex], i+1)) {\r\n \t\t\treturn true;\r\n \t\t}//不加入当前元素\r\n \t}\r\n\t\treturn false;\r\n\t}", "private static boolean canCoverCurrent(boolean[][] covered, int row, int col) {\n boolean canCover = true;\n for(int j = 0; j < rowDiffs.length; j++){\n int nextRow = row + rowDiffs[j];\n int nextCol = col + colDiffs[j];\n if(inbounds(nextRow, nextCol) && covered[nextRow][nextCol])\n canCover = false;\n }\n return canCover;\n }", "public static boolean isLegalPlay (Map<Coord,Integer> board, int myIndex, Coord coord) {\n if (!inBounds(coord.x, coord.y) || board.containsKey(coord)) return false;\n\n // look in each direction from this piece, if we see the other guy's pieces and then one of our\n // own, then this is a legal move\n for (int ii = 0; ii < DX.length; ii++) {\n boolean sawOther = false;\n int x = coord.x, y = coord.y;\n for (int dd = 0; dd < Board.SIZE; dd++) {\n x += DX[ii];\n y += DY[ii];\n if (!inBounds(x, y)) break; // stop when we end up off the board\n Integer color = board.get(new Coord(x, y));\n if (color == null) break;\n else if (color == 1-myIndex) sawOther = true;\n else if (color == myIndex && sawOther) return true;\n else break;\n }\n }\n\n return false;\n }", "private boolean hasValidBounds() {\n\n\n\n return false;\n }", "public Contig getTarget() { return target; }", "@Test\n\tpublic void testRoomExit()\n\t{\n\t\t// Take one step, essentially just the adj list\n\t\tboard.calcTargets(18, 21, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\t// Ensure doesn't exit through the wall\n\t\tassertEquals(1, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 21)));\n\t\t// Take two steps\n\t\tboard.calcTargets(18, 21, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 20)));\n\t}", "private boolean hasValidOrientation(String[] coord) {\n int[] indices = getIndexFromCoord(coord);\n int x0 = indices[0];\n int y0 = indices[1];\n int x1 = indices[2];\n int y1 = indices[3];\n\n boolean result = x0 == x1 || y0 == y1;\n if (!result) {\n System.out.println(\"Error! Wrong ship location! Try again:\");\n }\n return result;\n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getBegin();\n range0.intersects(range0);\n range0.getEnd();\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "public void invalidateLayout(Container target) \n {\n\t_invalid = true;\n }", "@Test\n\tvoid testCheckCoordinates4() {\n\t\tassertFalse(DataChecker.checkCoordinate(-100));\n\t}" ]
[ "0.6546547", "0.6111486", "0.61028725", "0.5953626", "0.5807271", "0.5711072", "0.5651472", "0.5567577", "0.53997695", "0.53544474", "0.5317267", "0.5306034", "0.5285946", "0.52695465", "0.52376354", "0.5230783", "0.5188792", "0.5090933", "0.507061", "0.5041329", "0.501174", "0.50090134", "0.50012153", "0.49983254", "0.49579", "0.49291363", "0.48952746", "0.48903358", "0.48752165", "0.48713547", "0.4867954", "0.48446655", "0.48429647", "0.4841912", "0.48349774", "0.48185515", "0.481795", "0.47928917", "0.4782325", "0.4780782", "0.4774675", "0.47745538", "0.4757459", "0.47544816", "0.47439435", "0.47418833", "0.47268325", "0.47265172", "0.47192368", "0.4717836", "0.47173303", "0.47153318", "0.4714095", "0.47074935", "0.47043923", "0.46991464", "0.46881038", "0.4672251", "0.46676356", "0.46654838", "0.46637845", "0.466003", "0.46575338", "0.46460426", "0.46458456", "0.46399188", "0.46319214", "0.46306536", "0.46276653", "0.46195033", "0.46179423", "0.46161643", "0.46150142", "0.4614162", "0.45998916", "0.4577924", "0.4568315", "0.45631135", "0.45615155", "0.45539021", "0.45502022", "0.45465484", "0.45436352", "0.45351446", "0.45315623", "0.4530869", "0.45291522", "0.45279872", "0.452264", "0.45225686", "0.4517816", "0.45142034", "0.45087856", "0.45053655", "0.4504137", "0.45014685", "0.44945875", "0.44943225", "0.44926122", "0.44901833" ]
0.6577041
0
closed [low, high] or halfclosed [low, high)
private boolean intervalContains(double target, int coordIdx, boolean ascending, boolean closed) { // Target must be in the closed bounds defined by the discontiguous interval at index coordIdx. double lowerVal = ascending ? orgGridAxis.getCoordEdge1(coordIdx) : orgGridAxis.getCoordEdge2(coordIdx); double upperVal = ascending ? orgGridAxis.getCoordEdge2(coordIdx) : orgGridAxis.getCoordEdge1(coordIdx); if (closed) { return lowerVal <= target && target <= upperVal; } else { return lowerVal <= target && target < upperVal; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isClosed() {\n return (int)freqX == freqX && (int)freqY == freqY;\n }", "public abstract boolean isClosed();", "boolean isClosed();", "boolean isClosed();", "boolean isClosed();", "boolean isClosed();", "public boolean isBullish(){\n return (Double.compare(this.open, this.close) < 0) ? true : false;\r\n }", "public boolean checkClosed();", "void checkClosed();", "public BoundType b() {\n return BoundType.CLOSED;\n }", "public boolean getClosed() {\n\treturn this.closed;\n }", "private boolean isClosed(EdgeWeightedDigraph G, FlowEdge e, int V) {}", "public static double outside(double[] values, double low, double high) {\n return -1.0; // FIXME Q1\n }", "public boolean domainMax2Closed() throws IllegalStateException {\n\treturn true;\n }", "public boolean domainMin2Closed() throws IllegalStateException {\n\treturn true;\n }", "public boolean getClosed(){\n \treturn this.isClosed;\n }", "public boolean isClosed() {\n return false;\n }", "@Override\n\tpublic boolean isClosed() \n\t{\n\t\treturn false;\n\t}", "public BoundType a() {\n return BoundType.CLOSED;\n }", "public void setClosed(boolean closed) {\n\tthis.closed = closed;\n }", "void setClosed(boolean closed) {\n this.closed = closed;\n }", "@Override\n public boolean isClosed() {\n return false;\n }", "public String getClosedInd()\r\n\t{\r\n\t\treturn closedInd;\r\n\t}", "public boolean isClosed()\n {\n return _isClosed;\n }", "public boolean isClosed()\n {\n return _isClosed;\n }", "public boolean isBearish(){\n return (Double.compare(this.open, this.close) > 0) ? true : false;\r\n }", "private final boolean isOpen()\n {\n return !closed;\n }", "public boolean isClosed(){\n return this.closed.get();\n }", "public boolean isClosed() {\n return closed;\n }", "@Basic(init = @Expression(\"false\"))\n public boolean isClosed() {\n return $closed;\n }", "public boolean isClosed() {\n return calculateSumOfHouse() > 31;\n }", "public final boolean isClosed() {\n\t\treturn (m_flags & Closed) != 0 ? true : false;\n\t}", "public IntervalNode(int low, int high, Object proxy) {\n\t// if the user gave high < low, reverse it\n\tif (high < low) {\n\t int lowtemp = low;\n\t low = high;\n\t high = lowtemp;\n\t}\n\n\t// set the internal values\n\tthis.low = low;\n\tthis.high = high;\n\tthis.max = high;\n\tthis.min = low;\n\n\t// node is \"free\" floating\n\tthis.right = nullIntervalNode;\n\tthis.left = nullIntervalNode;\n\tthis.p = nullIntervalNode;\n\n\tthis.proxyObj = proxy;\n\n\t//System.out.println(low + \" \" + high + \" \" + proxy);\n }", "private void closeGroup(){\n if(winningHoleGroup ==0){\n max = 19;\n min = 0;\n }\n if(winningHoleGroup ==1){\n max = 29;\n min = 0;\n }\n if(winningHoleGroup ==2){\n max = 39;\n min = 10;\n }\n if(winningHoleGroup ==3){\n max = 49;\n min = 20;\n }\n if(winningHoleGroup ==4){\n max = 49;\n min = 30;\n }\n }", "protected final boolean overlaps(int low2, int high2) {\n\tif ((high2 < this.low) || (low2 > this.high)) { \n\t return(false);\n\t}\n\treturn(true);\n }", "public abstract HalfOpenIntRange approximateSpan();", "protected final boolean contains(int low2, int high2) {\n\t//if (((this.low >= low2) && (this.high <= high2)) ||\n\t// ((low2 >= this.low) && (high2 <= this.high))) {\n\tif ((this.low <= low2) && (this.high >= high2)) {\n\t return(true);\n\t}\n\treturn(false);\n }", "public void narrowRange(int min, int max, Boolean axis) {\n\t\tint counter=0; // how much points we erasing total ?\n\t\tboolean erasingAll=false; // if we eventually erasing all the database\n\t\t// by axis X-----------------------------------------//\n\t\tif (axis){ \n\t\t\tthis.current = this.minx;\n\t\t\twhile (!erasingAll && this.current.getData().getX()<min){\n\t\t\t\tnarrowOppPoint(this.current,axis); // deleting this point in y axis\n\t\t\t\tthis.current = this.current.getNextX(); \n\t\t\t\tcounter++;\n\t\t\t\tif (this.current==null) //if we get to the edge of the DS\n\t\t\t\t\terasingAll=true;\n\t\t\t}\n\t\t\tif (!erasingAll)\n\t\t\t\tthis.current.setPrevX(null);\n\t\t\tthis.minx = this.current; // the actual erasing\n\t\t\t//---//\n\t\t\tthis.current = this.maxx;\n\t\t\twhile (!erasingAll && this.current.getData().getX() > max){\n\t\t\t\tnarrowOppPoint(this.current,axis);\n\t\t\t\tthis.current = this.current.getPrevX(); \n\t\t\t\tcounter++;\n\t\t\t\tif (this.current==null) //if we get to the edge of the DS\n\t\t\t\t\terasingAll=true;\n\t\t\t}\n\t\t\tif (!erasingAll)\n\t\t\t\tthis.current.setNextX(null);\n\t\t\tthis.maxx = this.current; //the actual erasing\n\t\t}\n\t\t// by axis Y -----------------------------------------------------------//\n\t\telse{ \n\t\t\tthis.current = this.miny;\n\t\t\twhile (!erasingAll && this.current.getData().getY()<min){\n\t\t\t\tnarrowOppPoint(this.current,axis);\n\t\t\t\tthis.current = this.current.getNextY(); \n\t\t\t\tcounter++;\n\t\t\t\tif (this.current==null) //if we get to the edge of the DS\n\t\t\t\t\terasingAll=true;\n\t\t\t}\n\t\t\tif (!erasingAll)\n\t\t\t\tthis.current.setPrevY(null);\n\t\t\tthis.miny = this.current; //the actual erasing\n\t\t\t//--//\n\t\t\tthis.current = this.maxy;\n\t\t\twhile (!erasingAll && this.current.getData().getY() > max){\n\t\t\t\tnarrowOppPoint(this.current,axis);\n\t\t\t\tthis.current = this.current.getPrevY(); \n\t\t\t\tcounter++;\n\t\t\t\tif (this.current==null) //if we get to the edge of the DS\n\t\t\t\t\terasingAll=true;\n\t\t\t}\n\t\t\tif (!erasingAll)\n\t\t\t\tthis.current.setNextY(null);\n\t\t\tthis.maxy = this.current; //the actual erasing\n\t\t}\n\t\tthis.size = this.size - counter; // Update the size of the DS\n\t}", "public static void close() \r\n{\r\n\tif((591 <= x && x <= 622 ) && (76 <= y && y <= 110))\r\n\t{\r\n\t\tc.close();\r\n\t}\r\n}", "public boolean hitSide(int xLow, int xHigh, int yLow, int yHigh)\n\t{\n\t\tif ((x + frogSize >= xHigh) || (x <= xLow))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\t\n\t\tif ((y <= yLow) || (y + frogSize >= yHigh))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isClosed() {\n return closed;\n }", "public double getHigh() { return high;}", "public boolean isClosed() {\n return this.isClosed;\n }", "public boolean isClosed() {\n return this.closed.get();\n }", "public boolean isDoorClosed() {\n\t\treturn isClosed;\n\t}", "public boolean isClose(Position pos) {\n return this.row - pos.row >= -1 && this.row - pos.row <= 1 && this.column - pos.column >= -1 && this.column - pos.column <= 1;\n }", "public boolean isClosed() {\n\t\treturn this.closed;\n\t}", "public boolean domainMax1Closed() throws IllegalStateException {\n\treturn true;\n }", "public int getClosedStopIndex()\r\n {\r\n return closed_stop_index;\r\n }", "@Override\n\tpublic AbstractValue greatestLowerBound(AbstractValue d) {\n\t\tif ( !(d instanceof Interval) )\n\t\t\tthrow new IllegalArgumentException(\"v should be of type Interval\");\n\t\tInterval i = (Interval) d;\n\n\t\tif (i.isBottom())\n\t\t\treturn i;\n\t\telse if (i.equals(top))\n\t\t\treturn this;\n\n\t\tString newLow = \"-Inf\", newHigh = \"+Inf\";\n\n\t\t//Calcolare limite inferiore\n\n\t\tif ( this.getLow().equals(\"-Inf\")){\n\t\t\tif( !i.getLow().equals(\"-Inf\"))\n\t\t\t\tif(Integer.parseInt(this.getHigh()) > Integer.parseInt(i.getLow()))\n\t\t\t\t\tnewLow = String.valueOf(Integer.max(Integer.parseInt(this.getLow()), Integer.parseInt(i.getLow())));\n\t\t\t\telse\n\t\t\t\t\treturn BottomAV.getInstance();\n\t\t}else if ( i.getLow().equals(\"-Inf\")){\n\t\t\tif( !this.getLow().equals(\"-Inf\"))\n\t\t\t\tif(Integer.parseInt(i.getHigh()) > Integer.parseInt(this.getLow()))\n\t\t\t\t\tnewLow = String.valueOf(Integer.max(Integer.parseInt(i.getLow()), Integer.parseInt(this.getLow())));\n\t\t\t\telse\n\t\t\t\t\treturn BottomAV.getInstance();\n\t\t}else if(!this.getLow().equals(\"-Inf\") && !i.getLow().equals(\"-Inf\")){\n\t\t\tnewLow = String.valueOf(Integer.max(Integer.parseInt(this.getLow()), Integer.parseInt(i.getLow())));\n\t\t}\n\n\t\t// Calcolare limite superiore\n\n\t\tif ( this.getHigh().equals(\"+Inf\")) {\n\t\t\tif (!i.getHigh().equals(\"+Inf\"))\n\t\t\t\tnewHigh = i.getHigh();\n\t\t}else if ( i.getHigh().equals(\"+Inf\")) {\n\t\t\tif (!this.getHigh().equals(\"+Inf\"))\n\t\t\t\tnewHigh = this.getHigh();\n\t\t}else if(!this.getHigh().equals(\"+Inf\") && !i.getHigh().equals(\"+Inf\")){\n\t\t\tnewHigh = String.valueOf(Integer.min(Integer.parseInt(this.getHigh()), Integer.parseInt(i.getHigh())));\n\t\t}\n\n\t\tInterval res = new Interval(newLow, newHigh);\n\n\t\t// Checks whether low > high\n\t\tif ((!newLow.equals(\"-Inf\") && (!newHigh.equals(\"+Inf\")) && Integer.parseInt(newLow) > Integer.parseInt(newHigh)))\n\t\t\treturn BottomAV.getInstance();\n\n\t\treturn amItop() ? top : res;\n\t}", "public void open(int i, int j) {\n checkRange(i, j);\n if (isOpen(i, j)) {\n return;\n }\n grids[getGrid(i, j)] = true;\n if (i >= 1 && i < gridsLength && isOpen(i+1, j)) {\n\n uf.union(getGrid(i, j), getGrid(i + 1, j));\n ufBackwash.union(getGrid(i, j), getGrid(i + 1, j));\n }\n if (i > 1 && i <= gridsLength && isOpen(i-1, j)) {\n uf.union(getGrid(i, j), getGrid(i - 1, j));\n ufBackwash.union(getGrid(i, j), getGrid(i - 1, j));\n }\n\n if (j >= 1 && j < gridsLength && isOpen(i, j+1)) {\n uf.union(getGrid(i, j), getGrid(i, j + 1));\n ufBackwash.union(getGrid(i, j), getGrid(i, j + 1));\n }\n\n if (j > 1 && j <= gridsLength && isOpen(i, j-1)) {\n uf.union(getGrid(i, j), getGrid(i, j - 1));\n ufBackwash.union(getGrid(i, j), getGrid(i, j - 1));\n }\n }", "private synchronized boolean isClosed()\n {\n return isClosed;\n }", "public Set<WeightedPoint> getClosedSet()\n {\n return closedSet;\n }", "public boolean isOpen(int i, int j) {\n\t\tvalidate(i, j);\n\t\treturn grid[i - 1][j - 1];\n\t}", "public boolean isClosed(){\n\t\tFreeVariableSet temp=freeVariables(new HashSet<Integer>());\n\t\tif (temp.size()==0) return true;\n\t\treturn false;\n\t}", "public void closed();", "protected abstract D getUpper(R range);", "public AbstractBoolean greater(Interval other){\n\t\ttry {\n\t\t\t// If this.max > this.min then True\n\t\t\tif ((!this.low.equals(\"-Inf\"))\n\t\t\t\t\t&& (!other.high.equals(\"+Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.low) > Integer.parseInt(other.high))\n\t\t\t\treturn AbstractBoolean.True();\n\n\t\t\t// If this.min < other.max then False\n\t\t\tif ((!other.low.equals(\"-Inf\"))\n\t\t\t\t\t&& (!this.high.equals(\"+Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.high) < Integer.parseInt(other.low))\n\t\t\t\treturn AbstractBoolean.False();\n\n\t\t} catch (NumberFormatException e){\n\t\t\treturn AbstractBoolean.TopBool();\n\t\t}\n\n\t\treturn AbstractBoolean.TopBool();\n\t}", "public static void merge(Value[] arr, int low, int high) {\r\n int mid = low + (high - low) / 2; // the mid-point\r\n // Merge the two \"halves\" into a new array merged\r\n Value[] merged = new Value[high - low];\r\n int low_i = low;\r\n int upp_i = mid;\r\n for (int mer_i = 0; mer_i < merged.length; mer_i++) {\r\n if (low_i == mid) {\r\n // We already put all elements from the lower half in their\r\n // right place, so just put all the elements from the upper half\r\n // in their place, and be done.\r\n while (upp_i < high) {\r\n merged[mer_i] = arr[upp_i];\r\n upp_i++;\r\n mer_i++;\r\n }\r\n break;\r\n } else if (upp_i == high) {\r\n // We already put all elements from the upper half in their\r\n // right place, so just put all the elements from the lower half\r\n // in their place, and be done.\r\n while (low_i < mid) {\r\n merged[mer_i] = arr[low_i];\r\n low_i++;\r\n mer_i++;\r\n }\r\n double x = 0.5;\r\n for (int i = 0; i < merged.length; i++) {\r\n merged[i].draw(x, 0);\r\n }\r\n break;\r\n } else if (arr[low_i].getValue() < arr[upp_i].getValue()) { // when comparing objects, use arr[low_i].compareTo(arr[upp_i) < 0\r\n merged[mer_i] = arr[low_i];\r\n low_i++;\r\n } else {\r\n merged[mer_i] = arr[upp_i];\r\n upp_i++;\r\n }\r\n }\r\n // Copy the elements of merged back into arr in the right place.\r\n for (int i = 0; i < merged.length; i++)\r\n arr[low + i] = merged[i];\r\n }", "public boolean\tisClosed();", "public static int getMid(int low, int high) \r\n\t{\r\n\t\treturn ((low + high + 1) / 2);\r\n\t}", "public static boolean checkOpenOnRight(int[] heights, int checkFrom) {\n\t\tboolean status = true;\n\t\tint checkFromHeight = heights[checkFrom];\n\t\tfor(int i = checkFrom + 1; i < heights.length && status; i++) { // The && status adds some efficency.\n\t\t\tstatus &= heights[i] <= checkFromHeight;\n\t\t}\n\t\treturn status;\n\t}", "public void doorClose(){\n this.setRoadBlock(true);\n this.setRender(true);\n }", "private int alwaysMoreOpen(int start, int end, String s){\n int diff=0, temp=0, res=0;\n for(int i=end; i>start;i--){\n if(s.charAt(i)==')') diff++;\n else {\n if(diff>0){\n diff--;\n temp+=2;\n }\n else{\n res=Math.max(temp,res);\n temp=0;\n }\n }\n }\n return Math.max(temp,res);\n}", "public BoundType b() {\n return BoundType.OPEN;\n }", "public Stop getClosedStop()\r\n {\r\n return closed_stop;\r\n }", "private int getCloseColor(int[] prgb) {\n \t\t\t\n \t\t\treturn getClosestColorByDistance(palette, firstColor, numColors, prgb, -1);\n \t\t}", "protected final boolean isContained(int low2, int high2) {\n\tif ((this.low >= low2) && (this.high <= high2)) {\n\t return(true);\n\t}\n\treturn(false);\n }", "public boolean domainMin1Closed() throws IllegalStateException {\n\treturn true;\n }", "public void depolarize(){\n\t\t\tif(sodiumChannel.getGateStatus().equalsIgnoreCase(\"open\")) {\n\t\t\t\tfor(int i = 1; i <= threshold; i++) {\n\t\t\t\t\tcurrentVoltage = currentVoltage + sodiumIon;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static void test(String args[]) {\n int[][] input = {{1,1,1,1,1,1,1,0},{1,0,0,0,0,1,1,0},{1,0,1,0,1,1,1,0},{1,0,0,0,0,1,0,1},{1,1,1,1,1,1,1,0}};\n int[][] input2 = {{0,0,1,0,0},{0,1,0,1,0},{0,1,1,1,0}};\n int[][] input3 = {{1,1,1,1,1,1,1},\n {1,0,0,0,0,0,1},\n {1,0,1,1,1,0,1},\n {1,0,1,0,1,0,1},\n {1,0,1,1,1,0,1},\n {1,0,0,0,0,0,1},\n {1,1,1,1,1,1,1}};\n System.out.println(closedIsland(input));\n System.out.println(closedIsland(input2));\n System.out.println(closedIsland(input3));\n }", "public abstract S isCloseTo(A expected, A offset, boolean strict);", "public IntervalNode(int low, int high) {\n\tthis(low,high,null);\n }", "private int getCloseColor(int[] prgb) {\n \t\t\tfloat[] phsv = { 0, 0, 0 };\n \t\t\trgbToHsv(prgb[0], prgb[1], prgb[2], phsv);\n \t\t\treturn phsv[2] < 64 ? fg : bg;\n \t\t}", "public void closed() \r\n\t{\r\n\t\t\r\n\t}", "public void shuttlesort(int from[], int to[], int low, int high) {\n if (high - low < 2) {\n return;\n }\n int middle = (low + high) / 2;\n shuttlesort(to, from, low, middle);\n shuttlesort(to, from, middle, high);\n int p = low;\n int q = middle;\n if (high - low >= 4 && compare(from[middle - 1], from[middle]) <= 0) {\n for (int i = low; i < high; i++) {\n to[i] = from[i];\n }\n return;\n }\n for (int i = low; i < high; i++) {\n if (q >= high || (p < middle && compare(from[p], from[q]) <= 0)) {\n to[i] = from[p++];\n } else {\n to[i] = from[q++];\n }\n }\n }", "public Interval(String low, String high) {\n\t\tthis.low = low;\n\t\tthis.high = high;\n\t}", "public int getyHarbourOff(int leftCoordinate, int rightCoordinate, int off) {\n if (defaultHarbourMap.get(getHashCodeofPair(leftCoordinate, rightCoordinate)) != null) {\n switch (defaultHarbourMap.get(getHashCodeofPair(leftCoordinate, rightCoordinate))) {\n case GENERIC:\n if (rightCoordinate == -11) {\n return 0;\n } else if (rightCoordinate == -10) {\n return -off;\n } else {\n if (leftCoordinate == -5 || leftCoordinate == 1) {\n return off;\n } else {\n return 0;\n }\n }\n case NONE:\n return 0;\n case SPECIAL_BRICK:\n if (leftCoordinate == -3) {\n return 0;\n } else {\n return -off;\n }\n case SPECIAL_GRAIN:\n if (leftCoordinate == 3) {\n return 0;\n } else {\n return -off;\n }\n case SPECIAL_ORE:\n if (rightCoordinate == -10) {\n return off/2;\n } else {\n return -off/2;\n }\n case SPECIAL_WOOD:\n if (leftCoordinate == -5) {\n return -off;\n } else {\n return 0;\n }\n case SPECIAL_WOOL:\n if (leftCoordinate == -2) {\n return 0;\n } else {\n return off;\n }\n default:\n return 0;\n\n }\n }\n\n return 0;\n }", "public boolean stop(int floor);", "private void checkIfClosed(int i) throws IOException {\n if (i == -1) {\n throw new IOException();\n }\n }", "public boolean closed() {\r\n return closed;\r\n }", "public final int getHigh() {\n\treturn(this.high);\n }", "public static FreezerDoorClosedState instance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new FreezerDoorClosedState();\n\t\t\tinstance.initialize( FreezerContext.instance() );\n\t\t}\n\t\treturn instance;\n\t}", "private boolean inRange(double num, double low, double high) {\n if (num >= low && num <= high)\n return true;\n\n return false;\n }", "boolean incHighValue() { return true; }", "protected final boolean exactMatch(int low2, int high2) {\n\tif ((low2 == this.low) && (high2 == this.high)) { \n\t return(true);\n\t}\n\treturn(false);\n }", "public boolean hideClosedPorts(){\n return hideClosedP.isSelected();\n }", "private int getmax(int red,int green,int blue)\r\n\t{\r\n\t\tif (red>green && red>blue)\r\n\t\t\treturn red;\r\n\t\telse\r\n\t\t\tif (green>blue)\r\n\t\t\t\treturn green;\r\n\t\t\telse\r\n\t\t\t\treturn blue;\r\n\t}", "public boolean isDirectlyClosed() {\n\t\treturn this.directlyClosed;\n\t}", "@Override\n public boolean close() {\n return sortedbase.close(); \n\n }", "public void setDirectlyClosed(boolean directlyClosed) {\n\t\tthis.directlyClosed = directlyClosed;\n\t}", "private int pour(int left, int right, int max) {\r\n int fill = max-right;\r\n if(left<=fill) {\r\n return left;\r\n }else {\r\n return fill;\r\n }\r\n }", "public int getCover(int side)\r\n/* 184: */ {\r\n/* 185:145 */ if ((this.CoverSides & 1 << side) == 0) {\r\n/* 186:145 */ return -1;\r\n/* 187: */ }\r\n/* 188:146 */ return this.Covers[side];\r\n/* 189: */ }", "public boolean isOpen(int i, int j){\n \tif(i<=0 || i>this.gridLength || j<=0 || j>this.gridLength){\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n \treturn this.idGrid[(i-1)*this.gridLength + j] == true;\n }", "private void closeDoor(int floor){\r\n\t\tfor(int i = 0; i <1000; i++){\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"Elevator no. \"+ id+ \" Door closed at floor \"+ floor);\r\n\t}", "public void wrap(int xLow, int xHigh, int yLow, int yHigh)\n\t{\n\t\tif(x >= xHigh)\n\t\t{\n\t\t\tx = x - xHigh;\n\t\t}\n\t\t\n\t\telse if(y >= yHigh)\n\t\t{\n\t\t\ty = y - yHigh;\n\t\t}\n\t\t\n\t}", "@Test\r\n\tvoid testDominoHighLowSetTwoInts()\r\n\t{\r\n\t\tSystem.out.println(\"NOW TESTING TWO INTS PASSED TO HIGHLOWSET IMPL\");\r\n\t\tint highPip = 5;\r\n\t\tint lowPip = 3;\r\n\t\tDomino d1 = new DominoHighLowSetImpl_Khan(highPip,lowPip);\r\n\t\tint assertHigh = d1.getHighPipCount();\r\n\t\tint assertLow = d1.getLowPipCount();\r\n\t\tassertEquals(assertHigh, 5);\r\n\t\tassertEquals(assertLow, 3);\r\n\t\tSystem.out.println(\"TEST SUCCESFULLY COMPLETED\");\r\n\t}", "public boolean isOpen(int i, int j) {\n\t\tif (!isInside(i, j))\n\t\t\treturn false;\n\t\treturn grid[getPosition(i, j)];\n\n\t}", "public double getLow() {return low;}", "public void setHigh(int high) {\n\t\tthis.high = high;\n\t}" ]
[ "0.65439415", "0.6154838", "0.6071321", "0.6071321", "0.6071321", "0.6071321", "0.60658103", "0.6046047", "0.58879125", "0.58787036", "0.58073366", "0.5776183", "0.5769554", "0.57149", "0.5673883", "0.565512", "0.56468856", "0.5645374", "0.5604353", "0.56017846", "0.5528466", "0.54921275", "0.5461701", "0.54324704", "0.54324704", "0.5431036", "0.54129916", "0.5393975", "0.53542566", "0.534887", "0.5341468", "0.5336396", "0.5310078", "0.5251252", "0.523306", "0.52259016", "0.5183115", "0.5174566", "0.51612663", "0.51567745", "0.5145514", "0.5104952", "0.5074019", "0.5055087", "0.50530607", "0.5046811", "0.5045151", "0.50321573", "0.5024539", "0.5011293", "0.5009881", "0.4992775", "0.49832878", "0.49827766", "0.49360457", "0.49279782", "0.49262008", "0.4910084", "0.4905152", "0.48989272", "0.48977864", "0.48875868", "0.48771673", "0.48700923", "0.48663744", "0.48556614", "0.4848244", "0.48416343", "0.4832111", "0.48173758", "0.48173174", "0.4814561", "0.48133713", "0.48118737", "0.48116282", "0.48070464", "0.47885123", "0.47844365", "0.4766804", "0.47660348", "0.47546318", "0.47485927", "0.47430214", "0.47373697", "0.47368515", "0.4726903", "0.4723753", "0.4722886", "0.47209245", "0.4708199", "0.470093", "0.46991873", "0.4697071", "0.46959347", "0.469252", "0.4681596", "0.46796688", "0.46708748", "0.46646413", "0.46497387" ]
0.5184298
36
return index if only one match, if no matches return 1, if > 1 match return nhits
private int findSingleHit(double target) { int hits = 0; int idxFound = -1; int n = orgGridAxis.getNcoords(); for (int i = 0; i < n; i++) { if (intervalContains(target, i)) { hits++; idxFound = i; } } if (hits == 1) return idxFound; if (hits == 0) return -1; return -hits; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getHits();", "Object getNumberMatched();", "private int getSearchHitCount()\r\n {\r\n return ( mFilteringSearchTerm != null ) ? mFilteringSearchTerm.getHitCount() : 0;\r\n }", "public int getWrapperHits();", "protected int hit() {\r\n\t\treturn hits;\r\n\t}", "public int numMatches();", "public int getTotalHits() { return totalHits; }", "protected long hit() {\n return numHits.incrementAndGet();\n }", "public HitStatus hit() {\r\n\t\tnumHits++;\r\n\t\tif (type.length() <= numHits) {\r\n\t\t\treturn HitStatus.SUNK;\r\n\t\t}\r\n\t\treturn HitStatus.HIT;\r\n\t}", "int getIndexesCount();", "Map<String, Long> hits();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "final int numHits() {\n return numHits;\n }", "public abstract int getNumIndexes();", "int getIndexEndpointsCount();", "public int numHits() {\r\n\t\treturn hits;\r\n\t}", "public int getExact() { return exactMatches; }", "int getIndicesCount();", "@Test\n public void testFindNMatches() {\n List<Path> files = new ArrayList<>();\n files.add(new File(String.join(File.separator, \"src\", \"test\", \"resources\"),\n \"logviewer-search-context-tests.log.test\").toPath());\n files.add(new File(String.join(File.separator, \"src\", \"test\", \"resources\"),\n \"logviewer-search-context-tests.log.gz\").toPath());\n\n final LogviewerLogSearchHandler handler = getSearchHandler();\n\n final List<Map<String, Object>> matches1 = handler.findNMatches(files, 20, 0, 0, \"needle\").getMatches();\n final List<Map<String, Object>> matches2 = handler.findNMatches(files, 20, 0, 126, \"needle\").getMatches();\n final List<Map<String, Object>> matches3 = handler.findNMatches(files, 20, 1, 0, \"needle\").getMatches();\n\n assertEquals(2, matches1.size());\n assertEquals(4, ((List) matches1.get(0).get(\"matches\")).size());\n assertEquals(4, ((List) matches1.get(1).get(\"matches\")).size());\n assertEquals(String.join(File.separator, \"test\", \"resources\", \"logviewer-search-context-tests.log.test\"), matches1.get(0).get(\"fileName\"));\n assertEquals(String.join(File.separator, \"test\", \"resources\", \"logviewer-search-context-tests.log.gz\"), matches1.get(1).get(\"fileName\"));\n\n assertEquals(2, ((List) matches2.get(0).get(\"matches\")).size());\n assertEquals(4, ((List) matches2.get(1).get(\"matches\")).size());\n\n assertEquals(1, matches3.size());\n assertEquals(4, ((List) matches3.get(0).get(\"matches\")).size());\n }", "@Override\n\tpublic int countIndex() {\n\t\treturn logoMapper.selectCountLogo()+headbannerMapper.selecCountHB()+succefulMapper.selecCountSucc()+solutionMapper.selecCountSolu();\n\t}", "boolean allHits();", "public int getIndex();", "public int getIndex();", "public int getIndex();", "Expression getIndexExpr();", "public abstract long getIndex();", "public int getNumHits() {\n\t\treturn numHits;\n\t}", "public int Search(int key)\n {\n for(int i=0; i<n; i++)\n {\n if(a[i]==key)\n return 1;\n }\n return 0;\n }", "private int findIndex(T item){\n for(int i = 0; i < numItems; i++){\n if(arr[i].equals(item))\n return i;\n }\n return -1;\n }", "private int findItemIndex(StudentClass searchItem)\n {\n int searchedHash = generateHash(searchItem) % tableSize;\n int workingIndex = searchedHash;\n int probe = 0; \n int QUAD_VAL = 2;\n StudentClass accessedItem;\n\n while(workingIndex < tableSize)\n {\n accessedItem = tableArray[workingIndex];\n\n if(searchItem.compareTo(accessedItem) == 0)\n {\n return workingIndex;\n }\n probe++;\n\n if(probeFlag == QUADRATIC_PROBING)\n {\n workingIndex = searchedHash + toPower(probe, QUAD_VAL);\n }\n else\n {\n workingIndex += 1;\n }\n workingIndex %= tableSize;\n }\n return ITEM_NOT_FOUND;\n }", "public int searchRowsCount(SearchCriteria cri);", "public abstract int getIndex();", "int findCount();", "SearchResult getBestResult(List<SearchResult> results, SearchQuery query);", "int getTermIndexFromName(String name) {\n int count = 0;\n for (Term term : terms) {\n if (term.getName().equals(name)) {\n return count;\n }\n count++;\n }\n throw new RuntimeException(\"couldn't find index by name\");\n }", "public void increaseNumHits() {\n\t\tthis.numHits += 1;\n\t}", "int getResultsCount();", "int getResultsCount();", "public int getNumOfMatchedBets();", "@Override\r\n public Integer countingDuplicates(String match) {\r\n if(duplicates == null) { // if it's not already located\r\n duplicates = new HashMap<>();\r\n for (Core str : pondred) {\r\n for (String term:str.abstractTerm){\r\n if (duplicates.containsKey(term) )\r\n duplicates.put(term, duplicates.get(term) + 1);\r\n else {\r\n duplicates.put(term, 1);\r\n }\r\n }\r\n }\r\n }\r\n return duplicates.get(match);\r\n }", "private int searchForAnnotatedRna(Genome genome) {\n int retVal = 0;\n for (Feature feat : genome.getFeatures()) {\n if (feat.getType().contentEquals(\"rna\") && Genome.SSU_R_RNA.matcher(feat.getPegFunction()).find()) {\n RnaDescriptor descriptor = new RnaDescriptor(genome, feat);\n this.reporter.recordHit(descriptor);\n retVal++;\n }\n }\n return retVal;\n }", "private int getNextMatch(String searchText) {\n \tint startPosition = textArea.getCaretPosition()+1;\n \treturn document.getContent().indexOf(searchText, startPosition);\n }", "public long numHits() {\n return numHits.longValue();\n }", "int index();", "public void searchIndex(Directory index) throws Exception{\n\t\tString searchString = getSearchString();\n\t\t\n\t\tSystem.out.println(\"Searching for '\" + searchString + \"'\");\n\n\t\tIndexReader indexReader = DirectoryReader.open(index);\n\t\tIndexSearcher indexSearcher = new IndexSearcher(indexReader);\n\n\t\tAnalyzer analyzer = new StandardAnalyzer();\n\t\t\n\t\tString query_string = \"title:\" + searchString + \" OR content:\" + searchString + \"OR important:\" + searchString + \"OR h1:\" + searchString +\n\t\t\t\t\"OR h2:\" + searchString + \"OR h3:\" + searchString + \"OR h4:\" + searchString + \"OR h5:\" + searchString + \"OR h6:\" + searchString;\n\t\tQueryParser queryParser = new QueryParser(\"title\", analyzer);\n\t\t\n\t\tTopDocs docs = indexSearcher.search(queryParser.parse(query_string), 10);\n\t\t\n\t\t\n//\t\tString[] fields = {\"content\", \"title\", \"important\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"};\n//\t\tBooleanClause.Occur[] flags = \n//\t\t{\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n// };\n//\t\t\n//\t\tTopDocs docs = indexSearcher.search(MultiFieldQueryParser.parse(searchString, fields, flags, analyzer), 10);\n\n\t\tScoreDoc[] hits = docs.scoreDocs;\n\n\t System.out.println(\"Found \" + hits.length + \" hits.\");\n\t for(int i=0;i<hits.length;++i) {\n\t \tint docId = hits[i].doc;\n\t Document d = indexSearcher.doc(docId);\n\t System.out.println((i + 1) + \". \" + d.get(\"title\") + \"\\t\" + d.get(\"url\") + \"\\t\" + hits[i].score);\n\t }\n\t}", "int getNumberOfResults();", "public final long incrementNearCacheHitCount() {\n\t\tm_nearLastAccess = System.currentTimeMillis();\n\t\treturn ++m_nearCacheHits;\n\t}", "public int find(String key){\n\tint spotCheck = hashIt(key);\n\tfor(int b = 0; b <= theTable.length; b++){\n\t /** System.out.println(\"b + spotCheck: \" + (b + spotCheck));\n\t System.out.println(\"(b + spotCheck) % theTable.length: \" + ((b + spotCheck) % theTable.length));\n\t System.out.println(\"theTable.length: \" + theTable.length);\n\t */\n\t if(theTable[(b + spotCheck) % theTable.length] != null){\n\t\tif(theTable[(b + spotCheck) % theTable.length].getKey().toLowerCase().equals(key)){\n\t\t theTable[(b + spotCheck) % theTable.length].incrCount();\n\t\t return (b + spotCheck) % theTable.length;\n\t\t}\n\t }\n\n\t}\n\treturn -1;\n\t\t\n }", "Integer getIndexOfGivenValue(String value) {\n Integer index = null;\n for (IndexValuePair indexValuePair : indexValuePairs) {\n if (indexValuePair.getValue().equals(value)) {\n index = indexValuePair.getIndex();\n break;\n }\n }\n return index;\n }", "int countByExample(CfgSearchRecommendExample example);", "default void hit() {\n\t\tcount(1);\n\t}", "public int numberOfMatches(String prefix) {\r\n if (prefix == null) {\r\n throw new java.lang.NullPointerException();\r\n }\r\n Term temp = new Term(prefix, 0);\r\n int x = BinarySearchDeluxe.firstIndexOf(queries, temporary, Term.byPrefixOrder(prefix.length()));\r\n int y = BinarySearchDeluxe.lastIndexOf(queries, temporary, Term.byPrefixOrder(prefix.length()));\r\n return y - x + 1;\r\n }", "public int getSearchResultsCount() {\n return searchResultsList.size();\n }", "int getMatchedElements();", "public int numberOfOccorrence();", "public void rankMatches();", "@VTID(10)\n int getIndex();", "private int locateIndex(K key)\n { \n // // Search until you either find an entry containing key or \n // // pass the point where it should be\n // int index = 0;\n // while ((index < numberOfEntries) && (key.compareTo(dictionary[index].getKey()) > 0))\n // index++;\n // // end while \n // return index;\n \n return binarySearchQ7(0, numberOfEntries - 1, key);\n }", "@Test\n public void testCase4 () throws IOException {\n //\t\tlog.trace(\"Testcase4\");\n\n ki = new KrillIndex();\n ki.addDoc(createFieldDoc0());\n ki.commit();\n ki.addDoc(createFieldDoc1());\n ki.addDoc(createFieldDoc2());\n ki.commit();\n\n sq = new SpanSegmentQuery(new SpanElementQuery(\"base\", \"e\"),\n new SpanNextQuery(new SpanTermQuery(new Term(\"base\", \"s:a\")),\n new SpanTermQuery(new Term(\"base\", \"s:b\"))));\n\n kr = ki.search(sq, (short) 10);\n ki.close();\n\n assertEquals(\"totalResults\", kr.getTotalResults(), 2);\n // Match #0\n assertEquals(\"doc-number\", 0, kr.getMatch(0).getLocalDocID());\n assertEquals(\"StartPos\", 3, kr.getMatch(0).startPos);\n assertEquals(\"EndPos\", 5, kr.getMatch(0).endPos);\n // Match #1\n assertEquals(\"doc-number\", 0, kr.getMatch(1).getLocalDocID());\n assertEquals(\"StartPos\", 1, kr.getMatch(1).startPos);\n assertEquals(\"EndPos\", 3, kr.getMatch(1).endPos);\n }", "public final long getNearCacheHitCount() {\n\t\treturn m_nearCacheHits;\n\t}", "public static int getPageHits() {\r\n return _count;\r\n }", "@Override\n public synchronized Long count(String query) {\n long count = 0L;\n String nQuery = normalizeQuery(query);\n Set<String> keys = suggestIndex.getKeys();\n Map index = suggestIndex.getIndex();\n LinkedHashSet<Long> result = new LinkedHashSet<Long>();\n\n logger.debug(\"IN SEARCH: query={}, keys={}\", query, keys);\n\n StringBuilder patternBuilder;\n List<Pattern> patterns = new ArrayList<Pattern>();\n for (String keyPart : nQuery.split(\" \")) {\n patternBuilder = new StringBuilder(\"^(?iu)\");\n patternBuilder.append(ALLOWED_CHARS_REGEXP);\n keyPart = Normalizer.normalize(keyPart, Normalizer.Form.NFD);\n patternBuilder.append(keyPart)\n .append(ALLOWED_CHARS_REGEXP)\n .append('$');\n patterns.add(Pattern.compile(patternBuilder.toString()));\n }\n\n for (String key : keys) {\n for (Pattern pattern : patterns) {\n\n if (pattern.matcher(key).matches()) {\n result.addAll((LinkedHashSet<Long>) index.get(key));\n count += ((LinkedHashSet<Long>) index.get(key)).size();\n }\n }\n }\n return Long.valueOf(result.size());\n }", "public int search(T t) {\n \tint bucket = hash(t);\n \tif (Table.get(bucket).linearSearch(t) != -1) {\n \t\treturn bucket;\n \t}\n \treturn -1;\n }", "public Long get_cachetotparameterizedhits() throws Exception {\n\t\treturn this.cachetotparameterizedhits;\n\t}", "private int vertexIndex(T obj){\n for (int i = 0; i < n; i++){\n if (obj.equals(vertices[i])){\n return i;\n }\n }\n return NOT_FOUND;\n }", "private int getIndex(Entity entity){\n int currentIndex = 0;\n\n for(QuadTree node: this.getNodes()){\n\n /*PhysicsComponent bp = (PhysicsComponent)entity.getProperty(PhysicsComponent.ID);\n if( node.getBounds().contains(bp.getBounds())){\n return currentIndex;\n }*/\n currentIndex++;\n }\n return -1; // Subnode not found (part of the root then)\n }", "private GetRequest getIndexExistsRequest() {\n return Requests.getRequest(config.getIndex())\n .type(config.getType())\n .id(\"_\");\n }", "public int index();", "private int findIndexContainingType(TileType type) {\n for (int x = 0; x < getWidth(); x++) {\n for (int y = 0; y < getHeight(); y++) {\n if (getTileType(x, y) == type) {\n return twoDimIndexToOneDimIndex(x, y);\n }\n }\n }\n return NO_INDEX;\n }", "private int indexValue(String value) {\n int loc = openHashCode(value);\n //if the searchVal exist\n if (this.openHashSetArray[loc] == null||!this.openHashSetArray[loc].myList.contains(value))\n return -1;\n else\n return loc;\n\n }", "private int getSearchIndex() \n {\n String selected = searchCombo.getSelectedItem().toString();\n for(int i = 0; i<columnNames.length; i++)\n {\n if(selected.equals(columnNames[i]))\n {\n return i;\n }\n }\n return -1;\n }", "private RequestResponse handleIndexRequest(Request request, Response response) throws ServiceException {\n response.type(\"application/json\");\n\n String core = request.params(\":core\");\n if (StringUtils.isEmpty(core)) {\n throw new ServiceException(\"Failed to provide an index core for the document\");\n }\n\n ContentDocument contentDocument = new RequestToContentDocument().convert(request);\n return this.searchService.index(core, contentDocument);\n }", "public int getNumberFound() {\n return numberFound;\n }", "private int getIndexForDocument(int docId){\n\n int i = 0;\n while(i < this.postingList.size() && this.postingList.get(i) != docId){\n i += this.postingList.get(i+1)+2;\n }\n if(i >= this.postingList.size())\n return -1; // document does not exist in posting List. Return -1\n return i;\n }", "@Override\n public List<SearchResult> search(String queryString, int k) {\n // TODO: YOUR CODE HERE\n\n // Tokenize the query and put it into a Set\n HashSet<String> tokenSet = new HashSet<>(Searcher.tokenize(queryString));\n\n /*\n * Section 1: FETCHING termId, termFreq and relevant docId from the Query\n */\n\n // Init a set to store Relevant Document Id\n HashSet<Integer> relevantDocIdSet = new HashSet<>();\n for (String token : tokenSet) { // Iterates thru all query tokens\n int termId;\n try {\n termId = indexer.getTermDict().get(token);\n } catch (NullPointerException e) { // In case current token is not in the termDict\n continue; // Skip this one\n }\n // Get the Posting associate to the termId\n HashSet<Integer> posting = indexer.getPostingLists().get(termId);\n relevantDocIdSet.addAll(posting); // Add them all to the Relevant Document Id set\n }\n\n /*\n * Section 2: Calculate Jaccard Coefficient between the Query and all POTENTIAL DOCUMENTS\n */\n\n // ArrayList for the Final Result\n ArrayList<SearchResult> searchResults = new ArrayList<>();\n for (Document doc : documents) { // Iterates thru all documents\n if (!relevantDocIdSet.contains(doc.getId())) { // If the document is relevant\n searchResults.add(new SearchResult(doc, 0)); // Add the document as a SearchResult with zero score\n } else {\n HashSet<String> termIdSet = new HashSet<>(doc.getTokens()); // Get the token set from the document\n\n // Calculate Jaccard Coefficient of the document\n double jaccardScore = JaccardMathHelper.calculateJaccardSimilarity(tokenSet, termIdSet);\n\n // Add the SearchResult with the computed Jaccard Score\n searchResults.add(new SearchResult(doc, jaccardScore));\n }\n }\n\n return TFIDFSearcher.finalizeSearchResult(searchResults, k);\n }", "private Integer getNoOfOccurences(String key) {\n\t\ttry {\n\t\t\tif (key != null && key.trim().length() > 0){\n\t\t\t\tInteger noOfOccurences = DataLoader.data.get(key.toString().trim().toLowerCase());\n\t\t\t\tif(noOfOccurences != null)\n\t\t\t\t\treturn noOfOccurences;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn 0;\n\t}", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "public int searchIndex(int v) {\n int counter = 1;\n Lista iter = new Lista(this);\n if (iter.x == v) {\n return 0;\n }\n while (iter.next != null) {\n if (iter.next.x == v) {\n return counter;\n }\n iter = iter.next;\n counter += 1;\n }\n if (counter == iter.size() - 1) {\n return -1;\n }\n return counter;\n }", "public abstract int indexFor(Object obj);", "public void search(IndexShort < O > index, short range, short k)\n throws Exception {\n // assertEquals(index.aDB.count(), index.bDB.count());\n // assertEquals(index.aDB.count(), index.bDB.count());\n // index.stats();\n index.resetStats();\n // it is time to Search\n int querySize = 1000; // amount of elements to read from the query\n String re = null;\n logger.info(\"Matching begins...\");\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n BufferedReader r = new BufferedReader(new FileReader(query));\n List < OBPriorityQueueShort < O >> result = new LinkedList < OBPriorityQueueShort < O >>();\n re = r.readLine();\n int i = 0;\n long realIndex = index.databaseSize();\n\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n OBPriorityQueueShort < O > x = new OBPriorityQueueShort < O >(\n k);\n if (i % 100 == 0) {\n logger.info(\"Matching \" + i);\n }\n\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n if(i == 279){\n System.out.println(\"hey\");\n }\n index.searchOB(s, range, x);\n result.add(x);\n i++;\n }\n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n \n logger.info(index.getStats().toString());\n \n int maxQuery = i;\n // logger.info(\"Matching ends... Stats follow:\");\n // index.stats();\n\n // now we compare the results we got with the sequential search\n Iterator < OBPriorityQueueShort < O >> it = result.iterator();\n r.close();\n r = new BufferedReader(new FileReader(query));\n re = r.readLine();\n i = 0;\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n if (i % 300 == 0) {\n logger.info(\"Matching \" + i + \" of \" + maxQuery);\n }\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n OBPriorityQueueShort < O > x2 = new OBPriorityQueueShort < O >(\n k);\n searchSequential(realIndex, s, x2, index, range);\n OBPriorityQueueShort < O > x1 = it.next();\n //assertEquals(\"Error in query line: \" + i + \" slice: \"\n // + line, x2, x1); \n \n assertEquals(\"Error in query line: \" + i + \" \" + index.debug(s) + \"\\n slice: \"\n + line + \" \" + debug(x2,index ) + \"\\n\" + debug(x1,index), x2, x1);\n\n i++;\n }\n \n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n r.close();\n logger.info(\"Finished matching validation.\");\n assertFalse(it.hasNext());\n }", "public synchronized int search(Object arg)\n {\n int result = -1;\n for (int i=0; i<dataList.size(); i++)\n {\n Object testItem = dataList.get(i);\n if (arg.equals(testItem))\n {\n // calculate the 1-based index of the last item\n // in the List (the top item on the stack)\n result = i + 1;\n break;\n }\n }\n return result;\n }", "@Override\r\n\tpublic HitsVo hitsSelectOne(Map<String, Object> map) {\n\t\treturn sqlSession.selectOne(namespace + \"hitsSelectOne\", map);\r\n\t}", "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }" ]
[ "0.59916145", "0.5955351", "0.5869631", "0.5816937", "0.5806447", "0.5773531", "0.57491493", "0.57337797", "0.56745136", "0.5611088", "0.55741143", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.55715203", "0.5523883", "0.5511127", "0.55030733", "0.54798967", "0.54283035", "0.54077905", "0.53589255", "0.53484315", "0.5338608", "0.5327488", "0.5327488", "0.5327488", "0.5322178", "0.53164345", "0.5269479", "0.5245386", "0.5245104", "0.5241224", "0.5225909", "0.5222368", "0.5207059", "0.5206056", "0.5197799", "0.5194406", "0.51645344", "0.51645344", "0.5163721", "0.51629597", "0.51550335", "0.5151951", "0.51427704", "0.51154566", "0.5108828", "0.5104576", "0.5103626", "0.5093392", "0.50921834", "0.50844836", "0.5079318", "0.5066597", "0.50641024", "0.50631046", "0.50589496", "0.50498277", "0.5048915", "0.50371236", "0.5030849", "0.501519", "0.50048685", "0.50037014", "0.49989527", "0.49970236", "0.49848354", "0.4980341", "0.49760342", "0.49700794", "0.49643475", "0.4955023", "0.4953723", "0.4952662", "0.49467972", "0.49459827", "0.49426213", "0.49391618", "0.49372312", "0.49372312", "0.49372312", "0.49372312", "0.49372312", "0.49372312", "0.49341187", "0.4920562", "0.491951", "0.49191025", "0.49154055", "0.49112067" ]
0.5267494
39
return index of closest value to target For Discontiguous Intervals, "closest" means: time coordinate axis? Interval such that the end of the interval is closest to the target value otherwise, interval midpoint closest to target If there are multiple matches for closest: time coordinate axis? Use the interval with the smallest nonzero interval width otherwise, use the one with the largest midpoint value
private int findClosestDiscontiguousInterval(double target) { boolean isTemporal = orgGridAxis.getAxisType().equals(AxisType.Time); return isTemporal ? findClosestDiscontiguousTimeInterval(target) : findClosestDiscontiguousNonTimeInterval(target); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "private int calculateIndexOfClosestPoint(Position[] smoothedPath) {\n double[] distances = new double[smoothedPath.length];\n for (int i = 0/*lastClosestPointIndex*/; i < smoothedPath.length; i++) {\n distances[i] = Functions.Positions.subtract(smoothedPath[i], currentCoord).getMagnitude();\n }\n\n // calculates the index of value in the array with the smallest value and returns that index\n lastClosestPointIndex = Functions.calculateIndexOfSmallestValue(distances);\n return lastClosestPointIndex;\n }", "public static int binarySearchWithTheClosestNum(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// when we reach here, means target is not in the array, so we need to find the closet element from num[left] or num[right]\n\t\t// notice that, right is smailler than left now, according to the while condition, if it breaks, left > right\n\t\treturn Math.abs(target - num[left]) > Math.abs(target - num[right]) ? right : left;\n\t}", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "private int closest(double [] v){\n \t\tdouble mindist = dist(v, nCentroids[0]);\n \t\tint label =0;\n \t\tfor (int i=1; i<nClusters; i++){\n \t\t\tdouble t = dist(v, nCentroids[i]);\n \t\t\tif (mindist>t){\n \t\t\t\tmindist = t;\n \t\t\t\tlabel = i;\n \t\t\t}\n \t\t}\n \t\treturn label;\n \t}", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "public static int findClosest(int[] array, int value){\n if(value < array[0]) return array[0];\n if(value > array[array.length-1]) return array[array.length-1];\n\n int low = 0;\n int high = array.length -1;\n\n while(low <= high){\n int mid = (low+high)/2;\n if(array[mid] == value) return array[mid];\n else if(array[mid] < value) low = mid+1;\n else high = mid-1;\n }\n\n return ((array[low] - value) < (value - array[high])) ? array[low] : array[high];\n }", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public int findCoordElement(double target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n case regularPoint:\n return findCoordElementRegular(target, bounded);\n case irregularPoint:\n case contiguousInterval:\n return findCoordElementContiguous(target, bounded);\n case discontiguousInterval:\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "@NotNull\n private RangeInfo findNearestRangeInfo() {\n final int caretPosition = myView.getCaretPosition();\n\n for (final RangeInfo range : myRangeInfos) {\n if (range.isWithin(caretPosition)) {\n return range;\n }\n if (range.getFrom() > caretPosition) {\n return range; // Ranges are sorted, so we are on the next range. Take it, if caret is not within range\n }\n }\n\n return myRangeInfos.last();\n }", "private int findNearestValue(final int i, final double key) {\n\n\t\tint low = 0;\n\t\tint high = m_NumValues[i];\n\t\tint middle = 0;\n\t\twhile (low < high) {\n\t\t\tmiddle = (low + high) / 2;\n\t\t\tdouble current = m_seenNumbers[i][middle];\n\t\t\tif (current == key) {\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\tif (current > key) {\n\t\t\t\thigh = middle;\n\t\t\t} else if (current < key) {\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "@SuppressWarnings(\"null\")\n\tpublic static Node optimalIterativeSolution (Node Tree, int target) {\n\t\tNode curr = Tree;\n\t\tNode Closest = null;\n\t\tClosest.val = Integer.MAX_VALUE;\n\t\twhile (curr != null) {\n\t\t\tif (Math.abs(target - Closest.val) > Math.abs(target - curr.val)) {\n\t\t\t\tClosest = curr;\n\t\t\t} else if (target < curr.val) {\n\t\t\t\tcurr = curr.left;\n\t\t\t} else if (target > curr.val) {\n\t\t\t\tcurr = curr.right;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn Closest;\n\t}", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public int closest2(TreeNode root, int target) {\n\t\tif (root.key == target || (root.left == null && root.right == null)) {\n\t\t\treturn root.key;\n\t\t}\n\t\tint result = root.key;\n\t\twhile (root != null) {\n\t\t\tif (root.key == target) {\n\t\t\t\treturn root.key;\n\t\t\t} else {\n\t\t\t\tif (Math.abs(root.key - target) < Math.abs(result - target)) {\n\t\t\t\t\tresult = root.key;\n\t\t\t\t}\n\t\t\t\tif (root.key < target) {\n\t\t\t\t\troot = root.right;\n\t\t\t\t} else {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static int searchInMountainArray(int[] arr, int target){\n int indexOfPeak = peakIndexInMountainArray(arr);\n\n int firstIndex = BinarySearch(arr, target, 0, indexOfPeak);\n if(firstIndex != -1){\n return firstIndex;\n }\n //try to search in second half.\n return BinarySearch(arr, target, indexOfPeak, arr.length-1);\n }", "public int[] kClosest(int[] array, int target, int k) {\n if (array.length==0){\n return new int[] {-1};\n }\n int left=0;\n int right=array.length-1;\n int[] result=new int[k];\n while(left<right-1){\n int mid = left+(right-left)/2;\n if (array[mid]==target){\n left=mid;\n right=mid;\n }else if (array[mid]>target){\n right = mid;\n }else{\n left = mid;\n }\n }\n //post processing\n for(int i=0;i<k;i++){ //逻辑运算符按顺序计算,如果先计算array【left】就有可能出界报错\n if( left<0 || (right<=array.length-1 && Math.abs(array[left]-target)>=Math.abs(array[right]-target))){\n result[i]=array[right];\n right++;\n }else{\n result[i]=array[left];\n left--;\n }\n }\n return result;\n }", "public static int threeSumClosest(int[] num, int target) {\n Arrays.sort(num);\n int closestSum = Integer.MAX_VALUE;\n \n int left, right;\n for(int i = 0; i < num.length-2; i++){\n left = i+1;\n right = num.length - 1;\n \n while(left < right){\n \n // we havent found a closestSum yet, just take the first sum\n if(closestSum == Integer.MAX_VALUE){\n closestSum = num[left] + num[right] + num[i];\n }\n \n // checks for the closest of sums\n else if(Math.abs(closestSum - target) > (Math.abs(target - (num[left] + num[right] + num[i])))){\n closestSum = num[left] + num[right] + num[i];\n \n // if you sum up to target, there is no possible closer sum\n if(closestSum == target){\n return target;\n }\n }\n \n \n if(num[left] + num[right] + num[i] < target){\n left++;\n }\n else{\n right--;\n }\n }\n \n }\n return closestSum;\n }", "private int getNearestCenterIndex(DataObject obj,\n\t\t\tArrayList<DataObject> centers) {\n\t\tint centerIndex = 0;\n\t\tdouble minDistance = Double.MAX_VALUE;\n\t\tdouble distance = 0.0;\n\t\tfor (int i = 0; i < centers.size(); i++) {\n\t\t\tDataObject dataObject = centers.get(i);\n\t\t\tdistance = getDistance(obj, dataObject);\n\t\t\tif (distance < minDistance) {\n\t\t\t\tminDistance = distance;\n\t\t\t\tcenterIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn centerIndex;\n\t}", "public int findPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "public Point getClosest(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMax = 0.0;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint furthermost = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance > distanceMax){\n\t\t\t\t\tdistanceMax = distance;\n\t\t\t\t\tfurthermost = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn furthermost;\n\t\t}", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "public static double closestPair(Point[] sortedX) {\n if (sortedX.length <= 1) {\n return Double.MAX_VALUE;\n }\n double mid = sortedX[(sortedX.length) / 2].getX();\n double firstHalf = closestPair(Arrays.copyOfRange(sortedX, 0, (sortedX.length) / 2));\n double secondHalf = closestPair(Arrays.copyOfRange(sortedX, (sortedX.length) / 2, sortedX.length));\n double min = Math.min(firstHalf, secondHalf);\n ArrayList<Point> close = new ArrayList<Point>();\n for (int i = 0; i < sortedX.length; i++) {\n double dis = Math.abs(sortedX[i].getX() - mid);\n if (dis < min) {\n close.add(sortedX[i]);\n }\n }\n // sort by Y coordinates\n Collections.sort(close, new Comparator<Point>() {\n public int compare(Point obj1, Point obj2) {\n return (int) (obj1.getY() - obj2.getY());\n }\n });\n Point[] near = close.toArray(new Point[close.size()]);\n\n for (int i = 0; i < near.length; i++) {\n int k = 1;\n while (i + k < near.length && near[i + k].getY() < near[i].getY() + min) {\n if (min > near[i].distance(near[i + k])) {\n min = near[i].distance(near[i + k]);\n System.out.println(\"near \" + near[i].distance(near[i + k]));\n System.out.println(\"best \" + best);\n\n if (near[i].distance(near[i + k]) < best) {\n best = near[i].distance(near[i + k]);\n arr[0] = near[i];\n arr[1] = near[i + k];\n // System.out.println(arr[0].getX());\n // System.out.println(arr[1].getX());\n\n }\n }\n k++;\n }\n }\n return min;\n }", "private Cluster getNearestCluster(BasicEvent event) {\n float minDistance = Float.MAX_VALUE;\n Cluster closest = null;\n float currentDistance = 0;\n for (Cluster c : clusters) {\n float rX = c.radiusX;\n float rY = c.radiusY; // this is surround region for purposes of dynamicSize scaling of cluster size or aspect ratio\n if (dynamicSizeEnabled) {\n rX *= surround;\n rY *= surround; // the event is captured even when it is in \"invisible surround\"\n }\n float dx, dy;\n if ((dx = c.distanceToX(event)) < rX && (dy = c.distanceToY(event)) < rY) { // needs instantaneousAngle metric\n currentDistance = dx + dy;\n if (currentDistance < minDistance) {\n closest = c;\n minDistance = currentDistance;\n c.distanceToLastEvent = minDistance;\n c.xDistanceToLastEvent = dx;\n c.yDistanceToLastEvent = dy;\n }\n }\n }\n return closest;\n }", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }", "public static int searchTriplet(int[] arr, int targetSum) {\n\n Arrays.sort(arr); // need to make fiding number easier n * log(n) with qsort\n // we fix one value\n\n // internal array would have: value, left, right, target\n // when sum value+left+right.\n // if exactly target => return result\n // if > than target sum: move right pointer. Calculate absolute difference.\n // if < than target sum: move left pointers. Calculate absolute difference.\n // if at any point absolute difference becomes larger -> there is no point to continue iteratig\n // (^ how true if that?)\n // at the end of one cycle return absolute difference. If it is zero -> early exist,\n // if not, try again with different fixed number\n\n int smallestDifference = Integer.MAX_VALUE;\n for (int i = 0; i < arr.length - 2; i++) {\n int left = i + 1;\n int right = arr.length - 1;\n\n while (left < right) {\n int diffWithTarget = targetSum - arr[i] - arr[left] - arr[right];\n if (diffWithTarget == 0) {\n return diffWithTarget;\n }\n\n if (Math.abs(diffWithTarget) < Math.abs(smallestDifference)) {\n smallestDifference = diffWithTarget;\n }\n\n if (diffWithTarget > 0) {\n left++;\n } else {\n right--;\n }\n }\n }\n return targetSum - smallestDifference;\n }", "public void findClosestPosition(double touchThetaValue)\n\t{\n\t\tdouble[] difference = new double[thetaValue.length];\n\t\tfor (int i = 0; i < thetaValue.length; i++)\n\t\t{\n\t\t\tdifference[i] = MathematicalModulus.getAbsoluteValue(thetaValue[i] - touchThetaValue);\n\t\t}\n\t\t\n\t\tint closestPos = 0;\n\t\tdouble smallestValue = difference[0];\n\t\t\n\t\tfor (int i = 0; i < difference.length; i++)\n\t\t{\n\t\t\tif (difference[i] < smallestValue)\n\t\t\t{\n\t\t\t\tclosestPos = i;\n\t\t\t\tsmallestValue = difference[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (closestPos == 8)\n\t\t{\n\t\t\tsetValueSelected(5);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetValueSelected(closestPos + 1);\n\t\t}\n\t}", "Execution getClosestDistance();", "public double getClosestDistance(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn distanceMin;\n\t\t}", "private List<Integer> getClosestRange(List<Integer> ranges, double predictionAmount) {\n List<Integer> bestRange = new ArrayList<>();\n double bestRangeDistance = Double.MAX_VALUE;\n for (int i = 0; i < ranges.size(); i += 2) {\n double rangeDistance = Math.abs(predictionAmount - getRangeCenter(ranges.get(i), ranges.get(i + 1)));\n if (rangeDistance < bestRangeDistance) {\n bestRangeDistance = rangeDistance;\n bestRange.clear();\n bestRange.add(ranges.get(i));\n bestRange.add(ranges.get(i + 1));\n }\n }\n return bestRange;\n }", "public int threeSumClosest(int[] num, int target) {\n long sum = Integer.MIN_VALUE;\n long diff = Integer.MAX_VALUE;\n Arrays.sort(num);\n for (int i = 0; i <= num.length - 3; i++) {\n int j = i + 1;\n int k = num.length - 1;\n while (j < k) {\n int tempSum = num[i] + num[j] + num[k];\n if (target - tempSum > 0) {\n j++;\n } else if (target - tempSum < 0) {\n k--;\n } else {\n return tempSum;\n }\n long delt = Math.abs(tempSum - target);\n if (delt < diff) {\n diff = delt;\n sum = tempSum;\n }\n }\n }\n return (int)sum;\n }", "public Balloon acquireTarget() {\r\n\r\n\t\tBalloon closest = null;\r\n\t\tfloat closestDistance = 1000;\r\n\t\tif (balloons != null) {\r\n\t\t\tfor (Balloon balloons : balloons) {\r\n\t\t\t\tif (isInRange(balloons) && findDistance(balloons) < closestDistance && balloons.getHiddenHealth() > 0) {\r\n\t\t\t\t\tclosestDistance = findDistance(balloons);\r\n\t\t\t\t\tclosest = balloons;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (closest != null) {\r\n\t\t\t\ttargeted = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closest;\r\n\r\n\t}", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "public int[] getClosestInput(int[] input) {\n\t\tint minDist = input.length;\n\t\tint minIndex = 0;\n\t\tfor(int i = 0 ; i < this.inputs.size() ; i++) {\n\t\t\tint d = this.hammingDistance(input, this.inputs.get(i));\n\t\t\tif(d < minDist) {\n\t\t\t\tminDist = d;\n\t\t\t\tminIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn this.inputs.get(minIndex);\n\t}", "private int binarySearch(int[] array, int min, int max, int target){\r\n\r\n //because there is often not an answer that is equal to our target,\r\n //this algorithm is deisgned to find the element that it would go after in the array\r\n //because sometimes that is smaller than anything in the list it could bisect at a value that is not ideal.\r\n //however the final check handles 4 possible answers so this is not really an issue.\r\n if(target >= array[max]) return max;\r\n else if(target < array[min]) return min;\r\n if(min + 1 == max) return min;\r\n\r\n int midPoint = (min + max) / 2;\r\n\r\n if(target > array[midPoint]){\r\n return binarySearch(array, midPoint, max, target);\r\n }else return binarySearch(array, min, midPoint, target);\r\n }", "public Set<? extends Position> findNearest(Position position, int k);", "public static int search(int[] nums, int target) {\n int low=0;\n int high=nums.length-1;\n int middle=(high+low)>>1;\n\n for(int i=0;i<nums.length;i++){\n int num = nums[middle];\n if(target>num){\n low=middle+1;\n middle=(high+low)>>1;\n }else if(target<num){\n high=middle-1;\n middle=(high+low)>>1;\n } else{\n return middle;\n }\n\n }\n\n return -1;\n }", "public static int search(int[] nums, int target) {\n\n int length = nums.length;\n int i = 0;\n int j = length - 1;\n if (length == 0) return -1;\n\n while (true) {\n int index = (i + j) / 2;\n\n int value = nums[index];\n if (value == target) return index;\n\n //Using the invariant that either i - mid OR mid-j has\n //to be sorted at any point of the computation\n if (nums[j] >= value) {\n if (target > value && target <= nums[j]) i = index;\n else if (target > value && target > nums[j]) j = index;\n else j = index;\n }\n else {\n if (target < value && target >= nums[i]) j = index;\n else if (target < value && target < nums[i]) i = index;\n else i = index;\n }\n\n if (i + 1 == j) {\n if (nums[i] == target) return i;\n if (nums[j] == target) return j;\n return -1;\n }\n\n if (i == j || i >= length || j >= length) return -1;\n }\n\n }", "public Coordinate getClosestCoordinateAround(Coordinate centeredCoordinate) {\n Set<Coordinate> allCellsAsCoordinates = getAllSurroundingCellsAsCoordinates();\n Coordinate closest = allCellsAsCoordinates\n .stream()\n .min((c1, c2) ->\n Float.compare(c1.distance(centeredCoordinate), c2.distance(centeredCoordinate))\n )\n .get();\n return closest;\n }", "public int getClosestIndex(final DataPoint point) {\n DataPoint closest = ntree.getClosestPoint(point);\n return ntree.getIndex(closest);\n }", "public static double findNearestElement(double[] values, double item) {\n\n //defining some variables to use.\n double nearestElement = 0;\n double differenceLowest = 300;\n\n // Loop invariant is: 0 <= i < values.length.\n for (int i = 0; i < values.length; i++){\n\n /* Gets the absolute value for the difference between the input item\n * and the current value in the array.\n */\n double difference = java.lang.Math.abs(item - values[i]);\n\n /* Checks whether the current difference is less than the lowest distance.\n * if this is the case, the value of the new lowest difference is assigned\n * to the differenceLowest variable.\n */\n if (difference < differenceLowest){\n differenceLowest = difference;\n // Assigns the value of the current array element to the nearestElement variable.\n nearestElement = values[i];\n }\n } \n return nearestElement;\n }", "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public int search(int[] A, int target) {\n\n\t\tint s = 0;\n\t\tint e = A.length - 1;\n\n\t\twhile (s <= e) {\n\t\t\tint m = (s + e) / 2;\n\n\t\t\tif (target == A[m])\n\t\t\t\treturn m;\n\t\t\telse if (A[s] <= A[m]) {\n\t\t\t\tif (A[s] <= target && target < A[m])\n\t\t\t\t\te = m;\n\t\t\t\telse\n\t\t\t\t\ts = m + 1;\n\t\t\t} else {\n\t\t\t\tif (A[m] < target && target <= A[e])\n\t\t\t\t\ts = m + 1;\n\t\t\t\telse\n\t\t\t\t\te = m;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "static public Element nearest(Color c)\n {\n int r = c.getRed();\n int g = c.getGreen();\n int b = c.getBlue();\n int minDelta = Integer.MAX_VALUE;\n Element nearest = null;\n\n for (Element e: Element.values())\n {\n Color ec = e.getColor();\n int delta = \n abs(r - ec.getRed()) +\n abs(g - ec.getGreen()) +\n abs(b - ec.getBlue());\n\n if (delta < minDelta)\n {\n minDelta = delta;\n nearest = e;\n }\n }\n return nearest;\n }", "public static int threeSumClosest(int[] nums, int target) {\n\t\tint diff = Integer.MAX_VALUE;\n\t\tArrays.sort(nums);\n\t\tfor (int i = 0; i < nums.length - 2; i++) {\n\t\t\tint left = i + 1;\n\t\t\tint right = nums.length - 1;\n\t\t\twhile (left < right) {\n\t\t\t\tint val = target - (nums[i] + nums[left] + nums[right]);\n\t\t\t\t\n\t\t\t\tif(Math.abs(diff)>Math.abs(val))\n\t\t\t\t\tdiff = val;\n\n\t\t\t\tif (target > nums[i] + nums[left] + nums[right])\n\t\t\t\t\tleft++;\n\t\t\t\telse if (target < nums[i] + nums[left] + nums[right])\n\t\t\t\t\tright--;\n\t\t\t\telse\n\t\t\t\t\treturn target;\n\t\t\t}\n\t\t}\n\t\treturn target - diff;\n\t}", "public MapLocation findNearestAction() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestHelp = findNearestHelp();\n MapLocation nearestArchon = findNearestArchon();\n\n if (nearestArchon == null && nearestHelp == null) {\n return rc.getInitialArchonLocations(rc.getTeam().opponent())[0]; // when no target is known, go to enemy archon initial position\n } else if (nearestArchon == null) { // when some of the targets is not present, just return the other one\n return nearestHelp; // is not null\n } else if (nearestHelp == null) {\n return nearestArchon; // is not null\n }\n\n if (origin.distanceSquaredTo(nearestHelp) < origin.distanceSquaredTo(nearestArchon)) {\n return nearestHelp;\n } else {\n return nearestArchon;\n }\n }", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "private int findZeroClosestIndex( final int numRows, final double[] pctVals ) {\n\n int closestMarketIndex = 0 ;\n double lastClosestDist = -1 ;\n double distance = -1 ;\n\n for( int i=0; i<numRows; i++ ) {\n // Find the index whose value is the closest to zero. We plan\n // to mark it in the spectrum.\n if( lastClosestDist == -1 ) {\n lastClosestDist = Math.abs( pctVals[i] ) ;\n }\n else {\n distance = Math.abs( pctVals[i] ) ;\n if( distance < lastClosestDist ) {\n closestMarketIndex = i ;\n lastClosestDist = distance ;\n }\n }\n }\n return closestMarketIndex ;\n }", "public int search(int[] nums, int target) {\n if (null == nums || nums.length == 0) {\n return -1;\n }\n int start = 0;\n int end = nums.length - 1;\n while (start <= end) {\n int mid = (start + end) / 2;\n if (nums[mid] == target)\n return mid;\n if (nums[start] <= nums[mid]) {\n if (target < nums[mid] && target >= nums[start])\n end = mid - 1;\n else\n start = mid + 1;\n }\n if (nums[mid] <= nums[end]) {\n if (target > nums[mid] && target <= nums[end])\n start = mid + 1;\n else\n end = mid - 1;\n }\n }\n return -1;\n }", "public MapLocation findNearestHelp() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestAction = null;\n float nearestDistance = 9999f;\n int roundNumber = rc.getRoundNum();\n\n for (int i = 0; i < MAX_HELP_NEEDED; ++i) {\n HelpNeededLocation loc = helpNeededLocations[i];\n if (loc.hasExpired(roundNumber)) continue;\n float distance = loc.location.distanceSquaredTo(origin);\n if (nearestAction == null || distance < nearestDistance) {\n nearestAction = loc.location;\n nearestDistance = distance;\n }\n }\n\n return nearestAction;\n }", "public Coordinate getClosestCoordinateTo(Coordinate centeredCoordinate) {\n List<Coordinate> allCellsAsCoordinates = getAllCellsAsCenteredCoordinates();\n if (allCellsAsCoordinates.size() == 0) allCellsAsCoordinates.get(0);\n Coordinate closest = allCellsAsCoordinates.stream().min((c1, c2) -> Float.compare(c1.distance(centeredCoordinate), c2.distance(centeredCoordinate))).get();\n return closest.minHalfTile();\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "private static int findIndexOfSmallest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.MAX_VALUE;\n\t\tfloat temp;\n\t\tfor (int d=0; d<Constants.ACCEL_DIM; ++d) {\n\t\t\ttemp = vector[d];\n\t\t\tif (temp<0.0f)\n\t\t\t\ttemp = -temp;\n\t\t\t\n\t\t\tif (temp<value) {\n\t\t\t\tvalue = temp;\n\t\t\t\tindex = d;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "public int linearSearch(int target)\n {\n int location = -1;\n for (int i=0; i<list.length && location == -1; i++)\n if (list[i] == target)\n location = i;\n return location;\n }", "public int threeSumClosest(int[] nums, int target) {\n\t\tArrays.sort(nums);\n\t\tif (nums.length < 3)\n\t\t\treturn -1;\n\t\tint n = nums.length;\n\t\tint result = 0;\n\t\tint diff = Integer.MAX_VALUE;\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint l = i + 1;\n\t\t\tint h = n - 1;\n\t\t\twhile (l < h) {\n\t\t\t\tint value = nums[i] + nums[l] + nums[h];\n\t\t\t\tif (value == target)\n\t\t\t\t\treturn target;\n\t\t\t\tif (value > target) {\n\t\t\t\t\th--;\n\t\t\t\t} else {\n\t\t\t\t\tl++;\n\t\t\t\t}\n\t\t\t\tif (Math.abs(value - target) < Math.abs(diff)) {\n\t\t\t\t\tresult = value;\n\t\t\t\t\tdiff = value - target;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private void locateBestMatch(int queryStartIdx){\n \n double dist;\n double bsfDist = Double.MAX_VALUE;\n int bsfIdx = -1;\n\n double[] query = zNormalise(series, queryStartIdx, this.windowSize, false);\n double[] comparison;\n\n for(int comparisonStartIdx = 0; comparisonStartIdx <= seriesLength-windowSize; comparisonStartIdx+=stride){\n \n // exclusion zone +/- windowSize/2 around the window\n if(comparisonStartIdx >= queryStartIdx-windowSize*1.5 && comparisonStartIdx <= queryStartIdx+windowSize*1.5){\n continue;\n }\n \n // using a bespoke version of this, rather than the shapelet version, for efficiency - see notes with method\n comparison = zNormalise(series, comparisonStartIdx, windowSize, false);\n dist = 0;\n\n for(int j = 0; j < windowSize;j++){\n dist += (query[j]-comparison[j])*(query[j]-comparison[j]);\n if(dist > bsfDist){\n dist = Double.MAX_VALUE;\n break;\n }\n }\n\n if(dist < bsfDist){\n bsfDist = dist;\n bsfIdx = comparisonStartIdx;\n }\n\n }\n \n this.distances[queryStartIdx] = bsfDist;\n this.indices[queryStartIdx] = bsfIdx;\n }", "synchronized protected int findNearestPoint(final int x_p, final int y_p, final long layer_id) {\n \t\tint index = -1;\n \t\tdouble min_dist = Double.MAX_VALUE;\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tif (layer_id != p_layer[i]) continue;\n \t\t\tdouble sq_dist = Math.pow(p[0][i] - x_p, 2) + Math.pow(p[1][i] - y_p, 2);\n \t\t\tif (sq_dist < min_dist) {\n \t\t\t\tindex = i;\n \t\t\t\tmin_dist = sq_dist;\n \t\t\t}\n \t\t}\n \t\treturn index;\n \t}", "public int find(int[] nums, int target, int start, int end){\n int middle = (start + end) / 2;\n\n while (start <= end){\n middle = (start + end) >> 1;\n if(nums[middle] == target){\n return middle;\n }\n else if(nums[middle] > target){\n end = middle - 1;\n }\n else {\n start = middle + 1;\n }\n }\n return -1;\n }", "protected IgniteBiTuple<Integer, Double> findClosest(Vector[] centers, Vector pnt) {\n double bestDistance = Double.POSITIVE_INFINITY;\n int bestInd = 0;\n\n for (int i = 0; i < centers.length; i++) {\n double dist = distance(centers[i], pnt);\n if (dist < bestDistance) {\n bestDistance = dist;\n bestInd = i;\n }\n }\n\n return new IgniteBiTuple<>(bestInd, bestDistance);\n }", "public int linearSearch(int[] array,int target) {\n for (var index = 0; index < array.length; index++) {\n if (array[index] == target)\n return index;\n }\n return -1;\n }", "public int getOptimalNumNearest();", "Point findNearestActualPoint(Point a, Point b) {\n\t\tPoint left = new Point(a.x-this.delta/3,a.y);\n\t\tPoint right = new Point(a.x+this.delta/3,a.y);\n\t\tPoint down = new Point(a.x,a.y-this.delta/3);\n\t\tPoint up = new Point(a.x,a.y+this.delta/3);\n\t\tPoint a_neighbor = left;\n\t\tif (distance(right,b) < distance(a_neighbor,b)) a_neighbor = right;\n\t\tif (distance(down,b) < distance(a_neighbor,b)) a_neighbor = down;\n\t\tif (distance(up,b) < distance(a_neighbor,b)) a_neighbor = up;\n\n\t\treturn a_neighbor;\n\t}", "private int findUpperBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] > target) right = mid;\n else left = mid + 1;\n }\n return (left > 0 && nums[left - 1] == target) ? left - 1 : -1;\n }", "public Location getNearest(Location src)\r\n {\r\n if(Main.ASSERT) Util.assertion(!src.inside(bl, tr));\r\n // cases: \r\n // 3 6 9 \r\n // 2 x 8\r\n // 1 4 7\r\n if(src.getX()<=bl.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return bl; // case 1\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tl; // case 3\r\n }\r\n else\r\n {\r\n return new Location.Location2D(bl.getX(), src.getY()); // case 2\r\n }\r\n }\r\n else if(src.getX()>=tr.getX())\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return br; // case 7\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return tr; // case 9\r\n }\r\n else\r\n {\r\n return new Location.Location2D(tr.getX(), src.getY()); // case 8\r\n }\r\n }\r\n else\r\n {\r\n if(src.getY()<=bl.getY())\r\n {\r\n return new Location.Location2D(src.getX(), bl.getY()); // case 4\r\n }\r\n else if(src.getY()>=tr.getY())\r\n {\r\n return new Location.Location2D(src.getX(), tr.getY()); // case 6\r\n }\r\n else\r\n {\r\n throw new RuntimeException(\"get nearest undefined for internal point\");\r\n }\r\n }\r\n }", "private static Point getNearest(Collection<Point> centers, Point p) {\n\t\tdouble min = 0;\n\t\tPoint minPoint = null;\n\t\tfor(Point c : centers){\n\t\t\tif(minPoint == null || c.distance(p) < min){\n\t\t\t\tmin = c.distance(p);\n\t\t\t\tminPoint = c;\n\t\t\t}\n\t\t}\n\t\treturn minPoint;\n\t}", "long closest(double lon, double lat) {\n double smallestDist = Double.MAX_VALUE;\n long smallestId = 0;\n Iterable<Node> v = world.values();\n for (Node n : v) {\n double tempLat = n.getLat();\n double tempLon = n.getLon();\n double tempDist = distance(lon, lat, tempLon, tempLat);\n if (tempDist < smallestDist) {\n smallestDist = tempDist;\n smallestId = n.getId();\n }\n }\n return smallestId;\n }", "public int search(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return -1;\n int start = 0, end = A.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (A[mid] == target) return mid;\n if (A[mid] < A[start]) {\n if (target <= A[end] && target > A[mid]){\n start = mid;\n }\n else {\n end = mid;\n }\n }\n else {\n if (target >= A[start] && target < A[mid]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n }\n if (A[start] == target) return start;\n if (A[end] == target) return end;\n return -1;\n }", "public static int findClosestFreq(double[] inarr, double infreq) {\r\n if ((inarr == null) || (inarr.length == 0) || (infreq < 0.0)){\r\n return -1;\r\n }\r\n double minval = inarr[0];\r\n int minindex = 0;\r\n for (int i=0; i<inarr.length; i++) {\r\n double test = Math.abs(inarr[i] - infreq);\r\n if (test < minval) {\r\n minindex = i;\r\n minval = test;\r\n }\r\n }\r\n return minindex;\r\n }", "private PanImageEntry findPanImageEntryClosestToCenter() {\n\t\tfindProjectedZs();\n\t\t\n\t\tPanImageEntry closestEntry = null;\n\t\tfor (int n=0; n<panImageList.length; n++) {\n\t\t\tPanImageEntry entry = panImageList[n];\n\t\t\tif (entry.draw) {\n\t\t\t\tif (closestEntry == null) {\n\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t}\n\t\t\t\telse if (entry.projectedZ > closestEntry.projectedZ) {\n\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t}\n\t\t\t\telse if (entry.projectedZ == closestEntry.projectedZ) {\n\t\t\t\t\tif (isSuperiorImageCat(entry.imageListEntry.getImageCategory(), closestEntry.imageListEntry.getImageCategory())) {\n\t\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (selectedPanImageEntry != null) {\n\t\t\tdouble dAz = closestEntry.imageListEntry.getImageMetadataEntry().inst_az_rover - \n\t\t\tselectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_az_rover;\n\t\t\tdouble dEl = closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover - \n\t\t\tselectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover;\n\t\t\tif ((selectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover < -85.0 \n\t\t\t\t\t&& closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover < 85.0)\n\t\t\t\t\t|| (selectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover > 85\n\t\t\t\t\t\t&& closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover > 85)\t\n\t\t\t\t\t) {\n\t\t\t\t// this is a fix because the distance computation doesn't work right at high or low elevations...\n\t\t\t\t// in fact, the whole thing is pretty messed up\n\t\t\t\tclosestEntry = selectedPanImageEntry;\t\t\t\t\n\t\t\t}\n\t\t\telse if ((Math.abs(dAz) < selectTolerance) && (Math.abs(dEl) < selectTolerance)) {\n\t\t\t\tclosestEntry = selectedPanImageEntry;\n\t\t\t}\n\t\t}\n\t\treturn closestEntry;\n\t}", "public static int binarySearch(int[] arr, int target){\n\t\tint start = 0;\n\t\tint end = arr.length - 1;\n\n\t\twhile (start <= end){\n\t\t\tint mid = (end + start) / 2;\n\t\t\tif(arr[mid] == target){\n\t\t\t\treturn mid;\n\t\t\t} else if(target < arr[mid]){\n\t\t\t\tend = mid - 1;\n\t\t\t} else if(target > arr[mid]){\n\t\t\t\tstart = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public static int findNextHigherIndex(int[] a, int k) {\n\t\tint start = 0, end = a.length - 1; \n\t \n int ans = -1; \n while (start <= end) { \n int mid = (start + end) / 2; \n \n // Move to right side if target is \n // greater. \n if (a[mid] <= k) { \n start = mid + 1; \n } \n \n // Move left side. \n else { \n ans = mid; \n end = mid - 1; \n } \n } \n return ans;\n\t}", "static int linearSearch(int[] arr, int target){\r\n if(arr.length == 0){\r\n return -1;\r\n }\r\n\r\n for (int i = 0; i < arr.length; i++) {\r\n if(arr[i] == target){\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }", "public int search(int[] A, int target) {\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n while (start + 1 < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n }\n if (A[start] < A[mid]) {\n // situation 1, red line\n if (A[start] <= target && target <= A[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n } else {\n // situation 2, green line\n if (A[mid] <= target && target <= A[end]) {\n start = mid;\n } else {\n end = mid;\n }\n }\n } // while\n\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n return -1;\n }", "public static int binarySearch(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public static int getIndexOfMin(double[] x) {\n Objects.requireNonNull(x, \"The supplied array was null\");\n int index = 0;\n double min = Double.MAX_VALUE;\n for (int i = 0; i < x.length; i++) {\n if (x[i] < min) {\n min = x[i];\n index = i;\n }\n }\n return (index);\n }", "public float getDistanceTo(DoGMaximum target)\n \t{\n \t\tif (target == null)\n \t\t\treturn Float.NaN;\n \t\t\n \t\tfloat difference = 0;\n \t\t\n\t\tdifference += Math.pow(this.x - target.x,2); \n\t\tdifference += Math.pow(this.y - target.y,2);\n\t\tdifference += Math.pow(this.z - target.z,2);\n\t\tdifference += Math.pow(this.sigma - target.sigma,2); \t\t\n \t\t\n\t\treturn (float)Math.sqrt(difference);\n \t}", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "public Point2D nearest(Point2D p) {\n if (isEmpty()) {\n return null;\n }\n double minDistance = Double.POSITIVE_INFINITY;\n Point2D nearest = null;\n for (Point2D i : pointsSet) {\n if (i.distanceTo(p) < minDistance) {\n nearest = i;\n minDistance = i.distanceTo(p);\n }\n }\n return nearest;\n\n }", "public static int binarySearch2(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n int mid = -1;\n while (min <= max) {\n mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n mid = (max + min) / 2;\n }\n \n return -min - 1; // not found\n }", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "static int findMin(double[] pq)\n\t{\n\t\tint ind = -1; \n\t\tfor (int i = 0; i < pq.length; ++i)\n\t\t\tif (pq[i] >= 0 && (ind == -1 || pq[i] < pq[ind]))\n\t\t\t\tind = i;\n\t\treturn ind;\n\t}", "public static int binarySearch(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n while (min <= max) {\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n }\n \n return -1; // not found\n }", "private UnconstrainedBidElement getClosest(double demandWatt) {\n UnconstrainedBidElement best = null;\n double bestDistance = Double.MAX_VALUE;\n for (UnconstrainedBidElement e : elements) {\n double distance = Math.abs(demandWatt - e.demandWatt);\n if (best == null || distance < bestDistance) {\n best = e;\n bestDistance = distance;\n }\n }\n return best;\n }", "private static void findClosestElement(int[] a, int element) {\n int low = 0, high = a.length - 1;\n\n\n // Corner cases\n if (a[high] < element) {\n System.out.println(a[high]);\n return;\n }\n\n if (element < a[low]) {\n System.out.println(a[low]);\n return;\n }\n\n while (low <= high) {\n\n int mid = low + (high - low) / 2;\n\n // element == mid\n if (a[mid] == element) {\n\n int leftDiff = Integer.MAX_VALUE;\n int rightDiff = Integer.MAX_VALUE;\n\n if (mid > 0) {\n leftDiff = element - a[mid - 1];\n }\n\n if (mid < a.length - 1) {\n rightDiff = a[mid + 1] - element;\n }\n\n\n if (leftDiff != Integer.MAX_VALUE && leftDiff < rightDiff) {\n System.out.println(a[mid - 1]);\n } else if (rightDiff != Integer.MAX_VALUE) {\n System.out.println(a[mid + 1]);\n }\n return;\n }\n\n // element < mid\n if (element < a[mid]) {\n\n if (low <= mid - 1 && a[mid - 1] < element) { // Cross over point is mid-1 to mid\n System.out.println(getClosest(element, a[mid - 1], a[mid]));\n return;\n } else\n high = mid;\n } else {\n if (mid + 1 <= high && element < a[mid + 1]) { // Cross over point is mid to mid+1\n System.out.println(getClosest(element, a[mid], a[mid + 1]));\n return;\n } else\n low = mid + 1;\n }\n }\n\n }", "public Point2D nearest(Point2D p) {\n \n if (p == null)\n throw new IllegalArgumentException(\"Got null object in nearest()\");\n \n double rmin = 2.;\n Point2D pmin = null;\n \n for (Point2D q : point2DSET) {\n \n double r = q.distanceTo(p);\n if (r < rmin) {\n \n rmin = r;\n pmin = q;\n }\n }\n return pmin;\n }", "private static int getMinDistIndex(ArrayList<Double> list, int indexNotInterested) {\n \tdouble newDistMin = Double.MAX_VALUE;\n\t\tint newMinDistIndex = -1;\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tif(i != indexNotInterested && newDistMin > list.get(i)) {\n\t\t\t\tnewDistMin = list.get(i);\n\t\t\t\tnewMinDistIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newMinDistIndex;\n }", "public int search(int[] nums, int target) {\n int left = 0;\n int right = nums.length - 1;\n while (left < right) {\n int mid = (left + right) / 2;\n if (nums[mid] > nums[right]) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n int pivot = left;\n left = 0;\n right = nums.length - 1;\n while (left <= right) {\n int mid = (left + right) / 2;\n int realmid = (mid + pivot) % nums.length;\n if (nums[realmid] == target) {\n return realmid;\n } else if (nums[realmid] < target) {\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n }\n return -1;\n }", "private Cell getShortestPath(List<Cell> surroundingBlocks, int DestinationX, int DestinationY) {\n \n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell min = surroundingBlocks.get(0);\n int distMin = euclideanDistance(surroundingBlocks.get(0).x, surroundingBlocks.get(0).y, DestinationX, DestinationY);\n \n for(int i = 0; i < surroundingBlocks.size(); i++) {\n if (i==1) {\n min = surroundingBlocks.get(i);\n }\n if(distMin > euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY)) {\n distMin = euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY);\n min = surroundingBlocks.get(i);\n }\n }\n return min;\n }", "public static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }", "private int insertIndex(int[] arr, int target) {\n int low = 0, high = arr.length - 1;\n if (target < arr[0]) {\n return -1;\n }\n if (target >= arr[arr.length - 1]) {\n return arr.length - 1;\n }\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= target && arr[mid + 1] > target) {\n // index found\n return mid;\n }\n if (arr[mid] <= target) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n return -1;\n }", "static int findFirstPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the first target from left\n if(mid==0 ||nums[mid-1]<nums[mid])\n return mid;\n else{\n //there are more targets available at left\n right=mid-1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "public Coordinates closestPoint() {\n return closestPoint;\n }", "private int getNearestNode(LatLng vic) {\n\t\tint node = 0;\n\t\tfor(int j=0; j<nodeList.size()-1; j++){\n\t\t\tdouble dist1 = getWeight(vic, nodeList.get(node));\n\t\t\tdouble dist2 = getWeight(vic, nodeList.get(j));\n\t\t\tif(dist1 > dist2){\n\t\t\t\tnode = j;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}", "public int ternarySearch(int[] array,int target) {\n return 1;\n }", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public static int getMinIndex(double[] array)\r\n\t{\r\n\t\tdouble min = Double.POSITIVE_INFINITY;\r\n\t\tint minIndex = 0;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (min > array[i]) {\r\n\t\t\t\tmin = array[i];\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\treturn minIndex;\r\n\t}" ]
[ "0.6925374", "0.6666191", "0.6492505", "0.64295375", "0.6423477", "0.6411609", "0.63558966", "0.6251849", "0.62360835", "0.6186975", "0.6140709", "0.6136698", "0.60598296", "0.60579854", "0.60195005", "0.59948003", "0.5981019", "0.5935536", "0.59133756", "0.58790094", "0.5820595", "0.5806303", "0.5798915", "0.57986796", "0.5798153", "0.57880026", "0.57677925", "0.57437724", "0.5736168", "0.56999195", "0.56990975", "0.5691728", "0.5674153", "0.56707543", "0.56652176", "0.5657287", "0.56553686", "0.5637468", "0.5636952", "0.5608712", "0.5606232", "0.56042844", "0.55976444", "0.55872995", "0.55692583", "0.55609024", "0.55484045", "0.5542505", "0.55298245", "0.5526482", "0.5501311", "0.54974395", "0.5493623", "0.5483573", "0.54614127", "0.5457215", "0.54296637", "0.54115915", "0.54115605", "0.54094464", "0.53918946", "0.5382661", "0.5379417", "0.5377927", "0.5358665", "0.53557706", "0.5348684", "0.534668", "0.5327568", "0.5313378", "0.53063375", "0.53045535", "0.52973044", "0.5296301", "0.529616", "0.52943474", "0.5293651", "0.52888596", "0.52779114", "0.5274506", "0.52726763", "0.5271473", "0.5266652", "0.5262399", "0.5258622", "0.52482665", "0.5246757", "0.5230909", "0.5228077", "0.5227983", "0.52198595", "0.521488", "0.5212323", "0.5210504", "0.52077043", "0.52061975", "0.520354", "0.5191685", "0.5178777", "0.5175897" ]
0.6795554
1
this is specific to dates
private GridAxis1D.Builder<?> subsetClosestDiscontiguousInterval(CalendarDate date) { double target = ((GridAxis1DTime) orgGridAxis).makeValue(date); double maxDateToSearch = 0; int intervals = 0; // if there are multiple intervals that contain the target // we want to find the maximum amount of time to subset based // on the end of the widest interval for (int i = 0; i < orgGridAxis.getNcoords(); i++) { if (intervalContains(target, i)) { intervals += 1; double bound1 = orgGridAxis.getCoordEdge1(i); double bound2 = orgGridAxis.getCoordEdge2(i); double intervalEnd = Math.max(bound1, bound2); if (intervalEnd > maxDateToSearch) { maxDateToSearch = intervalEnd; } } } // if we found one or more intervals, try to handle that by subsetting over a range of time Optional<GridAxis1D.Builder<?>> multipleIntervalBuilder = Optional.empty(); if (intervals > 0) { multipleIntervalBuilder = subset(target, maxDateToSearch, 1, new Formatter()); } // if multipleIntervalBuilder exists, return it. Otherwise fallback to subsetValuesClosest. return multipleIntervalBuilder .orElseGet(() -> makeSubsetValuesClosest(((GridAxis1DTime) orgGridAxis).makeValue(date))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetFoundingDate();", "boolean isFilterByDate();", "@Override\n\tprotected void setDate() {\n\n\t}", "boolean isSetDate();", "@Override\n public void date_()\n {\n }", "boolean hasDate();", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "@Override\n public int compareTo(Date ARG) {\n if (year < ARG.year)\n {\n \treturn -1;\n }\n else if( year > ARG.year)\n {\n \treturn 1;\n }\n \n else{\n \tif (dayOfMonth < ARG.dayOfMonth)\n \t{\n \t\treturn -1; \n \t\t\n \t}\n \telse if (dayOfMonth > ARG.dayOfMonth)\n \t{\n \t\treturn 1; \n \t}\n \telse\n \t{\n \t\tif (dayOfMonth < ARG.dayOfMonth)\n \t\t{\n \t\t\treturn -1;\n \t\t}\n \t\telse if(dayOfMonth > ARG.dayOfMonth)\n \t\t{\n \t\t\treturn 1;\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn 0; \n \t\t}\n \t}\n \t\n } \t\n }", "abstract public Date getServiceAppointment();", "public boolean hasDate() {\n return true;\n }", "@Override\n\tpublic void visit(DateValue arg0) {\n\t\t\n\t}", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }", "@Override\n\tpublic void visit(DateValue arg0) {\n\n\t}", "public Date getFechaExclusion()\r\n/* 160: */ {\r\n/* 161:178 */ return this.fechaExclusion;\r\n/* 162: */ }", "@Override\n\tpublic boolean create(Dates obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void initDate() {\n\n\t}", "boolean hasStartDate();", "abstract protected Date getDate(E o2, Date date);", "public boolean isDate() {\n return false;\n }", "Date getDataIns();", "@Test\n\tpublic void testDate2() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36160);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "@Override\n\tpublic Date getStatusDate();", "@Override\n\tpublic void eventDate(Date newDate) {\n\t\t\n\t}", "@Override\n public void date()\n {\n }", "private void generateMarkedDates() {\n this.markedDates = new HashMap<>();\n for (Task t : logic.getAddressBook().getTaskList()) {\n\n if (markedDates.containsKey(t.getStartDate().getDate())) {\n if (t.getPriority().getPriorityLevel() > markedDates.get(t.getStartDate().getDate())) {\n markedDates.put(t.getStartDate().getDate(), t.getPriority().getPriorityLevel());\n }\n } else {\n markedDates.put(t.getStartDate().getDate(), t.getPriority().getPriorityLevel());\n }\n\n if (markedDates.containsKey(t.getEndDate().getDate())) {\n if (t.getPriority().getPriorityLevel() > markedDates.get(t.getEndDate().getDate())) {\n markedDates.put(t.getEndDate().getDate(), t.getPriority().getPriorityLevel());\n }\n } else {\n markedDates.put(t.getEndDate().getDate(), t.getPriority().getPriorityLevel());\n }\n }\n }", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "boolean hasFromDay();", "boolean hasToDay();", "@Test\n\tpublic void testDate1() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(0);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 1900);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "@Override\n\tpublic boolean ate() {\n\t\treturn false;\n\t}", "public void testIndexCostForDate() {\n final Date dateIndexing = new Date();\n this.classHandler.applyIndexesForDate(dateIndexing);\n }", "public String getDate(){ return this.start_date;}", "protected abstract void calcNextDate();", "public boolean isValidDate() {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(mDate.getDate());\n int yearNow = cal.get(Calendar.YEAR);\n int monthNow = cal.get(Calendar.MONTH);\n int dayNow = cal.get(Calendar.DAY_OF_MONTH);\n cal.setTimeInMillis(selectedDate.getTimeInMillis());\n int yearSelected = cal.get(Calendar.YEAR);\n int monthSelected = cal.get(Calendar.MONTH);\n int daySelected = cal.get(Calendar.DAY_OF_MONTH);\n if (yearSelected <= yearNow) {\n if (monthSelected <= monthNow) {\n return daySelected >= dayNow;\n }\n }\n return true;\n }", "boolean hasOrderDate();", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean checkProjectTaskDates(Project pr)\n\t{\n\t\tfor(Task ts:taskManager.get(\"toInsert\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t}\n\t\tfor(Task ts:taskManager.get(\"toEdit\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\tArrayList<Task> tasks=null;\n\t\ttry \n\t\t{\n\t\t\ttasks=db.selectTaskforProjID(project.getProjectID());\n\t\t}\n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tErrorWindow wind = new ErrorWindow(e); \n\t\t\tUI.getCurrent().addWindow(wind);\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(Task ts:tasks)\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t }", "boolean hasBeginDate();", "@Test\n\tpublic void testDate4() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36161);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 2);\n\t\t\t// month is 0 indexed, so Jan is 0\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "@Override\n public boolean isDateAllowed(LocalDate date) {\n \n return startDates.contains(date) || endDates.contains(date);\n }", "abstract void birthDateValidity();", "public void processDate(boolean periodStart) {\n Calendar cal = Calendar.getInstance();\n if (year == null) {\n year = cal.get(Calendar.YEAR);\n }\n if (week != null) {\n cal.set(Calendar.WEEK_OF_YEAR, week);\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, (periodStart) ? Calendar.MONDAY : Calendar.SUNDAY);\n week = null;\n month = TimeConstants.MONTHS_EN.split(\",\")[cal.get(Calendar.MONTH)].toLowerCase();\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n if (season != null) {\n if (\"Spring\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 2 : 4);\n } else if (\"Summer\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 5 : 7);\n } else if (\"Autumn\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 8 : 10);\n } else if (\"Winter\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 11 : 1);\n }\n cal.set(Calendar.DAY_OF_MONTH, periodStart ? 1 : cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n month = TimeConstants.MONTHS_EN.split(\",\")[cal.get(Calendar.MONTH)].toLowerCase();\n day = cal.get(Calendar.DAY_OF_MONTH);\n season = null;\n }\n if (month != null) {\n cal.set(Calendar.MONTH, TimeConstants.getMonthIndex(month));\n }\n if (day != null && day == 99) {\n cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n if (day == null) {\n cal.set(Calendar.DAY_OF_MONTH, periodStart ? 1 : cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n }", "public void setFechaInclusion(Date fechaInclusion)\r\n/* 155: */ {\r\n/* 156:174 */ this.fechaInclusion = fechaInclusion;\r\n/* 157: */ }", "public boolean isSelected(Date date)\n/* */ {\n/* 200 */ Contract.asNotNull(date, \"date must not be null\");\n/* 201 */ return this.selectedDates.contains(date);\n/* */ }", "public interface DateInterface \n{\n /*\n Dada uma data, determina a sua estação do ano (Primavera, Verão, Outono ou Inverno) de acordo com o hemisfério Norte.\n */\n public String estacaoDoAno(LocalDate d);\n \n /*\n Determina o dia da semana do primeiro dia de um ano.\n */\n public DayOfWeek primeiroDiaSemanaAno(int ano);\n \n /*\n Determina o dia da semana de uma data.\n */\n public DayOfWeek diaDaSemana(LocalDate d);\n \n /*\n Determina o dia do ano de uma data (por exemplo, 10/01/2018 corresponde ao 10º dia do ano de 2018).\n */\n public int diaDoAno(LocalDate d);\n \n /*\n Determina em que trimestre do ano uma data se situa.\n */\n public int trimestre(LocalDate d);\n \n /*\n Determina o número de semanas completas entre duas datas, sendo uma delas a atual.\n */\n public long numSemanasAteData(LocalDate d);\n \n /*\n Determina se um ano é bissexto ou não.\n */\n public boolean anoBissexto(Year ano);\n \n /*\n Determina o século, o milénio e a era de uma data.\n */\n public TuploSeculoMilenioEra seculoMilenioEraData(LocalDate d);\n \n /*\n Determina quanto tempo falta até à próxima passagem do cometa Halley. Mostra o resultado em dias totais, meses totais\n e anos totais.\n */\n public ParDataDiaMesAno cometaHalley();\n \n /*\n Determina o número de dias úteis entre duas dadas datas.\n */\n public int diasUteisEntreDatas(LocalDate d1, LocalDate d2);\n \n /*\n Determina quantos fins-de-semanas completos um ano tem. Caso o ano inserido possua um sábado ou um domingo extra, \n estes também são sinalizados.\n */\n public ParFimDeSemana numFinsDeSemanaAno(int ano);\n \n /*\n Determina quantos dias faltam até ao próximo Natal.\n */\n public long diasAteNatal();\n \n /*\n Determina o salário de um indivíduo sabendo quanto ganha por hora e o ano que pretende calcular. Apresenta o resultado\n em dias, semanas, meses e ano.\n */\n public SalarioAno salarioDiaMesSemanaAno(float salarioHora, int ano); \n \n /*\n Determina o número de dias úteis (isto é, que não são fins-de-semana) de um ano.\n */\n public int numDiasUteisAno(int ano);\n \n /*\n Determina em que dias são os fins-de-semana de um dado mês. Por exemplo, em Janeiro de 2018 o primeiro fim-de-semana\n ocorre nos dias 6 (Sábado) e 7 (Domingo).\n */\n public Map<Integer, DayOfWeek> finsDeSemanaDoMes(int ano, int mes);\n \n /*\n A uma dada data são somados anos, meses, semanas e dias.\n */\n public LocalDate somaData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n A uma dada data são subtraidos anos, meses, semanas e dias.\n */\n public LocalDate subtraiData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n Dado um número de dias, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana e quantos\n dias úteis faltam até lá.\n */\n public TuploDataDia_SemanaDias_Uteis eventoDaquiXDias(int dias);\n \n /*\n Dado um número de dias úteis, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana.\n */\n public ParDataDiaDaSemana eventoDaquiXDiasUteis(int dias);\n \n /*\n Determina qual a data da próxima Black Friday e quantos dias faltam até essa data.\n */\n public ParDataDia proxBlackFriday();\n \n /*\n Calcula a data da Páscoa de um determinado ano.\n */\n public LocalDate proxPascoa(int ano);\n \n /*\n Para um dado ano apresenta a data dos feriados nacionais e em que dia da semana ocorrem.\n */\n public Map<String, MonthDay> dataFeriadosNacionais(int ano);\n \n /*\n Calcula a diferença entre duas datas. Apresenta o resultado em anos, meses e dias. Por exemplo, de 01/01/2018 até \n 10/02/2018 existe uma diferença de 0 anos, 1 mês e 9 dias.\n */\n public static TuploAnosMesesDias difEntreDatas(LocalDate d1, LocalDate d2)\n { \n boolean stop = false;\n boolean stop2 = false;\n long dias;\n int meses;\n int anos;\n \n anos = 0;\n meses = 0;\n dias = 0;\n\n while((d1.getYear() != d2.getYear() || d1.getMonthValue() != d2.getMonthValue())&&!stop && !stop2)\n {\n \n \n while(d1.getMonthValue() != d2.getMonthValue() && !stop2)\n {\n if(d1.getYear() == (d2.getYear() - 1) && d1.getMonthValue() == 12 && d2.getMonthValue() == 1 && d2.getDayOfMonth() < d1.getDayOfMonth())\n {\n stop2 = true;\n dias = 31 - d1.getDayOfMonth() + d2.getDayOfMonth();\n }\n if(stop2 == false)\n {\n YearMonth anoMes = YearMonth.of(d1.getYear(), d1.getMonth());\n int daysInMonth = anoMes.lengthOfMonth(); \n\n if(((d2.getYear() - d1.getYear()) == 0) \n &&((d2.getMonthValue() - d1.getMonthValue()) == 1)\n &&(d1.getDayOfMonth() > d2.getDayOfMonth()))\n {\n\n dias = d2.getDayOfMonth() + daysInMonth - d1.getDayOfMonth(); \n stop = true;\n break;\n }\n\n meses++;\n\n d1 = d1.plusMonths(1);\n }\n }\n if(stop2 == false)\n {\n if(d1.getMonthValue() == d2.getMonthValue() && d1.getYear() !=d2.getYear())\n {\n meses++;\n d1 = d1.plusMonths(1);\n }\n }\n }\n \n if(d1.getMonthValue() == d2.getMonthValue())\n {\n dias = d2.getDayOfMonth() - d1.getDayOfMonth();\n }\n\n while(meses > 12)\n {\n anos++;\n meses-=12;\n }\n \n return new TuploAnosMesesDias(anos, meses, dias);\n \n }\n}", "boolean isSetAppliesDateTime();", "boolean hasEndDate();", "private void checkDateBounds(PortfolioRecord portRecord) {\n List<DataPoint> history = portRecord.getHistory();\n\n if (!userSetDates) {\n fromDateBound = null;\n toDateBound = null;\n }\n\n if (history.size() > 0) {\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDateBound == null && toDateBound == null) {\n fromDateBound = minDate;\n toDateBound = maxDate;\n } else if (toDateBound.compareTo(maxDate) < 0) {\n toDateBound = maxDate;\n }\n } else {\n fromDateBound = null;\n toDateBound = null;\n userSetDates = false;\n }\n }", "boolean hasTradeDate();", "public void setDate(int date){\n this.date = date;\n }", "String isOoseChangeDateAllowed(Record inputRecord);", "boolean hasOrderByDay();", "protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }", "public static void main(String[] args) \r\n {\n\t Date date = new Date();\r\n\t System.out.println(date);\r\n\t \r\n\t //comparision of dates\r\n\t /*\r\n\t Return\r\n 1. It returns the value 0 if the argument Date is equal to this Date. \r\n 2. It returns a value less than 0 if this Date is before the Date argument.\r\n 3. It returns a value greater than 0 if this Date is after the Date argument.\r\n\t */\r\n\t Date d=new Date(2021,05,31);\r\n\t System.out.println(d.equals(date));\r\n Date d1=new Date(2021,5,26); \r\n int comparison=d.compareTo(d1); \r\n System.out.println();\r\n System.out.println(\"Your comparison value is : \"+comparison); \r\n }", "@Override\n\tpublic boolean update(Dates obj) {\n\t\treturn false;\n\t}", "public void setDate(DateInfo dates) {\r\n\t\tsuper.setDate(dates);\r\n\t\t//maturityDate = new DateInfo(dates);\r\n\t}", "public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}", "private String getIndexDate(String criteriaMet, Map<String, List<Info>> criteria, boolean isAny) {\n\t\tSortedSet<String> date = new TreeSet<String>();\n\t\t\n\t\tString[] crit = criteriaMet.split(\":\");\n\t\tfor(int i=0; i<crit.length; i++) {\n\t\t\tList<Info> info = criteria.get(crit[i]);\n\t\t\tif(info==null) {\n\t\t\t\tSystem.out.println(crit[i] + \" has NO Info\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t//info includes \"all\" related conditions until it satisfies the criteria\n\t\t\t//so the last element will be the earliest date that satisfies the criteria\n\t\t\tdate.add(info.get(info.size()-1).date);\n\t\t}\n\t\t\n\t\t//date is in order of earliest to latest \n\t\tif(isAny)\n\t\t\treturn date.first();\n\t\telse\n\t\t\treturn date.last();\n\t}", "private void parseAmbiguousDatesAsAfter(final Date startDate) {\n\t\tdefaultCenturyStart = startDate;\n\t\tcalendar.setTime(startDate);\n\t\tdefaultCenturyStartYear = calendar.get(Calendar.YEAR);\n\t}", "String formatDateCondition(Date date);", "@Override\n public Date getManufactureDate() {\n return manufacturedOn;\n }", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "public Date getFromDate()\r\n/* 18: */ {\r\n/* 19:27 */ return this.fromDate;\r\n/* 20: */ }", "private static boolean isDate(final Object obj) {\n return dateClass != null && dateClass.isAssignableFrom(obj.getClass());\n }", "public void startDateQuestionSet() {\n this.dateQuestionSet = new HashSet<>();//creates a new dateQuestionSet\n for (Question q : this.getForm().getQuestionList()) {//for every question in the question list of the current form\n if (q.getType().getId() == 4) {//if the question is type Date Question\n Quest newQuest = new Quest();//creates a new Quest\n newQuest.setqQuestion(q);//adds the current question to the new Quest\n this.dateQuestionSet.add(newQuest);//adds the new Quest to the new dateQuestionSet\n }\n }\n }", "private void dateRangeChanged(Context context) {\r\n\t\tClientFinanceDate todaydate = new ClientFinanceDate();\r\n\t\tString selectedOption = get(SHOWTRANSACTION_TYPE).getValue();\r\n\t\tif (selectedOption.equals(getMessages().all())) {\r\n\t\t\tstartDate = new ClientFinanceDate(0);\r\n\t\t\tendDate = new ClientFinanceDate(0);\r\n\t\t} else if (selectedOption.equals(getMessages().today())) {\r\n\t\t\tstartDate = todaydate;\r\n\t\t\tendDate = todaydate;\r\n\t\t} else if (selectedOption.equals(getMessages().last30Days())) {\r\n\t\t\tstartDate = new ClientFinanceDate(todaydate.getYear(),\r\n\t\t\t\t\ttodaydate.getMonth() - 1, todaydate.getDay());\r\n\t\t\tendDate = todaydate;\r\n\t\t} else if (selectedOption.equals(getMessages().last45Days())) {\r\n\t\t\tstartDate = new ClientFinanceDate(todaydate.getYear(),\r\n\t\t\t\t\ttodaydate.getMonth() - 2, todaydate.getDay() + 16);\r\n\t\t\tendDate = todaydate;\r\n\t\t}\r\n\t}", "private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }", "Date getForDate();", "private boolean hasSetToAndFromDates() {\r\n return (this.fromDateString != null) && (this.toDateString != null);\r\n }", "boolean hasAcquireDate();", "Pair<Date, Date> getForDatesFrame();", "private void givenExchangeRateExistsForABaseAndDate() {\n }", "public boolean hasDate() {\n return fieldSetFlags()[5];\n }", "java.lang.String getFoundingDate();", "private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }", "void validateDates(ComponentSystemEvent event);", "public Boolean checkPeriod( ){\r\n\r\n Date dstart = new Date();\r\n Date dend = new Date();\r\n Date dnow = new Date();\r\n\r\n\r\n\r\n // this part will read the openndate file in specific formate\r\n try (BufferedReader in = new BufferedReader(new FileReader(\"opendate.txt\"))) {\r\n String str;\r\n while ((str = in.readLine()) != null) {\r\n // splitting lines on the basis of token\r\n String[] tokens = str.split(\",\");\r\n String [] d1 = tokens[0].split(\"-\");\r\n String [] d2 = tokens[1].split(\"-\");\r\n \r\n int a = Integer.parseInt(d1[0]);\r\n dstart.setDate(a);\r\n a = Integer.parseInt(d1[1]);\r\n dstart.setMonth(a);\r\n a = Integer.parseInt(d1[2]);\r\n dstart.setYear(a);\r\n\r\n a = Integer.parseInt(d2[0]);\r\n dend.setDate(a);\r\n a = Integer.parseInt(d2[1]);\r\n dend.setMonth(a);\r\n a = Integer.parseInt(d2[2]);\r\n dend.setYear(a);\r\n\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"File Read Error\");\r\n }\r\n\r\n \r\n\r\n if ( dnow.before(dend) && dnow.after(dstart) )\r\n return true; \r\n\r\n return true;\r\n }", "@Override\n public Date getDate() {\n return date;\n }", "public void setDate(DateTime \n date) {\n this.date = date;\n }", "public void setStartDate(Date s);", "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }", "private boolean isEqualDate(DateStruct d1, DateStruct d2)\n {\n boolean isEqual = false;\n if ( d1.year == d2.year && d1.month == d2.month && d1.day == d2.day )\n {\n isEqual = true;\n }\n return isEqual;\n }", "@Test\r\n public void getDateValue() throws Exception {\r\n assertEquals(dt1,point1.getDateValue());\r\n assertEquals(dt2,point2.getDateValue());\r\n assertEquals(dt3,point3.getDateValue());\r\n assertEquals(dt4,point4.getDateValue());\r\n }", "public boolean dateCompartFromTo(String[] sdate, String[] edate) {\r\n\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tDate startdate = null;\r\n\t\tDate enddate = null;\r\n\t\ttry {\r\n\t\t\t// 시작일 종료일 날짜 비교\r\n\t\t\tfor (int idx = 0; idx < sdate.length; idx++) {\r\n\r\n\t\t\t\tstartdate = dateFormat.parse(sdate[idx]);\r\n\t\t\t\tenddate = dateFormat.parse(edate[idx]);\r\n\t\t\t\t\r\n\t\t\t\tif (startdate.compareTo(enddate) >= 0) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (ParseException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public int MagicDate(){\n return month = day = year = 1;\n \n }", "public void setDate(String date){\n this.date = date;\n }", "protected DateFieldMetadata() {\r\n\r\n\t}", "public boolean isSupportDay() {\r\n return true;\r\n }", "public Date getCreateDate()\r\n/* */ {\r\n/* 158 */ return this.createDate;\r\n/* */ }", "public void setDate(String date){\n this.date = date;\n }", "public boolean validDateRange() {\n\t\treturn dateEnd.compareTo(dateStart) > 0;\n\t}", "@Test\r\n\tpublic void testSetDate() {\n\t\tfail(\"Not yet implemented\");\r\n\t}", "final boolean isDateRollEnforced() {\n return this.dateRollEnforced;\n }", "public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }", "protected Date findFirstGenDate(GenCtx ctx)\n\t{\n\t\treturn EX.assertn(ctx.get(Date.class));\n\t}", "@Override\n public String getStyle(LocalDate date, TuningDateField tuningDateField) {\n String style = null;\n \n if (multiSelectDateField.getAvailabilityDates() != null && multiSelectDateField.getAvailabilityDates().contains(date) \n \t\t&& ( multiSelectDateField.getSelectedDates().isEmpty() || date.isAfter(multiSelectDateField.getStartDate()))) {\n style = \"day-availability\";\n } else {\n style = \"day-unavailability\";\n }\n \n if (multiSelectDateField.getValue() != null && multiSelectDateField.getValue().contains(date))\n {\n \tstyle += \" day-selected\";\n }\n \n return style;\n }", "public static void before1(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,5);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==5);\n assert(ret0==false);\n System.out.println(ret0);\n }", "Dates() {\n clear();\n }", "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}" ]
[ "0.65327185", "0.64309275", "0.63628614", "0.6325658", "0.6316394", "0.62702143", "0.6257088", "0.62342876", "0.62257767", "0.6217861", "0.61681545", "0.615079", "0.61077815", "0.61069226", "0.60983694", "0.60844004", "0.6059793", "0.60454625", "0.60424817", "0.60358757", "0.60133153", "0.5989132", "0.5982928", "0.59465075", "0.59454286", "0.5918966", "0.59075797", "0.5901487", "0.5897408", "0.588614", "0.58718085", "0.586826", "0.58660734", "0.58389497", "0.5838326", "0.5829933", "0.5825031", "0.58114177", "0.580834", "0.57886755", "0.57846814", "0.57838523", "0.5783314", "0.57818377", "0.57790536", "0.57781774", "0.5775924", "0.5760205", "0.5756504", "0.5748753", "0.57467335", "0.57413", "0.57378596", "0.572687", "0.57247233", "0.57240367", "0.5714295", "0.5701288", "0.5701245", "0.5700427", "0.5700403", "0.569948", "0.5698494", "0.56950676", "0.56933665", "0.56896096", "0.5678758", "0.5678661", "0.5676737", "0.5670983", "0.5668582", "0.56640214", "0.5660481", "0.5656306", "0.56545705", "0.56544334", "0.5652411", "0.56520945", "0.565016", "0.5642452", "0.5640572", "0.56308407", "0.56174713", "0.56128603", "0.56099886", "0.56050766", "0.5590019", "0.5588624", "0.55855155", "0.55828905", "0.5582872", "0.5577003", "0.5576507", "0.557346", "0.5573006", "0.5568851", "0.556", "0.5559191", "0.5558386", "0.5556848", "0.55501753" ]
0.0
-1
SubsetRange must be contained in this range
public GridAxis1D.Builder<?> makeSubsetByIndex(Range subsetRange) { int ncoords = subsetRange.length(); Preconditions.checkArgument(subsetRange.last() < orgGridAxis.getNcoords()); double resolution = 0.0; if (orgGridAxis.getSpacing().isRegular()) { resolution = subsetRange.stride() * orgGridAxis.getResolution(); } GridAxis1D.Builder<?> builder = orgGridAxis.toBuilder(); builder.subset(ncoords, orgGridAxis.getCoordMidpoint(subsetRange.first()), orgGridAxis.getCoordMidpoint(subsetRange.last()), resolution, subsetRange); return builder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\t public void test_Is_Subset_Positive() throws Exception{\t\n\t\t SET setarray= new SET( new int[]{1,2,3,4,5});\n\t\t SET subsetarray= new SET( new int[]{1,2,3});\n\t\t assertTrue(setarray.isSubSet(subsetarray));\t \n\t }", "@Test\n\t public void test_Is_Subset_Negative() throws Exception{\t\n\t\t SET setarray= new SET( new int[]{1,2,3,4,5});\n\t\t SET subsetarray= new SET( new int[]{7,8});\n\t\t assertFalse(setarray.isSubSet(subsetarray));\t \n\t }", "@Test\r\n public void testIsSubset1() {\r\n Assert.assertEquals(false, set1.isSubset(set2));\r\n }", "public boolean isSubset() {\n return isSubset;\n }", "public boolean isSubset() {\n return isSubset;\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "public boolean isSetSubset() {\n return this.subset != null;\n }", "public boolean subset(ZYSet<ElementType> potentialSubset){\n for(ElementType e:potentialSubset){\n if(!this.contains(e)){\n return false;\n }\n }\n return true;\n }", "public boolean isProperSubset(/*@ non_null @*/ JMLObjectSet<E> s2) {\n return size < s2.int_size() && isSubset(s2);\n }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "@Override\n public boolean subset(SetI other) {\n if (count > other.size()) {\n return false;\n }\n\n for (Integer e : this) {\n // I have but other do not...\n if (!other.contains(e)) {\n return false;\n }\n }\n return true;\n }", "@Override\n public boolean isRange() {\n return false;\n }", "public boolean subset(Set subset) throws SetException {\n\t\tfor (Object element : subset.list)\n\t\t\tif (!member(element))\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public Range findRangeBounds(CategoryDataset dataset) { return findRangeBounds(dataset, true); }", "SubsetTableImpl(int numColumns) {\n\t\tsuper(numColumns);\n\t\tsubset = new int[0];\n\t}", "public boolean subset (Bag u) {\n return true;\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "private boolean hasValidBounds() {\n\n\n\n return false;\n }", "public SubsetTableImpl() {\n\t\tsuper();\n\t\tsubset = new int[0];\n\t}", "public SortedSubset(RangeSet<T> constitutingSuperset, T lowerbound, T upperbound)\n\t{\n\t\tinit(constitutingSuperset, lowerbound, upperbound, true, false);\n\t}", "public void setValidRange (int lowerBounds, int upperBounds)\r\n\t{\r\n\t\tm_lowerBounds = lowerBounds;\r\n\t\tm_upperBounds = upperBounds;\r\n\t}", "@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}", "public SubsetTableImpl(Column[] col, int[] subset) {\n\t\tsuper(col);\n\t\tthis.subset = subset;\n\t}", "public boolean containsRange(Range range) {\n/* 317 */ if (range == null) {\n/* 318 */ return false;\n/* */ }\n/* 320 */ return (containsLong(range.getMinimumLong()) && containsLong(range.getMaximumLong()));\n/* */ }", "private boolean isSubsetOf(int firstRow, int secondRow) {\n for (int i = 0; i < universalSetSize; i++) {\n if (input[firstRow][i] && !input[secondRow][i]) {\n return false;\n }\n }\n return true;\n }", "public boolean properSubset(SetSet second){\n\t\tif(subset(second) && !equals(second)){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean validateFullBounds() {\n\t\tcomparisonBounds = getUnionOfChildrenBounds(comparisonBounds);\n\t\n\t\tif (!cachedChildBounds.equals(comparisonBounds)) {\n\t\t\tsetPaintInvalid(true);\n\t\t}\n\t\treturn super.validateFullBounds();\t\n\t}", "public boolean validateFullBounds() {\n\t\tcomparisonBounds = getUnionOfChildrenBounds(comparisonBounds);\n\t\n\t\tif (!cachedChildBounds.equals(comparisonBounds)) {\n\t\t\tsetPaintInvalid(true);\n\t\t}\n\t\treturn super.validateFullBounds();\t\n\t}", "public abstract void selectIndexRange(int min, int max);", "@Test\r\n\tpublic void getByRange_RangeInAll_Success() {\r\n\r\n\t\tSelectionCriteria criteria = getSelectionCriteria();\r\n\t\tgetContentList();\r\n\t\tList<String> content = service.getByCriteria(criteria);\r\n\t\tAssert.assertEquals(7, content.size());\r\n\t\tAssert.assertEquals(USER_INPUT[2], content.get(0));\r\n\t\tservice.clearAll();\r\n\t}", "@Test\n\tpublic void test() {\n\t\tList<Integer[]> result = subGen.subset(9);\n\t\tassertEquals(10, result.size());\n\t\tInteger[] temp = { 0, 1, 2, 3, 4, 5, 6, 7, 8 };\n\t\tassertEquals(Arrays.toString(temp), Arrays.toString(result.get(0)));\n\n\t\tSet<Integer[]> testSet = new HashSet<Integer[]>();\n\t\tfor (int i = 0, len = result.size(); i < len; i++) {\n\t\t\ttestSet.add(result.get(i));\n\t\t}\n\t\tassertEquals(10, testSet.size());\n\n\t\tList<Integer[]> result2 = subGen.subset(3);\n\t\tassertEquals(120, result2.size());\n\n\t}", "private static void checkNSSubset(XSWildcardDecl dWildcard, int min1, int max1, XSWildcardDecl bWildcard, int min2, int max2) throws XMLSchemaException {\n/* 1196 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1197 */ throw new XMLSchemaException(\"rcase-NSSubset.2\", new Object[] {\n/* 1198 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1199 */ Integer.toString(max1), \n/* 1200 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1201 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* */ \n/* 1205 */ if (!dWildcard.isSubsetOf(bWildcard)) {\n/* 1206 */ throw new XMLSchemaException(\"rcase-NSSubset.1\", null);\n/* */ }\n/* */ \n/* 1209 */ if (dWildcard.weakerProcessContents(bWildcard)) {\n/* 1210 */ throw new XMLSchemaException(\"rcase-NSSubset.3\", new Object[] { dWildcard\n/* 1211 */ .getProcessContentsAsString(), bWildcard\n/* 1212 */ .getProcessContentsAsString() });\n/* */ }\n/* */ }", "private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) {\n\t\tif (fromIndex > toIndex)\n\t\t\tthrow new IllegalArgumentException(\"fromIndex(\" + fromIndex +\n\t\t\t\t\t\") > toIndex(\" + toIndex+\")\");\n\t\tif (fromIndex < 0)\n\t\t\tthrow new ArrayIndexOutOfBoundsException(fromIndex);\n\t\tif (toIndex > arrayLen)\n\t\t\tthrow new ArrayIndexOutOfBoundsException(toIndex);\n\t}", "private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}", "public boolean isSubset(/*@ non_null @*/ JMLObjectSet<E> s2) {\n if (size > s2.int_size()) {\n return false;\n } else {\n for (JMLListObjectNode<E> walker = the_list;\n walker != null;\n walker = walker.next) {\n if (!s2.has(walker.val)) {\n return false;\n }\n } \n //@ assert (\\forall Object e; ; this.has(e) ==> s2.has(e));\n return true;\n } \n }", "final public int[] getSubset() {\n\t\treturn subset;\n\t}", "boolean HasRange() {\r\n\t\treturn hasRange;\r\n\t}", "public boolean isBounded() {\n\t\treturn true;\n\t}", "Boolean subset(MultiSet<X> s);", "boolean checkIfValidToCreate(int start, int end) {\n return myMarkerTree.processOverlappingWith(start, end, region->{\n int rStart = region.getStartOffset();\n int rEnd = region.getEndOffset();\n if (rStart < start) {\n if (region.isValid() && start < rEnd && rEnd < end) {\n return false;\n }\n }\n else if (rStart == start) {\n if (rEnd == end) {\n return false;\n }\n }\n else {\n if (rStart > end) {\n return true;\n }\n if (region.isValid() && rStart < end && end < rEnd) {\n return false;\n }\n }\n return true;\n });\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n Range.Builder range_Builder1 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(243L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n long long0 = 127L;\n Range range1 = Range.of((-636L), 127L);\n range1.isSubRangeOf(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "CollectionRange createCollectionRange();", "public void testFindRangeBounds() {\n XYBlockRenderer renderer = new XYBlockRenderer();\n XYSeriesCollection dataset = new XYSeriesCollection();\n XYSeries series = new XYSeries(\"S1\");\n series.add(1.0, null);\n dataset.addSeries(series);\n Range r = renderer.findRangeBounds(dataset);\n }", "protected boolean applySubsetRule(Node value) {\n\n int type;\n int sizeParents;\n boolean isAppliedRule = false;\n Node auxI;\n Node auxJ;\n int i;\n NodeList auxNodeList = new NodeList();\n Node auxNode;\n\n\n //If the subset rule is forbidden then the methods finishes\n if (canApplySubsetRule == false) {\n return false;\n } else {\n\n type = value.getKindOfNode();\n\n if (type == Node.UTILITY) {\n return false;\n } else {//(type == Node.SUPER_VALUE)\n NodeList parents = diag.parents(value);\n sizeParents = parents.size();\n\n //See if subset rule can be applied to some ancestors\t\t\t\n for (i = 0; (i < sizeParents) && (isAppliedRule == false); i++) {\n isAppliedRule = applySubsetRule(parents.elementAt(i));\n }\n if (isAppliedRule) {\n indexOperation++;\n try {\n diag.save(\"debug-operation-\" + indexOperation + \".elv\");\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n if (isAppliedRule == false) {\n //See if subset rule can be applied to two utility parents\n for (i = 0; (i < sizeParents - 1) && (isAppliedRule == false); i++) {\n auxI = parents.elementAt(i);\n if (auxI.getKindOfNode() == Node.UTILITY) {\n for (int j = i + 1; (j < sizeParents) && (isAppliedRule == false); j++) {\n auxJ = parents.elementAt(j);\n if (auxJ.getKindOfNode() == Node.UTILITY) {\n if (verifySubsetRule(auxI, auxJ)) {\n String operation =\n \"Apply subset rule to: \" + auxI.getName() + \" and \" + auxJ.getName();\n\n statistics.addOperation(operation);\n System.out.println(operation);\n\n auxNodeList.insertNode(auxI);\n auxNodeList.insertNode(auxJ);\n auxNode = introduceSVNode(auxNodeList, value);\n System.out.println(\"Nodo introducido por la subset rule anterior: \" + auxNode.getName());\n ReductionAndEvalID.reduceNode((IDWithSVNodes) diag, auxNode);\n System.out.println(\"Reducción del nodo: \" + auxNode.getName());\n\n statistics.addSize(diag.calculateSizeOfPotentials());\n statistics.addTime(crono.getTime());\n\n\n isAppliedRule = true;\n\n indexOperation++;\n try {\n diag.save(\"debug-operation-\" + indexOperation + \".elv\");\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n\n }\n }\n }\n }\n }\n\n }\n }\n\n return isAppliedRule;\n }\n }", "@Nullable\n public abstract GridAxis subset(GridSubset params, Formatter errlog);", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n Range range0 = Range.ofLength(0L);\n Range range1 = Range.of(0L);\n Range range2 = range1.intersection(range0);\n boolean boolean0 = range0.equals(range2);\n assertFalse(range1.isEmpty());\n assertTrue(range2.isEmpty());\n assertFalse(range2.equals((Object)range1));\n assertTrue(boolean0);\n }", "public void checkInterval (int begin, int end) {\n\t\tif (begin >= end) {\n\t\t\tthrow new IllegalArgumentException (\"Invalid SegmentTreeNode insert: begin (\" +\n\t\t\t\t\tbegin +\t\") must be strictly less than end (\" + end + \")\");\n\t\t}\n\t}", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "public static void main (String args[])\n\t {\n\t int set[] = {3, 34, 4, 12, 5, 2};\n\t int sum = 9;\n\t int n = set.length;\n\t if (isSubsetSum(set, n, sum) == true)\n\t System.out.println(\"Found a subset with given sum\");\n\t else\n\t System.out.println(\"No subset with given sum\");\n\t }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n Range range0 = Range.ofLength(0L);\n String string0 = range0.toString();\n assertEquals(\"[ 0 .. -1 ]/0B\", string0);\n \n Object object0 = new Object();\n boolean boolean0 = range0.isSubRangeOf(range0);\n assertTrue(boolean0);\n }", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "boolean isIncludeBounds();", "@Test\n public void testBoundsAsCompositesWithMultiEqAndSingleSliceRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n\n // (clustering_0, clustering_1) = (1, 2) AND clustering_2 > 3\n Restriction multiEq = newMultiEq(cfMetaData, 0, value1, value2);\n Restriction singleSlice = newSingleSlice(cfMetaData, 2, Bound.START, false, value3);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(multiEq).mergeWith(singleSlice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.END);\n }", "public void setRange(Range range) { setRange(range, true, true); }", "boolean isEquals(Range other);", "public boolean containsDomainRange(long from, long to) { return true; }", "public boolean intersects(Range other) {\n if ((length() == 0) || (other.length() == 0)) {\n return false;\n }\n if (this == VLEN || other == VLEN) {\n return true;\n }\n\n int first = Math.max(this.first(), other.first());\n int last = Math.min(this.last(), other.last());\n\n return (first <= last);\n }", "public Code visitNarrowSubrangeNode(ExpNode.NarrowSubrangeNode node) {\n beginGen(\"NarrowSubrange\");\n Code code = node.getExp().genCode(this);\n code.genBoundsCheck(node.getSubrangeType().getLower(), \n node.getSubrangeType().getUpper());\n endGen(\"NarrowSubrange\");\n return code;\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n // Undeclared exception!\n try { \n range0.intersects((Range) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Null Range used in intersection operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test\n\tpublic void seperateRangeTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"seperate range test\");\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94600), new ZipCode(94699));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z1);\n\t\trequiredList.add(z2);\n\t\trequiredList.add(z3);\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\t\tclimax();\n\n\t}", "public static boolean isSubset(int[] large, int[] small){\n HashSet<Integer> hs = new HashSet<>(20, 0.9f);\n for(int i : large)\n hs.add(new Integer(i));\n for(int i = 0; i < small.length; i++)\n if(!hs.contains(small[i]))\n return false;\n return true;\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n Range range0 = Range.of(0L);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem0);\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem1);\n range0.iterator();\n Range.of((-1233L), 0L);\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem1, 0L, (-1233L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "protected void validateTxRangeList(cwterm.service.rigctl.xsd.FreqRange[] param) {\n }", "private boolean isValidSeam(int[] a, int len, int range)\n {\n if (a.length != len || a[0] < 0 || a[0] > range)\n return false;\n for (int i = 1; i < len; i++)\n {\n if (a[i] < Math.max(0, a[i-1] -1) || a[i] > Math.min(range, a[i-1] +1))\n return false;\n }\n return true;\n }", "@Override\r\n protected boolean remove(SubsetImpl r)\r\n {\r\n if (r != null) {\r\n /*\r\n * if the subset contains the element, use the subset method to do all the work\r\n * TableSliceElementImpl.remove will be called again to finish up\r\n */\r\n \tif (r.contains(this)) \r\n \t\tr.remove(this);\r\n \t\r\n \treturn m_subsets.remove(r);\r\n }\r\n \r\n return false;\r\n }", "private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }", "@Test\n\tpublic void rangeOverlapTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"overlaptest\");\n\t\t// dataset 1\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94226), new ZipCode(94399));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z5 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z5);\n\t\trequiredList.add(z4);\n\n\t\tfor (ZipCodeRange z : zrc.getFinalZipRanges()) {\n\t\t\tSystem.out.println(z.lower.zipcode + \",\" + z.upper.zipcode);\n\t\t}\n\t\tfor (ZipCodeRange z : requiredList) {\n\t\t\tSystem.out.println(z.lower.zipcode + \",\" + z.upper.zipcode);\n\t\t}\n\n\t\tAssert.assertEquals(\"Overlap test Size check passed \", requiredList.size(), zrc.getFinalZipRanges().size());\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\n\t\tclimax();\n\n\t}", "private static boolean hasVisibleRegion(int begin,int end,int first,int last) {\n return (end > first && begin < last);\n }", "public static boolean isSubset(Vector v1, Vector v2) {\n\t\tif (v1 == null || v2 == null || v1.equals(v2) || v1.size() >= v2.size()) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (Object o1 : v1) {\n\t\t\tif (!v2.contains(o1)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public ImmutableSortedSet<C> subSet(Range<C> range) {\n return ImmutableRangeSet.this.subRangeSet((Range) range).asSet((DiscreteDomain<C>) this.domain);\n }", "private boolean isSubset(List<ConceptLabel> outer, List<ConceptLabel> inner){\n\t\tfor(ConceptLabel in: inner){\n\t\t\tboolean c = false;\n\t\t\tfor(ConceptLabel l: outer){\n\t\t\t\tif(l.getText().equals(in.getText())){\n\t\t\t\t\tc = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!c)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean isSubsetOf(List<String> permissions2,\n\t\t\tList<String> permissions3) {\n\t\treturn false;\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Range range0 = Range.of((-1259L));\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n long long0 = new Long((-1259L));\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range range3 = range1.asRange();\n String string0 = null;\n range3.intersection(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. -1258 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse [ -1259 .. -1258 ]/SB into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test\n public void testBoundsAsCompositesWithEqAndSliceRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n\n Restriction eq = newSingleEq(cfMetaData, 0, value3);\n\n Restriction slice = newSingleSlice(cfMetaData, 1, Bound.START, false, value1);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, EOC.END);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.START, true, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, EOC.END);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.END, true, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.END);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.END, false, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.START);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.START, false, value1);\n Restriction slice2 = newSingleSlice(cfMetaData, 1, Bound.END, false, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value2, EOC.START);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.START, true, value1);\n slice2 = newSingleSlice(cfMetaData, 1, Bound.END, true, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value2, EOC.END);\n }", "@Test\n public void testBoundsAsCompositesWithMultiSliceRestrictionsWithOneClusteringColumn()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n\n Restriction slice = newMultiSlice(cfMetaData, 0, Bound.START, false, value1);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n slice = newMultiSlice(cfMetaData, 0, Bound.START, true, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n slice = newMultiSlice(cfMetaData, 0, Bound.END, true, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n\n slice = newMultiSlice(cfMetaData, 0, Bound.END, false, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.START);\n\n slice = newMultiSlice(cfMetaData, 0, Bound.START, false, value1);\n Restriction slice2 = newMultiSlice(cfMetaData, 0, Bound.END, false, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value2, EOC.START);\n\n slice = newMultiSlice(cfMetaData, 0, Bound.START, true, value1);\n slice2 = newMultiSlice(cfMetaData, 0, Bound.END, true, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value2, EOC.END);\n }", "public SubsetTableImpl(TableImpl table, int[] subset) {\n\t\tthis.columns = table.getColumns();\n\t\tthis.label = table.label;\n\t\tthis.comment = table.comment;\n\t\tthis.subset = subset;\n\t}", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem0);\n // Undeclared exception!\n try { \n range0.intersection((Range) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Null Range used in intersection operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean checkIndexBounds(int idx) {\n return (idx >= 0) && (idx <= this.length);\n }", "@SuppressWarnings(\"unlikely-arg-type\")\n\tpublic boolean verify(ArrayList<Integer[]> answer, ArrayList<Integer[]> allSubsets, int bound) {\n\t\t//Contains\n\t\tfor (int i = 0; i < answer.size(); i++) {\n\t\t\tif(!allSubsets.contains(answer.get(i))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//Size\n\t\tif(answer.size()>bound) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tint[] people= new int[answer.get(0).length];\n\t\t//Universe\n\t\tfor (int i = 0; i <answer.size(); i++) {\n\t\t\tInteger[] subset = answer.get(i);\n\t\t\tfor (int j = 0; j < subset.length; j++) {\n\t\t\t\tif(subset[j]==1) {\n\t\t\t\t\tpeople[j]=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public genSubset_args(genSubset_args other) {\n if (other.isSetFilePath()) {\n this.filePath = other.filePath;\n }\n if (other.isSetOutputDir()) {\n this.outputDir = other.outputDir;\n }\n if (other.isSetSubset()) {\n this.subset = other.subset;\n }\n if (other.isSetTypes()) {\n List<FileType> __this__types = new ArrayList<FileType>(other.types.size());\n for (FileType other_element : other.types) {\n __this__types.add(other_element);\n }\n this.types = __this__types;\n }\n }", "Range controlLimits();", "public SubsetTableImpl(Column[] col) {\n\t\tsuper(col);\n\t\t//ANCA added 2 lines below\n\t\tint numRows = super.getNumRows();\n\t\tthis.subset = new int[numRows];\n\t\t//ANCA took this out: this.subset = new int [this.getNumRows()];\n\t\tfor (int i = 0; i < this.getNumRows(); i++) {\n\t\t\tsubset[i] = i;\n\t\t}\n\t}", "public boolean isRange() {\r\n return range;\r\n }", "ValueRangeConstraint createValueRangeConstraint();", "@Test\n public void testBoundsAsCompositesWithMultiSliceRestrictionsWithTwoClusteringColumn()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n\n // (clustering_0, clustering1) > (1, 2)\n Restriction slice = newMultiSlice(cfMetaData, 0, Bound.START, false, value1, value2);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n // (clustering_0, clustering1) >= (1, 2)\n slice = newMultiSlice(cfMetaData, 0, Bound.START, true, value1, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n // (clustering_0, clustering1) <= (1, 2)\n slice = newMultiSlice(cfMetaData, 0, Bound.END, true, value1, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.END);\n\n // (clustering_0, clustering1) < (1, 2)\n slice = newMultiSlice(cfMetaData, 0, Bound.END, false, value1, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.START);\n\n // (clustering_0, clustering1) > (1, 2) AND (clustering_0) < (2)\n slice = newMultiSlice(cfMetaData, 0, Bound.START, false, value1, value2);\n Restriction slice2 = newMultiSlice(cfMetaData, 0, Bound.END, false, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value2, EOC.START);\n\n // (clustering_0, clustering1) >= (1, 2) AND (clustering_0, clustering1) <= (2, 1)\n slice = newMultiSlice(cfMetaData, 0, Bound.START, true, value1, value2);\n slice2 = newMultiSlice(cfMetaData, 0, Bound.END, true, value2, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value2, value1, EOC.END);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Amino;\n defaultNucleotideCodec0.encode(nucleotide0);\n int int0 = 15;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Range range0 = Range.ofLength(359L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range1 = Range.of(range_CoordinateSystem0, (-874L), (-874L));\n range0.isSubRangeOf(range1);\n // Undeclared exception!\n try { \n Range.ofLength((-2918L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // must be >=0\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "boolean hasDestRange();", "public boolean checkLampSubset(ArrayList<Furniture> subset){\n boolean base = false;\n boolean bulb = false;\n\n for(Furniture l : subset){\n if(l instanceof Lamp){\n Lamp lamp = (Lamp)l;\n if(lamp.getBase().equals(\"Y\")){\n base = true;\n }\n if(lamp.getBulb().equals(\"Y\")){\n bulb = true;\n }\n }\n }\n // check if any of the lamp pieces are missing and if so the combination is invalid\n if(!base || !bulb){\n return false;\n }\n return true;\n }", "abstract public Range createRange();", "public boolean isBitRangeExpr() {\n return false;\n }", "@Test\n public void testBoundsAsCompositesWithSliceRestrictionsAndOneClusteringColumn()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n\n Restriction slice = newSingleSlice(cfMetaData, 0, Bound.START, false, value1);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n slice = newSingleSlice(cfMetaData, 0, Bound.START, true, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n slice = newSingleSlice(cfMetaData, 0, Bound.END, true, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n\n slice = newSingleSlice(cfMetaData, 0, Bound.END, false, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertEmptyComposite(bounds.get(0));\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.START);\n\n slice = newSingleSlice(cfMetaData, 0, Bound.START, false, value1);\n Restriction slice2 = newSingleSlice(cfMetaData, 0, Bound.END, false, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value2, EOC.START);\n\n slice = newSingleSlice(cfMetaData, 0, Bound.START, true, value1);\n slice2 = newSingleSlice(cfMetaData, 0, Bound.END, true, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value2, EOC.END);\n }", "public static void main (String args[])\n\t{\n\t\tint set[] = {3, 34, 4, 12, 5, 2};\n\t\tint sum = 9;\n\t\tint n = set.length;\n\t\tif (isSubsetSum(set, n, sum) == true)\n\t\t\tSystem.out.println(\"Found a subset\"\n\t\t\t\t\t\t+ \" with given sum\");\n\t\telse\n\t\t\tSystem.out.println(\"No subset with\"\n\t\t\t\t\t\t\t+ \" given sum\");\n\t}", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "@Test\n public void testGetRandomRange() {\n // XXX what should be tested?\n // bad values to the range?\n // min == max?\n Assert.assertTrue(true);\n }", "private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }", "public boolean compare(AlphaSubset passedSubset) {\n\t\tif(passedSubset.getSubset().size() == getSubset().size()) {\r\n\t\t\tfor(int i = 0; i < getSubset().size();i++) {\r\n\t\t\t\tif(passedSubset.getSubset().get(i) != getSubset().get(i)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void checkBound(int lowerBound, int upperBound) {\n\t\tSet setKeys = Utility.vocabHM.keySet();\n\t\tIterator i = setKeys.iterator();\n\n\t\twhile (i.hasNext()) {\n\t\t\tString s = (String) i.next();\n\t\t\tInteger df = (Integer) Utility.vocabHM.get(s);\n\n\t\t\tif ((df.intValue() <= lowerBound) || (df.intValue() >= upperBound))\n\t\t\t\ti.remove();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n Range range0 = Range.of(4294967295L);\n Object object0 = new Object();\n range0.intersects(range0);\n // Undeclared exception!\n try { \n range0.isSubRangeOf((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // range can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean outOfBounds(int nidx1){\n\t\treturn (nidx1 < 0 || nidx1 >= numofvert);\n\t}" ]
[ "0.70897734", "0.70650375", "0.68015045", "0.6723416", "0.6723416", "0.6333806", "0.6269784", "0.6241189", "0.62017095", "0.60938287", "0.60798526", "0.6022899", "0.6019772", "0.5953359", "0.59377146", "0.5919354", "0.5917447", "0.59139776", "0.5913041", "0.5890583", "0.58805364", "0.5851475", "0.57777625", "0.57618237", "0.57386875", "0.572671", "0.57158303", "0.57158303", "0.5702137", "0.5693806", "0.56900597", "0.56583834", "0.5651778", "0.56396943", "0.5634334", "0.5631994", "0.5610129", "0.5606897", "0.5604452", "0.5591227", "0.55768985", "0.5573666", "0.55723387", "0.5561828", "0.55534726", "0.5551258", "0.5522095", "0.55054027", "0.55049396", "0.5499899", "0.5470243", "0.5453722", "0.5447732", "0.5443442", "0.5443182", "0.54426193", "0.5423954", "0.5420197", "0.54161376", "0.54009587", "0.5389233", "0.53874415", "0.53817487", "0.53720427", "0.5368269", "0.53587335", "0.53447616", "0.53373474", "0.5336766", "0.53350693", "0.53238213", "0.53218156", "0.53198105", "0.53174603", "0.53006035", "0.5300389", "0.529569", "0.52920187", "0.5284813", "0.5284486", "0.5283743", "0.52803755", "0.528001", "0.5278532", "0.5278532", "0.52687985", "0.5266322", "0.52656585", "0.5257416", "0.52569646", "0.52536005", "0.5249795", "0.52410257", "0.52406865", "0.5240555", "0.52343124", "0.5225437", "0.52247316", "0.5223868", "0.52193576" ]
0.5489846
50
Express the Regexp above with the code you wish you had throw new PendingException();
@Given("^Car owner enter Fname as \"([^\"]*)\" and Lname as \"([^\"]*)\" and Location as \"([^\"]*)\" and time as \"([^\"]*)\" an email as \"([^\"]*)\" and phone as \"([^\"]*)\"$") public void CarOwner_entry(String fname, String lname, String location, String time, String email, String phone) throws Throwable { ride.setFname(fname); ride.setLname(lname); ride.setLocation(location); ride.setTime(time); ride.setEmail(email); ride.setPhone(phone); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid runRegEx_IllegalCharacters() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"|*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\tactualScore += 10;\n\t\t}\n\t}", "@Test(expected = InvalidRegexpException.class)\n public void testParseRegexp_invalid8() throws Throwable {\n BasicRegexp.parseRegexp(\"()\");\n }", "@Factory\r\n public static Matcher<Proc> raises(String regex) {\r\n return raises(IsThrowable.throwable(regex));\r\n }", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Factory\r\n public static Matcher<Proc> raisesException(String regex) {\r\n return new Raises(IsThrowable.exception(regex));\r\n }", "@Test\n public void testOptimise_2() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a+++++++++++++++++++++\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a+\");\n }", "@Test\n\tvoid runRegExNoOperands_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Sargon\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "@Test\n\tvoid runRegExUnfoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Introuvable\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(0, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "public NotMatchedException(Pattern pattern) {\n this.pattern = pattern;\n }", "@Test\n public void testParseRegexp_valid7() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"abc*def\");\n assertEquals(re.toString(), \"abc*def\");\n }", "public void setPattern(String pattern) {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.getMetaData((Connection) null, \"43X50.U\", \"43X50.U\", true, false, false, true, \"#hl2(.N!cDa@pc@R\", true);\n fail(\"Expecting exception: PatternSyntaxException\");\n \n } catch(PatternSyntaxException e) {\n //\n // Unclosed group near index 16\n // #hl2(.N!cDa@pc@R\n //\n verifyException(\"java.util.regex.Pattern\", e);\n }\n }", "protected abstract Regex pattern();", "@Test\n public void testOptimise_8() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(b|a)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(c|d)*|(d|c)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|d)*\");\n\n }", "@Override\n protected void compileRegex(String regex) {\n }", "public SyntaxMatchingException() {\n super();\n }", "private String parseRegExp(String exp) throws Exception {\r\n\t\treturn RegexpTranslationHelper.translateANTLRToAutomatonStyle(exp);\r\n\t}", "private Pattern compilePattern(String pattern) throws PatternBuilderException {\n try{\n return Pattern.compile(pattern);\n } catch (PatternSyntaxException pse) {\n throw new PatternBuilderException(String.format(\"unable to compile regex for pattern: %s\", pattern), pse);\n }\n }", "@Factory\r\n public static Matcher<Proc> raises(Class<? extends Throwable> clazz, String regex) {\r\n return raises(IsThrowable.throwable(clazz, regex));\r\n }", "private JBurgPatternMatcher()\n\t{\n\t}", "@Then(\"^the status code is (\\\\d+)$\")\npublic void the_status_code_is(int arg1) throws Throwable {\n throw new PendingException();\n}", "@Test\n public void testParseRegexp_valid3() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"a b c d\");\n assertEquals(re.toString(), \"abcd\");\n }", "public static UnaryExpression rethrow() { throw Extensions.todo(); }", "@Test\n public void testOptimise_3() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*a*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*a?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?a?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*a?a?a?a*a*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "private String regex(Edge e) {\n return EdgeWriter.toRegex(e, false /* use dot match */);\n }", "@Test\n public void testOptimise_1() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a**\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a+*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a*+\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a*********************\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a++++++++++++++++++++*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"a????????????????????*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"a********************?\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"a+?*+?*+?*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"a+?\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"a?+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "@Override\n\tpublic boolean test(MyRegex t) {\n\t\treturn false;\n\t}", "public interface RegExp {\n String NUMBER_OF_COMPOSITION = \"^[1-2][0-9]|[1-9]$\";\n String BREAK_DATE_BY_DOT = \"[.]\";\n String IDENTIFY_BUMDLE = \"^([E|e][N|n])|[У|у][К|к][Р|р]$\";\n String DURATION = \"^[1-9]|[1-9][0-9]|[1-4][0-9][0-9]$\";\n}", "@Test\n public void testParseRegexp_correctness1new()\n throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n assertEquals(re.toString(), \"(01|10)*1111\");\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"O:56ve.env.properties\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"O:56ve\");\n // Undeclared exception!\n try { \n DBUtil.getMetaData(\"O:56ve\", true, false, false, false, \"r!3}iKU)q_q\", true, false);\n fail(\"Expecting exception: PatternSyntaxException\");\n \n } catch(PatternSyntaxException e) {\n //\n // Unmatched closing ')' near index 6\n // r!3}iKU)q_q\n // ^\n //\n verifyException(\"java.util.regex.Pattern\", e);\n }\n }", "@Factory\r\n public static Matcher<Proc> raisesException(Class<? extends Exception> clazz, String regex) {\r\n return new Raises(IsThrowable.exception(clazz, regex));\r\n }", "@Test\n public void testOptimise_4() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)+\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)?\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n }", "@Test\n public void testParseRegexp_valid6() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"ab(cd(e))ff\");\n assertEquals(re.toString(), \"abcdeff\");\n }", "String getErrorLinePattern();", "@Test\n public void testDebugPrintBasicRegexp() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n BasicRegexp.debugPrintBasicRegexp(0, re1);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-3975));\n // Undeclared exception!\n try { \n xPathLexer0.dots();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-1));\n // Undeclared exception!\n try { \n xPathLexer0.literal();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test\n public void testOptimise_6() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a|a|b\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"b|a|a\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(b|b)*|(a|a)*|a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(c|b|b)*|(a|a)*|a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a*b*|a*b*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a|b\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b|a\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b*|a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|b)*|a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n }", "public SyntaxMatchingException(String msg) {\n super(msg);\n }", "public RegularExpression() {\n }", "@Test\n\tpublic void test61() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//bug 10\n\t\tfor(int i =0;i<200;i++) {\n\t\t\tboolean dummy = RegExpMatcher.matches(String.valueOf(i), \"([0-9])+\");\n\t\t\tif(!dummy) {\n\t\t\t\t//System.err.print(i);\n \t\t\t\tassertTrue(dummy);\t\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t//System.out.println(\"no bug on index \"+i);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//System.out.println(\"hello\");\n\t\t//assertTrue(RegExpMatcher.matches(\"\", \"([0-9])+\"));\n\t}", "@Override\n\tpublic void exucute() {\n\t\t\n\t}", "private static void compile(String pat) {\r\n\t\ttry {\r\n\t\t\tpattern = Pattern.compile(pat);\r\n\t\t} catch (PatternSyntaxException x) {\r\n\t\t\tSystem.err.println(x.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "@Override\n protected Pattern getServerFailurePattern() {\n return null;\n }", "@Test\n public void testParseRegexp_valid1() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"\");\n assertEquals(re, null);\n }", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isRegex() {\n return false;\n }", "@Test\n public void testOptimise_5() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*b*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*b?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?b*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?b?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*b?a?a?a*b*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?b*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?a?b?a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?a*b*a*\");\n }", "final /* synthetic */ void m36061b(@NonNull String str, Throwable th) throws Exception {\n C0001a.c(th, \"Failed to unmatch %s\", new Object[]{str});\n this.f29981a.showUnMatchFailure();\n }", "protected void replaceText(CharSequence text) {\n/* 564 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testOptimise_7() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a*b*)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"((a|d)*b*c?)*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(abc)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"((a*|b*)b*c*)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"((a*b*)*b*c*)*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"((ab)*b*c*)*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"((a|b)*b*|c*)*\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"((a|b)+b?|c)*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"(a*bc*)*\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"((a*|b*)+b?|c)*\");\n BasicRegexp re11 = BasicRegexp.parseRegexp(\"(abc**)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|d|b|c)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(ab|b|c)*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n // Can't optimise further\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"((a|b)+b?|c)*\");\n // Can't optimise further\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a*bc*)*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re11.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc*)*\");\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\":E<;\");\n xPathLexer0.consume((-5675));\n // Undeclared exception!\n try { \n xPathLexer0.and();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"F#VsZ=,K/\");\n xPathLexer0.consume((-3281));\n // Undeclared exception!\n try { \n xPathLexer0.mod();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Factory\r\n public static Matcher<Proc> raisesException() {\r\n return raises(IsThrowable.exception());\r\n }", "public static UnaryExpression throw_(Expression expression) { throw Extensions.todo(); }", "void mo1332e(String str, String str2, Throwable th);", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"<\");\n xPathLexer0.consume((-1311));\n // Undeclared exception!\n try { \n xPathLexer0.whitespace();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n SystemInUtil.addInputLine(\"0(u\");\n SystemInUtil.addInputLine(\"eWEzPBT{b\");\n String string0 = \"znot\";\n SystemInUtil.addInputLine(\"znot\");\n JSPredicateForm jSPredicateForm0 = null;\n try {\n jSPredicateForm0 = new JSPredicateForm(\"znot\");\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "static void fail(String message, Scanner s){\r\n\tString msg = message + \"\\n @ ...\";\r\n\tfor (int i=0; i<5 && s.hasNext(); i++){\r\n\t msg += \" \" + s.next();\r\n\t}\r\n\tthrow new ParserFailureException(msg+\"...\");\r\n }", "public GrammaticaRE(String regex) throws Exception {\n regExp = new RegExp(regex, ignoreCase);\n }", "protected String failedMatcherMessage() {\n return \"FAILED!\";\n }", "@Test\n\tvoid runRegExFoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"S(a|r|g)*on\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(30, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "private String genNonGreedyRegex(int charloc,\n String specification,\n String eolcapture,\n String nonGreedyCapture) {\n\n return (charloc == specification.length()) ? eolcapture : nonGreedyCapture;\n }", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\">>yh88W0GKz~{herR\");\n xPathLexer0.consume((-2376));\n // Undeclared exception!\n try { \n xPathLexer0.identifier();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "private\n\tRegExHelper()\n\t{\n\t\tsuper();\n\t}", "public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);", "@Test\n\tvoid getEndTransitionsAfterMinimisation_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"a|bc*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<Integer> endStates = new ArrayList<Integer>();\n\t\t\tendStates.add(1);\n\t\t\tendStates.add(2);\n\t\t\tassertEquals(endStates, a.getEnd());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "void mo1343w(String str, String str2, Throwable th);", "void assertExceptionIsThrown(\n String sql,\n String expectedMsgPattern);", "@Test\n public void test079() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Any any0 = (Any)errorPage0.hr();\n // Undeclared exception!\n try {\n Component component0 = any0.end(\"V\\\"i%{rPYE$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No corresponding component found for end expression 'V\\\"i%{rPYE$'.\n //\n }\n }", "@Override\n\t\tprotected String[] handleIrregulars(String s) {\n\t\t\treturn null;\n\t\t}", "protected void noMatch() {\n Token[] tokens = m_errorHandler.noMatch(m_current, m_prev);\n m_current = tokens[0];\n m_prev = tokens[1];\n }", "protected LogParserMatch() {\n\t}", "final /* synthetic */ void m36057a(@NonNull String str, Throwable th) {\n this.f29981a.showReportFailure();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Error reporting blocked match from chat. matchId: \");\n stringBuilder.append(str);\n C0001a.c(th, stringBuilder.toString(), new Object[0]);\n }", "void DoNothing() throws ParseException {\r\n }", "public String replaceFrom(CharSequence sequence, CharSequence replacement, CountMethod countMethod) {\n/* 165 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }", "@Given(\"^User exists with an \\\"([^\\\"]*)\\\"$\")\npublic void user_exists_with_an(String arg1) throws Throwable {\n throw new PendingException();\n}", "public static void main(String[] ignore)\r\n/* 404: */ throws InterruptedException\r\n/* 405: */ {\r\n/* 406:358 */ String arg = \"drop(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:10.300\\\").\";\r\n/* 407:359 */ arg = arg + \"drop(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:10.000\\\").\";\r\n/* 408: */ \r\n/* 409: */ \r\n/* 410: */ \r\n/* 411:363 */ arg = arg + \"throw(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:09.467\\\").\";\r\n/* 412:364 */ arg = arg + \"bounce(subject:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.933\\\", to:time \\\"2011-08-25T20:30:09.767\\\").\";\r\n/* 413: */ \r\n/* 414: */ \r\n/* 415: */ \r\n/* 416: */ \r\n/* 417: */ \r\n/* 418: */ \r\n/* 419: */ \r\n/* 420: */ \r\n/* 421: */ \r\n/* 422: */ \r\n/* 423: */ \r\n/* 424: */ \r\n/* 425: */ \r\n/* 426: */ \r\n/* 427: */ \r\n/* 428: */ \r\n/* 429: */ \r\n/* 430: */ \r\n/* 431: */ \r\n/* 432: */ \r\n/* 433:385 */ DisgustingMoebiusTranslator translator = new DisgustingMoebiusTranslator();\r\n/* 434:386 */ translator.translate(arg);\r\n/* 435:387 */ translator.commentOnAction(Long.valueOf(2000L));\r\n/* 436:388 */ Thread.sleep(2000L);\r\n/* 437:389 */ translator.commentOnAction(Long.valueOf(4000L));\r\n/* 438: */ }", "private Annotation[] testRegEx(String regEx) {\n\t\tQueriableAnnotation data = this.parent.getActiveDocument();\n\t\treturn ((data == null) ? null : Gamta.extractAllMatches(data, regEx, 64));\n\t}", "@When(\"^I execute my test case$\")\n public void iExecuteMyTestCase() throws Throwable {\n throw new PendingException();\n }", "@Test\r\n public void testAddRemoveRegexp() throws RegexpParserException {\r\n assertFalse(rs.hasRegexp(reString));\r\n rs.add(reString, a);\r\n assertTrue(rs.hasRegexp(reString));\r\n rs.remove(reString, a);\r\n assertFalse(rs.hasRegexp(reString));\r\n }", "private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }", "public void testMODIFIER4() throws Exception {\n\t\tObject retval = execLexer(\"MODIFIER\", 89, \"blah\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"MODIFIER\", expecting, actual);\n\t}", "public String replaceFrom(CharSequence sequence, CharSequence replacement) {\n/* 150 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@And(\"^I see only the pets with the status \\\"([^\\\"]*)\\\"$\")\n public void iSeeOnlyThePetsWithTheStatus(String arg0) throws Throwable {\n throw new PendingException();\n }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\" 6PR~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 2);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 1, column 2. Encountered: \\\"6\\\" (54), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public void m23078a(String str, Exception exception) {\n }", "public static UnaryExpression throw_(Expression expression, Class type) { throw Extensions.todo(); }", "@When(\"^I enter a invalid password$\")\n\tpublic void i_enter_a_invalid_password() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "public boolean match( DataExp p ) { return false; }", "public StringSearch(String pattern, String target) {\n/* 190 */ super(null, null); throw new RuntimeException(\"Stub!\");\n/* */ }", "void mo1335i(String str, String str2, Throwable th);", "public void assertNotEval(final String expression, final String textPattern);", "@Override\r\n\tpublic Node visitPatternExpr(PatternExprContext ctx) {\n\t\treturn super.visitPatternExpr(ctx);\r\n\t}", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.consume((-2013));\n // Undeclared exception!\n try { \n xPathLexer0.and();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[Sdf yy*X>HdSr %<}\");\n xPathLexer0.consume((-1189));\n // Undeclared exception!\n try { \n xPathLexer0.or();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }" ]
[ "0.6143404", "0.60235274", "0.5956244", "0.593987", "0.57107705", "0.56626576", "0.5577618", "0.5563184", "0.55629957", "0.5553213", "0.555202", "0.55166316", "0.5508768", "0.5465734", "0.54375887", "0.5423701", "0.5396533", "0.5386623", "0.53690207", "0.5368862", "0.53575754", "0.5345903", "0.53454506", "0.53396213", "0.52980846", "0.52859676", "0.5267422", "0.52651083", "0.5258389", "0.52521604", "0.5249223", "0.5245094", "0.5161472", "0.5147727", "0.51404554", "0.5137284", "0.51261395", "0.51250875", "0.5119643", "0.5118382", "0.5116419", "0.5101119", "0.5097066", "0.50835526", "0.50774693", "0.50610155", "0.5045439", "0.5039615", "0.503011", "0.50264937", "0.50177705", "0.5017001", "0.5015185", "0.5013653", "0.5003383", "0.49960837", "0.49935707", "0.49890193", "0.4984578", "0.4980356", "0.49764106", "0.49562982", "0.49536902", "0.49400786", "0.49378118", "0.49295086", "0.4924271", "0.491633", "0.49119347", "0.49041444", "0.48923403", "0.4890045", "0.48898715", "0.48874578", "0.48849317", "0.48730728", "0.48626417", "0.4845005", "0.48424512", "0.4838822", "0.4833082", "0.48318765", "0.4831053", "0.482871", "0.48273498", "0.48267326", "0.48263204", "0.48224553", "0.4820421", "0.4815298", "0.48059875", "0.48039007", "0.48032293", "0.48023796", "0.48022282", "0.47995076", "0.4799366", "0.47991836", "0.47963923", "0.47928607", "0.47882277" ]
0.0
-1
Express the Regexp above with the code you wish you had
@Given("^Car owner enter Location as \"([^\"]*)\" and time as \"([^\"]*)\"$") public void Car_owner_enter_Location_as_and_time_as(String arg1, String arg2) throws Throwable { throw new PendingException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}", "protected abstract Regex pattern();", "public interface RegExp {\n String NUMBER_OF_COMPOSITION = \"^[1-2][0-9]|[1-9]$\";\n String BREAK_DATE_BY_DOT = \"[.]\";\n String IDENTIFY_BUMDLE = \"^([E|e][N|n])|[У|у][К|к][Р|р]$\";\n String DURATION = \"^[1-9]|[1-9][0-9]|[1-4][0-9][0-9]$\";\n}", "public interface RegExp {\n String NAME_REGEXP = \"^[А-Я][а-я]{2,30}$\";\n String AGE_REGEXP = \"^((1[012][0-9])|([1-9][0-9]))$\";\n String EMAIL_REGEXP = \"^[-z0-9_.]{1,30}@([A-z]+[A-z0-9]{1,15}.){1,2}([A-z]+[A-z0-9]{1,15})$\";\n String CELL_PHONE_REGEXP = \"([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|\" +\n \"(\\\\d{3}))[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{2}[\\\\s-]?\\\\d{2}$\";\n String CELL_PHONE_OPTIONAL_REGEXP = \"^(([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|\" +\n \"(\\\\d{3}))[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{2}[\\\\s-]?\\\\d{2})?\";\n String LOCAL_PHONE_REGEXP = \"^([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|(\\\\d{3}))?[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{3}$\";\n String COMMENT_REGEXP = \"^([\\\\d\\\\s\\\\w\\\\.\\\\,\\\\!]){0,127}$\";\n String GROUP_REGEXP = \"^[А-я]{4,10}$\";\n String SKYPE_NICK_REGEXP = \"^[\\\\w\\\\d\\\\_]{3,20}$\";\n String INDEX_REGEXP = \"^[\\\\d]{8}$\";\n String CITY_STREET_REGEXP = \"^[А-Я][а-я]{3,20}$\";\n String BUILDING_REGEXP = \"^[\\\\d]{1,3}[\\\\w]?$\";\n String FLAT_REGEXP = \"^[\\\\d]{1,3}$\";\n}", "@Override\n protected void compileRegex(String regex) {\n }", "private static String adaptRegEx(Mode mode, String regex, int flagMask, boolean removeWhitespace)\n throws QueryException {\n StringBuilder sb = new StringBuilder();\n boolean escaped = false;\n boolean groupStart = false;\n int completeGroups = 0;\n int backRef = 0;\n int charClassDepth = 0;\n int groupDepth = 0;\n\n for (char c : regex.toCharArray()) {\n if (escaped) {\n if (backRef == 0 && c == '0') {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Reference to group 0 not allowed\");\n } else if (c >= '0' && c <= '9') {\n if (charClassDepth > 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back references in character class expressions\" + \" are disallowed.\");\n }\n backRef = backRef * 10 + Integer.parseInt(Character.toString(c));\n continue;\n }\n }\n\n if (backRef > 0) {\n // Check back reference that just ended\n if (backRef > completeGroups) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back reference to nonexisting or unfinished group.\");\n } else {\n backRef = 0;\n escaped = false;\n }\n }\n\n if (c == '\\\\' && !escaped) {\n // Not preceded by backslash\n escaped = true;\n groupStart = false;\n continue;\n }\n\n if (c == '(' && !escaped) {\n groupStart = true;\n groupDepth++;\n escaped = false;\n continue;\n }\n\n if (c == '?' && !escaped && groupStart) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Pure groups are not supported in XQuery regular expressions.\");\n } else if (c == ')' && !escaped) {\n if (--groupDepth < 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Invalid sequence of brackets.\");\n }\n completeGroups++;\n } else if (c == '[' && !escaped) {\n charClassDepth++;\n } else if (c == ']' && !escaped) {\n if (--charClassDepth < 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Invalid sequence of brackets.\");\n }\n } else if (removeWhitespace) {\n // Remove whitespace outside of character classes\n if (charClassDepth == 0 && WHITESPACE.contains(c)) {\n // Don't touch boolean flags\n continue;\n }\n\n sb.append(c);\n }\n\n groupStart = false;\n escaped = false;\n }\n\n // Check for trailing '\\' (only valid with subsequent characters)\n if (escaped && backRef == 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Trailing backslash character in pattern.\");\n }\n\n // Check back reference if that was last token in pattern\n if (backRef > 0 && backRef > completeGroups) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back reference to nonexisting or unfinished group.\");\n }\n\n // Check for dangling brackets\n if (charClassDepth != 0 || groupDepth != 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Pattern contains dangling brackets.\");\n }\n\n if (!removeWhitespace) {\n sb.append(regex);\n }\n\n if (mode == Mode.MATCH) {\n // Adapt for XQuery substring matching by extending pattern\n if (sb.charAt(0) != '^' || ((flagMask & Pattern.MULTILINE) == Pattern.MULTILINE)) {\n if ((flagMask & Pattern.DOTALL) == Pattern.DOTALL) {\n sb.insert(0, \".*\");\n } else {\n sb.insert(0, \"(?s:.*)\");\n }\n }\n\n if (sb.charAt(sb.length() - 1) != '$' || ((flagMask & Pattern.MULTILINE) == Pattern.MULTILINE)) {\n if ((flagMask & Pattern.DOTALL) == Pattern.DOTALL) {\n sb.append(\".*\");\n } else {\n sb.append(\"(?s:.*)\");\n }\n }\n }\n\n return sb.toString();\n }", "private String parseRegExp(String exp) throws Exception {\r\n\t\treturn RegexpTranslationHelper.translateANTLRToAutomatonStyle(exp);\r\n\t}", "java.lang.String getRegex();", "java.lang.String getRegex();", "private String regex(Edge e) {\n return EdgeWriter.toRegex(e, false /* use dot match */);\n }", "private\n\tRegExHelper()\n\t{\n\t\tsuper();\n\t}", "public boolean match( DataExp p ) { return false; }", "public String getRegEx();", "@Test\n\tvoid testFormattedRE() {\n\t\tRegularLanguage rl[] = new RegularLanguage[lengthToFormatRE]; \n\t\tint i = 0;\n\t\tfor (String re : toFormatRE) {\n\t\t\trl[i++] = RegularExpression.isValidRE(re);\n\t\t}\n\t\t// Verify if all objects were created\n\t\tfor (RegularLanguage re : rl) {\n\t\t\tif (re.equals(null)) {\n\t\t\t\tfail(); // object couldn't be created\n\t\t\t}\n\t\t}\n\n\t\t// a***** -> a*\n\t\tassertEquals(\"a*\", rl[0].getRE().getFormattedRegex());\n\t\t// aa????? -> a?\n\t\tassertEquals(\"a?\", rl[1].getRE().getFormattedRegex());\n\t\t// a+++++ -> a+\n\t\tassertEquals(\"a+\", rl[2].getRE().getFormattedRegex());\n\t\t// a?*?*?***???* -> a*\n\t\tassertEquals(\"a*\", rl[3].getRE().getFormattedRegex());\n\t\t// a?+?+?+++???+ -> a*\n\t\tassertEquals(\"a*\", rl[4].getRE().getFormattedRegex());\n\t\t// a*+*+*++++***+* -> a*\n\t\tassertEquals(\"a*\", rl[5].getRE().getFormattedRegex());\n\t\t// a?+*?+?***???+++***?+?*+* -> a*\n\t\tassertEquals(\"a*\", rl[6].getRE().getFormattedRegex());\n\t\t\t\n\t}", "public void caseARegExpBasic(ARegExpBasic node)\n {\n buffer.append('(');\n node.getRegExp().apply(this);\n buffer.append(')');\n }", "private JBurgPatternMatcher()\n\t{\n\t}", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "public String getRegex();", "protected abstract Matcher<? super ExpressionTree> specializedMatcher();", "@Override\n public R visit(RegexExpression n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n n.expression.accept(this, argu);\n n.nodeToken2.accept(this, argu);\n n.expression1.accept(this, argu);\n n.nodeOptional.accept(this, argu);\n n.nodeToken3.accept(this, argu);\n return _ret;\n }", "public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }", "@Test\n public void testParseRegexp_valid6() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"ab(cd(e))ff\");\n assertEquals(re.toString(), \"abcdeff\");\n }", "@Override\r\n\tpublic Node visitPatternExpr(PatternExprContext ctx) {\n\t\treturn super.visitPatternExpr(ctx);\r\n\t}", "public RegularExpression() {\n }", "@Test\n public void testOptimise_2() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a+++++++++++++++++++++\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a+\");\n }", "public static Term createRegExp(Expression exp) {\r\n\t\tTerm term = Term.function(REGEX, exp);\r\n\t\treturn term;\r\n\t}", "@Override\n\tpublic void visit(RegExpMySQLOperator arg0) {\n\t\t\n\t}", "public static void TestRegex()\n\t{\n\t String line = \" if( aaa&&(ypbreg))\";\n\t String pattern = \"(&&)\\\\s*\\\\(*\\\\s*!?ypbreg\\\\)*\";\n\t // Create a Pattern object\n\t Pattern r = Pattern.compile(pattern);\n\t System.out.println(line.contains(pattern));\n\t // Now create matcher object.\n\t Matcher m = r.matcher(line);\n\t if (m.find( )) {\n\t // System.out.println(\"Found value: \" + m.group(0) );\n\t int count = m.groupCount();\n\t System.out.println(\"group count is \"+count);\n\t for(int i=0;i<count;i++){\n\t System.out.println(m.group(i));\n\t }\n\t // System.out.println(line.replaceFirst(BregPattern.pEqualTrue1, \"!$1\"));\n\n\t } else {\n\t System.out.println(\"NO MATCH\");\n\t }\n\t}", "private PatternExpression patternExpression(PatternExpression p, \n Expression exp)\n {\n exp = transform(exp);\n if (p instanceof PatternExpression.IdentifierPatternExp)\n {\n PatternExpression.IdentifierPatternExp p0 =\n (PatternExpression.IdentifierPatternExp)p;\n return new PatternExpression.IdentifierPatternExp(p0.ident, exp);\n }\n if (p instanceof PatternExpression.ApplicationPatternExp)\n {\n PatternExpression.ApplicationPatternExp p0 =\n (PatternExpression.ApplicationPatternExp)p;\n List<AST.Parameter> params =\n new ArrayList<AST.Parameter>(Arrays.asList(p0.params));\n return new PatternExpression.ApplicationPatternExp(p0.ident, params, exp);\n }\n return new PatternExpression.DefaultPatternExp(exp);\n }", "@Test\n public void testParseRegexp_correctness1new()\n throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n assertEquals(re.toString(), \"(01|10)*1111\");\n }", "private String getMatchPattern(String pattern) {\n String mandatoryPart = pattern.trim().replaceAll(\"(\\\\s+?)\\\\[.+?\\\\]\", \"($1.+?(\\\\\\\\s|\\\\$))*\");\n mandatoryPart = mandatoryPart.replaceAll(\"\\\\s+\", \"\\\\\\\\s+\");\n return mandatoryPart.replaceAll(\"<.+?>\", \".+?\");\n }", "@Test\n public void testOptimise_3() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*a*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*a?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?a?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*a?a?a?a*a*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "public RegExp (final int type)\n {\n this.type = type;\n }", "com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex();", "private NFA regEx() {\n NFA term = term();\n\n //If the regex requires a union operation\n if (more() && peek() == '|') {\n\n eat('|');\n NFA regex = regEx();\n return union(term, regex);\n //If no union is needed, just return the NFA\n } else {\n return term;\n }\n }", "@Test\n public void testOptimise_8() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(b|a)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(c|d)*|(d|c)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|d)*\");\n\n }", "public Expression setRegexTest(Expression exp, Expression test){\r\n\t\tregexExpr.put(exp, test);\r\n\t\tExpression tt = Term.function(Term.TEST);\r\n\t\ttt.setExpr(test);\r\n\t\tExpression seq = sequence(exp, tt);\r\n\t\treturn seq;\r\n\t}", "public void caseARegExp(ARegExp node)\n {\n Iterator<PConcat> iter = node.getConcats().iterator();\n iter.next().apply(this);\n\n // further PConcat nodes are unioned (| operator) together\n while (iter.hasNext()) {\n buffer.append('|');\n iter.next().apply(this);\n }\n }", "public static void main(String[] args) {\n\t\t Pattern p = Pattern.compile(\"(a+)\");\r\n\t\t Matcher m = p.matcher(\"aaaaaba\");\r\n\t\t //System.out.println(m.matches())\r\n\t\t m.find();\t\t \r\n\t\t m.find();\r\n\t\t System.out.println(\"grCount \"+m.groupCount());\t \r\n\t\t MatchResult mr = m.toMatchResult();\r\n\t\t \r\n\t\t System.out.println(m.end());\r\n\t\t System.out.println(\"'\"+mr.group()+\"'\");\r\n\t\t System.out.println(\"start \"+mr.start(1));\r\n\t\t \r\n\t}", "@Override\n public String visit(PatternExpr n, Object arg) {\n return null;\n }", "public static void matchMaker()\n {\n \n }", "@Override\n\tpublic boolean test(MyRegex t) {\n\t\treturn false;\n\t}", "@Test\n public void testOptimise_5() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*b*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*b?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?b*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?b?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*b?a?a?a*b*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?b*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?a?b?a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?a*b*a*\");\n }", "@Test\n public void testOptimise_6() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a|a|b\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"b|a|a\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(b|b)*|(a|a)*|a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(c|b|b)*|(a|a)*|a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a*b*|a*b*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a|b\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b|a\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b*|a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|b)*|a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n }", "@Test\n public void testParseRegexp_valid3() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"a b c d\");\n assertEquals(re.toString(), \"abcd\");\n }", "RegExConstraint createRegExConstraint();", "@Test\n public void testOptimise_1() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a**\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a+*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a*+\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a*********************\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a++++++++++++++++++++*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"a????????????????????*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"a********************?\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"a+?*+?*+?*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"a+?\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"a?+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "@Test\n public void macroParseTest1() throws TapisException\n {\n var s = \"$varname\";\n var m = _pattern.matcher(s);\n var b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"varname\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname ,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n\n s = \"$varname,\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n }", "@Test\n public void testOptimise_4() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)+\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)?\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n }", "private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }", "@Test(expected = InvalidRegexpException.class)\n public void testParseRegexp_invalid8() throws Throwable {\n BasicRegexp.parseRegexp(\"()\");\n }", "@Test\n public void testParseRegexp_valid7() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"abc*def\");\n assertEquals(re.toString(), \"abc*def\");\n }", "public GrandChildOfStringMatch() {}", "@Test\n\tvoid runRegExNoOperands_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Sargon\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "protected String hookGetRegex() \r\n\t{\n\t\treturn \"\\\\s+\"; \r\n\t}", "@Test\n public void testOptimise_7() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a*b*)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"((a|d)*b*c?)*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(abc)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"((a*|b*)b*c*)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"((a*b*)*b*c*)*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"((ab)*b*c*)*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"((a|b)*b*|c*)*\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"((a|b)+b?|c)*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"(a*bc*)*\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"((a*|b*)+b?|c)*\");\n BasicRegexp re11 = BasicRegexp.parseRegexp(\"(abc**)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|d|b|c)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(ab|b|c)*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n // Can't optimise further\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"((a|b)+b?|c)*\");\n // Can't optimise further\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a*bc*)*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re11.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc*)*\");\n }", "@Override\n\tpublic void visit(Matches arg0) {\n\t\t\n\t}", "private Annotation[] testRegEx(String regEx) {\n\t\tQueriableAnnotation data = this.parent.getActiveDocument();\n\t\treturn ((data == null) ? null : Gamta.extractAllMatches(data, regEx, 64));\n\t}", "@Override\n public boolean isRegex() {\n return false;\n }", "private static String orderRegexpPattern(String regexp)\n {\n // convert expression to pattern\n StringBuffer pattern = null;\n for (int i = 0, limit = regexp.length(); (i < limit); i++)\n {\n char regexpChar = regexp.charAt(i);\n switch (regexpChar)\n {\n case '*':\n case '.':\n case '?':\n case '[':\n if (pattern == null)\n {\n pattern = new StringBuffer(regexp.length()*2);\n pattern.append(regexp.substring(0, i));\n }\n switch (regexpChar)\n {\n case '*':\n pattern.append(\"[^\"+Folder.PATH_SEPARATOR+\"]*\");\n break;\n case '.':\n pattern.append(\"\\\\.\");\n break;\n case '?':\n pattern.append(\"[^\"+Folder.PATH_SEPARATOR+\"]\");\n break;\n case '[':\n pattern.append('[');\n break;\n }\n break;\n default:\n if (pattern != null)\n {\n pattern.append(regexpChar);\n }\n break;\n }\n }\n\n // return converted pattern\n if (pattern != null)\n return pattern.toString();\n return regexp;\n }", "@Test\n public void testDebugPrintBasicRegexp() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n BasicRegexp.debugPrintBasicRegexp(0, re1);\n }", "private String regex() {\n final List<String> keys = new LinkedList<>();\n for (final String key : this.template.split(\"\\\\.\")) {\n if (key.equals(\"*\")) {\n keys.add(\"\\\\w+\");\n } else {\n keys.add(key);\n }\n }\n return String.join(\"\\\\.\", keys);\n }", "public ArticleForAnnotation FindFekRegex(ArticleForAnnotation curArticle) throws Exception {\n // Regular expression to be matched\n// Pattern FekPattern = Pattern.compile(\"((\\\\d+\\\\w{1,2}? +)?[νΝ]\\\\. ?\\\\d+/\\\\d+( *\\\\([Α-Ωα-ω]{1,2}[΄΄'’]? ?\\\\d+\\\\))?)\", Pattern.UNICODE_CASE);\n // Matches Laws and POs (ΠΔ)\n// Pattern FekPattern = Pattern.compile(\"(((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+( *\\\\((ΦΕΚ )?[Α-Ωα-ω]{1,2}[΄`΄'’]? ?\\\\d+((\\\\/|, ?)(\\\\d|\\\\.|-)*)?\\\\))?)\", Pattern.UNICODE_CASE);\n Pattern FekPattern = Pattern.compile(\"(((άρθ[α-ω\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*παρ[α-ωά\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*)|(παρ[α-ωά\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*άρθ[α-ω\\\\.]{0,4} ?\\\\d+,? [Α-Ωα-ω0-9, ]*))?((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+( *\\\\((ΦΕΚ )?[Α-Ωα-ω]{1,2}[΄`΄'’]? ?\\\\d+((\\\\/|, ?)(\\\\d|\\\\.|-)*)?\\\\))?)\", Pattern.UNICODE_CASE);\n Pattern LawPattern = Pattern.compile(\"((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+\", Pattern.UNICODE_CASE);\n // Start searching article text\n String articText = curArticle.articleText;\n Matcher m = FekPattern.matcher(articText);\n while (m.find()) {\n String entityFound = m.group(0);\n\n Matcher mLaw = LawPattern.matcher(entityFound);\n if (!mLaw.find()) {\n continue;\n }\n String entityLaw = mLaw.group(0);\n\n String[] FEKparts = entityFound.split(\"/\", 2);\n int startIndex = m.start();\n int endIndex = m.end();\n String FEK_year = \"\";\n String FEK_issue = \"\";\n String FEK_number = null;\n String urlpdf = \"\";\n String entity_Type = \"fek\";\n\n // Get the second part from a FEK annotation (e.g. from ν. 2873/2000 (Α’ 285) the 2000 (Α’ 285) part)\n // and check if FEK issue and number exist (inside parenthesis)\n if (FEKparts[1].contains(\"(\")) {\n // Check inside that part for mached accent characters (΄ or ' or ’)\n // and if so, we get from this string the FEK issue (e.g. A) and FEK number\n FEK_year = FEKparts[1].substring(0, FEKparts[1].lastIndexOf(\"(\")).trim();\n if (FEKparts[1].contains(\"΄\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"΄\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"΄\"), FEKparts[1].lastIndexOf(\")\")).replace(\"΄\", \"\").trim();\n } else if (FEKparts[1].contains(\"'\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"'\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"'\"), FEKparts[1].lastIndexOf(\")\")).replace(\"'\", \"\").trim();\n } else if (FEKparts[1].contains(\"’\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"’\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"’\"), FEKparts[1].lastIndexOf(\")\")).replace(\"’\", \"\").trim();\n } else if (FEKparts[1].contains(\"`\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"`\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"`\"), FEKparts[1].lastIndexOf(\")\")).replace(\"`\", \"\").trim();\n } else {\n // If doesn't contain on of these characters then we check for space\n // else we get the first character as the FEK issue (e.g. A, B etc)\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\")\")).trim().replace(\"(\", \"\").replace(\")\", \"\");\n if (FEK_issue.startsWith(\"ΦΕΚ \")) {\n FEK_issue = FEK_issue.substring(4);\n } else if (FEK_issue.startsWith(\"ΦΕΚ\")) {\n FEK_issue = FEK_issue.substring(3);\n }\n\n if (FEK_issue.contains(\" \")) {\n String[] splitedIssue = FEK_issue.split(\" \");\n FEK_issue = splitedIssue[0];\n FEK_number = splitedIssue[1];\n } else {\n FEK_number = FEK_issue.substring(1);\n FEK_issue = FEK_issue.substring(0, 1);\n }\n }\n if (FEK_issue.startsWith(\"ΦΕΚ \")) {\n FEK_issue = FEK_issue.substring(4);\n }\n String[] FEK_num_tokens = FEK_number.split(\"(\\\\/|-| |,)\");\n\n FEK_number = FEK_num_tokens[0];\n\n // Set the corresponding issue checkbox based on the FEK issue retrieved above\n String checkBoxIssue = \"\";\n switch (FEK_issue) {\n case \"Α\":\n checkBoxIssue = \"chbIssue_1\";\n break;\n case \"Β\":\n checkBoxIssue = \"chbIssue_2\";\n break;\n case \"Γ\":\n checkBoxIssue = \"chbIssue_3\";\n break;\n case \"Δ\":\n checkBoxIssue = \"chbIssue_4\";\n break;\n case \"\":\n checkBoxIssue = \"\";\n break;\n }\n\n // Perform the POST request\n PostRequestFEK httpRequest = new PostRequestFEK();\n // Get the corresponding pdf url of the FEK\n urlpdf = httpRequest.sendPost3(FEK_year, FEK_issue, FEK_number, checkBoxIssue);\n// if (urlpdf.length() == 0) {\n// urlpdf = \"-1\";\n// }\n } else {\n FEK_year = FEKparts[1];\n String[] toks = entityLaw.split(\"(\\\\.|,| |\\\\/)\");\n if (entityLaw.toLowerCase().startsWith(\"ν\")) {\n entity_Type = \"law\";\n } else if (entityLaw.toLowerCase().startsWith(\"π\")) {\n entity_Type = \"pd\";\n }\n String item_number = toks[toks.length - 2];\n PostRequestFEK httpRequest = new PostRequestFEK();\n urlpdf = httpRequest.sendPost4(FEK_year, item_number, entity_Type);\n }\n // Add the current annotation found into the current article's annotations list\n Annotation currentAnnotation = new Annotation(entityFound, startIndex, endIndex, urlpdf, entity_Type, entityLaw);\n curArticle.annotations.add(currentAnnotation);\n }\n // Return the article back to the process\n return curArticle;\n }", "static ConscellNode parse_re(int level) throws IOException {\n if(level == 0) {\n cout.printf(\"%nProcessing Expression: \\\"%s\\\"%n\", curr_line);\n }\n ConscellNode root = new ConscellNode(parse_simple_re(level + 1), \"RE\", level);\n ConscellNode last = root;\n\n while (curr_type == TokenType.VERT) {\n match(TokenType.VERT);\n last.setNext(new ConscellNode(parse_simple_re(level + 1), \"VERT\", level + 1));\n last = last.getNext();\n }\n return root;\n }", "String getRegExpLikeOperator(String column, String regexp);", "public Pattern buildPattern ()\n {\n int flags = 0;\n if ( this.canonicalEquivalence ) flags += Pattern.CANON_EQ;\n if ( this.caseInsensitive ) flags += Pattern.CASE_INSENSITIVE;\n if ( this.comments ) flags += Pattern.COMMENTS;\n if ( this.dotall ) flags += Pattern.DOTALL;\n if ( this.multiline ) flags += Pattern.MULTILINE;\n if ( this.unicodeCase ) flags += Pattern.UNICODE_CASE;\n if ( this.unixLines ) flags += Pattern.UNIX_LINES;\n return Pattern.compile(this.regex, flags);\n }", "public static void main(String[] args) {\n Pattern p = Pattern.compile(\"2*5?$\");\n Matcher m = p.matcher(regex1);\n if (m.matches()) {\n System.out.println(\"YES ¦ \");\n } else {\n System.out.println(\"NO\");\n }\n\n }", "private String genNonGreedyRegex(int charloc,\n String specification,\n String eolcapture,\n String nonGreedyCapture) {\n\n return (charloc == specification.length()) ? eolcapture : nonGreedyCapture;\n }", "public abstract String getRegexTableMarker();", "public static String createRegularExpression(AutomatonSpecification automaton) {\n String regexp = \"\";\n State initial = automaton.getInitialState();\n List<State> finalStates = new LinkedList<State>();\n\n for (State state : automaton.allStates()) {\n transitionLabels.put(hashOf(state, state), \"\");\n }\n\n String label;\n List<State> next; //lista tymczasowa.\n List<State> previous; //lista tymczasowa.\n for (State state : automaton.allStates()) {\n next = new LinkedList<State>();\n for (OutgoingTransition out : automaton.allOutgoingTransitions(state)) {\n State target = out.getTargetState();\n if (!next.contains(target)) {\n next.add(target);\n if (previousStates.containsKey(target)) {\n previous = previousStates.get(target);\n previous.add(state);\n previousStates.put(target, previous);\n } else {\n previous = new LinkedList<State>();\n previous.add(state);\n previousStates.put(target, previous);\n }\n label = out.getTransitionLabel().toString();\n for (char character : SPECIAL_CHARACTERS)\n if (label.charAt(0) == character)\n label = QUOTE + label;\n } else {\n label = transitionLabels.get(hashOf(state, target)) + '|';\n StringBuffer buf = new StringBuffer();\n for (char character : SPECIAL_CHARACTERS)\n if (out.getTransitionLabel().toString().charAt(0) == character) {\n buf.append(QUOTE);\n break;\n }\n label = label + buf.toString() + out.getTransitionLabel().toString();\n }\n transitionLabels.put(hashOf(state, target), label);\n }\n nextStates.put(state, next);\n if (automaton.isFinal(state))\n finalStates.add(state);\n }\n\n for (State state : automaton.allStates()) {\n if (!automaton.isFinal(state) && state != initial) {\n remove(state);\n }\n }\n\n String r, s, u, t, reg;\n for (State state : finalStates) {\n transitionLabelsBackup = new HashMap<String, String>(transitionLabels);\n previousBackup = new HashMap<State, List<State>>();\n for (State prevState : previousStates.keySet()) {\n previous = new LinkedList<State>();\n for (State st : previousStates.get(prevState))\n previous.add(st);\n previousBackup.put(prevState, previous);\n }\n nextBackup = new HashMap<State, List<State>>();\n for (State prevState : nextStates.keySet()) {\n next = new LinkedList<State>();\n for (State st : nextStates.get(prevState))\n next.add(st);\n nextBackup.put(prevState, next);\n }\n\n for (State toRemove : finalStates) {\n if (state != toRemove && toRemove != initial)\n remove(toRemove);\n }\n if (state == initial) {\n if (regexp.equals(\"\")) {\n if (transitionLabels.get(hashOf(state, state)).equals(\"\"))\n regexp = \"(\\u03B5)\";\n else\n regexp = \"(\" + transitionLabels.get(hashOf(state, state)) + \")*\";\n } else\n regexp = regexp + \"|\" + \"(\" + transitionLabels.get(hashOf(state, state)) + \")*\";\n } else {\n r = getLabel(initial, initial);\n s = getLabel(initial, state);\n u = getLabel(state, state);\n t = getLabel(state, initial);\n if (r.length() > 0) {\n if (t.length() > 0)\n reg = \"(\" + r + \"|\" + \"(\" + s + \")\" + \"(\" + u + \")*\" + \"(\" + t + \")\" + \")*\"\n + \"(\" + s + \")\" + \"(\" + u + \")*\";\n else\n reg = \"(\" + r + \")*\" + \"(\" + s + \")\" + \"(\" + u + \")*\";\n } else {\n if (t.length() > 0)\n reg = \"((\" + s + \")\" + \"(\" + u + \")*\" + \"(\" + t + \")\" + \")*\" + \"(\" + s + \")\"\n + \"(\" + u + \")*\";\n else\n reg = \"(\" + s + \")\" + \"(\" + u + \")*\";\n }\n if (regexp.equals(\"\"))\n regexp = reg;\n else\n regexp = regexp + \"|\" + reg;\n }\n previousStates.clear();\n previousStates.putAll(previousBackup);\n nextStates.clear();\n nextStates.putAll(nextBackup);\n transitionLabels.clear();\n transitionLabels.putAll(transitionLabelsBackup);\n }\n\n regexp = fixKleene(fixBrackets(regexp));\n\n return regexp.replace(String.valueOf(QUOTE), \"\\\\\");\n }", "public static void main(String[] args) {\r\n\t\t boolean matches_1 = Pattern.matches(\"[a-zA-Z0-9]{4}\", \"0Aa1\");\r\n\t\t boolean matches_2 = Pattern.matches(\"[a-zA-Z0-9]{4}\", \"0A@a1\");\r\n\t\t\t System.out.println(\"Regular Expression is \"+matches_1 +\" for given string(0Aa1)\");\r\n\t\t\t System.out.println(\"Regular Expression is \"+matches_2 +\" for given string(0A@a1)\");\r\n\t}", "@Override public boolean\r\n matches(String regex, CharSequence input) {\n return false;\r\n }", "public void addPattern(TokenPattern pattern) throws Exception {\n RE[] temp = regExps;\n RE re;\n\n re = new JavaRE(pattern.getPattern());\n regExps = new RE[temp.length + 1];\n System.arraycopy(temp, 0, regExps, 0, temp.length);\n regExps[temp.length] = re;\n pattern.setDebugInfo(\"native Java regexp\");\n super.addPattern(pattern);\n }", "public boolean match( ElementExp p ) { return false; }", "@Override\n\tpublic void visit(Matches arg0) {\n\n\t}", "static Extractor byRegex(String format, Object... args) {\n\t\t\treturn byRegex(RegexUtil.compile(format, args));\n\t\t}", "private NFA factor() {\n NFA base = base();\n //if the regex is longer and the next char is star operator\n while (more() && peek() == '*') {\n eat('*');\n base = star(base);\n }\n return base;\n }", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "private static String replaceAll(Matcher matcher, String rep) {\n try {\n StringBuffer sb = null ; // Delay until needed\n while(matcher.find()) {\n if ( sb == null )\n sb = new StringBuffer() ;\n else {\n // Do one match of zerolength string otherwise filter out.\n if (matcher.start() == matcher.end() )\n continue ;\n }\n matcher.appendReplacement(sb, rep);\n }\n if ( sb == null )\n return null ;\n matcher.appendTail(sb);\n return sb.toString();\n } catch (IndexOutOfBoundsException ex) {\n throw new ExprEvalException(\"IndexOutOfBounds\", ex) ;\n }\n }", "void matchStart();", "public String buildTagRegex() {\n return buildTagRegex(\"(.+?)\", true);\n }", "public static void main(String[] args) throws Exception {\n String patronA = \"[0-5]\";\n\n // conjunto de letras de \"a\" a \"c\"\n String patronB = \"[a-c]\";\n\n // conjunto de todas las letras minusculas\n String patronC = \"[a-z]\";\n\n // conjunto de numeros\n String patronD = \"[0-9]\";\n\n // ejemplo con tipo de dato string\n String textoAlfanumerico = \"0123aaaa\";\n System.out.println(\"Texto alfanumerico:\" + textoAlfanumerico);\n\n String replace1 = textoAlfanumerico.replaceAll(patronA, \"X\");\n System.out.println(\"Reemplazo de numeros con X: \" + replace1);\n\n String replace2 = textoAlfanumerico.replaceAll(patronB, \"X\");\n System.out.println(\"Reemplazo de letras con X: \" + replace2);\n\n\n //[0-5][a-c];\n //String patronComplejo = patronA + patronB;\n\n //[a-c]*[0-5]*\n //String patronComplejo = patronA + \"*\" + patronB + \"*\";\n\n //\"[a-z]+\"\n\n // + = una coincidencia\n // * = ninguna o muchas\n\n //String patronComplejo = \"(\" + patronA + patronC + \")+\";\n String patronComplejo = \"(\" + patronC + \")+\";\n\n String texto = \"hola, aacc este bbcc es mi 55222aaa texto 2663aaaa blah blah\";\n System.out.println(\"patron complejo:\" + patronComplejo);\n System.out.println(texto);\n\n Pattern pattern = Pattern.compile(patronComplejo);\n Matcher matcher = pattern.matcher(texto);\n\n // buscar ocurrencias\n while (matcher.find()) {\n System.out.println(\"Encontrado:\" + matcher.group());\n }\n\n\n }", "public GrammaticaRE(String regex) throws Exception {\n regExp = new RegExp(regex, ignoreCase);\n }", "public RegexPatternBuilder ()\n {\n this.regex = null;\n }", "@Test\r\n public void testAddRemoveRegexp() throws RegexpParserException {\r\n assertFalse(rs.hasRegexp(reString));\r\n rs.add(reString, a);\r\n assertTrue(rs.hasRegexp(reString));\r\n rs.remove(reString, a);\r\n assertFalse(rs.hasRegexp(reString));\r\n }", "void replaceRegex() {\n int index = -1;\n for (int i = 0; i < regex.elist.size(); i++) {\n if (regex.elist.get(i).isShareableUnit) {\n ElementShareableUnit share = (ElementShareableUnit) regex.elist.get(i);\n if (share.share == this) {\n index = i;\n }\n }\n }\n //replace in parenthesis\n for (int i = 0; i < regex.elist.size(); i++) {\n Element e = regex.elist.get(i);\n if (e.isParentheis) {\n e.replaceRegex(this);\n }\n\n }\n if (index == -1) {\n System.out.println(\"there is error \" + this.getString());\n } else {\n regex.elist.remove(index);\n for (int i = 0; i < this.lelement.size(); i++) {\n regex.elist.add(index + i, this.lelement.get(i));\n }\n }\n //System.out.println(\"After: \" + this.regex.getString());\n }", "private String genRegex(int charLoc, String captureToken, String specification) throws PatternBuilderException {\n\n //Remove leading digits from string before retrieving capture type\n String strippedLeadingDigits = StringUtil.dropWhile(Character::isDigit,captureToken);\n\n switch (CaptureType.getType(strippedLeadingDigits)) {\n case DEFAULT:\n return genNonGreedyRegex(charLoc,specification,\n RegexPatterns.EOL_CAPTURE.getPattern(),\n RegexPatterns.NON_GREEDY.getPattern());\n case GREEDY:\n return RegexPatterns.GREEDY.getPattern();\n case WHITESPACE:\n return genWhiteSpaceRegex(\n Integer.parseInt(\n StringUtil.dropWhile(Character::isAlphabetic, strippedLeadingDigits)\n ),\n RegexPatterns.VARIABLE_WHITESPACE.getPattern(),\n RegexPatterns.ZERO_WHITESPACE.getPattern());\n\n case UNKNOWN: default:\n throw new PatternBuilderException(String.format(\"Unable to generate regex from %s\", captureToken));\n }\n }", "@BeforeEach\n\tvoid setUpValidRE(){\n\t\tvalidRE= new String[lengthValid];\n\t\t// ab\n\t\tvalidRE[0] = \"ab\";\n\t\t// (ab)\n\t\tvalidRE[1] = \"(ab)\";\n\t\t//(ab)*\n\t\tvalidRE[2] = \"(ab)*\";\n\t\t// a???\n\t\tvalidRE[3] = \"a???\";\n\t\t// a***\n\t\tvalidRE[4] = \"a***\";\n\t\t// a+++\n\t\tvalidRE[5] = \"a+++\";\n\t\t// (((a)))\n\t\tvalidRE[6] = \"(((a)))\";\n\t\t// (a | ab | c*)*\n\t\tvalidRE[7] = \"(a | ab | c*)*\";\n\t\t// (a | ab | c*)**??\n\t\tvalidRE[8] = \"(a | ab | c*)*??\";\n\t\t// ( a | (ab | cd)+ )+\n\t\tvalidRE[9] = \"(a | (ab | cd)+)+\";\n\t\t// 0 (01 | (02) * | (03)++) | (1?01?)\n\t\tvalidRE[10] = \"0 (01 | (02) * | (03)++) | (a?01?)\";\n\t\t// a | &\n\t\tvalidRE[11] = \"a | &\";\n\t\t// &*\n\t\tvalidRE[12] = \"&*\";\n\t\t// (())* (empty language)\n\t\tvalidRE[13] = \"(())*\";\n\t\t// (a*b)*\n\t\tvalidRE[14] = \"(a*b)*\";\n\t\t// (a | & | a*b?c+)*\n\t\tvalidRE[15] = \"(a | & | a*b?c+)*\";\n\t}", "protected LogParserMatch() {\n\t}", "public void testRegEx(){\n\t\tString emptyLineRegEx = \"\\\\s*\";\r\n\t\t\r\n\t\tassertTrue(\"\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\" \".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\n\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\t\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\r\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\n \\t \".matches(emptyLineRegEx));\r\n\t\tassertTrue(\" \\n \\t \\n\\n\\n \".matches(emptyLineRegEx));\r\n\t\tassertFalse(\" . \\n \".matches(emptyLineRegEx));\r\n\t\t\r\n\t\t// space or tab any number of times\r\n\t\tString spaceTabRegEx = \"[ \\t]*\";\r\n\t\t\r\n\t\tassertTrue(\"\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \".matches(spaceTabRegEx));\r\n\t\tassertTrue(\"\\t\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \".matches(spaceTabRegEx));\r\n\t\tassertTrue(\"\\t\\t\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \\t \\t \\t \".matches(spaceTabRegEx));\r\n\t\tassertFalse(\"\\n\".matches(spaceTabRegEx));\r\n\t\tassertFalse(\" l \".matches(spaceTabRegEx));\r\n\t\tassertFalse(\"\\t\\n\".matches(spaceTabRegEx));\r\n\t\t\r\n\t\t\r\n\t\t//Nucleotide sequence\r\n\t\tString ntRegEx = \"[ACGTacgt]+\";\r\n\t\t\r\n\t\tassertTrue(\"CAGTATGCATACC\".matches(ntRegEx));\r\n\t\tassertTrue(\"CTTATTTCAGGAAAATTTTTTCAAAACTGTAAAACAAAAACCATTTTTCACAGAATCTAAGGGTATCTGAAAGCTTAAAATAACTTCAGAAAGATATCAATTCCAGCTGTTTAGTACCTGAACTGTCTGTAAACGTTTCTTCTCGAATTATAGAAAATTTTCCACTTTTTCAAGTTCAGGTTTTCAAGAAACCCCACGATTTCCACTCATCGTTTCCAATGTCCAATTTCCCATCCAATTTGCCGCACTCTGACCCAATGACTTGTTCCTTTGCCAATCAATGCTACCTAATAAATTTAAAAGTTTAACACGCATCCAATTGACACACAGGTAACCGCCCTTTCTTCTTTTACATAATTCGGAAACTTCAAAGAGCCGAAGGTGTCGGTTGTAGCAGCAGCGGAGGAACGGATGCCAATTGCGCAACTCTCGGCTCAACTCTTTTAGTGCTCCGAGAGCAGGAAGAAGAATACTGTTGGGTTGTAATAAAGACGGATGTTTTTGTTCAGAGTAGATTAGCTCGTGTTTGATTGGATTTGACCGGATCAAGAGGGGAATGTCCTGGTGGAATTAAATTTTATTAGAATAAATTGTATTTGGTGTTTAAATTCGAATCAATAATATTTATGAGCTTTAATGAATAAGTGTTAGATTATATAATTCTATAATTTTTGAACAAGCAATTCAAAAAGAAAACAAATTTTAGTAACCTCCGAAATCAAGCTGGGTGGCCTCTAGAAGTTTTGAAAAAACTTTTTTTATATTCTGTTGGAGTTTTTTTAAGTTTTATAATTATAGGTTAATCTTTCTAATTTGTAAGCTTTTTCTTAACCAATTTTTTTTGTTAACATTTTTTTGGAATTATGCTATATGACCTATACCTAAAACAGTTTAAAAGTTTAAAAAAATTTTCTATATTTTTCACTTCGTATTGAACCTCCTGGGTACATATATTGACAGCACATATCTTGTTTGTCTCAGATTTTATCAAATAAGTTTAACAAGTAAACCATGCACCAAATATTTTTCTAGGTCTCTGTAGTTAGGAAATATTTAATAAAAATAAAAATAACCGAGATATGAGCCATCAAAGTAGATCAATTAAGGCACAGGAAAAAAGATCTGAATAAAATCGAAGTTCTTAAAAATATAAATCAAACAAAATTTTTTCCAGAATTTCAGCCGAGAATTTCCAGCCGATTTGTTTATATTTTCCACATCACTCCCCACACTTCTCTCACACAAACACGATAAAATCTTGAGAAGCAATTAGCGCCAATCAACTCAACACAAAAACGAAAAGCCAACGAAAAGCTAAAGCTATCATCGTTGTCGCGTCTATGAGCAACTCAATCGTTCATCATCCTCATCTTCAGAGTGCTCAAACCTACCGTAACCCGAATTGGGCGGAGCCAAAGGGTCCGAAACAGTGCACCAGGGCGGGGAGGGACCCTGAGAAACGAGAGGGAAGTGAGCAATTGTTGAAGTGTCAGTTGTGCTCATCGAGGTCCGATGAAGAGACGCGCCTGCTCACCTACACAACTGACTTCCCCCATATACCTTTTTCTAGAATTTCCTTTTTTAGATTTATACGGTCAGGTAAAAAGGTAGAGTTTTACAGTGTAGAAATTAGGAAATTGCTCAAAAAGCCGAGCAGAATGCATATAAGAAGTACCATAGCCCCAAAGATTCGATTTTCCAGGGTTCAATCAATTTTTGTACTTTGACAGCGTATATCTCAGTTTTCTTTGATTTTATCAAAAACTAGTCAACTGACAAAATACTTGAAAAGTATTCCTTTATATTTTGGTAGCTGACCATTGTTTGTTAAAATATAAGGGAATCGAAATGTCGGTTATCAAAGTAGAACCTAACCTAAATCGCTATATATGCTATTTTTCAAAAAAAAAAACACGTTTTACTTTGTCTCAACTTATTAATATTCTTTAATATTTTTTCTATTTCTACCATTTTCCAAATTTTCCAATAATTTTCCAGAA\".matches(ntRegEx));\r\n\t\tassertTrue(\"cagtagta\".matches(ntRegEx));\r\n\t\tassertTrue(\"aCgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"aCXtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a.CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a1CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"aNCgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"AGTATAATGACAACTTACAAAzTTGGGAAATCTGGAAAACCGAGC\".matches(ntRegEx));\r\n\t\t\r\n\t\t//PWM line \r\n\t\t// unicode for | is \\u007C\r\n\t\t// space: \\u0020\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"\\u007C\");\r\n\r\n\t\tString pwmRexEx = \"[ACGT][\\\\t ]+\\\\|([\\\\t ]+[0-9]+)+\";\r\n\t\t\r\n\t\tassertTrue(\"G\t|\t12 \t2\t 2343\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A | 1 2 3\".matches(pwmRexEx));\r\n\t\tassertTrue(\"C | 11 2234 3\".matches(pwmRexEx));\r\n\t\tassertTrue(\"T |\t1\t12\t3123\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A\t|\t49\t0\t288\t26\t77\t67\t45\t50\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A\\t|\\t49\\t0\\t288\\t26\\t77\\t67\\t45\\t50\".matches(pwmRexEx));\r\n\t\tassertFalse(\"a | 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A |\\n 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A |\t1 C 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"C |1 2 3\".matches(pwmRexEx));\r\n\t\t\r\n\t\t\r\n\t\t// fasta sequence name\r\n\t\t\r\n\t\tString fastaNameSeqRegEx = \">[ \\t]*\\\\w+.*\"; \r\n\t\t\r\n\t\tassertTrue(\"> name \".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">name\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">\\t name\\t\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\"> name123 stuf\\t12342 \\t\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">check sda\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\".matches(fastaNameSeqRegEx));\r\n\t\t\r\n\t\tassertFalse(\"\".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\" > name \".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\">\\tname\\t\\n\".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\">\\t\".matches(fastaNameSeqRegEx));\r\n\t\t\r\n\t\t\r\n\t\t//fasta file sequence\r\n\t\t\r\n\t\tString oneFastaSection = \"\\\\s*\" + fastaNameSeqRegEx + \"\\\\s*\\n+\" + \"[ACGTacgt]+\" ;\r\n\t\tString fastaSeqRegEx = \"(\" + oneFastaSection + \"[ \\t\\r]*\\n\" + \")*\" + oneFastaSection + \"\\\\s*\" ;\r\n\t\t\r\n\t\tassertTrue(\"> Y105E8B.1c\\nacgtacgtacggttacCTTACAAAATTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGA\\n\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n>C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"\\t\\t\\t\\t\\t\\n> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\t\\t\\t\\t\\n> C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAAA\\n\\t\\t \\n \\t\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"\\t\\t\\t\\t\\r\\n> negExSeq_0_B0304.1\\r\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\t\\t\\t\\t\\n> C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAAA\\n\\t\\t \\n \\t\".matches(fastaSeqRegEx));\r\n\t\tString realOutput = \"\\t\\t\\t\\t\\t\\r\\n> B0304.1\\r\\nCTTATTTCAGGGAA\\r\\n\\r\\n> F29F11.5\\r\\nGCCACATGG\\r\\n\\r\\n\\t\\t\\t\";\r\n\t\tassertTrue(realOutput.matches(fastaSeqRegEx));\r\n\t\r\n\t\t\r\n\t\t\r\n\t\tassertFalse(\"\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c\\n\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c\\nAGTATAATGACAACTTACAAAzTTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c acgtacgtacggttacCTTACAAAATTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC >C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"\".matches(fastaSeqRegEx));\r\n\t\t\r\n\t\t\r\n\t\t// pwm line: \r\n\r\n\t\tString pwmLineRegEx1 = \"[ACGTacgt][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\";\r\n\t\t\r\n\t\tassertTrue(\"A | 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A |2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A| 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A\\t| \\t2 \\t\\t\\t26 7\\t\\t \".matches(pwmLineRegEx1));\r\n\r\n\t\tassertFalse(\"\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\" \\t \\t \".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"abra-cadabra\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"> test A | 1 2 3\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A | 2 A 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A [ 2 26 7]\".matches(pwmLineRegEx1));\r\n\t\t\r\n\t\t\r\n\t\tString pwmLineRegEx2 = \"[ACGTacgt][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\";\r\n\r\n\t\tassertTrue(\"A [ 2 26 7]\".matches(pwmLineRegEx2));\r\n\t\tassertTrue(\"A\\t[\\t2\\t26\\t7\\t]\".matches(pwmLineRegEx2));\r\n\t\tassertTrue(\"A[ 2 26 7]\".matches(pwmLineRegEx2));\r\n\t\t\r\n\t\tassertFalse(\"\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\" \\t \\t \".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"abra-cadabra\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"> test A | 1 2 3\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A | 2 A 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A [ ]\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A | 2 26 7\".matches(pwmLineRegEx2));\r\n\t\t\r\n\t\tString pwmRegEx1 = \"[Aa][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Cc][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Gg][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Tt][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\";\r\n\t\t\r\n\t\tassertTrue(\"A | 2 26 7\\nC | 2 26 7\\nG | 2 26 7\\nT | 2 26 7\".matches(pwmRegEx1));\r\n\t\tassertTrue(\"A | 2 26 7\\nC | 2 26 7\t\\nG | 2 26 7\\nT |\t2\t\t26 7\\r\\n\".matches(pwmRegEx1));\r\n\r\n\t\tassertFalse(\"\".matches(pwmRegEx1));\r\n\t\tassertFalse(\"A | 2 26 7\\nC | 2 26 7\\nG | 2 26 7\".matches(pwmRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\\nC | 2 26 7\t\\nG | 2 26 7\\nT |\t2\t\t26 7\\r\\n\".matches(pwmRegEx1));\r\n\r\n\t\r\n\t\tString pwmRegEx2 = \"[Aa][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Cc][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Gg][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Tt][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\";\r\n\r\n\t\tassertTrue(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertTrue(\"A [\\t2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\\n\".matches(pwmRegEx2));\r\n\r\n\t\tassertFalse(\"\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]G [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nA [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"\\tA [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\t\r\n\t}", "@Test\n public void testGroups() {\n assertThat(regex(or(e(\"0\"), e(\"1\"), e(\"2\")))).isEqualTo(\"0|1|2\");\n // Optional groups always need parentheses.\n assertThat(regex(opt(e(\"0\"), e(\"1\"), e(\"2\")))).isEqualTo(\"(?:0|1|2)?\");\n // Once a group has prefix or suffix, parentheses are needed.\n assertThat(regex(\n seq(\n or(e(\"0\"), e(\"1\")),\n e(\"2\"))))\n .isEqualTo(\"(?:0|1)2\");\n }", "public RegexFormatter(Pattern pattern) {\n this();\n setPattern(pattern);\n }", "@Test\n public void testNesting() {\n assertThat(regex(\n seq(\n e(\"0\"),\n or(\n e(\"1\"),\n seq(\n e(\"2\"),\n opt(e(\"3\"), e(\"4\")))),\n e(\"5\"), e(\"6\"))))\n .isEqualTo(\"0(?:1|2(?:3|4)?)56\");\n }", "public static String fromSableCCRegexp(ARegExp regexp, final Map<String, ARegExp> helpers)\n {\n String basic = asSimpleString(regexp);\n if (basic != null) return basic;\n\n final StringBuilder buffer = new StringBuilder();\n\n // handle regexp nodes using SableCC's tree traversal API\n regexp.apply(new AnalysisAdapter() {\n public void caseARegExp(ARegExp node)\n {\n // there must be at least one PConcat node\n Iterator<PConcat> iter = node.getConcats().iterator();\n iter.next().apply(this);\n\n // further PConcat nodes are unioned (| operator) together\n while (iter.hasNext()) {\n buffer.append('|');\n iter.next().apply(this);\n }\n }\n\n public void caseAConcat(AConcat node)\n {\n // AConcat child nodes are concatenated together\n for (PUnExp child : node.getUnExps())\n child.apply(this);\n }\n\n public void caseAUnExp(AUnExp node)\n {\n char op = '\\0';\n\n // check out which unary operator is present\n if (node.getUnOp() instanceof AQMarkUnOp)\n op = '?';\n\n else if (node.getUnOp() instanceof APlusUnOp)\n op = '+';\n\n else if (node.getUnOp() instanceof AStarUnOp)\n op = '*';\n\n // if there no operator present, just output the basic node as-is\n if (op == '\\0') {\n node.getBasic().apply(this);\n\n // otherwise, wrap the basic node in parens and add the operator\n } else {\n buffer.append('(');\n node.getBasic().apply(this);\n buffer.append(')').append(op);\n }\n }\n\n public void casePChar(PChar node)\n {\n // determine what kind of character encoding\n // (text, dec or hex) is in use\n char chr = '\\0';\n\n // as a single character in single quotes\n if (node instanceof ACharChar)\n chr = ((ACharChar)(node)).getChar().getText().charAt(1);\n\n // as a hexadecimal number\n else if (node instanceof AHexChar)\n chr = (char)(Integer.parseInt(\n ((AHexChar)(node)).getHexChar().getText().substring(2)\n ));\n\n // as a regular decimal number\n else if (node instanceof ADecChar)\n chr = (char)(Integer.parseInt(\n ((ADecChar)(node)).getDecChar().getText()\n ));\n\n // escape if reserved\n if (RESERVED_CHARS.contains(chr))\n buffer.append('\\\\');\n\n buffer.append(chr);\n }\n\n public void caseAStringBasic(AStringBasic node)\n {\n // a simple string in single quotes\n String str = node.getString().getText();\n str = str.substring(1, str.length() - 1);\n\n // split the string on double quotes and individually\n // quote each piece to avoid quoting issues\n for (String chk : str.split(\"\\\"\"))\n buffer.append('\"').append(chk).append('\"');\n }\n\n public void caseAIdBasic(AIdBasic node)\n {\n // resolve the id and re-invoke this handler\n String id = node.getId().getText();\n\n ARegExp resolved = helpers.get(id);\n if (resolved == null)\n throw new RuntimeException(\"Unknown helper '\" + id + \"'\");\n\n resolved.apply(this);\n }\n\n public void caseARegExpBasic(ARegExpBasic node)\n {\n // add parens and recurse over sub-regexps\n buffer.append('(');\n node.getRegExp().apply(this);\n buffer.append(')');\n }\n\n public void caseAOperationSet(AOperationSet node)\n {\n String op = null;\n\n // '+' operator corresponds to union\n if (node.getBinOp() instanceof APlusBinOp)\n op = \"|\";\n\n // '-' operator corresponds to subtraction,\n // which is in turn intersection with complement\n else if (node.getBinOp() instanceof AMinusBinOp)\n op = \"&~\";\n\n // stitch everything together and wrap with parens to avoid\n // interactions with other operators\n buffer.append('(');\n node.getLeft().apply(this);\n\n buffer.append(op);\n\n node.getRight().apply(this);\n buffer.append(')');\n }\n\n public void caseAIntervalSet(AIntervalSet node)\n {\n // corresponds directly to a character class;\n // just add brackets and set both ends of the range\n buffer.append('[');\n casePChar(node.getLeft());\n\n buffer.append('-');\n\n casePChar(node.getRight());\n buffer.append(']');\n }\n\n public void caseACharBasic(ACharBasic node)\n {\n casePChar(node.getChar());\n }\n\n public void caseASetBasic(ASetBasic node)\n {\n node.getSet().apply(this);\n }\n });\n\n return buffer.toString();\n }", "static Extractor byRegex(Pattern pattern) {\n\t\t\treturn Splitter.regexGroupExtractor(pattern);\n\t\t}", "Pattern getTagPattern();", "public RegexPatternBuilder (String regex)\n {\n this.regex = regex;\n }", "@Test\n\tvoid runRegEx_IllegalCharacters() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"|*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\tactualScore += 10;\n\t\t}\n\t}", "private Pattern compilePattern(String pattern) throws PatternBuilderException {\n try{\n return Pattern.compile(pattern);\n } catch (PatternSyntaxException pse) {\n throw new PatternBuilderException(String.format(\"unable to compile regex for pattern: %s\", pattern), pse);\n }\n }", "private String buildWordMatch(Matcher matcher, String word){\n return \"(\" + matcher.replaceAll(\"% \"+word+\" %\")\n + \" or \" + matcher.replaceAll(word+\" %\")\n + \" or \" + matcher.replaceAll(word)\n + \" or \" + matcher.replaceAll(\"% \"+word) + \")\" ;\n }", "public static String extractExpr(Line.Part lp, String text) {\n int bp = lp.getColumn(); // beginning of the exp\n int ep = lp.getColumn(); // end of the expr\n int len = text.length();\n\n if (lp.getColumn() >= len) {\n return null; // pointed outside the current line\n }\n char[] str = new char[len + 1]; // leave room for '\\0'\n text.getChars(0, len, str, 0);\n str[len] = 0;\n\n // Search forwards. Accept all alpha numeric characters, _, and\n // array indexing (provided it's balanced)\n int bbalance = 0; // Balance of brackets []\n int pbalance = 0; // Balance of parentheses ()\n boolean foundEnd = false; // Found the boundary of the expression\n for (; !foundEnd && str[ep] != 0; ep++) {\n if (Character.isLetterOrDigit(str[ep]) || str[ep] == '_') {\n continue; // C token\n }\n switch (str[ep]) {\n case '[':\n bbalance++;\n break;\n case ']':\n if (str[ep] == ']') {\n bbalance--;\n if (bbalance < 0) {\n foundEnd = true;\n break;\n }\n }\n break;\n case '*': // Allow *'s: for example in \"foo[*bar]\"\n break;\n case ':': // Foo::bar\n // pass only scope members, see IZ 206740\n if (str[ep+1] != ':') {\n foundEnd = true;\n } else {\n ep++;\n }\n break;\n default:\n foundEnd = true;\n break;\n }\n if (foundEnd) {\n break; // To prevent e++ in loop iteration\n }\n }\n // Search backwards. Just like forwards, but also accept function calls ()\n // and dereferencing ->, and look for a cast in front of the expression\n bbalance = 0;\n pbalance = 0;\n foundEnd = false;\n // for (; !foundEnd && (bp <= pos); bp--) {\n for (; !foundEnd && (bp >= 0); bp--) {\n if (Character.isLetterOrDigit(str[bp]) || str[bp] == '_') {\n continue; // C identifier\n }\n switch (str[bp]) {\n case ')':\n // Special case: I need to see if this is a\n // function call (in which case I proceed as\n // usual) or a cast. If it's a cast I want to\n // find the matching parenthesis and stop\n // (since a cast can contain stuff that I\n // don't otherwise allow, like *, whitespace,\n // etc.) This allows me to point at \"(char\n if ((bp < ep) && (Character.isLetterOrDigit(str[bp + 1]) || str[bp + 1] == '_')) {\n // It's a cast\n pbalance = 0;\n while (bp >= lp.getColumn()) {\n if (str[bp] == ')') {\n pbalance++;\n } else if (str[bp] == '(') {\n pbalance--;\n if (pbalance == 0) {\n // found beginning of cast\n // compensate for b++ below\n bp--;\n break;\n }\n }\n bp--;\n }\n foundEnd = true;\n break;\n } else {\n // It's a function call\n pbalance++;\n }\n break;\n case ']':\n bbalance++;\n break;\n case '(':\n pbalance--;\n if (pbalance < 0) {\n foundEnd = true;\n break;\n }\n break;\n case '[':\n bbalance--;\n if (bbalance < 0) {\n foundEnd = true;\n break;\n }\n break;\n case '>':\n // for example \"foo->bar\"\n if ((bp == lp.getColumn()) || (str[bp - 1] != '-')) {\n foundEnd = true;\n break;\n } else {\n bp--; // skip over whole ->\n }\n break;\n case '.': // for example \"foo.bar\"\n case 0: // empty string: when you point at the end of a expr\n case ':': // for example \"Foo::bar\"\n break;\n case '&':\n case '*':\n // What do we do about an expression like\n // foo = &bar; ? Does the user want to evaluate\n // \"bar\" or \"&bar\" ???\n // For now let's assume the user wants \"bar\"\n // For *, we have the same issue.\n // It's not easy to decide which is right.\n // (1) char *foo = \"hello\"\n // (2) bar = *llist\n // In (1) you want \"foo\", in (2) you want \"*llist\".\n // But since we have a gesture for *eval (hit control),\n // let's go with behavior 1 for now.\n foundEnd = true;\n break;\n default:\n foundEnd = true;\n break;\n }\n if (foundEnd) {\n break;\n } // To prevent bp-- in loop iteration\n }\n\n bp++; // Skip the delimiter we just found\n String result = \"\";\n if (bp >= ep) {\n return null;\n }\n\n while (bp < ep) {\n result += str[bp++];\n }\n\n return result;\n }" ]
[ "0.66947776", "0.6635607", "0.6459465", "0.6307991", "0.6243676", "0.6171356", "0.6144761", "0.61350137", "0.61350137", "0.6074405", "0.60219455", "0.5997328", "0.58404815", "0.58381397", "0.58202225", "0.58073443", "0.57749915", "0.57695836", "0.57247317", "0.5723896", "0.57232064", "0.5703501", "0.5691343", "0.5667451", "0.5663969", "0.5654444", "0.5634976", "0.5624865", "0.56058025", "0.5601531", "0.5590221", "0.5568669", "0.55638975", "0.55533946", "0.55511653", "0.5547845", "0.554447", "0.5544329", "0.5542147", "0.5528479", "0.55095404", "0.5498518", "0.54845995", "0.5467825", "0.54643494", "0.5459987", "0.54595834", "0.5443565", "0.54356104", "0.5431121", "0.54246485", "0.5421838", "0.5418332", "0.5417883", "0.54085624", "0.5389558", "0.5387316", "0.53863466", "0.53813285", "0.5372851", "0.5371269", "0.5360216", "0.5349189", "0.5328906", "0.53229624", "0.5322942", "0.5320274", "0.5308246", "0.5305932", "0.5299693", "0.52901345", "0.52818865", "0.52596617", "0.5254542", "0.52534544", "0.52508575", "0.52411234", "0.5235002", "0.52314734", "0.52312934", "0.52157736", "0.51921874", "0.5189226", "0.51795405", "0.51698154", "0.51513505", "0.5149426", "0.5147882", "0.51420236", "0.513746", "0.51313394", "0.5120697", "0.5113026", "0.51116157", "0.5111485", "0.51096046", "0.51094425", "0.5107727", "0.5080998", "0.50656325", "0.5065591" ]
0.0
-1
Express the Regexp above with the code you wish you had throw new PendingException();
@When("^click on \"([^\"]*)\"$") public void click_on(String operation) throws Throwable { operator = operation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid runRegEx_IllegalCharacters() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"|*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\tactualScore += 10;\n\t\t}\n\t}", "@Test(expected = InvalidRegexpException.class)\n public void testParseRegexp_invalid8() throws Throwable {\n BasicRegexp.parseRegexp(\"()\");\n }", "@Factory\r\n public static Matcher<Proc> raises(String regex) {\r\n return raises(IsThrowable.throwable(regex));\r\n }", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Factory\r\n public static Matcher<Proc> raisesException(String regex) {\r\n return new Raises(IsThrowable.exception(regex));\r\n }", "@Test\n public void testOptimise_2() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a+++++++++++++++++++++\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a+\");\n }", "@Test\n\tvoid runRegExNoOperands_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Sargon\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "@Test\n\tvoid runRegExUnfoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Introuvable\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(0, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "public NotMatchedException(Pattern pattern) {\n this.pattern = pattern;\n }", "@Test\n public void testParseRegexp_valid7() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"abc*def\");\n assertEquals(re.toString(), \"abc*def\");\n }", "public void setPattern(String pattern) {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.getMetaData((Connection) null, \"43X50.U\", \"43X50.U\", true, false, false, true, \"#hl2(.N!cDa@pc@R\", true);\n fail(\"Expecting exception: PatternSyntaxException\");\n \n } catch(PatternSyntaxException e) {\n //\n // Unclosed group near index 16\n // #hl2(.N!cDa@pc@R\n //\n verifyException(\"java.util.regex.Pattern\", e);\n }\n }", "protected abstract Regex pattern();", "@Test\n public void testOptimise_8() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(b|a)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(c|d)*|(d|c)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|d)*\");\n\n }", "@Override\n protected void compileRegex(String regex) {\n }", "public SyntaxMatchingException() {\n super();\n }", "private String parseRegExp(String exp) throws Exception {\r\n\t\treturn RegexpTranslationHelper.translateANTLRToAutomatonStyle(exp);\r\n\t}", "private Pattern compilePattern(String pattern) throws PatternBuilderException {\n try{\n return Pattern.compile(pattern);\n } catch (PatternSyntaxException pse) {\n throw new PatternBuilderException(String.format(\"unable to compile regex for pattern: %s\", pattern), pse);\n }\n }", "private JBurgPatternMatcher()\n\t{\n\t}", "@Factory\r\n public static Matcher<Proc> raises(Class<? extends Throwable> clazz, String regex) {\r\n return raises(IsThrowable.throwable(clazz, regex));\r\n }", "@Then(\"^the status code is (\\\\d+)$\")\npublic void the_status_code_is(int arg1) throws Throwable {\n throw new PendingException();\n}", "@Test\n public void testParseRegexp_valid3() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"a b c d\");\n assertEquals(re.toString(), \"abcd\");\n }", "public static UnaryExpression rethrow() { throw Extensions.todo(); }", "@Test\n public void testOptimise_3() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*a*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*a?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?a?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*a?a?a?a*a*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "private String regex(Edge e) {\n return EdgeWriter.toRegex(e, false /* use dot match */);\n }", "@Test\n public void testOptimise_1() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a**\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a+*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a*+\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a*********************\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a++++++++++++++++++++*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"a????????????????????*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"a********************?\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"a+?*+?*+?*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"a+?\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"a?+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "@Override\n\tpublic boolean test(MyRegex t) {\n\t\treturn false;\n\t}", "public interface RegExp {\n String NUMBER_OF_COMPOSITION = \"^[1-2][0-9]|[1-9]$\";\n String BREAK_DATE_BY_DOT = \"[.]\";\n String IDENTIFY_BUMDLE = \"^([E|e][N|n])|[У|у][К|к][Р|р]$\";\n String DURATION = \"^[1-9]|[1-9][0-9]|[1-4][0-9][0-9]$\";\n}", "@Test\n public void testParseRegexp_correctness1new()\n throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n assertEquals(re.toString(), \"(01|10)*1111\");\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"O:56ve.env.properties\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"O:56ve\");\n // Undeclared exception!\n try { \n DBUtil.getMetaData(\"O:56ve\", true, false, false, false, \"r!3}iKU)q_q\", true, false);\n fail(\"Expecting exception: PatternSyntaxException\");\n \n } catch(PatternSyntaxException e) {\n //\n // Unmatched closing ')' near index 6\n // r!3}iKU)q_q\n // ^\n //\n verifyException(\"java.util.regex.Pattern\", e);\n }\n }", "@Factory\r\n public static Matcher<Proc> raisesException(Class<? extends Exception> clazz, String regex) {\r\n return new Raises(IsThrowable.exception(clazz, regex));\r\n }", "@Test\n public void testOptimise_4() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)+\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)?\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n }", "@Test\n public void testParseRegexp_valid6() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"ab(cd(e))ff\");\n assertEquals(re.toString(), \"abcdeff\");\n }", "String getErrorLinePattern();", "@Test\n public void testDebugPrintBasicRegexp() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n BasicRegexp.debugPrintBasicRegexp(0, re1);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-3975));\n // Undeclared exception!\n try { \n xPathLexer0.dots();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-1));\n // Undeclared exception!\n try { \n xPathLexer0.literal();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}", "@Test\n public void testOptimise_6() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a|a|b\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"b|a|a\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(b|b)*|(a|a)*|a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(c|b|b)*|(a|a)*|a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a*b*|a*b*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a|b\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b|a\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b*|a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|b)*|a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n }", "public SyntaxMatchingException(String msg) {\n super(msg);\n }", "public RegularExpression() {\n }", "@Test\n\tpublic void test61() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//bug 10\n\t\tfor(int i =0;i<200;i++) {\n\t\t\tboolean dummy = RegExpMatcher.matches(String.valueOf(i), \"([0-9])+\");\n\t\t\tif(!dummy) {\n\t\t\t\t//System.err.print(i);\n \t\t\t\tassertTrue(dummy);\t\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t//System.out.println(\"no bug on index \"+i);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//System.out.println(\"hello\");\n\t\t//assertTrue(RegExpMatcher.matches(\"\", \"([0-9])+\"));\n\t}", "@Override\n\tpublic void exucute() {\n\t\t\n\t}", "private static void compile(String pat) {\r\n\t\ttry {\r\n\t\t\tpattern = Pattern.compile(pat);\r\n\t\t} catch (PatternSyntaxException x) {\r\n\t\t\tSystem.err.println(x.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "@Override\n protected Pattern getServerFailurePattern() {\n return null;\n }", "@Test\n public void testParseRegexp_valid1() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"\");\n assertEquals(re, null);\n }", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isRegex() {\n return false;\n }", "@Test\n public void testOptimise_5() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*b*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*b?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?b*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?b?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*b?a?a?a*b*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?b*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?a?b?a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?a*b*a*\");\n }", "final /* synthetic */ void m36061b(@NonNull String str, Throwable th) throws Exception {\n C0001a.c(th, \"Failed to unmatch %s\", new Object[]{str});\n this.f29981a.showUnMatchFailure();\n }", "protected void replaceText(CharSequence text) {\n/* 564 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testOptimise_7() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a*b*)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"((a|d)*b*c?)*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(abc)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"((a*|b*)b*c*)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"((a*b*)*b*c*)*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"((ab)*b*c*)*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"((a|b)*b*|c*)*\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"((a|b)+b?|c)*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"(a*bc*)*\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"((a*|b*)+b?|c)*\");\n BasicRegexp re11 = BasicRegexp.parseRegexp(\"(abc**)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|d|b|c)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(ab|b|c)*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n // Can't optimise further\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"((a|b)+b?|c)*\");\n // Can't optimise further\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a*bc*)*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re11.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc*)*\");\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\":E<;\");\n xPathLexer0.consume((-5675));\n // Undeclared exception!\n try { \n xPathLexer0.and();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"F#VsZ=,K/\");\n xPathLexer0.consume((-3281));\n // Undeclared exception!\n try { \n xPathLexer0.mod();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Factory\r\n public static Matcher<Proc> raisesException() {\r\n return raises(IsThrowable.exception());\r\n }", "public static UnaryExpression throw_(Expression expression) { throw Extensions.todo(); }", "void mo1332e(String str, String str2, Throwable th);", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"<\");\n xPathLexer0.consume((-1311));\n // Undeclared exception!\n try { \n xPathLexer0.whitespace();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n SystemInUtil.addInputLine(\"0(u\");\n SystemInUtil.addInputLine(\"eWEzPBT{b\");\n String string0 = \"znot\";\n SystemInUtil.addInputLine(\"znot\");\n JSPredicateForm jSPredicateForm0 = null;\n try {\n jSPredicateForm0 = new JSPredicateForm(\"znot\");\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "static void fail(String message, Scanner s){\r\n\tString msg = message + \"\\n @ ...\";\r\n\tfor (int i=0; i<5 && s.hasNext(); i++){\r\n\t msg += \" \" + s.next();\r\n\t}\r\n\tthrow new ParserFailureException(msg+\"...\");\r\n }", "public GrammaticaRE(String regex) throws Exception {\n regExp = new RegExp(regex, ignoreCase);\n }", "protected String failedMatcherMessage() {\n return \"FAILED!\";\n }", "@Test\n\tvoid runRegExFoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"S(a|r|g)*on\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(30, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "private String genNonGreedyRegex(int charloc,\n String specification,\n String eolcapture,\n String nonGreedyCapture) {\n\n return (charloc == specification.length()) ? eolcapture : nonGreedyCapture;\n }", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\">>yh88W0GKz~{herR\");\n xPathLexer0.consume((-2376));\n // Undeclared exception!\n try { \n xPathLexer0.identifier();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "private\n\tRegExHelper()\n\t{\n\t\tsuper();\n\t}", "public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);", "@Test\n\tvoid getEndTransitionsAfterMinimisation_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"a|bc*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<Integer> endStates = new ArrayList<Integer>();\n\t\t\tendStates.add(1);\n\t\t\tendStates.add(2);\n\t\t\tassertEquals(endStates, a.getEnd());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "void mo1343w(String str, String str2, Throwable th);", "@Test\n public void test079() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Any any0 = (Any)errorPage0.hr();\n // Undeclared exception!\n try {\n Component component0 = any0.end(\"V\\\"i%{rPYE$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No corresponding component found for end expression 'V\\\"i%{rPYE$'.\n //\n }\n }", "void assertExceptionIsThrown(\n String sql,\n String expectedMsgPattern);", "@Override\n\t\tprotected String[] handleIrregulars(String s) {\n\t\t\treturn null;\n\t\t}", "protected void noMatch() {\n Token[] tokens = m_errorHandler.noMatch(m_current, m_prev);\n m_current = tokens[0];\n m_prev = tokens[1];\n }", "protected LogParserMatch() {\n\t}", "final /* synthetic */ void m36057a(@NonNull String str, Throwable th) {\n this.f29981a.showReportFailure();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Error reporting blocked match from chat. matchId: \");\n stringBuilder.append(str);\n C0001a.c(th, stringBuilder.toString(), new Object[0]);\n }", "void DoNothing() throws ParseException {\r\n }", "public String replaceFrom(CharSequence sequence, CharSequence replacement, CountMethod countMethod) {\n/* 165 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }", "@Given(\"^User exists with an \\\"([^\\\"]*)\\\"$\")\npublic void user_exists_with_an(String arg1) throws Throwable {\n throw new PendingException();\n}", "public static void main(String[] ignore)\r\n/* 404: */ throws InterruptedException\r\n/* 405: */ {\r\n/* 406:358 */ String arg = \"drop(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:10.300\\\").\";\r\n/* 407:359 */ arg = arg + \"drop(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:10.000\\\").\";\r\n/* 408: */ \r\n/* 409: */ \r\n/* 410: */ \r\n/* 411:363 */ arg = arg + \"throw(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:09.467\\\").\";\r\n/* 412:364 */ arg = arg + \"bounce(subject:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.933\\\", to:time \\\"2011-08-25T20:30:09.767\\\").\";\r\n/* 413: */ \r\n/* 414: */ \r\n/* 415: */ \r\n/* 416: */ \r\n/* 417: */ \r\n/* 418: */ \r\n/* 419: */ \r\n/* 420: */ \r\n/* 421: */ \r\n/* 422: */ \r\n/* 423: */ \r\n/* 424: */ \r\n/* 425: */ \r\n/* 426: */ \r\n/* 427: */ \r\n/* 428: */ \r\n/* 429: */ \r\n/* 430: */ \r\n/* 431: */ \r\n/* 432: */ \r\n/* 433:385 */ DisgustingMoebiusTranslator translator = new DisgustingMoebiusTranslator();\r\n/* 434:386 */ translator.translate(arg);\r\n/* 435:387 */ translator.commentOnAction(Long.valueOf(2000L));\r\n/* 436:388 */ Thread.sleep(2000L);\r\n/* 437:389 */ translator.commentOnAction(Long.valueOf(4000L));\r\n/* 438: */ }", "private Annotation[] testRegEx(String regEx) {\n\t\tQueriableAnnotation data = this.parent.getActiveDocument();\n\t\treturn ((data == null) ? null : Gamta.extractAllMatches(data, regEx, 64));\n\t}", "@When(\"^I execute my test case$\")\n public void iExecuteMyTestCase() throws Throwable {\n throw new PendingException();\n }", "@Test\r\n public void testAddRemoveRegexp() throws RegexpParserException {\r\n assertFalse(rs.hasRegexp(reString));\r\n rs.add(reString, a);\r\n assertTrue(rs.hasRegexp(reString));\r\n rs.remove(reString, a);\r\n assertFalse(rs.hasRegexp(reString));\r\n }", "public void testMODIFIER4() throws Exception {\n\t\tObject retval = execLexer(\"MODIFIER\", 89, \"blah\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"MODIFIER\", expecting, actual);\n\t}", "private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }", "@And(\"^I see only the pets with the status \\\"([^\\\"]*)\\\"$\")\n public void iSeeOnlyThePetsWithTheStatus(String arg0) throws Throwable {\n throw new PendingException();\n }", "public String replaceFrom(CharSequence sequence, CharSequence replacement) {\n/* 150 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\" 6PR~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 2);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 1, column 2. Encountered: \\\"6\\\" (54), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public void m23078a(String str, Exception exception) {\n }", "@When(\"^I enter a invalid password$\")\n\tpublic void i_enter_a_invalid_password() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "public static UnaryExpression throw_(Expression expression, Class type) { throw Extensions.todo(); }", "public StringSearch(String pattern, String target) {\n/* 190 */ super(null, null); throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean match( DataExp p ) { return false; }", "@Override\r\n\tpublic Node visitPatternExpr(PatternExprContext ctx) {\n\t\treturn super.visitPatternExpr(ctx);\r\n\t}", "public void assertNotEval(final String expression, final String textPattern);", "void mo1335i(String str, String str2, Throwable th);", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.consume((-2013));\n // Undeclared exception!\n try { \n xPathLexer0.and();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[Sdf yy*X>HdSr %<}\");\n xPathLexer0.consume((-1189));\n // Undeclared exception!\n try { \n xPathLexer0.or();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }" ]
[ "0.61429757", "0.60230917", "0.5955505", "0.59408975", "0.5709462", "0.5661608", "0.5576626", "0.5562994", "0.55622566", "0.5553096", "0.55526024", "0.55165905", "0.55076915", "0.54654336", "0.54367095", "0.5422064", "0.53947866", "0.53864264", "0.53690875", "0.5368646", "0.5359398", "0.5345256", "0.5344481", "0.53383625", "0.52971256", "0.52850664", "0.5267876", "0.5263009", "0.52584493", "0.5252601", "0.52480984", "0.52445346", "0.51610667", "0.51465124", "0.5139752", "0.51370114", "0.5125238", "0.5124558", "0.51191545", "0.5116669", "0.5115698", "0.51017284", "0.50968087", "0.50838214", "0.50779855", "0.50604844", "0.504505", "0.5039297", "0.502925", "0.50267154", "0.50168335", "0.5016441", "0.50152045", "0.50138676", "0.5002838", "0.49945936", "0.49922156", "0.49891898", "0.4983752", "0.49805504", "0.497463", "0.49561507", "0.49532485", "0.4940411", "0.4938745", "0.49297282", "0.49233517", "0.491779", "0.49094844", "0.49043548", "0.4891169", "0.4889204", "0.4888939", "0.48868793", "0.4884518", "0.48723316", "0.48622918", "0.48435932", "0.4841167", "0.4838659", "0.48349616", "0.48324618", "0.48323444", "0.48306817", "0.4827522", "0.4826809", "0.4825822", "0.48226613", "0.48210886", "0.48151776", "0.4804803", "0.48044193", "0.48023897", "0.48023713", "0.4802363", "0.47988456", "0.47984982", "0.47982958", "0.4795591", "0.47928536", "0.47878057" ]
0.0
-1
Express the Regexp above with the code you wish you had throw new PendingException();
@Then("^System should show a message \"([^\"]*)\"$") public void System_should_show_a_message(String message) throws Throwable { PostRide posting = new PostRide(); assertEquals(message, posting.post(ride)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid runRegEx_IllegalCharacters() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"|*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\tactualScore += 10;\n\t\t}\n\t}", "@Test(expected = InvalidRegexpException.class)\n public void testParseRegexp_invalid8() throws Throwable {\n BasicRegexp.parseRegexp(\"()\");\n }", "@Factory\r\n public static Matcher<Proc> raises(String regex) {\r\n return raises(IsThrowable.throwable(regex));\r\n }", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Factory\r\n public static Matcher<Proc> raisesException(String regex) {\r\n return new Raises(IsThrowable.exception(regex));\r\n }", "@Test\n public void testOptimise_2() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a+++++++++++++++++++++\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a+\");\n }", "@Test\n\tvoid runRegExNoOperands_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Sargon\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "@Test\n\tvoid runRegExUnfoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Introuvable\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(0, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "public NotMatchedException(Pattern pattern) {\n this.pattern = pattern;\n }", "@Test\n public void testParseRegexp_valid7() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"abc*def\");\n assertEquals(re.toString(), \"abc*def\");\n }", "public void setPattern(String pattern) {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.getMetaData((Connection) null, \"43X50.U\", \"43X50.U\", true, false, false, true, \"#hl2(.N!cDa@pc@R\", true);\n fail(\"Expecting exception: PatternSyntaxException\");\n \n } catch(PatternSyntaxException e) {\n //\n // Unclosed group near index 16\n // #hl2(.N!cDa@pc@R\n //\n verifyException(\"java.util.regex.Pattern\", e);\n }\n }", "protected abstract Regex pattern();", "@Test\n public void testOptimise_8() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(b|a)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(c|d)*|(d|c)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|d)*\");\n\n }", "@Override\n protected void compileRegex(String regex) {\n }", "public SyntaxMatchingException() {\n super();\n }", "private String parseRegExp(String exp) throws Exception {\r\n\t\treturn RegexpTranslationHelper.translateANTLRToAutomatonStyle(exp);\r\n\t}", "private Pattern compilePattern(String pattern) throws PatternBuilderException {\n try{\n return Pattern.compile(pattern);\n } catch (PatternSyntaxException pse) {\n throw new PatternBuilderException(String.format(\"unable to compile regex for pattern: %s\", pattern), pse);\n }\n }", "private JBurgPatternMatcher()\n\t{\n\t}", "@Factory\r\n public static Matcher<Proc> raises(Class<? extends Throwable> clazz, String regex) {\r\n return raises(IsThrowable.throwable(clazz, regex));\r\n }", "@Then(\"^the status code is (\\\\d+)$\")\npublic void the_status_code_is(int arg1) throws Throwable {\n throw new PendingException();\n}", "@Test\n public void testParseRegexp_valid3() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"a b c d\");\n assertEquals(re.toString(), \"abcd\");\n }", "public static UnaryExpression rethrow() { throw Extensions.todo(); }", "@Test\n public void testOptimise_3() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*a*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*a?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?a?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*a?a?a?a*a*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "private String regex(Edge e) {\n return EdgeWriter.toRegex(e, false /* use dot match */);\n }", "@Test\n public void testOptimise_1() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a**\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a+*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a*+\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a*********************\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a++++++++++++++++++++*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"a????????????????????*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"a********************?\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"a+?*+?*+?*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"a+?\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"a?+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "@Override\n\tpublic boolean test(MyRegex t) {\n\t\treturn false;\n\t}", "public interface RegExp {\n String NUMBER_OF_COMPOSITION = \"^[1-2][0-9]|[1-9]$\";\n String BREAK_DATE_BY_DOT = \"[.]\";\n String IDENTIFY_BUMDLE = \"^([E|e][N|n])|[У|у][К|к][Р|р]$\";\n String DURATION = \"^[1-9]|[1-9][0-9]|[1-4][0-9][0-9]$\";\n}", "@Test\n public void testParseRegexp_correctness1new()\n throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n assertEquals(re.toString(), \"(01|10)*1111\");\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"O:56ve.env.properties\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"O:56ve\");\n // Undeclared exception!\n try { \n DBUtil.getMetaData(\"O:56ve\", true, false, false, false, \"r!3}iKU)q_q\", true, false);\n fail(\"Expecting exception: PatternSyntaxException\");\n \n } catch(PatternSyntaxException e) {\n //\n // Unmatched closing ')' near index 6\n // r!3}iKU)q_q\n // ^\n //\n verifyException(\"java.util.regex.Pattern\", e);\n }\n }", "@Factory\r\n public static Matcher<Proc> raisesException(Class<? extends Exception> clazz, String regex) {\r\n return new Raises(IsThrowable.exception(clazz, regex));\r\n }", "@Test\n public void testOptimise_4() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)+\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)?\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n }", "@Test\n public void testParseRegexp_valid6() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"ab(cd(e))ff\");\n assertEquals(re.toString(), \"abcdeff\");\n }", "String getErrorLinePattern();", "@Test\n public void testDebugPrintBasicRegexp() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n BasicRegexp.debugPrintBasicRegexp(0, re1);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-3975));\n // Undeclared exception!\n try { \n xPathLexer0.dots();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-1));\n // Undeclared exception!\n try { \n xPathLexer0.literal();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}", "@Test\n public void testOptimise_6() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a|a|b\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"b|a|a\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(b|b)*|(a|a)*|a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(c|b|b)*|(a|a)*|a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a*b*|a*b*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a|b\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b|a\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b*|a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|b)*|a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n }", "public SyntaxMatchingException(String msg) {\n super(msg);\n }", "public RegularExpression() {\n }", "@Test\n\tpublic void test61() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//bug 10\n\t\tfor(int i =0;i<200;i++) {\n\t\t\tboolean dummy = RegExpMatcher.matches(String.valueOf(i), \"([0-9])+\");\n\t\t\tif(!dummy) {\n\t\t\t\t//System.err.print(i);\n \t\t\t\tassertTrue(dummy);\t\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t//System.out.println(\"no bug on index \"+i);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//System.out.println(\"hello\");\n\t\t//assertTrue(RegExpMatcher.matches(\"\", \"([0-9])+\"));\n\t}", "@Override\n\tpublic void exucute() {\n\t\t\n\t}", "private static void compile(String pat) {\r\n\t\ttry {\r\n\t\t\tpattern = Pattern.compile(pat);\r\n\t\t} catch (PatternSyntaxException x) {\r\n\t\t\tSystem.err.println(x.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "@Override\n protected Pattern getServerFailurePattern() {\n return null;\n }", "@Test\n public void testParseRegexp_valid1() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"\");\n assertEquals(re, null);\n }", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isRegex() {\n return false;\n }", "@Test\n public void testOptimise_5() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*b*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*b?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?b*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?b?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*b?a?a?a*b*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?b*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?a?b?a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?a*b*a*\");\n }", "final /* synthetic */ void m36061b(@NonNull String str, Throwable th) throws Exception {\n C0001a.c(th, \"Failed to unmatch %s\", new Object[]{str});\n this.f29981a.showUnMatchFailure();\n }", "protected void replaceText(CharSequence text) {\n/* 564 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testOptimise_7() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a*b*)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"((a|d)*b*c?)*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(abc)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"((a*|b*)b*c*)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"((a*b*)*b*c*)*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"((ab)*b*c*)*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"((a|b)*b*|c*)*\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"((a|b)+b?|c)*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"(a*bc*)*\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"((a*|b*)+b?|c)*\");\n BasicRegexp re11 = BasicRegexp.parseRegexp(\"(abc**)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|d|b|c)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(ab|b|c)*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n // Can't optimise further\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"((a|b)+b?|c)*\");\n // Can't optimise further\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a*bc*)*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re11.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc*)*\");\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\":E<;\");\n xPathLexer0.consume((-5675));\n // Undeclared exception!\n try { \n xPathLexer0.and();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"F#VsZ=,K/\");\n xPathLexer0.consume((-3281));\n // Undeclared exception!\n try { \n xPathLexer0.mod();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Factory\r\n public static Matcher<Proc> raisesException() {\r\n return raises(IsThrowable.exception());\r\n }", "public static UnaryExpression throw_(Expression expression) { throw Extensions.todo(); }", "void mo1332e(String str, String str2, Throwable th);", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"<\");\n xPathLexer0.consume((-1311));\n // Undeclared exception!\n try { \n xPathLexer0.whitespace();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n SystemInUtil.addInputLine(\"0(u\");\n SystemInUtil.addInputLine(\"eWEzPBT{b\");\n String string0 = \"znot\";\n SystemInUtil.addInputLine(\"znot\");\n JSPredicateForm jSPredicateForm0 = null;\n try {\n jSPredicateForm0 = new JSPredicateForm(\"znot\");\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "static void fail(String message, Scanner s){\r\n\tString msg = message + \"\\n @ ...\";\r\n\tfor (int i=0; i<5 && s.hasNext(); i++){\r\n\t msg += \" \" + s.next();\r\n\t}\r\n\tthrow new ParserFailureException(msg+\"...\");\r\n }", "public GrammaticaRE(String regex) throws Exception {\n regExp = new RegExp(regex, ignoreCase);\n }", "protected String failedMatcherMessage() {\n return \"FAILED!\";\n }", "@Test\n\tvoid runRegExFoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"S(a|r|g)*on\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(30, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "private String genNonGreedyRegex(int charloc,\n String specification,\n String eolcapture,\n String nonGreedyCapture) {\n\n return (charloc == specification.length()) ? eolcapture : nonGreedyCapture;\n }", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\">>yh88W0GKz~{herR\");\n xPathLexer0.consume((-2376));\n // Undeclared exception!\n try { \n xPathLexer0.identifier();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "private\n\tRegExHelper()\n\t{\n\t\tsuper();\n\t}", "public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);", "@Test\n\tvoid getEndTransitionsAfterMinimisation_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"a|bc*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<Integer> endStates = new ArrayList<Integer>();\n\t\t\tendStates.add(1);\n\t\t\tendStates.add(2);\n\t\t\tassertEquals(endStates, a.getEnd());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "void mo1343w(String str, String str2, Throwable th);", "@Test\n public void test079() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Any any0 = (Any)errorPage0.hr();\n // Undeclared exception!\n try {\n Component component0 = any0.end(\"V\\\"i%{rPYE$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No corresponding component found for end expression 'V\\\"i%{rPYE$'.\n //\n }\n }", "void assertExceptionIsThrown(\n String sql,\n String expectedMsgPattern);", "@Override\n\t\tprotected String[] handleIrregulars(String s) {\n\t\t\treturn null;\n\t\t}", "protected void noMatch() {\n Token[] tokens = m_errorHandler.noMatch(m_current, m_prev);\n m_current = tokens[0];\n m_prev = tokens[1];\n }", "protected LogParserMatch() {\n\t}", "final /* synthetic */ void m36057a(@NonNull String str, Throwable th) {\n this.f29981a.showReportFailure();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Error reporting blocked match from chat. matchId: \");\n stringBuilder.append(str);\n C0001a.c(th, stringBuilder.toString(), new Object[0]);\n }", "void DoNothing() throws ParseException {\r\n }", "public String replaceFrom(CharSequence sequence, CharSequence replacement, CountMethod countMethod) {\n/* 165 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }", "@Given(\"^User exists with an \\\"([^\\\"]*)\\\"$\")\npublic void user_exists_with_an(String arg1) throws Throwable {\n throw new PendingException();\n}", "public static void main(String[] ignore)\r\n/* 404: */ throws InterruptedException\r\n/* 405: */ {\r\n/* 406:358 */ String arg = \"drop(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:10.300\\\").\";\r\n/* 407:359 */ arg = arg + \"drop(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:10.000\\\").\";\r\n/* 408: */ \r\n/* 409: */ \r\n/* 410: */ \r\n/* 411:363 */ arg = arg + \"throw(subject:object \\\"Object 1\\\", object:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.733\\\", to:time \\\"2011-08-25T20:30:09.467\\\").\";\r\n/* 412:364 */ arg = arg + \"bounce(subject:object \\\"Object 0\\\", from:time \\\"2011-08-25T20:30:08.933\\\", to:time \\\"2011-08-25T20:30:09.767\\\").\";\r\n/* 413: */ \r\n/* 414: */ \r\n/* 415: */ \r\n/* 416: */ \r\n/* 417: */ \r\n/* 418: */ \r\n/* 419: */ \r\n/* 420: */ \r\n/* 421: */ \r\n/* 422: */ \r\n/* 423: */ \r\n/* 424: */ \r\n/* 425: */ \r\n/* 426: */ \r\n/* 427: */ \r\n/* 428: */ \r\n/* 429: */ \r\n/* 430: */ \r\n/* 431: */ \r\n/* 432: */ \r\n/* 433:385 */ DisgustingMoebiusTranslator translator = new DisgustingMoebiusTranslator();\r\n/* 434:386 */ translator.translate(arg);\r\n/* 435:387 */ translator.commentOnAction(Long.valueOf(2000L));\r\n/* 436:388 */ Thread.sleep(2000L);\r\n/* 437:389 */ translator.commentOnAction(Long.valueOf(4000L));\r\n/* 438: */ }", "private Annotation[] testRegEx(String regEx) {\n\t\tQueriableAnnotation data = this.parent.getActiveDocument();\n\t\treturn ((data == null) ? null : Gamta.extractAllMatches(data, regEx, 64));\n\t}", "@When(\"^I execute my test case$\")\n public void iExecuteMyTestCase() throws Throwable {\n throw new PendingException();\n }", "@Test\r\n public void testAddRemoveRegexp() throws RegexpParserException {\r\n assertFalse(rs.hasRegexp(reString));\r\n rs.add(reString, a);\r\n assertTrue(rs.hasRegexp(reString));\r\n rs.remove(reString, a);\r\n assertFalse(rs.hasRegexp(reString));\r\n }", "public void testMODIFIER4() throws Exception {\n\t\tObject retval = execLexer(\"MODIFIER\", 89, \"blah\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"MODIFIER\", expecting, actual);\n\t}", "private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }", "@And(\"^I see only the pets with the status \\\"([^\\\"]*)\\\"$\")\n public void iSeeOnlyThePetsWithTheStatus(String arg0) throws Throwable {\n throw new PendingException();\n }", "public String replaceFrom(CharSequence sequence, CharSequence replacement) {\n/* 150 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\" 6PR~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 2);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 1, column 2. Encountered: \\\"6\\\" (54), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public void m23078a(String str, Exception exception) {\n }", "@When(\"^I enter a invalid password$\")\n\tpublic void i_enter_a_invalid_password() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "public static UnaryExpression throw_(Expression expression, Class type) { throw Extensions.todo(); }", "public StringSearch(String pattern, String target) {\n/* 190 */ super(null, null); throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean match( DataExp p ) { return false; }", "@Override\r\n\tpublic Node visitPatternExpr(PatternExprContext ctx) {\n\t\treturn super.visitPatternExpr(ctx);\r\n\t}", "public void assertNotEval(final String expression, final String textPattern);", "void mo1335i(String str, String str2, Throwable th);", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.consume((-2013));\n // Undeclared exception!\n try { \n xPathLexer0.and();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[Sdf yy*X>HdSr %<}\");\n xPathLexer0.consume((-1189));\n // Undeclared exception!\n try { \n xPathLexer0.or();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }" ]
[ "0.61429757", "0.60230917", "0.5955505", "0.59408975", "0.5709462", "0.5661608", "0.5576626", "0.5562994", "0.55622566", "0.5553096", "0.55526024", "0.55165905", "0.55076915", "0.54654336", "0.54367095", "0.5422064", "0.53947866", "0.53864264", "0.53690875", "0.5368646", "0.5359398", "0.5345256", "0.5344481", "0.53383625", "0.52971256", "0.52850664", "0.5267876", "0.5263009", "0.52584493", "0.5252601", "0.52480984", "0.52445346", "0.51610667", "0.51465124", "0.5139752", "0.51370114", "0.5125238", "0.5124558", "0.51191545", "0.5116669", "0.5115698", "0.51017284", "0.50968087", "0.50838214", "0.50779855", "0.50604844", "0.504505", "0.5039297", "0.502925", "0.50267154", "0.50168335", "0.5016441", "0.50152045", "0.50138676", "0.5002838", "0.49945936", "0.49922156", "0.49891898", "0.4983752", "0.49805504", "0.497463", "0.49561507", "0.49532485", "0.4940411", "0.4938745", "0.49297282", "0.49233517", "0.491779", "0.49094844", "0.49043548", "0.4891169", "0.4889204", "0.4888939", "0.48868793", "0.4884518", "0.48723316", "0.48622918", "0.48435932", "0.4841167", "0.4838659", "0.48349616", "0.48324618", "0.48323444", "0.48306817", "0.4827522", "0.4826809", "0.4825822", "0.48226613", "0.48210886", "0.48151776", "0.4804803", "0.48044193", "0.48023897", "0.48023713", "0.4802363", "0.47988456", "0.47984982", "0.47982958", "0.4795591", "0.47928536", "0.47878057" ]
0.0
-1
Express the Regexp above with the code you wish you had
@Then("^Send a mail to email id \"([^\"]*)\"$") public void Send_a_mail_to_email_id(String arg1) throws Throwable { throw new PendingException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}", "protected abstract Regex pattern();", "public interface RegExp {\n String NUMBER_OF_COMPOSITION = \"^[1-2][0-9]|[1-9]$\";\n String BREAK_DATE_BY_DOT = \"[.]\";\n String IDENTIFY_BUMDLE = \"^([E|e][N|n])|[У|у][К|к][Р|р]$\";\n String DURATION = \"^[1-9]|[1-9][0-9]|[1-4][0-9][0-9]$\";\n}", "public interface RegExp {\n String NAME_REGEXP = \"^[А-Я][а-я]{2,30}$\";\n String AGE_REGEXP = \"^((1[012][0-9])|([1-9][0-9]))$\";\n String EMAIL_REGEXP = \"^[-z0-9_.]{1,30}@([A-z]+[A-z0-9]{1,15}.){1,2}([A-z]+[A-z0-9]{1,15})$\";\n String CELL_PHONE_REGEXP = \"([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|\" +\n \"(\\\\d{3}))[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{2}[\\\\s-]?\\\\d{2}$\";\n String CELL_PHONE_OPTIONAL_REGEXP = \"^(([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|\" +\n \"(\\\\d{3}))[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{2}[\\\\s-]?\\\\d{2})?\";\n String LOCAL_PHONE_REGEXP = \"^([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|(\\\\d{3}))?[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{3}$\";\n String COMMENT_REGEXP = \"^([\\\\d\\\\s\\\\w\\\\.\\\\,\\\\!]){0,127}$\";\n String GROUP_REGEXP = \"^[А-я]{4,10}$\";\n String SKYPE_NICK_REGEXP = \"^[\\\\w\\\\d\\\\_]{3,20}$\";\n String INDEX_REGEXP = \"^[\\\\d]{8}$\";\n String CITY_STREET_REGEXP = \"^[А-Я][а-я]{3,20}$\";\n String BUILDING_REGEXP = \"^[\\\\d]{1,3}[\\\\w]?$\";\n String FLAT_REGEXP = \"^[\\\\d]{1,3}$\";\n}", "@Override\n protected void compileRegex(String regex) {\n }", "private static String adaptRegEx(Mode mode, String regex, int flagMask, boolean removeWhitespace)\n throws QueryException {\n StringBuilder sb = new StringBuilder();\n boolean escaped = false;\n boolean groupStart = false;\n int completeGroups = 0;\n int backRef = 0;\n int charClassDepth = 0;\n int groupDepth = 0;\n\n for (char c : regex.toCharArray()) {\n if (escaped) {\n if (backRef == 0 && c == '0') {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Reference to group 0 not allowed\");\n } else if (c >= '0' && c <= '9') {\n if (charClassDepth > 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back references in character class expressions\" + \" are disallowed.\");\n }\n backRef = backRef * 10 + Integer.parseInt(Character.toString(c));\n continue;\n }\n }\n\n if (backRef > 0) {\n // Check back reference that just ended\n if (backRef > completeGroups) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back reference to nonexisting or unfinished group.\");\n } else {\n backRef = 0;\n escaped = false;\n }\n }\n\n if (c == '\\\\' && !escaped) {\n // Not preceded by backslash\n escaped = true;\n groupStart = false;\n continue;\n }\n\n if (c == '(' && !escaped) {\n groupStart = true;\n groupDepth++;\n escaped = false;\n continue;\n }\n\n if (c == '?' && !escaped && groupStart) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Pure groups are not supported in XQuery regular expressions.\");\n } else if (c == ')' && !escaped) {\n if (--groupDepth < 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Invalid sequence of brackets.\");\n }\n completeGroups++;\n } else if (c == '[' && !escaped) {\n charClassDepth++;\n } else if (c == ']' && !escaped) {\n if (--charClassDepth < 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Invalid sequence of brackets.\");\n }\n } else if (removeWhitespace) {\n // Remove whitespace outside of character classes\n if (charClassDepth == 0 && WHITESPACE.contains(c)) {\n // Don't touch boolean flags\n continue;\n }\n\n sb.append(c);\n }\n\n groupStart = false;\n escaped = false;\n }\n\n // Check for trailing '\\' (only valid with subsequent characters)\n if (escaped && backRef == 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Trailing backslash character in pattern.\");\n }\n\n // Check back reference if that was last token in pattern\n if (backRef > 0 && backRef > completeGroups) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back reference to nonexisting or unfinished group.\");\n }\n\n // Check for dangling brackets\n if (charClassDepth != 0 || groupDepth != 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Pattern contains dangling brackets.\");\n }\n\n if (!removeWhitespace) {\n sb.append(regex);\n }\n\n if (mode == Mode.MATCH) {\n // Adapt for XQuery substring matching by extending pattern\n if (sb.charAt(0) != '^' || ((flagMask & Pattern.MULTILINE) == Pattern.MULTILINE)) {\n if ((flagMask & Pattern.DOTALL) == Pattern.DOTALL) {\n sb.insert(0, \".*\");\n } else {\n sb.insert(0, \"(?s:.*)\");\n }\n }\n\n if (sb.charAt(sb.length() - 1) != '$' || ((flagMask & Pattern.MULTILINE) == Pattern.MULTILINE)) {\n if ((flagMask & Pattern.DOTALL) == Pattern.DOTALL) {\n sb.append(\".*\");\n } else {\n sb.append(\"(?s:.*)\");\n }\n }\n }\n\n return sb.toString();\n }", "private String parseRegExp(String exp) throws Exception {\r\n\t\treturn RegexpTranslationHelper.translateANTLRToAutomatonStyle(exp);\r\n\t}", "java.lang.String getRegex();", "java.lang.String getRegex();", "private String regex(Edge e) {\n return EdgeWriter.toRegex(e, false /* use dot match */);\n }", "private\n\tRegExHelper()\n\t{\n\t\tsuper();\n\t}", "public boolean match( DataExp p ) { return false; }", "public String getRegEx();", "@Test\n\tvoid testFormattedRE() {\n\t\tRegularLanguage rl[] = new RegularLanguage[lengthToFormatRE]; \n\t\tint i = 0;\n\t\tfor (String re : toFormatRE) {\n\t\t\trl[i++] = RegularExpression.isValidRE(re);\n\t\t}\n\t\t// Verify if all objects were created\n\t\tfor (RegularLanguage re : rl) {\n\t\t\tif (re.equals(null)) {\n\t\t\t\tfail(); // object couldn't be created\n\t\t\t}\n\t\t}\n\n\t\t// a***** -> a*\n\t\tassertEquals(\"a*\", rl[0].getRE().getFormattedRegex());\n\t\t// aa????? -> a?\n\t\tassertEquals(\"a?\", rl[1].getRE().getFormattedRegex());\n\t\t// a+++++ -> a+\n\t\tassertEquals(\"a+\", rl[2].getRE().getFormattedRegex());\n\t\t// a?*?*?***???* -> a*\n\t\tassertEquals(\"a*\", rl[3].getRE().getFormattedRegex());\n\t\t// a?+?+?+++???+ -> a*\n\t\tassertEquals(\"a*\", rl[4].getRE().getFormattedRegex());\n\t\t// a*+*+*++++***+* -> a*\n\t\tassertEquals(\"a*\", rl[5].getRE().getFormattedRegex());\n\t\t// a?+*?+?***???+++***?+?*+* -> a*\n\t\tassertEquals(\"a*\", rl[6].getRE().getFormattedRegex());\n\t\t\t\n\t}", "public void caseARegExpBasic(ARegExpBasic node)\n {\n buffer.append('(');\n node.getRegExp().apply(this);\n buffer.append(')');\n }", "private JBurgPatternMatcher()\n\t{\n\t}", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "public String getRegex();", "protected abstract Matcher<? super ExpressionTree> specializedMatcher();", "@Override\n public R visit(RegexExpression n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n n.expression.accept(this, argu);\n n.nodeToken2.accept(this, argu);\n n.expression1.accept(this, argu);\n n.nodeOptional.accept(this, argu);\n n.nodeToken3.accept(this, argu);\n return _ret;\n }", "public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }", "@Test\n public void testParseRegexp_valid6() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"ab(cd(e))ff\");\n assertEquals(re.toString(), \"abcdeff\");\n }", "@Override\r\n\tpublic Node visitPatternExpr(PatternExprContext ctx) {\n\t\treturn super.visitPatternExpr(ctx);\r\n\t}", "public RegularExpression() {\n }", "@Test\n public void testOptimise_2() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a+++++++++++++++++++++\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a+\");\n }", "public static Term createRegExp(Expression exp) {\r\n\t\tTerm term = Term.function(REGEX, exp);\r\n\t\treturn term;\r\n\t}", "@Override\n\tpublic void visit(RegExpMySQLOperator arg0) {\n\t\t\n\t}", "public static void TestRegex()\n\t{\n\t String line = \" if( aaa&&(ypbreg))\";\n\t String pattern = \"(&&)\\\\s*\\\\(*\\\\s*!?ypbreg\\\\)*\";\n\t // Create a Pattern object\n\t Pattern r = Pattern.compile(pattern);\n\t System.out.println(line.contains(pattern));\n\t // Now create matcher object.\n\t Matcher m = r.matcher(line);\n\t if (m.find( )) {\n\t // System.out.println(\"Found value: \" + m.group(0) );\n\t int count = m.groupCount();\n\t System.out.println(\"group count is \"+count);\n\t for(int i=0;i<count;i++){\n\t System.out.println(m.group(i));\n\t }\n\t // System.out.println(line.replaceFirst(BregPattern.pEqualTrue1, \"!$1\"));\n\n\t } else {\n\t System.out.println(\"NO MATCH\");\n\t }\n\t}", "private PatternExpression patternExpression(PatternExpression p, \n Expression exp)\n {\n exp = transform(exp);\n if (p instanceof PatternExpression.IdentifierPatternExp)\n {\n PatternExpression.IdentifierPatternExp p0 =\n (PatternExpression.IdentifierPatternExp)p;\n return new PatternExpression.IdentifierPatternExp(p0.ident, exp);\n }\n if (p instanceof PatternExpression.ApplicationPatternExp)\n {\n PatternExpression.ApplicationPatternExp p0 =\n (PatternExpression.ApplicationPatternExp)p;\n List<AST.Parameter> params =\n new ArrayList<AST.Parameter>(Arrays.asList(p0.params));\n return new PatternExpression.ApplicationPatternExp(p0.ident, params, exp);\n }\n return new PatternExpression.DefaultPatternExp(exp);\n }", "@Test\n public void testParseRegexp_correctness1new()\n throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n assertEquals(re.toString(), \"(01|10)*1111\");\n }", "private String getMatchPattern(String pattern) {\n String mandatoryPart = pattern.trim().replaceAll(\"(\\\\s+?)\\\\[.+?\\\\]\", \"($1.+?(\\\\\\\\s|\\\\$))*\");\n mandatoryPart = mandatoryPart.replaceAll(\"\\\\s+\", \"\\\\\\\\s+\");\n return mandatoryPart.replaceAll(\"<.+?>\", \".+?\");\n }", "@Test\n public void testOptimise_3() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*a*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*a?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?a?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*a?a?a?a*a*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "public RegExp (final int type)\n {\n this.type = type;\n }", "com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex();", "private NFA regEx() {\n NFA term = term();\n\n //If the regex requires a union operation\n if (more() && peek() == '|') {\n\n eat('|');\n NFA regex = regEx();\n return union(term, regex);\n //If no union is needed, just return the NFA\n } else {\n return term;\n }\n }", "@Test\n public void testOptimise_8() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(b|a)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(c|d)*|(d|c)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|d)*\");\n\n }", "public Expression setRegexTest(Expression exp, Expression test){\r\n\t\tregexExpr.put(exp, test);\r\n\t\tExpression tt = Term.function(Term.TEST);\r\n\t\ttt.setExpr(test);\r\n\t\tExpression seq = sequence(exp, tt);\r\n\t\treturn seq;\r\n\t}", "public void caseARegExp(ARegExp node)\n {\n Iterator<PConcat> iter = node.getConcats().iterator();\n iter.next().apply(this);\n\n // further PConcat nodes are unioned (| operator) together\n while (iter.hasNext()) {\n buffer.append('|');\n iter.next().apply(this);\n }\n }", "public static void main(String[] args) {\n\t\t Pattern p = Pattern.compile(\"(a+)\");\r\n\t\t Matcher m = p.matcher(\"aaaaaba\");\r\n\t\t //System.out.println(m.matches())\r\n\t\t m.find();\t\t \r\n\t\t m.find();\r\n\t\t System.out.println(\"grCount \"+m.groupCount());\t \r\n\t\t MatchResult mr = m.toMatchResult();\r\n\t\t \r\n\t\t System.out.println(m.end());\r\n\t\t System.out.println(\"'\"+mr.group()+\"'\");\r\n\t\t System.out.println(\"start \"+mr.start(1));\r\n\t\t \r\n\t}", "@Override\n public String visit(PatternExpr n, Object arg) {\n return null;\n }", "public static void matchMaker()\n {\n \n }", "@Override\n\tpublic boolean test(MyRegex t) {\n\t\treturn false;\n\t}", "@Test\n public void testOptimise_5() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a*b*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a*b?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a?b*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a?a?b?a?a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a?a*a*a?a*b?a?a?a*b*a?a*a?\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?b*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a?a?b?a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b?a*b*a*\");\n }", "@Test\n public void testOptimise_6() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a|a|b\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"b|a|a\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(b|b)*|(a|a)*|a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(c|b|b)*|(a|a)*|a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a*b*|a*b*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a|b\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b|a\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b*|a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|b)*|a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n }", "@Test\n public void testParseRegexp_valid3() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"a b c d\");\n assertEquals(re.toString(), \"abcd\");\n }", "RegExConstraint createRegExConstraint();", "@Test\n public void testOptimise_1() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a**\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"a+*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"a*+\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"a*********************\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a++++++++++++++++++++*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"a????????????????????*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"a********************?\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"a+?*+?*+?*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"a+?\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"a?+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*\");\n }", "@Test\n public void macroParseTest1() throws TapisException\n {\n var s = \"$varname\";\n var m = _pattern.matcher(s);\n var b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"varname\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname ,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n\n s = \"$varname,\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n }", "@Test\n public void testOptimise_4() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)+\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)?\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n }", "private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }", "@Test(expected = InvalidRegexpException.class)\n public void testParseRegexp_invalid8() throws Throwable {\n BasicRegexp.parseRegexp(\"()\");\n }", "@Test\n public void testParseRegexp_valid7() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"abc*def\");\n assertEquals(re.toString(), \"abc*def\");\n }", "public GrandChildOfStringMatch() {}", "@Test\n\tvoid runRegExNoOperands_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Sargon\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "protected String hookGetRegex() \r\n\t{\n\t\treturn \"\\\\s+\"; \r\n\t}", "@Test\n public void testOptimise_7() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a*b*)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"((a|d)*b*c?)*\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(abc)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"((a*|b*)b*c*)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"((a*b*)*b*c*)*\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"((ab)*b*c*)*\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"((a|b)*b*|c*)*\");\n BasicRegexp re8 = BasicRegexp.parseRegexp(\"((a|b)+b?|c)*\");\n BasicRegexp re9 = BasicRegexp.parseRegexp(\"(a*bc*)*\");\n BasicRegexp re10 = BasicRegexp.parseRegexp(\"((a*|b*)+b?|c)*\");\n BasicRegexp re11 = BasicRegexp.parseRegexp(\"(abc**)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|d|b|c)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(ab|b|c)*\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n // Can't optimise further\n assertEquals(re8.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"((a|b)+b?|c)*\");\n // Can't optimise further\n assertEquals(re9.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a*bc*)*\");\n assertEquals(re10.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b|c)*\");\n assertEquals(re11.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(abc*)*\");\n }", "@Override\n\tpublic void visit(Matches arg0) {\n\t\t\n\t}", "private Annotation[] testRegEx(String regEx) {\n\t\tQueriableAnnotation data = this.parent.getActiveDocument();\n\t\treturn ((data == null) ? null : Gamta.extractAllMatches(data, regEx, 64));\n\t}", "@Override\n public boolean isRegex() {\n return false;\n }", "private static String orderRegexpPattern(String regexp)\n {\n // convert expression to pattern\n StringBuffer pattern = null;\n for (int i = 0, limit = regexp.length(); (i < limit); i++)\n {\n char regexpChar = regexp.charAt(i);\n switch (regexpChar)\n {\n case '*':\n case '.':\n case '?':\n case '[':\n if (pattern == null)\n {\n pattern = new StringBuffer(regexp.length()*2);\n pattern.append(regexp.substring(0, i));\n }\n switch (regexpChar)\n {\n case '*':\n pattern.append(\"[^\"+Folder.PATH_SEPARATOR+\"]*\");\n break;\n case '.':\n pattern.append(\"\\\\.\");\n break;\n case '?':\n pattern.append(\"[^\"+Folder.PATH_SEPARATOR+\"]\");\n break;\n case '[':\n pattern.append('[');\n break;\n }\n break;\n default:\n if (pattern != null)\n {\n pattern.append(regexpChar);\n }\n break;\n }\n }\n\n // return converted pattern\n if (pattern != null)\n return pattern.toString();\n return regexp;\n }", "@Test\n public void testDebugPrintBasicRegexp() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n BasicRegexp.debugPrintBasicRegexp(0, re1);\n }", "private String regex() {\n final List<String> keys = new LinkedList<>();\n for (final String key : this.template.split(\"\\\\.\")) {\n if (key.equals(\"*\")) {\n keys.add(\"\\\\w+\");\n } else {\n keys.add(key);\n }\n }\n return String.join(\"\\\\.\", keys);\n }", "public ArticleForAnnotation FindFekRegex(ArticleForAnnotation curArticle) throws Exception {\n // Regular expression to be matched\n// Pattern FekPattern = Pattern.compile(\"((\\\\d+\\\\w{1,2}? +)?[νΝ]\\\\. ?\\\\d+/\\\\d+( *\\\\([Α-Ωα-ω]{1,2}[΄΄'’]? ?\\\\d+\\\\))?)\", Pattern.UNICODE_CASE);\n // Matches Laws and POs (ΠΔ)\n// Pattern FekPattern = Pattern.compile(\"(((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+( *\\\\((ΦΕΚ )?[Α-Ωα-ω]{1,2}[΄`΄'’]? ?\\\\d+((\\\\/|, ?)(\\\\d|\\\\.|-)*)?\\\\))?)\", Pattern.UNICODE_CASE);\n Pattern FekPattern = Pattern.compile(\"(((άρθ[α-ω\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*παρ[α-ωά\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*)|(παρ[α-ωά\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*άρθ[α-ω\\\\.]{0,4} ?\\\\d+,? [Α-Ωα-ω0-9, ]*))?((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+( *\\\\((ΦΕΚ )?[Α-Ωα-ω]{1,2}[΄`΄'’]? ?\\\\d+((\\\\/|, ?)(\\\\d|\\\\.|-)*)?\\\\))?)\", Pattern.UNICODE_CASE);\n Pattern LawPattern = Pattern.compile(\"((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+\", Pattern.UNICODE_CASE);\n // Start searching article text\n String articText = curArticle.articleText;\n Matcher m = FekPattern.matcher(articText);\n while (m.find()) {\n String entityFound = m.group(0);\n\n Matcher mLaw = LawPattern.matcher(entityFound);\n if (!mLaw.find()) {\n continue;\n }\n String entityLaw = mLaw.group(0);\n\n String[] FEKparts = entityFound.split(\"/\", 2);\n int startIndex = m.start();\n int endIndex = m.end();\n String FEK_year = \"\";\n String FEK_issue = \"\";\n String FEK_number = null;\n String urlpdf = \"\";\n String entity_Type = \"fek\";\n\n // Get the second part from a FEK annotation (e.g. from ν. 2873/2000 (Α’ 285) the 2000 (Α’ 285) part)\n // and check if FEK issue and number exist (inside parenthesis)\n if (FEKparts[1].contains(\"(\")) {\n // Check inside that part for mached accent characters (΄ or ' or ’)\n // and if so, we get from this string the FEK issue (e.g. A) and FEK number\n FEK_year = FEKparts[1].substring(0, FEKparts[1].lastIndexOf(\"(\")).trim();\n if (FEKparts[1].contains(\"΄\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"΄\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"΄\"), FEKparts[1].lastIndexOf(\")\")).replace(\"΄\", \"\").trim();\n } else if (FEKparts[1].contains(\"'\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"'\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"'\"), FEKparts[1].lastIndexOf(\")\")).replace(\"'\", \"\").trim();\n } else if (FEKparts[1].contains(\"’\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"’\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"’\"), FEKparts[1].lastIndexOf(\")\")).replace(\"’\", \"\").trim();\n } else if (FEKparts[1].contains(\"`\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"`\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"`\"), FEKparts[1].lastIndexOf(\")\")).replace(\"`\", \"\").trim();\n } else {\n // If doesn't contain on of these characters then we check for space\n // else we get the first character as the FEK issue (e.g. A, B etc)\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\")\")).trim().replace(\"(\", \"\").replace(\")\", \"\");\n if (FEK_issue.startsWith(\"ΦΕΚ \")) {\n FEK_issue = FEK_issue.substring(4);\n } else if (FEK_issue.startsWith(\"ΦΕΚ\")) {\n FEK_issue = FEK_issue.substring(3);\n }\n\n if (FEK_issue.contains(\" \")) {\n String[] splitedIssue = FEK_issue.split(\" \");\n FEK_issue = splitedIssue[0];\n FEK_number = splitedIssue[1];\n } else {\n FEK_number = FEK_issue.substring(1);\n FEK_issue = FEK_issue.substring(0, 1);\n }\n }\n if (FEK_issue.startsWith(\"ΦΕΚ \")) {\n FEK_issue = FEK_issue.substring(4);\n }\n String[] FEK_num_tokens = FEK_number.split(\"(\\\\/|-| |,)\");\n\n FEK_number = FEK_num_tokens[0];\n\n // Set the corresponding issue checkbox based on the FEK issue retrieved above\n String checkBoxIssue = \"\";\n switch (FEK_issue) {\n case \"Α\":\n checkBoxIssue = \"chbIssue_1\";\n break;\n case \"Β\":\n checkBoxIssue = \"chbIssue_2\";\n break;\n case \"Γ\":\n checkBoxIssue = \"chbIssue_3\";\n break;\n case \"Δ\":\n checkBoxIssue = \"chbIssue_4\";\n break;\n case \"\":\n checkBoxIssue = \"\";\n break;\n }\n\n // Perform the POST request\n PostRequestFEK httpRequest = new PostRequestFEK();\n // Get the corresponding pdf url of the FEK\n urlpdf = httpRequest.sendPost3(FEK_year, FEK_issue, FEK_number, checkBoxIssue);\n// if (urlpdf.length() == 0) {\n// urlpdf = \"-1\";\n// }\n } else {\n FEK_year = FEKparts[1];\n String[] toks = entityLaw.split(\"(\\\\.|,| |\\\\/)\");\n if (entityLaw.toLowerCase().startsWith(\"ν\")) {\n entity_Type = \"law\";\n } else if (entityLaw.toLowerCase().startsWith(\"π\")) {\n entity_Type = \"pd\";\n }\n String item_number = toks[toks.length - 2];\n PostRequestFEK httpRequest = new PostRequestFEK();\n urlpdf = httpRequest.sendPost4(FEK_year, item_number, entity_Type);\n }\n // Add the current annotation found into the current article's annotations list\n Annotation currentAnnotation = new Annotation(entityFound, startIndex, endIndex, urlpdf, entity_Type, entityLaw);\n curArticle.annotations.add(currentAnnotation);\n }\n // Return the article back to the process\n return curArticle;\n }", "static ConscellNode parse_re(int level) throws IOException {\n if(level == 0) {\n cout.printf(\"%nProcessing Expression: \\\"%s\\\"%n\", curr_line);\n }\n ConscellNode root = new ConscellNode(parse_simple_re(level + 1), \"RE\", level);\n ConscellNode last = root;\n\n while (curr_type == TokenType.VERT) {\n match(TokenType.VERT);\n last.setNext(new ConscellNode(parse_simple_re(level + 1), \"VERT\", level + 1));\n last = last.getNext();\n }\n return root;\n }", "String getRegExpLikeOperator(String column, String regexp);", "public Pattern buildPattern ()\n {\n int flags = 0;\n if ( this.canonicalEquivalence ) flags += Pattern.CANON_EQ;\n if ( this.caseInsensitive ) flags += Pattern.CASE_INSENSITIVE;\n if ( this.comments ) flags += Pattern.COMMENTS;\n if ( this.dotall ) flags += Pattern.DOTALL;\n if ( this.multiline ) flags += Pattern.MULTILINE;\n if ( this.unicodeCase ) flags += Pattern.UNICODE_CASE;\n if ( this.unixLines ) flags += Pattern.UNIX_LINES;\n return Pattern.compile(this.regex, flags);\n }", "public static void main(String[] args) {\n Pattern p = Pattern.compile(\"2*5?$\");\n Matcher m = p.matcher(regex1);\n if (m.matches()) {\n System.out.println(\"YES ¦ \");\n } else {\n System.out.println(\"NO\");\n }\n\n }", "private String genNonGreedyRegex(int charloc,\n String specification,\n String eolcapture,\n String nonGreedyCapture) {\n\n return (charloc == specification.length()) ? eolcapture : nonGreedyCapture;\n }", "public abstract String getRegexTableMarker();", "public static String createRegularExpression(AutomatonSpecification automaton) {\n String regexp = \"\";\n State initial = automaton.getInitialState();\n List<State> finalStates = new LinkedList<State>();\n\n for (State state : automaton.allStates()) {\n transitionLabels.put(hashOf(state, state), \"\");\n }\n\n String label;\n List<State> next; //lista tymczasowa.\n List<State> previous; //lista tymczasowa.\n for (State state : automaton.allStates()) {\n next = new LinkedList<State>();\n for (OutgoingTransition out : automaton.allOutgoingTransitions(state)) {\n State target = out.getTargetState();\n if (!next.contains(target)) {\n next.add(target);\n if (previousStates.containsKey(target)) {\n previous = previousStates.get(target);\n previous.add(state);\n previousStates.put(target, previous);\n } else {\n previous = new LinkedList<State>();\n previous.add(state);\n previousStates.put(target, previous);\n }\n label = out.getTransitionLabel().toString();\n for (char character : SPECIAL_CHARACTERS)\n if (label.charAt(0) == character)\n label = QUOTE + label;\n } else {\n label = transitionLabels.get(hashOf(state, target)) + '|';\n StringBuffer buf = new StringBuffer();\n for (char character : SPECIAL_CHARACTERS)\n if (out.getTransitionLabel().toString().charAt(0) == character) {\n buf.append(QUOTE);\n break;\n }\n label = label + buf.toString() + out.getTransitionLabel().toString();\n }\n transitionLabels.put(hashOf(state, target), label);\n }\n nextStates.put(state, next);\n if (automaton.isFinal(state))\n finalStates.add(state);\n }\n\n for (State state : automaton.allStates()) {\n if (!automaton.isFinal(state) && state != initial) {\n remove(state);\n }\n }\n\n String r, s, u, t, reg;\n for (State state : finalStates) {\n transitionLabelsBackup = new HashMap<String, String>(transitionLabels);\n previousBackup = new HashMap<State, List<State>>();\n for (State prevState : previousStates.keySet()) {\n previous = new LinkedList<State>();\n for (State st : previousStates.get(prevState))\n previous.add(st);\n previousBackup.put(prevState, previous);\n }\n nextBackup = new HashMap<State, List<State>>();\n for (State prevState : nextStates.keySet()) {\n next = new LinkedList<State>();\n for (State st : nextStates.get(prevState))\n next.add(st);\n nextBackup.put(prevState, next);\n }\n\n for (State toRemove : finalStates) {\n if (state != toRemove && toRemove != initial)\n remove(toRemove);\n }\n if (state == initial) {\n if (regexp.equals(\"\")) {\n if (transitionLabels.get(hashOf(state, state)).equals(\"\"))\n regexp = \"(\\u03B5)\";\n else\n regexp = \"(\" + transitionLabels.get(hashOf(state, state)) + \")*\";\n } else\n regexp = regexp + \"|\" + \"(\" + transitionLabels.get(hashOf(state, state)) + \")*\";\n } else {\n r = getLabel(initial, initial);\n s = getLabel(initial, state);\n u = getLabel(state, state);\n t = getLabel(state, initial);\n if (r.length() > 0) {\n if (t.length() > 0)\n reg = \"(\" + r + \"|\" + \"(\" + s + \")\" + \"(\" + u + \")*\" + \"(\" + t + \")\" + \")*\"\n + \"(\" + s + \")\" + \"(\" + u + \")*\";\n else\n reg = \"(\" + r + \")*\" + \"(\" + s + \")\" + \"(\" + u + \")*\";\n } else {\n if (t.length() > 0)\n reg = \"((\" + s + \")\" + \"(\" + u + \")*\" + \"(\" + t + \")\" + \")*\" + \"(\" + s + \")\"\n + \"(\" + u + \")*\";\n else\n reg = \"(\" + s + \")\" + \"(\" + u + \")*\";\n }\n if (regexp.equals(\"\"))\n regexp = reg;\n else\n regexp = regexp + \"|\" + reg;\n }\n previousStates.clear();\n previousStates.putAll(previousBackup);\n nextStates.clear();\n nextStates.putAll(nextBackup);\n transitionLabels.clear();\n transitionLabels.putAll(transitionLabelsBackup);\n }\n\n regexp = fixKleene(fixBrackets(regexp));\n\n return regexp.replace(String.valueOf(QUOTE), \"\\\\\");\n }", "public static void main(String[] args) {\r\n\t\t boolean matches_1 = Pattern.matches(\"[a-zA-Z0-9]{4}\", \"0Aa1\");\r\n\t\t boolean matches_2 = Pattern.matches(\"[a-zA-Z0-9]{4}\", \"0A@a1\");\r\n\t\t\t System.out.println(\"Regular Expression is \"+matches_1 +\" for given string(0Aa1)\");\r\n\t\t\t System.out.println(\"Regular Expression is \"+matches_2 +\" for given string(0A@a1)\");\r\n\t}", "@Override public boolean\r\n matches(String regex, CharSequence input) {\n return false;\r\n }", "public void addPattern(TokenPattern pattern) throws Exception {\n RE[] temp = regExps;\n RE re;\n\n re = new JavaRE(pattern.getPattern());\n regExps = new RE[temp.length + 1];\n System.arraycopy(temp, 0, regExps, 0, temp.length);\n regExps[temp.length] = re;\n pattern.setDebugInfo(\"native Java regexp\");\n super.addPattern(pattern);\n }", "public boolean match( ElementExp p ) { return false; }", "@Override\n\tpublic void visit(Matches arg0) {\n\n\t}", "static Extractor byRegex(String format, Object... args) {\n\t\t\treturn byRegex(RegexUtil.compile(format, args));\n\t\t}", "private NFA factor() {\n NFA base = base();\n //if the regex is longer and the next char is star operator\n while (more() && peek() == '*') {\n eat('*');\n base = star(base);\n }\n return base;\n }", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "private static String replaceAll(Matcher matcher, String rep) {\n try {\n StringBuffer sb = null ; // Delay until needed\n while(matcher.find()) {\n if ( sb == null )\n sb = new StringBuffer() ;\n else {\n // Do one match of zerolength string otherwise filter out.\n if (matcher.start() == matcher.end() )\n continue ;\n }\n matcher.appendReplacement(sb, rep);\n }\n if ( sb == null )\n return null ;\n matcher.appendTail(sb);\n return sb.toString();\n } catch (IndexOutOfBoundsException ex) {\n throw new ExprEvalException(\"IndexOutOfBounds\", ex) ;\n }\n }", "void matchStart();", "public String buildTagRegex() {\n return buildTagRegex(\"(.+?)\", true);\n }", "public static void main(String[] args) throws Exception {\n String patronA = \"[0-5]\";\n\n // conjunto de letras de \"a\" a \"c\"\n String patronB = \"[a-c]\";\n\n // conjunto de todas las letras minusculas\n String patronC = \"[a-z]\";\n\n // conjunto de numeros\n String patronD = \"[0-9]\";\n\n // ejemplo con tipo de dato string\n String textoAlfanumerico = \"0123aaaa\";\n System.out.println(\"Texto alfanumerico:\" + textoAlfanumerico);\n\n String replace1 = textoAlfanumerico.replaceAll(patronA, \"X\");\n System.out.println(\"Reemplazo de numeros con X: \" + replace1);\n\n String replace2 = textoAlfanumerico.replaceAll(patronB, \"X\");\n System.out.println(\"Reemplazo de letras con X: \" + replace2);\n\n\n //[0-5][a-c];\n //String patronComplejo = patronA + patronB;\n\n //[a-c]*[0-5]*\n //String patronComplejo = patronA + \"*\" + patronB + \"*\";\n\n //\"[a-z]+\"\n\n // + = una coincidencia\n // * = ninguna o muchas\n\n //String patronComplejo = \"(\" + patronA + patronC + \")+\";\n String patronComplejo = \"(\" + patronC + \")+\";\n\n String texto = \"hola, aacc este bbcc es mi 55222aaa texto 2663aaaa blah blah\";\n System.out.println(\"patron complejo:\" + patronComplejo);\n System.out.println(texto);\n\n Pattern pattern = Pattern.compile(patronComplejo);\n Matcher matcher = pattern.matcher(texto);\n\n // buscar ocurrencias\n while (matcher.find()) {\n System.out.println(\"Encontrado:\" + matcher.group());\n }\n\n\n }", "public GrammaticaRE(String regex) throws Exception {\n regExp = new RegExp(regex, ignoreCase);\n }", "public RegexPatternBuilder ()\n {\n this.regex = null;\n }", "@Test\r\n public void testAddRemoveRegexp() throws RegexpParserException {\r\n assertFalse(rs.hasRegexp(reString));\r\n rs.add(reString, a);\r\n assertTrue(rs.hasRegexp(reString));\r\n rs.remove(reString, a);\r\n assertFalse(rs.hasRegexp(reString));\r\n }", "void replaceRegex() {\n int index = -1;\n for (int i = 0; i < regex.elist.size(); i++) {\n if (regex.elist.get(i).isShareableUnit) {\n ElementShareableUnit share = (ElementShareableUnit) regex.elist.get(i);\n if (share.share == this) {\n index = i;\n }\n }\n }\n //replace in parenthesis\n for (int i = 0; i < regex.elist.size(); i++) {\n Element e = regex.elist.get(i);\n if (e.isParentheis) {\n e.replaceRegex(this);\n }\n\n }\n if (index == -1) {\n System.out.println(\"there is error \" + this.getString());\n } else {\n regex.elist.remove(index);\n for (int i = 0; i < this.lelement.size(); i++) {\n regex.elist.add(index + i, this.lelement.get(i));\n }\n }\n //System.out.println(\"After: \" + this.regex.getString());\n }", "private String genRegex(int charLoc, String captureToken, String specification) throws PatternBuilderException {\n\n //Remove leading digits from string before retrieving capture type\n String strippedLeadingDigits = StringUtil.dropWhile(Character::isDigit,captureToken);\n\n switch (CaptureType.getType(strippedLeadingDigits)) {\n case DEFAULT:\n return genNonGreedyRegex(charLoc,specification,\n RegexPatterns.EOL_CAPTURE.getPattern(),\n RegexPatterns.NON_GREEDY.getPattern());\n case GREEDY:\n return RegexPatterns.GREEDY.getPattern();\n case WHITESPACE:\n return genWhiteSpaceRegex(\n Integer.parseInt(\n StringUtil.dropWhile(Character::isAlphabetic, strippedLeadingDigits)\n ),\n RegexPatterns.VARIABLE_WHITESPACE.getPattern(),\n RegexPatterns.ZERO_WHITESPACE.getPattern());\n\n case UNKNOWN: default:\n throw new PatternBuilderException(String.format(\"Unable to generate regex from %s\", captureToken));\n }\n }", "@BeforeEach\n\tvoid setUpValidRE(){\n\t\tvalidRE= new String[lengthValid];\n\t\t// ab\n\t\tvalidRE[0] = \"ab\";\n\t\t// (ab)\n\t\tvalidRE[1] = \"(ab)\";\n\t\t//(ab)*\n\t\tvalidRE[2] = \"(ab)*\";\n\t\t// a???\n\t\tvalidRE[3] = \"a???\";\n\t\t// a***\n\t\tvalidRE[4] = \"a***\";\n\t\t// a+++\n\t\tvalidRE[5] = \"a+++\";\n\t\t// (((a)))\n\t\tvalidRE[6] = \"(((a)))\";\n\t\t// (a | ab | c*)*\n\t\tvalidRE[7] = \"(a | ab | c*)*\";\n\t\t// (a | ab | c*)**??\n\t\tvalidRE[8] = \"(a | ab | c*)*??\";\n\t\t// ( a | (ab | cd)+ )+\n\t\tvalidRE[9] = \"(a | (ab | cd)+)+\";\n\t\t// 0 (01 | (02) * | (03)++) | (1?01?)\n\t\tvalidRE[10] = \"0 (01 | (02) * | (03)++) | (a?01?)\";\n\t\t// a | &\n\t\tvalidRE[11] = \"a | &\";\n\t\t// &*\n\t\tvalidRE[12] = \"&*\";\n\t\t// (())* (empty language)\n\t\tvalidRE[13] = \"(())*\";\n\t\t// (a*b)*\n\t\tvalidRE[14] = \"(a*b)*\";\n\t\t// (a | & | a*b?c+)*\n\t\tvalidRE[15] = \"(a | & | a*b?c+)*\";\n\t}", "protected LogParserMatch() {\n\t}", "public void testRegEx(){\n\t\tString emptyLineRegEx = \"\\\\s*\";\r\n\t\t\r\n\t\tassertTrue(\"\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\" \".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\n\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\t\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\r\".matches(emptyLineRegEx));\r\n\t\tassertTrue(\"\\n \\t \".matches(emptyLineRegEx));\r\n\t\tassertTrue(\" \\n \\t \\n\\n\\n \".matches(emptyLineRegEx));\r\n\t\tassertFalse(\" . \\n \".matches(emptyLineRegEx));\r\n\t\t\r\n\t\t// space or tab any number of times\r\n\t\tString spaceTabRegEx = \"[ \\t]*\";\r\n\t\t\r\n\t\tassertTrue(\"\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \".matches(spaceTabRegEx));\r\n\t\tassertTrue(\"\\t\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \".matches(spaceTabRegEx));\r\n\t\tassertTrue(\"\\t\\t\".matches(spaceTabRegEx));\r\n\t\tassertTrue(\" \\t \\t \\t \".matches(spaceTabRegEx));\r\n\t\tassertFalse(\"\\n\".matches(spaceTabRegEx));\r\n\t\tassertFalse(\" l \".matches(spaceTabRegEx));\r\n\t\tassertFalse(\"\\t\\n\".matches(spaceTabRegEx));\r\n\t\t\r\n\t\t\r\n\t\t//Nucleotide sequence\r\n\t\tString ntRegEx = \"[ACGTacgt]+\";\r\n\t\t\r\n\t\tassertTrue(\"CAGTATGCATACC\".matches(ntRegEx));\r\n\t\tassertTrue(\"CTTATTTCAGGAAAATTTTTTCAAAACTGTAAAACAAAAACCATTTTTCACAGAATCTAAGGGTATCTGAAAGCTTAAAATAACTTCAGAAAGATATCAATTCCAGCTGTTTAGTACCTGAACTGTCTGTAAACGTTTCTTCTCGAATTATAGAAAATTTTCCACTTTTTCAAGTTCAGGTTTTCAAGAAACCCCACGATTTCCACTCATCGTTTCCAATGTCCAATTTCCCATCCAATTTGCCGCACTCTGACCCAATGACTTGTTCCTTTGCCAATCAATGCTACCTAATAAATTTAAAAGTTTAACACGCATCCAATTGACACACAGGTAACCGCCCTTTCTTCTTTTACATAATTCGGAAACTTCAAAGAGCCGAAGGTGTCGGTTGTAGCAGCAGCGGAGGAACGGATGCCAATTGCGCAACTCTCGGCTCAACTCTTTTAGTGCTCCGAGAGCAGGAAGAAGAATACTGTTGGGTTGTAATAAAGACGGATGTTTTTGTTCAGAGTAGATTAGCTCGTGTTTGATTGGATTTGACCGGATCAAGAGGGGAATGTCCTGGTGGAATTAAATTTTATTAGAATAAATTGTATTTGGTGTTTAAATTCGAATCAATAATATTTATGAGCTTTAATGAATAAGTGTTAGATTATATAATTCTATAATTTTTGAACAAGCAATTCAAAAAGAAAACAAATTTTAGTAACCTCCGAAATCAAGCTGGGTGGCCTCTAGAAGTTTTGAAAAAACTTTTTTTATATTCTGTTGGAGTTTTTTTAAGTTTTATAATTATAGGTTAATCTTTCTAATTTGTAAGCTTTTTCTTAACCAATTTTTTTTGTTAACATTTTTTTGGAATTATGCTATATGACCTATACCTAAAACAGTTTAAAAGTTTAAAAAAATTTTCTATATTTTTCACTTCGTATTGAACCTCCTGGGTACATATATTGACAGCACATATCTTGTTTGTCTCAGATTTTATCAAATAAGTTTAACAAGTAAACCATGCACCAAATATTTTTCTAGGTCTCTGTAGTTAGGAAATATTTAATAAAAATAAAAATAACCGAGATATGAGCCATCAAAGTAGATCAATTAAGGCACAGGAAAAAAGATCTGAATAAAATCGAAGTTCTTAAAAATATAAATCAAACAAAATTTTTTCCAGAATTTCAGCCGAGAATTTCCAGCCGATTTGTTTATATTTTCCACATCACTCCCCACACTTCTCTCACACAAACACGATAAAATCTTGAGAAGCAATTAGCGCCAATCAACTCAACACAAAAACGAAAAGCCAACGAAAAGCTAAAGCTATCATCGTTGTCGCGTCTATGAGCAACTCAATCGTTCATCATCCTCATCTTCAGAGTGCTCAAACCTACCGTAACCCGAATTGGGCGGAGCCAAAGGGTCCGAAACAGTGCACCAGGGCGGGGAGGGACCCTGAGAAACGAGAGGGAAGTGAGCAATTGTTGAAGTGTCAGTTGTGCTCATCGAGGTCCGATGAAGAGACGCGCCTGCTCACCTACACAACTGACTTCCCCCATATACCTTTTTCTAGAATTTCCTTTTTTAGATTTATACGGTCAGGTAAAAAGGTAGAGTTTTACAGTGTAGAAATTAGGAAATTGCTCAAAAAGCCGAGCAGAATGCATATAAGAAGTACCATAGCCCCAAAGATTCGATTTTCCAGGGTTCAATCAATTTTTGTACTTTGACAGCGTATATCTCAGTTTTCTTTGATTTTATCAAAAACTAGTCAACTGACAAAATACTTGAAAAGTATTCCTTTATATTTTGGTAGCTGACCATTGTTTGTTAAAATATAAGGGAATCGAAATGTCGGTTATCAAAGTAGAACCTAACCTAAATCGCTATATATGCTATTTTTCAAAAAAAAAAACACGTTTTACTTTGTCTCAACTTATTAATATTCTTTAATATTTTTTCTATTTCTACCATTTTCCAAATTTTCCAATAATTTTCCAGAA\".matches(ntRegEx));\r\n\t\tassertTrue(\"cagtagta\".matches(ntRegEx));\r\n\t\tassertTrue(\"aCgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"aCXtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a.CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"a1CgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"aNCgtTG\".matches(ntRegEx));\r\n\t\tassertFalse(\"AGTATAATGACAACTTACAAAzTTGGGAAATCTGGAAAACCGAGC\".matches(ntRegEx));\r\n\t\t\r\n\t\t//PWM line \r\n\t\t// unicode for | is \\u007C\r\n\t\t// space: \\u0020\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"\\u007C\");\r\n\r\n\t\tString pwmRexEx = \"[ACGT][\\\\t ]+\\\\|([\\\\t ]+[0-9]+)+\";\r\n\t\t\r\n\t\tassertTrue(\"G\t|\t12 \t2\t 2343\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A | 1 2 3\".matches(pwmRexEx));\r\n\t\tassertTrue(\"C | 11 2234 3\".matches(pwmRexEx));\r\n\t\tassertTrue(\"T |\t1\t12\t3123\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A\t|\t49\t0\t288\t26\t77\t67\t45\t50\".matches(pwmRexEx));\r\n\t\tassertTrue(\"A\\t|\\t49\\t0\\t288\\t26\\t77\\t67\\t45\\t50\".matches(pwmRexEx));\r\n\t\tassertFalse(\"a | 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A |\\n 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A 1 2 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"A |\t1 C 3\".matches(pwmRexEx));\r\n\t\tassertFalse(\"C |1 2 3\".matches(pwmRexEx));\r\n\t\t\r\n\t\t\r\n\t\t// fasta sequence name\r\n\t\t\r\n\t\tString fastaNameSeqRegEx = \">[ \\t]*\\\\w+.*\"; \r\n\t\t\r\n\t\tassertTrue(\"> name \".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">name\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">\\t name\\t\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\"> name123 stuf\\t12342 \\t\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\">check sda\".matches(fastaNameSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\".matches(fastaNameSeqRegEx));\r\n\t\t\r\n\t\tassertFalse(\"\".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\" > name \".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\">\\tname\\t\\n\".matches(fastaNameSeqRegEx));\r\n\t\tassertFalse(\">\\t\".matches(fastaNameSeqRegEx));\r\n\t\t\r\n\t\t\r\n\t\t//fasta file sequence\r\n\t\t\r\n\t\tString oneFastaSection = \"\\\\s*\" + fastaNameSeqRegEx + \"\\\\s*\\n+\" + \"[ACGTacgt]+\" ;\r\n\t\tString fastaSeqRegEx = \"(\" + oneFastaSection + \"[ \\t\\r]*\\n\" + \")*\" + oneFastaSection + \"\\\\s*\" ;\r\n\t\t\r\n\t\tassertTrue(\"> Y105E8B.1c\\nacgtacgtacggttacCTTACAAAATTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGA\\n\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n>C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"\\t\\t\\t\\t\\t\\n> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\t\\t\\t\\t\\n> C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAAA\\n\\t\\t \\n \\t\".matches(fastaSeqRegEx));\r\n\t\tassertTrue(\"\\t\\t\\t\\t\\r\\n> negExSeq_0_B0304.1\\r\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\t\\t\\t\\t\\n> C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAAA\\n\\t\\t \\n \\t\".matches(fastaSeqRegEx));\r\n\t\tString realOutput = \"\\t\\t\\t\\t\\t\\r\\n> B0304.1\\r\\nCTTATTTCAGGGAA\\r\\n\\r\\n> F29F11.5\\r\\nGCCACATGG\\r\\n\\r\\n\\t\\t\\t\";\r\n\t\tassertTrue(realOutput.matches(fastaSeqRegEx));\r\n\t\r\n\t\t\r\n\t\t\r\n\t\tassertFalse(\"\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c\\n\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c\\nAGTATAATGACAACTTACAAAzTTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> Y105E8B.1c acgtacgtacggttacCTTACAAAATTGGGAAATCTGGAAAACCGAGC\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC >C02B8.4\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"> negExSeq_0_B0304.1\\nCCACGCTTGATATATGGAAGCGTACAACAGGCATTATTCCATC\\n\\nCTTATTTCAGGAAAATTTTTTCAAA\".matches(fastaSeqRegEx));\r\n\t\tassertFalse(\"\".matches(fastaSeqRegEx));\r\n\t\t\r\n\t\t\r\n\t\t// pwm line: \r\n\r\n\t\tString pwmLineRegEx1 = \"[ACGTacgt][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\";\r\n\t\t\r\n\t\tassertTrue(\"A | 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A |2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A| 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertTrue(\"A\\t| \\t2 \\t\\t\\t26 7\\t\\t \".matches(pwmLineRegEx1));\r\n\r\n\t\tassertFalse(\"\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\" \\t \\t \".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"abra-cadabra\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"> test A | 1 2 3\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A | 2 A 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx1));\r\n\t\tassertFalse(\"A [ 2 26 7]\".matches(pwmLineRegEx1));\r\n\t\t\r\n\t\t\r\n\t\tString pwmLineRegEx2 = \"[ACGTacgt][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\";\r\n\r\n\t\tassertTrue(\"A [ 2 26 7]\".matches(pwmLineRegEx2));\r\n\t\tassertTrue(\"A\\t[\\t2\\t26\\t7\\t]\".matches(pwmLineRegEx2));\r\n\t\tassertTrue(\"A[ 2 26 7]\".matches(pwmLineRegEx2));\r\n\t\t\r\n\t\tassertFalse(\"\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\" \\t \\t \".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"abra-cadabra\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"> test A | 1 2 3\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A | 2 A 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A [ ]\".matches(pwmLineRegEx2));\r\n\t\tassertFalse(\"A | 2 26 7\".matches(pwmLineRegEx2));\r\n\t\t\r\n\t\tString pwmRegEx1 = \"[Aa][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Cc][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Gg][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\\n\" +\r\n\t\t\t\t\"[Tt][ \\t]*\\\\|([ \\t]*\\\\d+)+[ \\t]*\\\\s*\";\r\n\t\t\r\n\t\tassertTrue(\"A | 2 26 7\\nC | 2 26 7\\nG | 2 26 7\\nT | 2 26 7\".matches(pwmRegEx1));\r\n\t\tassertTrue(\"A | 2 26 7\\nC | 2 26 7\t\\nG | 2 26 7\\nT |\t2\t\t26 7\\r\\n\".matches(pwmRegEx1));\r\n\r\n\t\tassertFalse(\"\".matches(pwmRegEx1));\r\n\t\tassertFalse(\"A | 2 26 7\\nC | 2 26 7\\nG | 2 26 7\".matches(pwmRegEx1));\r\n\t\tassertFalse(\"A 2 26 7\\nC | 2 26 7\t\\nG | 2 26 7\\nT |\t2\t\t26 7\\r\\n\".matches(pwmRegEx1));\r\n\r\n\t\r\n\t\tString pwmRegEx2 = \"[Aa][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Cc][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Gg][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\\n\" +\r\n\t\t\"[Tt][ \\t]*\\\\[([ \\t]*\\\\d+)+[ \\t]*\\\\][ \\t]*\\\\s*\";\r\n\r\n\t\tassertTrue(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertTrue(\"A [\\t2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\\n\".matches(pwmRegEx2));\r\n\r\n\t\tassertFalse(\"\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]G [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"A [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nA [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\tassertFalse(\"\\tA [ 2 26 7]\\r\\nC [ 2 26 7]\\r\\nG [ 2 26 7]\\nT [ 2 26 7]\".matches(pwmRegEx2));\r\n\t\t\r\n\t}", "@Test\n public void testGroups() {\n assertThat(regex(or(e(\"0\"), e(\"1\"), e(\"2\")))).isEqualTo(\"0|1|2\");\n // Optional groups always need parentheses.\n assertThat(regex(opt(e(\"0\"), e(\"1\"), e(\"2\")))).isEqualTo(\"(?:0|1|2)?\");\n // Once a group has prefix or suffix, parentheses are needed.\n assertThat(regex(\n seq(\n or(e(\"0\"), e(\"1\")),\n e(\"2\"))))\n .isEqualTo(\"(?:0|1)2\");\n }", "public RegexFormatter(Pattern pattern) {\n this();\n setPattern(pattern);\n }", "@Test\n public void testNesting() {\n assertThat(regex(\n seq(\n e(\"0\"),\n or(\n e(\"1\"),\n seq(\n e(\"2\"),\n opt(e(\"3\"), e(\"4\")))),\n e(\"5\"), e(\"6\"))))\n .isEqualTo(\"0(?:1|2(?:3|4)?)56\");\n }", "public static String fromSableCCRegexp(ARegExp regexp, final Map<String, ARegExp> helpers)\n {\n String basic = asSimpleString(regexp);\n if (basic != null) return basic;\n\n final StringBuilder buffer = new StringBuilder();\n\n // handle regexp nodes using SableCC's tree traversal API\n regexp.apply(new AnalysisAdapter() {\n public void caseARegExp(ARegExp node)\n {\n // there must be at least one PConcat node\n Iterator<PConcat> iter = node.getConcats().iterator();\n iter.next().apply(this);\n\n // further PConcat nodes are unioned (| operator) together\n while (iter.hasNext()) {\n buffer.append('|');\n iter.next().apply(this);\n }\n }\n\n public void caseAConcat(AConcat node)\n {\n // AConcat child nodes are concatenated together\n for (PUnExp child : node.getUnExps())\n child.apply(this);\n }\n\n public void caseAUnExp(AUnExp node)\n {\n char op = '\\0';\n\n // check out which unary operator is present\n if (node.getUnOp() instanceof AQMarkUnOp)\n op = '?';\n\n else if (node.getUnOp() instanceof APlusUnOp)\n op = '+';\n\n else if (node.getUnOp() instanceof AStarUnOp)\n op = '*';\n\n // if there no operator present, just output the basic node as-is\n if (op == '\\0') {\n node.getBasic().apply(this);\n\n // otherwise, wrap the basic node in parens and add the operator\n } else {\n buffer.append('(');\n node.getBasic().apply(this);\n buffer.append(')').append(op);\n }\n }\n\n public void casePChar(PChar node)\n {\n // determine what kind of character encoding\n // (text, dec or hex) is in use\n char chr = '\\0';\n\n // as a single character in single quotes\n if (node instanceof ACharChar)\n chr = ((ACharChar)(node)).getChar().getText().charAt(1);\n\n // as a hexadecimal number\n else if (node instanceof AHexChar)\n chr = (char)(Integer.parseInt(\n ((AHexChar)(node)).getHexChar().getText().substring(2)\n ));\n\n // as a regular decimal number\n else if (node instanceof ADecChar)\n chr = (char)(Integer.parseInt(\n ((ADecChar)(node)).getDecChar().getText()\n ));\n\n // escape if reserved\n if (RESERVED_CHARS.contains(chr))\n buffer.append('\\\\');\n\n buffer.append(chr);\n }\n\n public void caseAStringBasic(AStringBasic node)\n {\n // a simple string in single quotes\n String str = node.getString().getText();\n str = str.substring(1, str.length() - 1);\n\n // split the string on double quotes and individually\n // quote each piece to avoid quoting issues\n for (String chk : str.split(\"\\\"\"))\n buffer.append('\"').append(chk).append('\"');\n }\n\n public void caseAIdBasic(AIdBasic node)\n {\n // resolve the id and re-invoke this handler\n String id = node.getId().getText();\n\n ARegExp resolved = helpers.get(id);\n if (resolved == null)\n throw new RuntimeException(\"Unknown helper '\" + id + \"'\");\n\n resolved.apply(this);\n }\n\n public void caseARegExpBasic(ARegExpBasic node)\n {\n // add parens and recurse over sub-regexps\n buffer.append('(');\n node.getRegExp().apply(this);\n buffer.append(')');\n }\n\n public void caseAOperationSet(AOperationSet node)\n {\n String op = null;\n\n // '+' operator corresponds to union\n if (node.getBinOp() instanceof APlusBinOp)\n op = \"|\";\n\n // '-' operator corresponds to subtraction,\n // which is in turn intersection with complement\n else if (node.getBinOp() instanceof AMinusBinOp)\n op = \"&~\";\n\n // stitch everything together and wrap with parens to avoid\n // interactions with other operators\n buffer.append('(');\n node.getLeft().apply(this);\n\n buffer.append(op);\n\n node.getRight().apply(this);\n buffer.append(')');\n }\n\n public void caseAIntervalSet(AIntervalSet node)\n {\n // corresponds directly to a character class;\n // just add brackets and set both ends of the range\n buffer.append('[');\n casePChar(node.getLeft());\n\n buffer.append('-');\n\n casePChar(node.getRight());\n buffer.append(']');\n }\n\n public void caseACharBasic(ACharBasic node)\n {\n casePChar(node.getChar());\n }\n\n public void caseASetBasic(ASetBasic node)\n {\n node.getSet().apply(this);\n }\n });\n\n return buffer.toString();\n }", "static Extractor byRegex(Pattern pattern) {\n\t\t\treturn Splitter.regexGroupExtractor(pattern);\n\t\t}", "Pattern getTagPattern();", "public RegexPatternBuilder (String regex)\n {\n this.regex = regex;\n }", "@Test\n\tvoid runRegEx_IllegalCharacters() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"|*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\tactualScore += 10;\n\t\t}\n\t}", "private Pattern compilePattern(String pattern) throws PatternBuilderException {\n try{\n return Pattern.compile(pattern);\n } catch (PatternSyntaxException pse) {\n throw new PatternBuilderException(String.format(\"unable to compile regex for pattern: %s\", pattern), pse);\n }\n }", "private String buildWordMatch(Matcher matcher, String word){\n return \"(\" + matcher.replaceAll(\"% \"+word+\" %\")\n + \" or \" + matcher.replaceAll(word+\" %\")\n + \" or \" + matcher.replaceAll(word)\n + \" or \" + matcher.replaceAll(\"% \"+word) + \")\" ;\n }", "public static String extractExpr(Line.Part lp, String text) {\n int bp = lp.getColumn(); // beginning of the exp\n int ep = lp.getColumn(); // end of the expr\n int len = text.length();\n\n if (lp.getColumn() >= len) {\n return null; // pointed outside the current line\n }\n char[] str = new char[len + 1]; // leave room for '\\0'\n text.getChars(0, len, str, 0);\n str[len] = 0;\n\n // Search forwards. Accept all alpha numeric characters, _, and\n // array indexing (provided it's balanced)\n int bbalance = 0; // Balance of brackets []\n int pbalance = 0; // Balance of parentheses ()\n boolean foundEnd = false; // Found the boundary of the expression\n for (; !foundEnd && str[ep] != 0; ep++) {\n if (Character.isLetterOrDigit(str[ep]) || str[ep] == '_') {\n continue; // C token\n }\n switch (str[ep]) {\n case '[':\n bbalance++;\n break;\n case ']':\n if (str[ep] == ']') {\n bbalance--;\n if (bbalance < 0) {\n foundEnd = true;\n break;\n }\n }\n break;\n case '*': // Allow *'s: for example in \"foo[*bar]\"\n break;\n case ':': // Foo::bar\n // pass only scope members, see IZ 206740\n if (str[ep+1] != ':') {\n foundEnd = true;\n } else {\n ep++;\n }\n break;\n default:\n foundEnd = true;\n break;\n }\n if (foundEnd) {\n break; // To prevent e++ in loop iteration\n }\n }\n // Search backwards. Just like forwards, but also accept function calls ()\n // and dereferencing ->, and look for a cast in front of the expression\n bbalance = 0;\n pbalance = 0;\n foundEnd = false;\n // for (; !foundEnd && (bp <= pos); bp--) {\n for (; !foundEnd && (bp >= 0); bp--) {\n if (Character.isLetterOrDigit(str[bp]) || str[bp] == '_') {\n continue; // C identifier\n }\n switch (str[bp]) {\n case ')':\n // Special case: I need to see if this is a\n // function call (in which case I proceed as\n // usual) or a cast. If it's a cast I want to\n // find the matching parenthesis and stop\n // (since a cast can contain stuff that I\n // don't otherwise allow, like *, whitespace,\n // etc.) This allows me to point at \"(char\n if ((bp < ep) && (Character.isLetterOrDigit(str[bp + 1]) || str[bp + 1] == '_')) {\n // It's a cast\n pbalance = 0;\n while (bp >= lp.getColumn()) {\n if (str[bp] == ')') {\n pbalance++;\n } else if (str[bp] == '(') {\n pbalance--;\n if (pbalance == 0) {\n // found beginning of cast\n // compensate for b++ below\n bp--;\n break;\n }\n }\n bp--;\n }\n foundEnd = true;\n break;\n } else {\n // It's a function call\n pbalance++;\n }\n break;\n case ']':\n bbalance++;\n break;\n case '(':\n pbalance--;\n if (pbalance < 0) {\n foundEnd = true;\n break;\n }\n break;\n case '[':\n bbalance--;\n if (bbalance < 0) {\n foundEnd = true;\n break;\n }\n break;\n case '>':\n // for example \"foo->bar\"\n if ((bp == lp.getColumn()) || (str[bp - 1] != '-')) {\n foundEnd = true;\n break;\n } else {\n bp--; // skip over whole ->\n }\n break;\n case '.': // for example \"foo.bar\"\n case 0: // empty string: when you point at the end of a expr\n case ':': // for example \"Foo::bar\"\n break;\n case '&':\n case '*':\n // What do we do about an expression like\n // foo = &bar; ? Does the user want to evaluate\n // \"bar\" or \"&bar\" ???\n // For now let's assume the user wants \"bar\"\n // For *, we have the same issue.\n // It's not easy to decide which is right.\n // (1) char *foo = \"hello\"\n // (2) bar = *llist\n // In (1) you want \"foo\", in (2) you want \"*llist\".\n // But since we have a gesture for *eval (hit control),\n // let's go with behavior 1 for now.\n foundEnd = true;\n break;\n default:\n foundEnd = true;\n break;\n }\n if (foundEnd) {\n break;\n } // To prevent bp-- in loop iteration\n }\n\n bp++; // Skip the delimiter we just found\n String result = \"\";\n if (bp >= ep) {\n return null;\n }\n\n while (bp < ep) {\n result += str[bp++];\n }\n\n return result;\n }" ]
[ "0.66947776", "0.6635607", "0.6459465", "0.6307991", "0.6243676", "0.6171356", "0.6144761", "0.61350137", "0.61350137", "0.6074405", "0.60219455", "0.5997328", "0.58404815", "0.58381397", "0.58202225", "0.58073443", "0.57749915", "0.57695836", "0.57247317", "0.5723896", "0.57232064", "0.5703501", "0.5691343", "0.5667451", "0.5663969", "0.5654444", "0.5634976", "0.5624865", "0.56058025", "0.5601531", "0.5590221", "0.5568669", "0.55638975", "0.55533946", "0.55511653", "0.5547845", "0.554447", "0.5544329", "0.5542147", "0.5528479", "0.55095404", "0.5498518", "0.54845995", "0.5467825", "0.54643494", "0.5459987", "0.54595834", "0.5443565", "0.54356104", "0.5431121", "0.54246485", "0.5421838", "0.5418332", "0.5417883", "0.54085624", "0.5389558", "0.5387316", "0.53863466", "0.53813285", "0.5372851", "0.5371269", "0.5360216", "0.5349189", "0.5328906", "0.53229624", "0.5322942", "0.5320274", "0.5308246", "0.5305932", "0.5299693", "0.52901345", "0.52818865", "0.52596617", "0.5254542", "0.52534544", "0.52508575", "0.52411234", "0.5235002", "0.52314734", "0.52312934", "0.52157736", "0.51921874", "0.5189226", "0.51795405", "0.51698154", "0.51513505", "0.5149426", "0.5147882", "0.51420236", "0.513746", "0.51313394", "0.5120697", "0.5113026", "0.51116157", "0.5111485", "0.51096046", "0.51094425", "0.5107727", "0.5080998", "0.50656325", "0.5065591" ]
0.0
-1
Creates an instance of the feasible initialization operator.
public FeasibleInitialization(Problem problem, int populationSize) { super(problem, populationSize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void opInitFrom(LogicalOp logicalOperator) {\n \twindowAttribute = ((Bucket) logicalOperator).getWindowAttr();\n \twindowType = ((Bucket) logicalOperator).getWindowType();\t\t\n \trange = ((Bucket) logicalOperator).getWindowRange();\n \tslide = ((Bucket) logicalOperator).getWindowSlide();\n \twidName = ((Bucket) logicalOperator).getWid();\n \tstart = ((Bucket) logicalOperator).getStarttime();\n \tae = new AtomicEvaluator (windowAttribute.getName());\n \t\n }", "public ConstantFactory(Initializable<T> initializable) {\n\t\tthis.initializable = initializable;\n\t}", "public IDetectionAlgorithm createInstance();", "@Override\r\n public Solution[] initialize() {\r\n System.out.println(\"c Attempting feasible initialization\");\r\n Solution[] initial_pop = new Solution[populationSize];\r\n for (int i = 0; i < populationSize; ++i) {\r\n initial_pop[i] = problem.newSolution();\r\n attemptFeasibleInitialization(initial_pop[i]);\r\n }\r\n return initial_pop;\r\n }", "private FullyObservableProblem(int[] initialValuation,\n\t\t\tExplicitCondition goal, ArrayList<String> variableNames,\n\t\t\tList<List<String>> propositionNames,\n\t\t\tArrayList<Integer> domainSizes, ArrayList<Integer> axiomLayer,\n\t\t\tArrayList<Integer> defaultAxiomValues,\n\t\t\tLinkedHashSet<Operator> causativeOperators, Set<OperatorRule> axioms)\n\t{\n\t\tsuper(goal, variableNames, propositionNames, domainSizes, axiomLayer,\n\t\t\t\tdefaultAxiomValues, causativeOperators, axioms, true);\n\t\tGlobal.problem = this;\n\t\tperformSanityCheck();\n\t\tList<Integer> defaultValues = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < initialValuation.length; i++)\n\t\t{\n\t\t\tdefaultValues.add(i, initialValuation[i]);\n\t\t}\n\t\texplicitAxiomEvaluator = new ExplicitAxiomEvaluator();\n\t\tinitialState = new ExplicitState(initialValuation,\n\t\t\t\texplicitAxiomEvaluator);\n\t}", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "public LinearConstraint() {\n\n }", "public StandardCalculator init() {\n this.load(\"+\", this.add());\n this.load(\"-\", this.subtract());\n this.load(\"*\", this.multiple());\n this.load(\"/\", this.div());\n return this;\n }", "public ChainOperator(){\n\n }", "public Solver() {\n\t\t// TODO: Initialize the powersOf2 array with the first 16 powers of 2.\n\t}", "Reproducible newInstance();", "Expression() { }", "public SimpleCondition() {\n\n\t}", "@Override\n public PermutationSolution<Integer> createSolution() {\n return new DefaultBinaryIntegerPermutationSolution(this) ;\n }", "private DiscretePotentialOperations() {\r\n\t}", "public abstract SolutionPartielle solutionInitiale();", "private Instantiation(){}", "public static Construtor construtor() {\n return new Construtor();\n }", "public BinaryMatrixNew() {\n\t\t\tsuper(Matrixes.<R, C>newValidating(PredicateUtils.inBetween(0d, 1d)));\n\t\t}", "private Solution() { }", "private Solution() { }", "private void generateInitialSolution(Instance instance) {\n currentSol = new Solution(instance);\n switch (INITIAL) {\n case 0: mostValuePerWeightFirst(instance);\n case 1: leastWeightFirst(instance);\n default: randomConfiguration(instance);\n }\n // Set current best solution to initial solution\n bestSol = new Solution(currentSol);\n }", "public Expression() {\r\n }", "Expression getInitializer();", "private Solution() {\n //constructor\n }", "public BaseOptimizer() {\r\n Candidates = new ArrayList<>();\r\n }", "public LiteralValuePartitionAlgorithm() {\n\t\t\n\t}", "public Logic() {\n }", "Constraint createConstraint();", "Constraint createConstraint();", "public RandomNeighborhoodOperator(int nbRelaxedVars)\n{\n\tthis(nbRelaxedVars, 0);\n}", "Eq createEq();", "public Solver(Board initial) {\n if (initial == null)\n throw new java.lang.NullPointerException(\"null block\");\n \n final Board initConfig = initial;\n solve(initConfig);\n }", "public static Builder create(){\n return new Builder(Tribit.ZERO);\n }", "public static Problem getInstance(int[] initialValuation,\n\t\t\tExplicitCondition goal, ArrayList<String> variableNames,\n\t\t\tList<List<String>> propositionNames,\n\t\t\tArrayList<Integer> domainSizes, ArrayList<Integer> axiomLayer,\n\t\t\tArrayList<Integer> defaultAxiomValues,\n\t\t\tLinkedHashSet<Operator> operators, Set<OperatorRule> axioms)\n\t{\n\t\tif (instance == null)\n\t\t{\n\t\t\tinstance = new FullyObservableProblem(initialValuation, goal,\n\t\t\t\t\tvariableNames, propositionNames, domainSizes, axiomLayer,\n\t\t\t\t\tdefaultAxiomValues, operators, axioms);\n\t\t}\n\t\treturn instance;\n\t}", "public LogicalOperator() {\n this.logical = Logical.And;\n }", "public void init() throws InvariantError, PostconditionError;", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public Operation() {\n\t}", "public Operation() {\n /* empty */\n }", "private Solution() {\n }", "public OperationFactory() {\n initMap();\n }", "public Orbiter() {\n }", "public void init() throws InitializationException;", "protected abstract void attemptFeasibleInitialization(Solution solution);", "public NoiseCalculator() {\n this(1.0);\n }", "public void initialize(Instance inst){\n\n\t\t\tDoubleVector weights = CreateDoubleVector(inst.numAttributes(),0) ;// extended length ;\n// \t\tVarianceRationREduction\n\t\t\tif (learningCriteriaOption.getChosenIndex()==1) {\n\t\t\t\tdefaultRule = new RuleVR(this);\n\t\t\t}else {\n\t\t\t\tdefaultRule = new RuleErrR(this);\n\t\t\t}\n\n\t\t\tVector<FuzzySet> terms = new Vector<FuzzySet>();\n\t\t\tfor (int i = 0; i < inst.numAttributes(); i++) {\n\t\t\t\tif (inst.classIndex()==i)\n\t\t\t\t\tcontinue ;\n\t\t\t\tterms.add(new FuzzySet.LOToRO()) ;\n\t\t\t}\n\t\t\n\t\t\tdefaultRule.setAll(terms, weights);\n\t\t\tdefaultRule.setPrefixAndVersion(\"\", currentSystemVersion);\n\t\t\trs.add(defaultRule);\n\t\t\tcurrentValidCandidates = new Vector<FuzzyRuleExtendedCandidate>() ;\n\t\t\tcurrentNonReadyCandidates = new Vector<FuzzyRuleExtendedCandidate>() ;\n\t\t\tinitialized = true ;\n\t\n\t\t\tif (statsAttributes.size()==0){\n\t\t\t\tfor (int j = 0; j < inst.numAttributes(); j++) {\n\t\t\t\t\tif (inst.classIndex()==j)\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\tstatsAttributes.add(new IncrementalVariance()) ;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static IfstatementFactory init() {\n\t\ttry {\n\t\t\tIfstatementFactory theIfstatementFactory = (IfstatementFactory)EPackage.Registry.INSTANCE.getEFactory(IfstatementPackage.eNS_URI);\n\t\t\tif (theIfstatementFactory != null) {\n\t\t\t\treturn theIfstatementFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new IfstatementFactoryImpl();\n\t}", "public KernelPolynomial()\r\n\t{\r\n\t\tthis(0, 0, 3);\r\n\t}", "OperationalizingSoftgoal createOperationalizingSoftgoal();", "public TestGridSolver()\n {\n }", "public AirConditioner()\n\t{\n\t\tinit();\n\t}", "public Operation() {\n super();\n }", "public CustomSolver() {\n this.possibleSol = this.generateTokenSet();\n this.curToken = 0;\n }", "public Workflow init() throws IOException, ReflectiveOperationException {\n List<UtteranceProcessor> processors = new ArrayList<>();\n for (UtteranceProcessorConfig upc : processorConfigs) {\n processors.add(upc.init());\n }\n \n List<IntentMatcher> matchers = new ArrayList<>();\n if (matcherConfigs.size() < 1) {\n matchers.add(IntentMatcherConfig.getDefault());\n } else {\n for (IntentMatcherConfig imc : matcherConfigs) {\n matchers.add(imc.init());\n }\n }\n \n List<IntentResolver> resolvers = new ArrayList<>();\n if (resolverConfigs.size() < 1) {\n resolvers.add(IntentResolverConfig.getDefault());\n } else {\n for (IntentResolverConfig irc : resolverConfigs) {\n resolvers.add(irc.init());\n }\n }\n \n List<PromptHandler> promptHandlers = new ArrayList<>();\n if (promptHandlerConfigs.size() < 1) {\n promptHandlers.add(PromptHandlerConfig.getDefault());\n } else {\n for (PromptHandlerConfig phc : promptHandlerConfigs) {\n promptHandlers.add(phc.init());\n }\n }\n return DefaultWorkflowFactory.get().createDefaultWorkflow(\n name, processors, matchers, resolvers, promptHandlers);\n }", "public OscillatorCalculator() {\n this(1);\n }", "abstract public boolean init();", "public ProductionPower(){\n this(0, new NumberOfResources(), new NumberOfResources(), 0, 0);\n }", "private Solution() {\n\n }", "static void initRuntimeConstructors(ITermFactory tf) {\n CFGNode.initializeConstructor(tf);\n ICFGNode.Kind.initializeConstructor(tf);\n Set.initializeConstructor(tf);\n Map.initializeConstructor(tf);\n EmptyMapOrSet.initializeConstructor(tf);\n Name.initializeConstructor(tf);\n FullSetLattice.ISetImplementation.initializeConstructor(tf);\n TermIndex.initializeConstructor(tf);\n }", "public Completable init() {\n\t\tLocalConfigModel localConfigModel = new LocalConfigModel()\n\t\t\t.setReadOnly(meshOptions.isStartInReadOnly());\n\t\treturn setActiveConfig(localConfigModel).ignoreElement();\n\t}", "public Equation() {\n alpha_arr = new ArrayList<LinkedList<VariableUnit>>();\n for (int i = 0; i < 26; i++) {\n LinkedList<VariableUnit> list = new LinkedList<VariableUnit>();\n alpha_arr.add(list);\n }\n \n op_order = new LinkedList<VariableUnit>();\n }", "public TbProductOperatorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Heuristic() {\n this(HeuristicUtils.defaultValues);\n }", "Neq createNeq();", "public SimpleSolverFactory(SupplierValueStore valueStore)\n\t{\n\t\tthis.valueStore = Objects.requireNonNull(valueStore);\n\t}", "public Factory() {\n\t\tnb_rounds = 0; \n\t\tnb_to_train = 0; \n\t\ttraining_queue = new LinkedList<Pair<Soldier, Integer>>(); \n\t\tcurrent = null;\n\t}", "public RealConjunctiveFeature() { }", "@Override\r\n public IObjectiveState createState(final Serializable staticState) {\r\n return new InternalState(this.m_func.createState(staticState));\r\n }", "public OpticalElements() {\n }", "public SelectivityCalculator()\n\t{\n\t\tvalue = new ArrayList<Integer>();\n\t}", "public CSP() {\n integerVariables = new ArrayList<IntegerVariable>();\n booleanVariables = new ArrayList<BooleanVariable>();\n relations = new ArrayList<Relation>();\n clauses = new ArrayList<Clause>();\n objectiveVariables = null;\n objective = Objective.NONE;\n integerVariableMap = new HashMap<String, IntegerVariable>();\n booleanVariableMap = new HashMap<String, BooleanVariable>();\n relationMap = new HashMap<String, Relation>();\n }", "public Instance() {\n }", "private OperatorManager() {}", "public void initialization() {\n iterations_ = 1;\n\n swarm_ = new SolutionSet(swarmSize_);\n best_ = new Solution[swarmSize_];\n\n dominance_ = new DominanceComparator();\n crowdingDistanceComparator_ = new CrowdingDistanceComparator();\n distance_ = new Distance();\n\n speed_ = new double[swarmSize_][problem_.getNumberOfVariables()];\n\n deltaMax_ = new double[problem_.getNumberOfVariables()];\n deltaMin_ = new double[problem_.getNumberOfVariables()];\n for (int i = 0; i < problem_.getNumberOfVariables(); i++) {\n deltaMax_[i] = (problem_.getUpperLimit(i) -\n problem_.getLowerLimit(i)) / 2.0;\n deltaMin_[i] = -deltaMax_[i];\n }\n\n for (int i = 0; i < swarmSize_; i++) {\n for (int j = 0; j < problem_.getNumberOfVariables(); j++) {\n speed_[i][j] = 0.0;\n }\n }\n }", "public Intervals() {\n }", "private static State generateInitialState(double initialHeuristic) {\n ArrayList<List<Job>> jobList = new ArrayList<>(RecursionStore.getNumberOfProcessors());\n for (int i = 0; i < RecursionStore.getNumberOfProcessors(); i++) {\n jobList.add(new ArrayList<>());\n }\n int[] procDur = new int[RecursionStore.getNumberOfProcessors()];\n java.util.Arrays.fill(procDur, 0);\n return new State(jobList, procDur, initialHeuristic, 0);\n }", "public BruteForce() {\n }", "public ConstantPool() {\n super(ActionType.CONSTANT_POOL);\n }", "@SuppressWarnings(\"null\")\r\n\t@Override\r\n\tpublic PWPSolution createSolution(InitialisationMode mode) {\n\t\t\r\n\t\tif (mode == InitialisationMode.RANDOM) {\r\n\t\t\r\n\t\tint[] solutions = new int[getNumberOfLocations()];//array of solutions\r\n\t\t\r\n\t\tfor (int i = 0 ; i <= getNumberOfLocations() -1 ; i++) { //enumerate the array, giving each location an integer value\r\n\t\t\t\r\n\t\t\tsolutions[i]= i;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tCollections.shuffle(Arrays.asList(solutions)); //shuffle the array\r\n\t\t\r\n\t\tSolutionRepresentation solution = new SolutionRepresentation(solutions); //create a new solution representation using the array of ints\r\n\t\t\r\n\t\tObjectiveFunctionInterface objfunc = getPWPObjectiveFunction(); //get the objective function to be used \r\n\r\n\t\tPWPSolution sol = new PWPSolution(solution, objfunc.getObjectiveFunctionValue(solution)); //create the new PWPSolution using the solution representation and the value of the objective function applied to the solution\r\n\t\t\r\n\t\treturn sol;\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public AdvancedCFG(String constructor){\n super(constructor);\n }", "public void init(){}", "public IfstatementFactoryImpl() {\n\t\tsuper();\n\t}", "public void initByValue(Object obj, InterfaceOptimizationProblem opt) {\n if (obj instanceof BitSet) {\n BitSet bs = (BitSet) obj;\n this.SetBinaryGenotype(bs);\n } else {\n this.defaultInit(opt);\n System.out.println(\"Initial value for GAIndividualBinaryData is no BitSet!\");\n }\n this.m_MutationOperator.init(this, opt);\n this.m_CrossoverOperator.init(this, opt);\n }", "public void init() {}", "public void init() {}", "public InstConstraintVisitor(){}", "public AirCondition(){}", "public static void init() {}", "public MathEquation() {\n }", "If createIf();", "public static DecisionOperator<IntVar> assign() {\n return DecisionOperator.int_eq;\n }", "public ToZeroRampGenerator() { \r\n }", "public CostFactoryImpl() {\n\t\tsuper();\n\t}", "Instance createInstance();", "public Evaluador() {\n aL = new Arguments();\n }", "protected GenTreeOperation() {}", "public Formula() {\t\n\t\t// TODO: implement this.\n\t\t// throw new RuntimeException(\"not yet implemented.\");\n\t\tclauses=new EmptyImList<Clause>();\n\t}", "public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}", "public Operation(){\n\t}" ]
[ "0.5744158", "0.568916", "0.5646648", "0.55900115", "0.54846746", "0.54226524", "0.5422091", "0.54080427", "0.5405696", "0.5403759", "0.5371015", "0.534291", "0.5296233", "0.5270314", "0.52686316", "0.5266945", "0.52609175", "0.5260661", "0.5260216", "0.5253027", "0.5253027", "0.5228071", "0.5202772", "0.5196775", "0.51842964", "0.51838607", "0.5181959", "0.51742214", "0.5155011", "0.5155011", "0.5137588", "0.51161075", "0.51107675", "0.510837", "0.5103695", "0.50959015", "0.5093419", "0.5084063", "0.50809705", "0.507479", "0.5073526", "0.506596", "0.50637287", "0.5062243", "0.5046109", "0.50387216", "0.50271416", "0.5005493", "0.50017256", "0.49990365", "0.49967697", "0.49918494", "0.49857986", "0.4977065", "0.4963028", "0.49625486", "0.49440995", "0.49344578", "0.4933483", "0.4931832", "0.49224675", "0.49217603", "0.49216503", "0.49182585", "0.49147406", "0.4914699", "0.49125794", "0.4894759", "0.4893575", "0.4890501", "0.48891973", "0.48832923", "0.48799604", "0.48720828", "0.4863335", "0.4850481", "0.48452795", "0.48414335", "0.48378584", "0.48376176", "0.48349154", "0.48286736", "0.48173928", "0.48097306", "0.4808554", "0.4808554", "0.48049575", "0.48008806", "0.48004726", "0.47985184", "0.47984204", "0.4795003", "0.4784645", "0.47831306", "0.47775388", "0.47750413", "0.4767671", "0.4764888", "0.4762492", "0.4758313" ]
0.53305316
12
Makes a random set of solutions for the initial population. It attempts to produce a set of feasible solutions.
@Override public Solution[] initialize() { System.out.println("c Attempting feasible initialization"); Solution[] initial_pop = new Solution[populationSize]; for (int i = 0; i < populationSize; ++i) { initial_pop[i] = problem.newSolution(); attemptFeasibleInitialization(initial_pop[i]); } return initial_pop; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int[] generateInitialSolution(){\n int[] initialSolution = new int[tspProblem.getNumberOfCities()];\n ArrayList<Integer> listToGetRandomCities = new ArrayList<Integer>();\n\n for(int i = 0; i <= initialSolution.length - 1; i++){\n listToGetRandomCities.add(i);\n }\n\n for(int i = 0; i <= initialSolution.length - 1; i++){\n initialSolution[i] = getRandomCity(listToGetRandomCities);\n }\n\n return initialSolution;\n }", "public void generateSolutionList() {\n // Will probably solve it in a few years\n while (!isSolved()) {\n RubiksMove move = RubiksMove.random();\n solutionMoves.add(move);\n performMove(move);\n }\n }", "@Override\n \tpublic Solution solve() {\n \t\tfor (int i = 0; i < n; i++) {\n \t\t\tnest[i] = generator.getSolution();\n \t\t}\n \n \t\tfor (int t = 0; t < maxGeneration; t++) { // While (t<MaxGeneration) or\n \t\t\t\t\t\t\t\t\t\t\t\t\t// (stop criterion)\n \t\t\t// Get a cuckoo randomly (say, i) and replace its solution by\n \t\t\t// performing random operations;\n \t\t\tint i = r.nextInt(n);\n \t\t\tSolution randomNest = nest[i];\n \t\t\t//FIXME: randomNest = solutionModifier.modify(nest[i]);\n \n \t\t\t// Evaluate its quality/fitness\n \t\t\tint fi = randomNest.f();\n \n \t\t\t// Choose a nest among n (say, j) randomly;\n \t\t\tint j = r.nextInt(n);\n \t\t\tint fj = f[j];\n \n \t\t\tif (fi > fj) {\n \t\t\t\tnest[i] = randomNest;\n \t\t\t\tf[i] = fi;\n \t\t\t}\n \n \t\t\tsort();\n \t\t\t// A fraction (pa) of the worse nests are abandoned and new ones are built;\n\t\t\tfor(i = n-toAbandon; i<n; i++) {\n \t\t\t\tnest[i] = generator.getSolution();\n \t\t\t}\n \t\t\t\n \t\t\t// Rank the solutions/nests and find the current best;\n \t\t\tsort();\n \t\t}\n \n \t\treturn nest[0];\n \t}", "public void newRandomPuzzle() {\r\n // Start with the goal state\r\n state = goal.copy();\r\n HashSet<PuzzleState> visitedStates = new HashSet<PuzzleState>();\r\n visitedStates.add(state.copy());\r\n System.out.println(state);\r\n \r\n Vector<PuzzleState> aStarSolution = null;\r\n int numMovesLeft = this.minMoves;\r\n while (numMovesLeft > 0) {\r\n for (int move = 0; move < numMovesLeft; move++) {\r\n // Get all the possible next states\r\n Vector<PuzzleState> nextStates = possibleNextStates(state);\r\n \r\n // Randomly pick a new state until it is not one we have seen before\r\n PuzzleState next;\r\n do {\r\n next = nextStates.get(rand.nextInt(nextStates.size()));\r\n } while (visitedStates.contains(next));\r\n \r\n // Update the state and add it to the set of visited states\r\n state = next;\r\n visitedStates.add(state.copy());\r\n System.out.println(\"New state:\");\r\n System.out.println(state);\r\n }\r\n aStarSolution = aStarSearch();\r\n int minMovesAStar = aStarSolution.size();\r\n numMovesLeft = this.minMoves - minMovesAStar;\r\n System.out.println(\"num moves left: \" + numMovesLeft);\r\n }\r\n solution = aStarSolution;\r\n }", "public void initPopulation() throws JMException, ClassNotFoundException {\n population_ = new SolutionSet[problemSet_.size()];\n for (int i = 0; i < problemSet_.size(); i++){\n population_[i] = new SolutionSet(populationSize_);\n }\n\n for (int j = 0; j < problemSet_.size(); j++){\n for (int i = 0; i < populationSize_; i++) {\n Solution newSolution = new Solution(problemSet_);\n problemSet_.get(j).evaluate(newSolution);\n problemSet_.get(j).evaluateConstraints(newSolution);\n population_[j].add(newSolution);\n } // for\n }\n\n }", "private void genProb() {\n\t\tint row;\n\t\tint column;\n\t\tint removed1;\n\t\tint removed2;\n\n\t\tfor (int i = 0; i < DIFFICULTY / 2;) {\n\t\t\trow = rand.nextInt(9);\n\t\t\tcolumn = rand.nextInt(9);\n\t\t\twhile (problem[row][column] == 0 || (row == 4 && column == 4)) {\n\t\t\t\trow = rand.nextInt(9);\n\t\t\t\tcolumn = rand.nextInt(9);\n\t\t\t}\n\n\t\t\t// Clearing random boxes.\n\t\t\tremoved1 = problem[row][column];\n\t\t\tremoved2 = problem[8 - row][8 - column];\n\t\t\tproblem[row][column] = 0;\n\t\t\tproblem[8 - row][8 - column] = 0;\n\n\t\t\tcopy(problem, comp);\n\n\t\t\tif (!solve(0, 0, 0, comp)) { // Case of unsolvable.\n\t\t\t\t// Putting back original values.\n\t\t\t\tproblem[row][column] = removed1;\n\t\t\t\tproblem[8 - row][8 - column] = removed2;\n\t\t\t} else {\n\t\t\t\tif (unique()) { // Case of solution is unique.\n\t\t\t\t\ti++;\n\t\t\t\t} else { // Case of solution is not unique.\n\t\t\t\t\t// Putting back original values.\n\t\t\t\t\tproblem[row][column] = removed1;\n\t\t\t\t\tproblem[8 - row][8 - column] = removed2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void generateInitialSolution(Instance instance) {\n currentSol = new Solution(instance);\n switch (INITIAL) {\n case 0: mostValuePerWeightFirst(instance);\n case 1: leastWeightFirst(instance);\n default: randomConfiguration(instance);\n }\n // Set current best solution to initial solution\n bestSol = new Solution(currentSol);\n }", "@SuppressWarnings(\"null\")\r\n\t@Override\r\n\tpublic PWPSolution createSolution(InitialisationMode mode) {\n\t\t\r\n\t\tif (mode == InitialisationMode.RANDOM) {\r\n\t\t\r\n\t\tint[] solutions = new int[getNumberOfLocations()];//array of solutions\r\n\t\t\r\n\t\tfor (int i = 0 ; i <= getNumberOfLocations() -1 ; i++) { //enumerate the array, giving each location an integer value\r\n\t\t\t\r\n\t\t\tsolutions[i]= i;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tCollections.shuffle(Arrays.asList(solutions)); //shuffle the array\r\n\t\t\r\n\t\tSolutionRepresentation solution = new SolutionRepresentation(solutions); //create a new solution representation using the array of ints\r\n\t\t\r\n\t\tObjectiveFunctionInterface objfunc = getPWPObjectiveFunction(); //get the objective function to be used \r\n\r\n\t\tPWPSolution sol = new PWPSolution(solution, objfunc.getObjectiveFunctionValue(solution)); //create the new PWPSolution using the solution representation and the value of the objective function applied to the solution\r\n\t\t\r\n\t\treturn sol;\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public StandardSolution (long[] nums){\n \t\tsequence = nums;\n \t\tpartitions = new boolean[sequence.length];\n \t\t\n \t\tRandom rand = new Random();\n \t\tfor (int i = 0; i < partitions.length; i++){\n \t\t\t// worry about seeing?\n \t\t\tpartitions[i] = rand.nextBoolean();\n \t\t}\n \t}", "SolutionPopulation initialise(ArrayList<City> cities, int populationSize);", "private boolean checkSolutions() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tif (populationArray.get(i).getFitness() == 0) {\n\t\t\t\tsolution = populationArray.get(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void createRandomPopulation(List<String> cabinetArrangement, int populationSize){\n\t\t\n\t\tint size = 0;\n\t\t\n\t\t//list to check if the current solution\n\t\t//has been already added to the population \n\t\t\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\t\t\n\t\t//create a new solution object\n\t\tSolution solution = new Solution(relations, cabinetArrangement);\n\t\t//assign a cabinet arrangement to it, which is a possible solution\n\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\n\t\twhile(size < populationSize) {\n\t\t\t\t\n\t\t\t\t//continue, if the solution is already in the population\n\t\t\t\tif(added.contains(solution.getPossibleSolution())) {\n\t\t\t\t\tsolution = new Solution(relations, cabinetArrangement);\n\t\t\t\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsize++;\n\t\t\t\n\t\t\t\t//add solution to the population\n\t\t\t\tpopulation.add(solution);\n\t\t\t\t//and to the control list\n\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\n\t\t\t\tsolution = new Solution(relations, cabinetArrangement);\n\t\t\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\n\t\t}\n\t\t\n\t\tif(size == populationSize) {\n\t\t\t//count the average path when the population is already created\n\t\t\tcountAveragePath();\n\t\t\t\n\t\t\t//count and assign a cloning factor for all the solutions\n\t\t\tcloningFactor();\n\t\t}\n\t}", "public void initialiseNewRandomPopulation(Random rnd) {\n\t\tthis.population = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < this.popSize; i++) {\t\t\t\t\t//FOR ALL DESIRED POPULATION SIZE\n\t\t\tdouble[] randomValues = new double[DIMENSIONS];\t\t\t//INITIATE RANDOM X ARRAY WITH CORRECT DIMENSIONS\n\t\t\tfor (int j = 0; j < DIMENSIONS; j++) {\t\t\t\t\t//CREATE RANDOM X VALUES\n\t\t\t\trandomValues[j] = -5 + rnd.nextDouble() * 10;\t\t//ASSIGN VALUES TO EACH POSITION IN ARRAY\n\t\t\t}\n\t\t\tIndividual newInd = new Individual(randomValues);\t\t//CREATE NEW INDIVIDUAL WITH RANDOM X VALUES\n\t\t\tthis.population.add(newInd);\t\t\t\t\t\t\t//ADD INDIVIDUAL TO POPULATION\n\t\t}\n\t}", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "public void generateOffspringPopulation() throws JMException{\n\n offspringPopulation_ = new SolutionSet[problemSet_.size()];\n\n for (int task = 0; task < problemSet_.size(); task++){\n offspringPopulation_[task] = new SolutionSet(populationSize_);\n if (crossover_.getClass() == SBXCrossover.class){\n Solution[] parents = new Solution[2];\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n parents = (Solution[]) selection_.execute(population_[task]);\n\n Solution[] offSpring = (Solution[]) crossover_\n .execute(parents);\n mutation_.execute(offSpring[0]);\n problemSet_.get(task).evaluate(offSpring[0]);\n problemSet_.get(task).evaluateConstraints(offSpring[0]);\n offspringPopulation_[task].add(offSpring[0]);\n } // for\n }\n else if (crossover_.getClass() == EGG.class){\n\n int[] permutation = new int[populationSize_];\n Utils.randomPermutation(permutation, populationSize_);\n etmo.util.Ranking ranking = new etmo.util.Ranking(population_[task]);\n SolutionSet front = ranking.getSubfront(0);\n\n front.Suppress();\n SolutionSet KP = null;\n if(front.size()> problemSet_.get(task).getNumberOfObjectives())\n KP = findingKneePoint(front, task);\n if(KP == null){\n KP = population_[task];\n }\n\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n int n = permutation[i];\n // STEP 2.1. Mating selection\n int r1,r2;\n r1 = PseudoRandom.randInt(0, KP.size() - 1);\n do {\n r2 = PseudoRandom.randInt(0, KP.size() - 1);\n } while (r2==r1);\n // STEP 2.2. Reproduction\n Solution child;\n Solution[] parents = new Solution[3];\n\n// 加入迁移:\n double tranRand = PseudoRandom.randDouble();\n if (tranRand <= 0.1){\n parents[1] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[2] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n\n else {\n parents[1] = KP.get(r1);\n parents[2] = KP.get(r2);\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n } // for\n }\n\n }\n\n\n\n\n }", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "public void runGenerational() {\n\n\t\tSystem.out.println(\"Runing pure generational demo.\");\n\t\tFunction<BitSet, Double> knapsackFitnessFunction = new KnapsackFitness(capacity, parseElements());\n\t\tSpace<BitSet> space = new BitSetSpace(weights.length);\n\n\t\tGeneticSelector<BitSet, Double> rouletteSelector = new RouletteGeneticSelector<>(POP_SIZE);\n\t\tGeneticCrossover<BitSet, Double> crossover = new BinaryCrossover<>(0.9);\n\t\tGeneticOperator<BitSet, Double> geneticOperator = new CustomGeneticOperator<>(crossover);\n\t\tGeneticReplacement<BitSet, Double> replacement = new GenerationalReplacement<>();\n\t\tTracer.add(Population.class);\n\t\tTracer.start();\n\n\t\tSearch<BitSet, Double> search = new GeneticAlgorithm<>(POP_SIZE, NUM_ITER, rouletteSelector, geneticOperator,\n\t\t\t\treplacement);\n\t\tOptimizationProblem<BitSet, Double> problem = new OptimizationProblem<>(space, knapsackFitnessFunction,\n\t\t\t\tComparator.reverseOrder());\n\t\tSolution<BitSet, Double> foundSolution = search.solve(problem);\n\n\t\tSystem.out.println(String.format(\"Best found solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(foundSolution.getSolution()), foundSolution.getSolution()));\n\n\t\tBitSet optimalBitSet = parseOptimalBitSet();\n\t\tSystem.out.println(String.format(\"Optimal solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(optimalBitSet), optimalBitSet));\n\t\tKnapsackMetric metric = new KnapsackMetric();\n\t\tmetric.putDataOfBestInFile(1);\n\t}", "public Vector run(){\n generationCount = 0;\n solutionList = new Vector();\n bannedList = new Vector();\n solutionCounter = 0;\n whenToHalt.init();\n //INITIALIZE THE POPULATION\n\n population = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n fitnessArray = new double[populationSize];\n //COMPUTE FITNESSES\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) population.get(x);\n fitnessArray[x] = next.getFitness();\n }\n\n Arrays.sort(fitnessArray);\n\n while (! stop()){\n //RUN THROUGH THE GENERATIONS\n population = step();\n }\n\n if (useList){\n return solutionList;\n } else {\n return population;\n }\n }", "private void makeInitial(){\r\n for (int row = 0; row < 9; row++)\r\n System.arraycopy(solution[row], 0, initial[row], 0, 9);\r\n List<Position> fields = new ArrayList<Position>();\r\n for (int row = 0; row < 9; row++)\r\n for (int col = 0; col < 9; col++)\r\n fields.add(new Position(row, col));\r\n Collections.shuffle(fields);\r\n for (int index = 0; index < 40; index ++)\r\n initial[fields.get(index).row][fields.get(index).col] = 0;\r\n }", "private void addToTempPopulation(PermutationSolution<Integer> solution) {\n\t\tDominanceComparator<PermutationSolution<Integer>> dominanceComparator = new DominanceComparator<>();\n\t\tList<Integer> dominates = new ArrayList<Integer>();\n\t\tboolean dominated = false;\n\t\tboolean isEqual = false ;\n\t\tfor (int i = 0; i < tempList.size(); i++) {\n\t\t\tint flag = dominanceComparator.compare(solution, \n\t\t\t\t\ttempList.get(i));\n\n\t\t\tif (flag < 0) {\n\t\t\t\tdominates.add(i);\n\t\t\t} else if (flag > 0) {\n\t\t\t\tdominated = true;\n\t\t\t}else if(solutionUtils.isObjectiveEqual(solution, tempList.get(i))){\n\t\t\t\tisEqual = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!dominates.isEmpty()){\n\t\t\tint index = dominates.get(new Random().nextInt(dominates.size())) ;\n\t\t\ttempList.remove(index);\n\t\t\ttempList.add(solution);\n\t\t}else if(!dominated && !isEqual){\n\t\t\ttempList.remove(new Random().nextInt(tempList.size()));\n\t\t\ttempList.add(solution);\n\t\t}\n\t\t\n\t}", "protected abstract void attemptFeasibleInitialization(Solution solution);", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "private void createInitialPopulation() throws InterruptedException, TimeoutException {\n\n\t\tProteinDatabase ident = new ProteinDatabase();\n\t\tident.parseInput(\"proteins.fasta\");\n\t\tList<Protein> database = ident.getDatabase();\n\n\t\tfor (Protein data : database) {\n\t\t\tdata.setExperimental(es);\n\t\t}\n\n\t\tList<Protein> candidates = new ArrayList<Protein>();\n\t\tfor (Protein p : database)\n\t\t{\n\t\t\tTheoreticalSpectrum theoreticalSpectrum = new TheoreticalSpectrum(p.getAminoAcidsequence());\n\t\t\tif (Math.abs(parentMass - theoreticalSpectrum.getParentMass()) <= parentMassThreshold) {\n\t\t\t\tcandidates.add(p);\n\t\t\t}\n\t\t}\n\n\t\trunInitialFitnessCalculations(candidates);\n\n\t\tCollections.sort(candidates, new ProteinFitnessComparator());\n\t\tdebug(candidates, 0);\n\n\n\t\tpopulation = new ArrayList<Protein>(populationSize);\n\n\t\tpopulationActualSize = 0;\n\t\tfor (Protein p : candidates)\n\t\t{\n\t\t\tpopulation.add(p);\n\t\t\tpopulationActualSize++;\n\t\t\tif (populationActualSize == populationSize)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "void init() {\r\n \tfor (int i=0; i<SIZE; i++) {\r\n \t\tfor (int j=0; j<LEN; j++) {\r\n \t\t\tif (rnd.nextDouble() < 0.5)\r\n \t\t\t\toldpop[i][j] = 0;\r\n \t\t\telse\r\n \t\t\t\toldpop[i][j] = 1;\r\n \t\t}\r\n \t}\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tcbest[j] = oldpop[0][j];\r\n \t}\r\n\t\tbest = fitness(0);\r\n }", "private void tournament_selection() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n // pick 2 random ints to for indices of parents\r\n int parent1 = new Random().nextInt(this.pop_size);\r\n int parent2 = new Random().nextInt(this.pop_size);\r\n\r\n individual p1 = new individual(main_population.getPopulation()[parent1].getGenes(), solutions, output);\r\n individual p2 = new individual(main_population.getPopulation()[parent2].getGenes(), solutions, output);\r\n\r\n if (p1.getFitness() >= p2.getFitness()) {\r\n temp_pop[i] = p1;\r\n } else {\r\n temp_pop[i] = p2;\r\n }\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public void generate() {\n\t\tint randNum;\n\n\t\t// Generates variables.\n\t\tfor (int i = 0; i < variables.length; i++) {\n\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\twhile (!checkDuplicate(variables, i, randNum)) {\n\t\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\t}\n\t\t\tvariables[i] = randNum;\n\t\t}\n\n\t\t// Example sudoku.\n\t\trandNum = rand.nextInt(3) + 1;\n\t\tswitch (randNum) {\n\t\tcase 1:\n\t\t\tint[][] array1 = { { 4, 7, 1, 3, 2, 8, 5, 9, 6 },\n\t\t\t\t\t{ 6, 3, 9, 5, 1, 4, 7, 8, 2 },\n\t\t\t\t\t{ 5, 2, 8, 6, 7, 9, 1, 3, 4 },\n\t\t\t\t\t{ 1, 4, 2, 9, 6, 7, 3, 5, 8 },\n\t\t\t\t\t{ 8, 9, 7, 2, 5, 3, 4, 6, 1 },\n\t\t\t\t\t{ 3, 6, 5, 4, 8, 1, 2, 7, 9 },\n\t\t\t\t\t{ 9, 5, 6, 1, 3, 2, 8, 4, 7 },\n\t\t\t\t\t{ 2, 8, 4, 7, 9, 5, 6, 1, 3 },\n\t\t\t\t\t{ 7, 1, 3, 8, 4, 6, 9, 2, 5 } };\n\t\t\tcopy(array1, answer); // Copies example to answer.\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tint[][] array2 = { { 8, 3, 5, 4, 1, 6, 9, 2, 7 },\n\t\t\t\t\t{ 2, 9, 6, 8, 5, 7, 4, 3, 1 },\n\t\t\t\t\t{ 4, 1, 7, 2, 9, 3, 6, 5, 8 },\n\t\t\t\t\t{ 5, 6, 9, 1, 3, 4, 7, 8, 2 },\n\t\t\t\t\t{ 1, 2, 3, 6, 7, 8, 5, 4, 9 },\n\t\t\t\t\t{ 7, 4, 8, 5, 2, 9, 1, 6, 3 },\n\t\t\t\t\t{ 6, 5, 2, 7, 8, 1, 3, 9, 4 },\n\t\t\t\t\t{ 9, 8, 1, 3, 4, 5, 2, 7, 6 },\n\t\t\t\t\t{ 3, 7, 4, 9, 6, 2, 8, 1, 5 } };\n\t\t\tcopy(array2, answer);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tint[][] array3 = { { 5, 3, 4, 6, 7, 8, 9, 1, 2 },\n\t\t\t\t\t{ 6, 7, 2, 1, 9, 5, 3, 4, 8 },\n\t\t\t\t\t{ 1, 9, 8, 3, 4, 2, 5, 6, 7 },\n\t\t\t\t\t{ 8, 5, 9, 7, 6, 1, 4, 2, 3 },\n\t\t\t\t\t{ 4, 2, 6, 8, 5, 3, 7, 9, 1 },\n\t\t\t\t\t{ 7, 1, 3, 9, 2, 4, 8, 5, 6 },\n\t\t\t\t\t{ 9, 6, 1, 5, 3, 7, 2, 8, 4 },\n\t\t\t\t\t{ 2, 8, 7, 4, 1, 9, 6, 3, 5 },\n\t\t\t\t\t{ 3, 4, 5, 2, 8, 6, 1, 7, 9 } };\n\t\t\tcopy(array3, answer);\n\t\t\tbreak;\n\t\t}\n\n\t\treplace(answer); // Randomize once more.\n\t\tcopy(answer, problem); // Copies answer to problem.\n\t\tgenProb(); // Generates problem.\n\n\t\tshuffle();\n\t\tcopy(problem, player); // Copies problem to player.\n\n\t\t// Checking for shuffled problem\n\t\tcopy(problem, comp);\n\n\t\tif (!solve(0, 0, 0, comp)) {\n\t\t\tgenerate();\n\t\t}\n\t\tif (!unique()) {\n\t\t\tgenerate();\n\t\t}\n\t}", "@Override\npublic boolean restrictNeighborhood(Solution solution)\n{\n\n\tSolver solver = solution.getSolver();\n\tint nbTotalVars = solver.getNbIntVars() - 1;\n\n\tint n = nbTotalVars - nbRelaxedVars;\n\tboolean b = false;\n\tIntVar var;\n\tselected.clear();\n\twhile (n > 0) {\n\t\tint index = random.nextInt(nbTotalVars);\n\t\tvar = solver.getIntVarQuick(index);\n\t\tif (var != solver.getObjective() && !selected.contains(index)) {\n\t\t\tif (solution.getIntValue(index) != Solution.NULL) {\n\t\t\t\tsolver.LOGGER.info(\"fix \" + var);\n\t\t\t\tsolver.post(solver.eq(var, solution.getIntValue(index)));\n\t\t\t\tb = true;\n\t\t\t}\n\t\t\tselected.add(index);\n\t\t\tn--;\n\t\t}\n\t}\n\treturn b;\n}", "public boolean generateSolution() {\n //first clear all filled in fields by user (they could be wrong)\n clearGame();\n\n //use solver\n SudokuSolver solver = new BacktrackSolver();\n return solver.solveSudoku(this);\n }", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "private int[][] generateInitialPopulation(int binCt, int binSize, int pkgCt, int populationSize) {\n\t\tint[][] population = new int[populationSize][pkgCt];\n\t\tfor (int i = 0; i < populationSize; i++) {\n\t\t\tfor (int j = 0; j < pkgCt; j++) {\n\t\t\t\tpopulation[i][j] = rand.nextInt(binCt);\n\t\t\t}\n\t\t}\n\t\treturn population;\n\t}", "public void solution() {\n\t\t\n\t}", "public List<T> getSolution() throws InstantiationException, IllegalAccessException,\n\t\t\tInvocationTargetException, NoSuchMethodException {\n\t\t\n\t\tPopulation<T, K> pop = initializePopulation(populationSize, clazz);\n\t\t// Evolve our population until we reach an optimum solution\n\t\tint generationCount = 0;\n\n\t\tK fittest = pop.getFittest();\n\t\twhile (fittest.getFitness() < fitnessCalc.getMaxFitness() && generationCount < maxNumberOfGeneration) {\n\t\t\tgenerationCount++;\n\t\t\tpop = evolutionAlgorithm.evolvePopulation(pop);\n\t\t\tfittest = pop.getFittest();\n\t\t}\n\t\treturn new LinkedList<>(fittest.getChromosome());\n\t}", "public static int dynamic_p(int objects,int capacity){\r\n // Array to accommodate dynamic programming solutions\r\n int dp_array[][] = new int[objects+1][capacity+1];\r\n // filling the 2D array\r\n for(int i=0; i<= objects;i++){\r\n for(int j=0; j<= capacity;j++){\r\n if(i == 0)\r\n dp_array[i][j]=0; // base case(number of objects are zero)\r\n else if(j == 0)\r\n dp_array[i][j]=0; // base case(capacity is zero)\r\n else if(randvariables[i-1] <= j){ // checking if the wight of object is less than the current knapsack capacity\r\n int included = randvalues[i-1]+dp_array[i-1][j-randvariables[i-1]]; // object is included\r\n int not_included = dp_array[i-1][j]; // object is not included\r\n\r\n //taking the max of these two\r\n if(included > not_included)\r\n dp_array[i][j] = included;\r\n else\r\n dp_array[i][j]= not_included;\r\n }\r\n else // weight is more than capacity .. not including the object\r\n dp_array[i][j] = dp_array[i-1][j];\r\n }\r\n }\r\n\r\n //System.out.println(Arrays.deepToString(dp_array));\r\n int solution = dp_array[objects][capacity];\r\n boolean[] optimalset = solution_used(dp_array,objects,capacity);\r\n System.out.println(Arrays.toString(optimalset));\r\n dp_array = null;\r\n return solution; // return the final solution\r\n\r\n }", "private static List<Cell> initiatePopulation(int required_population_size)\n {\n List<Cell> population = new ArrayList<Cell>(); //Define an arraylist to hold the initial population of cells\n int[][][] diploid_genome = newEmptyDeploidGenome();\n int cell_generation = newest_generation + 1, last_div = -1;\n \n //Set the label status of all DNA strands in the genome to unlabelled\n for(int chromosome_count = 0; chromosome_count < diploid_genome.length; chromosome_count++)\n {\n for(int homologous_pair_count= 0; homologous_pair_count < diploid_genome[chromosome_count].length; homologous_pair_count++)\n {\n for(int dna_strand_count = 0; dna_strand_count < diploid_genome[chromosome_count][homologous_pair_count].length; dna_strand_count++)\n {\n diploid_genome[chromosome_count][homologous_pair_count][dna_strand_count] = STRAND_UNLABELLED; //Set each DNA strand to unlabelled\n }\n }\n }\n \n // !****!Create the starting population of cells, all as generation 0!****!\n for (int counter = 0; counter < required_population_size; counter++)\n {\n int cell_id = counter;\n population.add(new Cell(cell_id, cell_generation, last_div, CAN_DIVIDE, diploid_genome)); // Create a new Cell object with the following values.\n id_of_last_created_cell = cell_id; // Track the id of the last created cell\n }// for\n newest_generation++;\n return population;\n }", "public void createSelectedPopulation(Population previousPopulation, int populationSize, double perc) {\n\t\t\n\t\tint intendedSize = (int)(populationSize * perc/100);\n\t\tSystem.out.println(\"intended size: \" + intendedSize ) ;\n\t\tint currentSize = 0;\n\t\tint randomPopulationSize;\n\t\tSolution mutant;\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\n\t\t\n\t\t//copy solutions from the previous population until the cloning factor is bigger than 1\n\t\tfor(Solution solution : previousPopulation.getPopulation()) {\n\t\t\tif(solution.getCloningFactor() < 1.0) break;\n\t\t\t\n\t\t\t//add as many clones of the current solution\n\t\t\t//as indicates the cloning factor\n\t\t\t//eg. if cloning factor is 2 -> 3 copies of this solution will go to the next population\n\t\t\tfor(int i = 0; i <= (int) solution.getCloningFactor(); i++) {\n\t\t\t\t//if we get a complete population by cloning the solution from the previous population\n\t\t\t\t//leave the method\n\t\t\t\tif(currentSize == intendedSize) break;\n\t\t\t\t\n\t\t\t\t//we create a mutation of each clone\n\t\t\t\t//if mutation is less efficient or already exists in the population we discard it\n\t\t\t\tmutant = new Solution(solution.getFrequencyRelations(), solution.getCabinets());\n\t\t\t\tArrayList<String> mutantSol = solution.mutate();\n\t\t\t\tmutant.setPossibleSolution(mutantSol);\n\t\t\t\tmutant.setPath(mutant.countPath(mutant.getPossibleSolution()));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"M: \" + mutantSol + \" \" + mutant.getPath() );\n\t\t\t//\tSystem.out.println(\"S: \" + solution.getPossibleSolution() + \" \" + solution.getPath() );\n\n\n\t\t\t\tif(mutant.getPath() >= solution.getPath() || added.contains(mutant.getPossibleSolution()) ) {\n\t\t\t\t\tpopulation.add(solution);\n\t\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"original\");\n\t\t\t\t}else {\n\t\t\t\t\tpopulation.add(mutant);\n\t\t\t\t\tadded.add(mutant.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"mutant\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcurrentSize++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//count the number of random solutions that should be added\n\t\tif(currentSize <= populationSize) {\n\t\t\t randomPopulationSize = populationSize - currentSize;\n\t\t}else return;\n\t\t\n\t\t//create random solutions and add them to the population \n\t\t//until the wished size is reached\n\t\tcreateRandomPopulation(previousPopulation.getCabinetArrangement(), randomPopulationSize);\n\t\t\t\n\t}", "public Solver(WorldState initial) {\n solution = new ArrayList<>();\n\n // create a priority queue of search nodes\n MinPQ<SNode> pq = new MinPQ<>();\n\n // insert an “initial search node” into the priority queue\n SNode start = new SNode(initial, 0, null);\n pq.insert(start);\n\n // If the search node with minimum priority is the goal node, then we’re done.\n while (!pq.min().ws.isGoal()) {\n\n // Remove the search node with minimum priority.\n SNode X = pq.delMin();\n\n // for each neighbor of X’s world state, create a new search node and\n // insert it into the priority queue.\n for (WorldState nb: X.ws.neighbors()) {\n\n // critical optimization\n if (X.prev == null || !(nb.equals(X.prev.ws))) {\n SNode nbNode = new SNode(nb, X.numberOfMove + 1, X);\n pq.insert(nbNode);\n }\n }\n }\n\n // generate the solution\n SNode goal = pq.min();\n while (goal != null) {\n solution.add(0, goal.ws);\n goal = goal.prev;\n }\n }", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "public List<Configuration> solve(){\n int group = 0;\n for(List<Configuration> set : input){\n minimize(set);\n\n for(Configuration root : set) {\n root.setGroup(group);\n }\n group++;\n\n }\n\n // Step 2: Preprocess\n sortBySize(input);\n\n // Step 5: Initialize set of partial solutions\n List<Configuration> partialSolutions;\n if(input.size()==0){\n return null;\n }\n else {\n partialSolutions = input.get(0);\n input.remove(partialSolutions);\n }\n\n // Step 6: The compositional computations\n for(List<Configuration> set : input) {\n filter(partialSolutions, setCutoff);\n filter(set, setCutoff);\n partialSolutions = combine(partialSolutions, set, constraints);\n }\n\n // Step 7: Postprocessing\n //greedyPostProcessing(partialSolutions);\n\n return partialSolutions;\n }", "public int getRandom() {\n Integer ans = null;\n while (ans == null) {\n int r = random.nextInt(size);\n ans = allSet[r];\n if (!realSet.contains(ans)) {\n ans = allSet[r] = null;\n }\n }\n return ans;\n }", "public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){\n \n ArrayList<Population> PopulationsList = new ArrayList();\n \n if(NumberOfPopulations == 1){\n \n PopulationsList.add(InitSinglePopulation(NumberOfAgents));\n \n }else{\n \n for(int i = 0; i < NumberOfPopulations; i++){ \n double temp = rand.nextDouble();\n PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp));\n }\n \n }\n \n \n return PopulationsList;\n }", "public void setFinalSolution() {\r\n for(int i=0; i<Config.numberOfSeeds;i++) {\r\n// this.seeds[i].setDurationMilliSec(GLowestState.getDwelltimes()[i]);\r\n// Cur_state[i] = GLowestState.getDwelltimes()[i];\r\n Cur_state[i] = this.seeds[i].getDurationMilliSec();\r\n }\r\n if (Config.SACostFunctionType==3) {\r\n setCur_cost(costCUR());\r\n }\r\n if (Config.SACostFunctionType==2) {\r\n setCur_cost(costCURfinal());\r\n }\r\n if (Config.SACostFunctionType==1) {\r\n setCur_cost(costCURsuper());\r\n }\r\n if (Config.SACostFunctionType==0) {\r\n setCur_cost(costCURsuperfinal());\r\n }\r\n }", "private static Set<Chromosome> generateRandomPopulation(int pathLength, int randomPopulationSize) {\n Set<Chromosome> population = new HashSet<>();\n\n // create an arraylist of CityIDs, and initialise it with the cities in order of their ID\n ArrayList<Integer> basePath = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n basePath.add(i);\n }\n\n // repeat the following for as many chromosomes as are required (populationSize)\n while (population.size() < randomPopulationSize) {\n Chromosome chromosome = new Chromosome(pathLength);\n // randomise the order of the arraylist of cities\n Collections.shuffle(basePath);\n for (int j = 0; j < pathLength; j++) {\n chromosome.path[j] = basePath.get(j);\n }\n population.add(chromosome);\n }\n\n return population;\n }", "public void solvePuzzle(){\n\t\t// check to make sure pieces was set\n\t\tif(possiblePieces == null){\n\t\t\tSystem.out.println(\"PuzzleThree::solvePuzzle(): possiblePieces is not initialized!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// initialize population with random sequences\n\t\tinitializePopulation();\n\t\t\n\t\t// print header of results\n\t\tSystem.out.printf(\"%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\n\", \"Current Generation\"\n\t\t\t\t, \"Most Fit Fitness\"\n\t\t\t\t, \"Most Fit Score\"\n\t\t\t\t, \"Most Fit Generation\"\n\t\t\t\t, \"Median Fit Fitness\"\n\t\t\t\t, \"Median Fit Score\"\n\t\t\t\t, \"Median Fit Generation\"\n\t\t\t\t, \"Worst Fit Fitness\"\n\t\t\t\t, \"Worst Fit Score\"\n\t\t\t\t, \"Worst Fit Generation\");\n\t\t\n\t\t\t\t// keep culling and reproducing until time is up\n\t\twhile(!clock.overTargetTime()){\n\t\t\t// every few generations print out generation, most fit, median fit, worst fit\n\t\t\tif(generation % 5000 == 0){\n\t\t\t\tCollections.sort(population);\n\t\t\t\tBuilding mostFit = population.get(POPULATION_SIZE-1);\n\t\t\t\tBuilding medianFit = population.get((int)(POPULATION_SIZE / 2) - 1);\n\t\t\t\tBuilding worstFit = population.get(0);\n\t\t\t\tSystem.out.printf(\"%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\n\", generation, \n\t\t\t\t\t\t\t\t\tmostFit.getFitness(), mostFit.getScore(), mostFit.getGeneration(),\n\t\t\t\t\t\t\t\t\tmedianFit.getFitness(), medianFit.getScore(), medianFit.getGeneration(),\n\t\t\t\t\t\t\t\t\tworstFit.getFitness(), worstFit.getScore(), worstFit.getGeneration());\n\t\t\t}\n\t\t\t\n\t\t\t// remove a portion of the population\n\t\t\tcullPopulation();\n\t\t\t\n\t\t\t// reproduce with the fittest more likely being parents\n\t\t\treproduce();\n\t\t\t\n\t\t\tgeneration++;\n\t\t}\n\n\t\t\n\t\t// print out information about most fit\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\tBuilding mostFit = population.get(0);\n\n\t\tSystem.out.printf(\"\\n\\nBest in population is\\n\");\n\t\tSystem.out.printf(\"Sequence: \\n\");\n\t\tfor(int i = 0; i < mostFit.getList().length; i++){\n\t\t\tSystem.out.printf(\"\\t%s\\n\", mostFit.getList()[i].toString());\n\n\t\t}\n\n\t\tSystem.out.printf(\"\\nFitness: %d\\n\", mostFit.getFitness());\n\t\tSystem.out.printf(\"Score: %d\\n\", mostFit.getScore());\n\t}", "private void initialiseNumbers() {\r\n double choice = Math.random();\r\n sourceNumbers = new int[6];\r\n if(choice<0.8) {\r\n //one big number, 5 small.\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n for( int i=1; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n } else {\r\n //two big numbers, 5 small\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n sourceNumbers[1] = (Integer) bigPool.remove(0);\r\n for( int i=2; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n }\r\n\r\n //for target all numbers from 101 to 999 are equally likely\r\n targetNumber = 101 + (int) (899 * Math.random());\r\n }", "@Test\n public void testSolution() throws Exception {\n assertEquals(4, new Task5().solution(4, new int[]{1, 2, 3}));\n // 1. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n // 2. 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n // 3. 2, 2, 1, 1, 1, 1, 1, 1, 1, 1\n // 4. 2, 2, 2, 1, 1, 1, 1, 1, 1\n // 5. 2, 2, 2, 2, 1, 1, 1, 1\n // 6. 2, 2, 2, 2, 2, 1, 1\n // 7. 2, 2, 2, 2, 2, 2\n // 8. 5, 1, 1, 1, 1, 1, 1, 1\n // 9. 5, 2, 1, 1, 1, 1, 1\n // 10. 5, 2, 2, 1, 1, 1\n // 11. 5, 2, 2, 2, 1\n // 12. 5, 5, 1, 1\n // 13. 5, 5, 2\n assertEquals(13, new Task5().solution(12, new int[]{1, 2, 5}));\n // 1. 2, 2, 2, 2, 2, 2\n // 2. 5, 5, 2\n assertEquals(2, new Task5().solution(12, new int[]{2, 5}));\n }", "public void randomizeState() {\n\t\t//System.out.print(\"Randomizing State: \");\n\t\tArrayList<Integer> lst = new ArrayList<Integer>();\n\t\tfor(int i = 0; i<9; i++)// adds 0-8 to list\n\t\t\tlst.add(i);\n\t\tCollections.shuffle(lst);//randomizes list\n\t\tString str=\"\";\n\t\tfor(Integer i : lst)\n\t\t\tstr += String.valueOf(i);\n\t\t//System.out.println(str);\n\t\tcurrent = new PuzzleState(str,current.getString(current.getGoalState()));\n\t\t//pathCost++;\n\t}", "public void solve() {\n// BruteForceSolver bfs = new BruteForceSolver(pointList);\n// bfs.solve(); // prints the best polygon, its area, and time needed\n// System.out.println(\"-------------\");\n\n// StarshapedSolver ss = new StarshapedSolver(pointList);\n// foundPolygons = ss.solve();\n// System.out.println(\"-------------\");\n\n// RandomAddPointHeuristic ra = new RandomAddPointHeuristic(pointList);\n// foundPolygons = ra.solve(750);\n// System.out.println(\"-------------\");\n\n// GreedyAddPointHeuristic ga = new GreedyAddPointHeuristic(pointList,false);\n// foundPolygons = ga.solve(750);\n// System.out.println(\"-------------\");\n\n// long time = 4000;\n// GreedyAddPointHeuristic gaInit = new GreedyAddPointHeuristic(pointList,false);\n// Polygon2D initSolution = gaInit.solve(time*1/4).get(0);\n// System.out.println(initSolution.area);\n// System.out.println(initSolution);\n//\n// SimulatedAnnealing sa = new SimulatedAnnealing(pointList,initSolution,3);\n// foundPolygons.addAll(sa.solve(time-gaInit.timeInit,2,0.005,0.95));\n// System.out.println(sa.maxPolygon);\n// System.out.println(\"-------------\");\n\n// foundPolygons.addAll(findMultiplePolygonsStarshaped(8,0.6));\n\n }", "public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}", "public void mutate(Solution solution) {\n int size = solution.values.length;\n int first = random.nextInt(size-1);\n int second = first + random.nextInt(size-first);\n\n int firstCopy = solution.values[first];\n solution.values[first] = solution.values[second];\n solution.values[second] = firstCopy;\n }", "@Override\n public String getSolutionCombination(int nbrDigits, int nbrRange, String sizure) {\n\n // randomRange\n int[][] randomRange = new int[2][nbrDigits];\n\n for (int i = 0; i < 2; i++) {\n\n for (int j = 0; j < nbrDigits; j++) {\n\n if (i == 0) {\n\n // Min value limit\n randomRange[i][j] = 0;\n\n } else {\n\n // Max value limit\n randomRange[i][j] = nbrRange;\n\n }\n\n }\n\n }\n\n // inputmachine\n List<Integer> inputMachine = new ArrayList<Integer>();\n\n for (int i = 0; i < nbrDigits; i++) {\n\n inputMachine.add((int) ((randomRange[1][i] - randomRange[0][i]) * Math.random()) + randomRange[0][i]);\n\n log.info(\"test A : \" + inputMachine.get(i) + \" \");\n\n }\n\n // convertListIntegerToString\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < inputMachine.size(); i++) {\n int num = inputMachine.get(i);\n sb.append(num);\n }\n\n return sb.toString();\n\n }", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "public Iterable<WorldState> solution() {\n return solution;\n }", "public RandomNeighborhoodOperator(int nbRelaxedVars, long seed)\n{\n\trandom = new Random(seed);\n\tthis.nbRelaxedVars = nbRelaxedVars;\n\tselected = new TIntHashSet();\n}", "public static void seed() {\n\n // Get locations, employees, and custodians from database.\n ArrayList<Location> locations = new ArrayList(LocationTable.getLocations().values());\n ArrayList<User> employees = UserTable.getEmployees();\n ArrayList<User> custodians = UserTable.getCustodians();\n\n // Generate random sanitation requests\n Random rand = new Random();\n final int numEntries = 30;\n for (int i = 0; i < numEntries; i++) {\n\n // Generate location (uniform)\n Location location = locations.get(rand.nextInt(locations.size()));\n\n // Generate priority (uniform)\n Priority priority;\n switch (rand.nextInt(3)) {\n case 0: priority = Priority.HIGH; break;\n case 1: priority = Priority.MEDIUM; break;\n default: priority = Priority.LOW; break;\n }\n\n // Generate requester\n User requester = employees.get(rand.nextInt(employees.size()));\n\n // Generate request time (uniform current time + ~12 hours)\n Timestamp requestTime = new Timestamp(\n new Date().getTime() + rand.nextInt(43200000));\n\n // Generate description\n String description;\n switch (rand.nextInt(3)) {\n case 0: description = \"Drink spill\";\n case 1: description = \"Vomit\";\n default: description = \"Radioactive waste\";\n }\n\n // Add request to database\n SanitationRequest request = new SanitationRequest(\n 0, location, priority, Status.INCOMPLETE, description,\n requester, requestTime,\n null, null, null);\n\n // Mark 2/3 of requests as claimed\n int claimFlag = rand.nextInt(3);\n if (claimFlag > 0) {\n\n // Mark as claimed within 1 hour of request\n User servicer = custodians.get(rand.nextInt(custodians.size()));\n Timestamp claimedTime = new Timestamp(\n requestTime.getTime() + rand.nextInt(3600000));\n request.setServicer(servicer);\n request.setClaimedTime(claimedTime);\n\n // Mark half of claimed requests as completed within 2 hours of claim\n if (claimFlag == 2) {\n Timestamp completedTime = new Timestamp(\n claimedTime.getTime() + rand.nextInt(7200000));\n request.setCompletedTime(completedTime);\n request.setStatus(Status.COMPLETE);\n }\n\n // Update request in database\n editSanitationRequest(request);\n }\n\n // Add request to database\n addSanitationRequest(request);\n }\n }", "private void randomizePuzzle() {\n\t\t// Choose random puzzles, shuffle the options.\n\t\tthis.puzzle = BarrowsPuzzleData.PUZZLES[(int) (Math.random() * BarrowsPuzzleData.PUZZLES.length)];\n\t\tthis.shuffledOptions = shuffleIntArray(puzzle.getOptions());\n\t}", "public interface PopulationInitialiser {\n\t/**\n\t * this generates an initial solution population from which to start optimisation\n\t *\n\t * @param cities the set of cities which are part of each solution\n\t * @param populationSize the number of solutions to be included in a population\n\t */\n\tSolutionPopulation initialise(ArrayList<City> cities, int populationSize);\n}", "public Iterable<Board> solution() {\n if (!solvable) {\n return null;\n }\n else {\n return new SolutionBoards();\n }\n\n }", "public default List<Item> generateSolution(KnapsackData knapsackData, BinarySolution solution) {\r\n List<Item> pickedItem = new ArrayList<>();\r\n for (int i = 0; i < knapsackData.getSize(); i++) {\r\n if (solution.getBit(i) == 1) {\r\n pickedItem.add(knapsackData.getData(i));\r\n }\r\n }\r\n return pickedItem;\r\n }", "public SolutionSet execute() throws JMException, ClassNotFoundException {\n int maxEvaluations ;\n int evaluations ;\n\n SolutionSet population ;\n SolutionSet offspringPopulation ;\n\n Solution betterIndividual ;\n\n Operator mutationOperator ;\n Comparator comparator ;\n Operator localSearchOperator ;\n\n\n comparator = new ObjectiveComparator(0) ; // Single objective comparator\n\n // Read the params\n maxEvaluations = ((Integer)this.getInputParameter(\"maxEvaluations\")).intValue();\n\n // Initialize the variables\n population = new SolutionSet(mu_) ;\n offspringPopulation = new SolutionSet(lambda_) ;\n\n evaluations = 0;\n\n // Read the operators\n mutationOperator = this.operators_.get(\"mutation\");\n localSearchOperator = (LocalSearch) operators_.get(\"improvement\");\n\n System.out.println(\"(\" + mu_ + \" + \" + lambda_+\")ES\") ;\n\n // Create 1-parent population of mu solutions\n Solution newIndividual;\n newIndividual = new Solution(problem_);\n problem_.evaluate(newIndividual);\n evaluations++;\n betterIndividual = new Solution(newIndividual);\n population.add(betterIndividual);\n\n // Main loop\n while (evaluations < maxEvaluations) {\n // STEP 1. Generate the offspring\n Solution offspring = new Solution(population.get(0)) ;\n mutationOperator.execute(offspring);\n /*Solution mutated_solution = (Solution) mutationOperator.execute(offspring);\n if(offspring.getObjective(0) < mutated_solution.getObjective(0))\n offspring = mutated_solution;*/\n problem_.evaluate(offspring);\n Solution local_offspring = (Solution) localSearchOperator.execute(offspring);\n offspring.setObjective(0, local_offspring.getObjective(0));\n offspringPopulation.add(offspring);\n evaluations++;\n\n if(comparator.compare(betterIndividual, offspringPopulation.get(0)) > 0) {\n betterIndividual = new Solution(offspringPopulation.get(0));\n population.clear();\n // STEP 4. Create the new mu population\n population.add(betterIndividual);\n }\n\n System.out.println(population.get(0).getObjective(0)) ;\n\n // STEP 6. Delete the offspring population\n offspringPopulation.clear() ;\n } // while\n\n // Return a population with the best individual\n SolutionSet resultPopulation = new SolutionSet(1) ;\n resultPopulation.add(population.get(0)) ;\n\n return resultPopulation ;\n }", "public static boolean solve(Problem inputProblem, int popLimit, double mutChance, int iterLimit) {\n\n // Check All the Input Parameter\n // popLimit: Make as Even\n int evenBase = 2;\n if (popLimit % evenBase != 0){\n popLimit = popLimit + 1;\n }\n // mutChance: in the Range of 0% and 100%\n if (mutChance < 0 || mutChance > 1){\n System.out.println(\"Invalid Mutation Chance: \" + mutChance);\n return false;\n }\n\n // Initialization\n Solution[] currentPop = initPopulation(inputProblem, popLimit);\n Solution[] generatedPop, nextPop;\n\n System.out.println(0 + \"\\t\" +0+ \"\\t\" +currentPop[0].distance);\n long time = System.nanoTime();\n\n // Loop For Counting Iteration\n for (int turn = 0; turn < iterLimit; turn++) {\n //System.out.println(currentPop[0].distance);\n // Initialization Next Generation\n generatedPop = new Solution[popLimit];\n\n // Loop for Generating Next Population\n Solution[] parent, offspring;\n for (int leftChild = popLimit; leftChild > 0; leftChild = leftChild - 2) {\n // Selection\n parent = rankSelection(currentPop);\n // CrossOver\n offspring = CrossOver_mapping(currentProblem, parent[0], parent[1]);\n // Prevent Duplicated Offspring\n if (haveDuplicated(generatedPop, offspring[0]) || haveDuplicated(generatedPop, offspring[1])) {\n leftChild = leftChild + 2;\n continue;\n }\n // Add Child into generatedPop\n generatedPop[leftChild - 1] = offspring[0];\n generatedPop[leftChild - 2] = offspring[1];\n }\n\n // Mutation For Each Solution\n Solution newElement;\n for (int index = 0; index < popLimit; index++){\n if(Math.random() < mutChance){\n // Use Local Search to Finish Mutation\n newElement = HillClimbing.solve_invoke(inputProblem, generatedPop[index]);\n // Prevent Duplicated Offspring\n if (!haveDuplicated(generatedPop, newElement)) {\n generatedPop[index] = newElement;\n }\n }\n }\n\n // Sort the Generated Array\n Arrays.sort(generatedPop);\n // Produce Next Generation\n nextPop = getTopSolutions(currentPop, generatedPop, popLimit);\n\n // Switch nextPop to currentPop\n currentPop = nextPop;\n System.out.println((System.nanoTime() - time) + \"\\t\" + (turn+1) + \"\\t\" + currentPop[0].distance);\n }\n // Store into the Static Variable\n optimalSolution = currentPop[0];\n return true;\n }", "public abstract SolutionPartielle solutionInitiale();", "public static Set<Integer> rndSet(int size, int min, int max){\n\n\t\tif (max < size)\n\t\t{\n\t\t throw new IllegalArgumentException(\"Can't ask for more numbers than are available\");\n\t\t}\n\n\t\tSet<Integer> generated = new LinkedHashSet<Integer>();\n\t\twhile (generated.size() < size)\n\t\t{\n\t\t Integer next = rng.nextInt(max - min + 1) + min;\n\t\t // As we're adding to a set, this will automatically do a containment check\n\t\t generated.add(next);\n\t\t}\n\t\tSystem.out.println(\"line sampled: \"+generated.toString());\n\t\treturn generated;\n\t}", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "public static CubeState getRandom(){\n CubeState cs = new CubeState();\n Random rand = new Random();\n for (int i = 0; i < 20; i++) {\n cs = cs.times(Solver.generators.get(rand.nextInt(18)));\n }\n return cs;\n }", "public Iterable<Board> solution() {\n if (!isSolvable) return null;\n return solutions;\n }", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "private static ArrayList<Chromosome> generateNearestNeighbourPopulation(int pathLength, int nnPopulationSize){\n // declaring the arraylist of chromosomes which will store the\n ArrayList<Chromosome> nnPopualtion = new ArrayList<>();\n\n // declaring a set which will contain all the starting cities that will be used for the population\n Set<Integer> startingCities = new HashSet<>();\n // initialising the set of startingCities with random cities. It being a set no duplicates are allowed\n while (startingCities.size() < nnPopulationSize) {\n startingCities.add(ThreadLocalRandom.current().nextInt(0, pathLength));\n }\n\n // An ArrayList with all the cityIDs which can be copied to keep track of visited/unvisited cities\n ArrayList<Integer> cities = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n cities.add(i);\n }\n\n // for every starting city\n for (Integer startingCity : startingCities) {\n // set the currentCity as the Starting City\n int currentCity = startingCity;\n // Declare a new chromosome to store this new path\n Chromosome chromosome = new Chromosome(pathLength);\n // Set the first city in the path as the startingCity\n chromosome.path[0] = startingCity;\n\n // Declare a new Set of unvisitedCities, and initialise it as a copy of the ArrayList of cityIDs\n Set<Integer> unvisitedCities = new HashSet<>(cities);\n // remove the startingCity from the set of unvisitedCities\n unvisitedCities.remove(startingCity);\n\n // for the length of the path\n for (int i = 1; i < pathLength; i++) {\n // initially set the closestCity to a random city from the set of unvisitedCities\n int closestCity = unvisitedCities.iterator().next();\n // loop through every unvisitedCity to find the closestCity\n for (Integer city : unvisitedCities) {\n // if the distance between the currentCity and the unvisitedCity is < the distance between\n // the currentCity and the closestCity\n if (distanceMatrix[currentCity][city] < distanceMatrix[currentCity][closestCity]) {\n // set thet unvisitedCity as the closestCity\n closestCity = city;\n }\n }\n // add the closestCity as the next city in the path\n chromosome.path[i] = closestCity;\n // make the currentCity for the next iteration the current closestCity\n currentCity = closestCity;\n // remove the closestCity from the set of unvisitedCities\n unvisitedCities.remove(closestCity);\n }\n\n // add the generated chromosome to the ArrayList of the initial nnPopulation\n nnPopualtion.add(chromosome);\n }\n\n return nnPopualtion;\n }", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public RandomizedSet() {\n realSet = new HashSet<>();\n allSet = new Integer[10];\n random = new Random();\n }", "public RandomizedSet() {\n nums = new ArrayList<Integer>();\n location = new HashMap<Integer, Integer>();\n }", "public static void breedAll() {\n int a, b; //Pointers to select parents\n\n //While loop to ensure full carrying capacity of population\n while (Population.size() <= maxPop) {\n //Sorts by Fitness level first\n sortByFitlvl();\n\n //Selects Two Random Parents\n a = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n b = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n //System.out.println(a+\"\\t\"+b+\"\\t\"+Population.size());\n\n // Between 1-2 children\n int children = rand.nextInt(2)+1;\n for (int i = 0; i < children; i++) {\n Population.add(Breeder.breed(Population.get(a), Population.get(b), 0.1));\n }\n\n //sortByFitlvl();\n }\n\n if (debug)\n printPopulation(true);\n }", "public Iterable<Board> solution() {\n\n return initialSolvable ? solutionBoards : null;\n }", "public abstract List<OptimisationSolution> getSolutions();", "private static ArrayList<Chromosome> generatePopulation(ArrayList<City> cities, int pathLength, int populationSize) {\n // generating part of the initial population using a Nearest Neighbour Algorithm\n int nnPopulationSize = (int) (0.1*populationSize);\n // if the required number of chromosomes to be generated by the NN Algorithm is greater then the number of cities\n // then set the required number of chromosomes to the number of cities\n if (nnPopulationSize > cities.size()) {\n nnPopulationSize = cities.size();\n }\n ArrayList<Chromosome> nnPopulation = generateNearestNeighbourPopulation(pathLength, nnPopulationSize);\n\n // generating the rest of the initial population randomly\n int randomPopulationSize = populationSize - nnPopulationSize;\n ArrayList<Chromosome> randomPopulation = new ArrayList<>();\n randomPopulation.addAll( generateRandomPopulation(pathLength, randomPopulationSize) );\n\n // Combining the 2 parts of the population into one initial population\n ArrayList<Chromosome> population = new ArrayList<>();\n population.addAll(nnPopulation);\n population.addAll(randomPopulation);\n\n return population;\n }", "public void populateRandomly(final EVGameState state)\n \t{\n \t\tfor (int i = 0; i < 6; i++) {\n \t\t\tfinal int width = MathUtils.getRandomIntBetween(32, 128);\n \t\t\tfinal int height = MathUtils.getRandomIntBetween(24, 72);\n \t\t\tfinal Point3D origin = getRandomSolarPoint(Math.max(width, height));\n \t\t\tfinal SolarSystem tSolar = SolarSystem.randomSolarSystem(width, height, origin, state);\n \t\t\taddSolarSystem(tSolar);\n \t\t}\n\t\tfor (int i = 0; i < 10; i++) {\n \t\t\tfinal SolarSystem ss1 = (SolarSystem) MathUtils.getRandomElement(aSolarSystems.values());\n \t\t\tfinal SolarSystem ss2 = (SolarSystem) MathUtils.getRandomElement(aSolarSystems.values());\n \t\t\tif (ss1.equals(ss2)) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tfinal Portal portal1 = new Portal(state.getNextPropID(), state.getNullPlayer(), ss1.getWormholeLocation(), ss1, ss2);\n \t\t\tfinal Portal portal2 = new Portal(state.getNextPropID() + 1, state.getNullPlayer(), ss2.getWormholeLocation(), ss2,\n \t\t\t\t\tss1);\n \t\t\tfinal Wormhole tempWorhmhole = new Wormhole(portal1, portal2, ss1.getPoint3D().distanceTo(ss2.getPoint3D()), state);\n \t\t\taddWormhole(tempWorhmhole, state);\n \t\t}\n \t}", "public SolutionSet execute() throws JMException, ClassNotFoundException {\n baiscSetting();\n /*\n * step2: Initialize the Population\n */\n initPopulation();\n initIdealPoint(); // initialize the ideal point\n\n initNadirPoint(); // initialize the nadir point\n\n initExtremePoints(); // initialize the extreme points\n /*\n * Enter the main loop,into the process of evolution\n */\n while (generations_ < maxGenerations_) {\n /*\n * step3 and step4:Mating Selection and Recombination to generate Offspring Populations\n */\n generateOffspringPopulation();\n /*\n * step5:Environmental Selection\n */\n environmentalSelection(generations_);\n\n generations_++;\n }\n\n// Ranking ranking = new NondominatedRanking(population_);\n// return ranking.getSubfront(0);\n return population_[0];\n }", "public ArrayList<PuzzleState> getRandomNeighbors() {\n\t\tArrayList<PuzzleState> ns = getNeighbors();\n\t\tCollections.shuffle(ns);\n\t\treturn ns;\t\n\t}", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "private PMCGenotype[] advanceGeneration()\n\t{\n\t\tPMCGenotype[] newPop = new PMCGenotype[population.length];\n\t\tPMCGenotype[] parents = selectParents();\n\t\tArrayList<PMCGenotype> candidates = new ArrayList<PMCGenotype>();\n\n\t\t// Add the current population to the list of candidates.\n\t\tfor (PMCGenotype pmcg : population)\n\t\t{\n\t\t\tcandidates.add(pmcg);\n\t\t}\n\n\t\t// For each parent, generate a number of mutations (children), calculate their fitness\n\t\t// and add them to the list of candidates.\n\t\tint childrenPerParent = this.childrenPerGeneration / this.parentsToSelect;\n\t\tfor (PMCGenotype p : parents)\n\t\t{\n\t\t\tfor (int i = 0; i < childrenPerParent; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = PMCGenotype.mutate(p, r);\n\t\t\t\tpmcg.setFitness(fitness(pmcg, this.trials));\n\t\t\t\tcandidates.add(pmcg);\n\t\t\t}\n\t\t}\n\n\t\t// Find candidate with the best fitness and add it to the new population.\n\t\t// Repeat this until the new population size matches the previous population size.\n\t\tint candidatesChosen = 0;\n\t\twhile (candidatesChosen < this.population.length)\n\t\t{\n\t\t\tint numberOfRemainingCandidates = candidates.size();\n\t\t\tdouble currentBestFitnessScore = 0;\n\t\t\tint currentBestFitnessScoreIndex = 0;\n\n\t\t\tfor (int i = 0; i < numberOfRemainingCandidates; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = candidates.get(i);\n\t\t\t\tif (pmcg.getFitness() > currentBestFitnessScore)\n\t\t\t\t{\n\t\t\t\t\tcurrentBestFitnessScore = pmcg.getFitness();\n\t\t\t\t\tcurrentBestFitnessScoreIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewPop[candidatesChosen] = candidates.get(currentBestFitnessScoreIndex);\n\t\t\tcandidatesChosen++;\n\n\t\t\tcandidates.remove(currentBestFitnessScoreIndex);\n\t\t}\n\n\t\treturn newPop;\n\t}", "protected void randInitialize(Variable variable) {\n if (variable instanceof Combining) {\n Combining comb = (Combining) variable;\n comb.setValue(pprng.nextInt(comb.getNumberOfAlternatives()));\n } else if (variable instanceof Assigning) {\n //this covers initialization for both assigning and connecting\n Assigning assign = (Assigning) variable;\n for (int i = 0; i < assign.getNumberOfLHS(); i++) {\n for (int j = 0; j < assign.getNumberOfRHS(); j++) {\n if(pprng.nextBoolean())\n assign.connect(i,j);\n }\n }\n// assign.connect(0,0);\n// assign.connect(6,0);\n// assign.connect(7,0);\n// assign.connect(11,0);\n// assign.connect(1,1);\n// assign.connect(6,1);\n// assign.connect(10,1);\n// assign.connect(5,2);\n// assign.connect(6,2);\n// assign.connect(4,3);\n// assign.connect(5,3);\n// assign.connect(11,3);\n// assign.connect(5,4);\n// assign.connect(7,4);\n// assign.connect(8,4);\n// assign.connect(9,4);\n// assign.connect(10,4);\n \n } else {\n System.err.println(\"can not initialize unknown type\");\n }\n }", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "@Test\n public void solveTest5() throws ContradictionException {\n\n Set<ConstraintInfo> constraints = new HashSet<>();\n Set<Position> vars = new HashSet<>();\n Position[] varArr = new Position[]{\n this.grid.getVariable(0, 6),\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(3, 6),\n this.grid.getVariable(4, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(6, 6),\n this.grid.getVariable(7, 6),\n this.grid.getVariable(7, 5),\n this.grid.getVariable(7, 4),\n this.grid.getVariable(7, 3),\n this.grid.getVariable(7, 2),\n this.grid.getVariable(6, 2),\n this.grid.getVariable(5, 2),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 0)\n };\n vars.addAll(Arrays.asList(varArr));\n ArrayList<Set<Position>> cArr = new ArrayList<>();\n for (int i = 0; i < 14; i++) cArr.add(new HashSet<>());\n add(cArr.get(0), varArr[0], varArr[1]);\n add(cArr.get(1), varArr[0], varArr[1], varArr[2]);\n add(cArr.get(2), varArr[3], varArr[1], varArr[2]);\n add(cArr.get(3), varArr[3], varArr[4], varArr[2]);\n add(cArr.get(4), varArr[3], varArr[4], varArr[5]);\n add(cArr.get(5), varArr[6], varArr[4], varArr[5]);\n add(cArr.get(6), varArr[6], varArr[7], varArr[5], varArr[8], varArr[9]);\n add(cArr.get(7), varArr[8], varArr[9], varArr[10]);\n add(cArr.get(8), varArr[9], varArr[10], varArr[11], varArr[12], varArr[13]);\n add(cArr.get(9), varArr[12], varArr[13]);\n add(cArr.get(10), varArr[13]);\n add(cArr.get(11), varArr[13], varArr[14]);\n add(cArr.get(12), varArr[13], varArr[14], varArr[15]);\n add(cArr.get(13), varArr[14], varArr[15]);\n\n int[] cVal = new int[] { 1,2,2,1,1,1,2,1,2,1,1,2,3,2 };\n for (int i = 0; i < 14; i++) {\n constraints.add(new ConstraintInfo(cArr.get(i), cVal[i]));\n }\n\n MSModel model = new MSModel(constraints, vars);\n\n Set<Position> expectedBombs = new HashSet<>();\n expectedBombs.addAll(Arrays.asList(\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(5, 0),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 2)\n ));\n Set<Position> expectedNoBombs = new HashSet<>();\n expectedNoBombs.addAll(Arrays.asList(\n this.grid.getVariable(6,2),\n this.grid.getVariable(0,6),\n this.grid.getVariable(3,6),\n this.grid.getVariable(4,6),\n this.grid.getVariable(6,6)\n ));\n\n for (Position pos : vars) {\n if (expectedBombs.contains(pos)) {\n assertTrue(model.hasBomb(pos));\n } else {\n assertFalse(model.hasBomb(pos));\n }\n\n if (expectedNoBombs.contains(pos)) {\n assertTrue(model.hasNoBombs(pos));\n } else {\n assertFalse(model.hasNoBombs(pos));\n }\n }\n\n /*\n 00002x???\n 00003x???\n 00002xxx?\n 0000112x?\n 0000001x?\n 1221112x?\n xxxxxxxx?\n ?????????\n */\n }", "public static void experiment(String name) {\n \tString probName = \"NQueensProblem\";\n \tList<OptimizationAlgorithm> algs = new ArrayList<>();\n int[] ranges = new int[N];\n Random random = new Random(N);\n for (int i = 0; i < N; i++) {\n \tranges[i] = random.nextInt();\n }\n NQueensFitnessFunction ef = new NQueensFitnessFunction();\n Distribution odd = new DiscretePermutationDistribution(N);\n NeighborFunction nf = new SwapNeighbor();\n MutationFunction mf = new SwapMutation();\n CrossoverFunction cf = new SingleCrossOver();\n Distribution df = new DiscreteDependencyTree(.1); \n \n HillClimbingProblem hcp = new GenericHillClimbingProblem(ef, odd, nf);\n GeneticAlgorithmProblem gap = new GenericGeneticAlgorithmProblem(ef, odd, mf, cf);\n ProbabilisticOptimizationProblem pop = new GenericProbabilisticOptimizationProblem(ef, odd, df);\n \n RandomizedHillClimbing rhc = new RandomizedHillClimbing(hcp); \n SimulatedAnnealing sa = new SimulatedAnnealing(1E1, .1, hcp);\n StandardGeneticAlgorithm ga = new StandardGeneticAlgorithm(200, 0, 10, gap);\n MIMIC mimic = new MIMIC(200, 10, pop);\n \n algs.add(rhc);\n algs.add(sa);\n algs.add(ga);\n algs.add(mimic);\n Experiment newExp = new Experiment();\n \n newExp.experiments(algs, ef, name);\n \n // test temperature for SA\n String paramName = \"Temperature\";\n String algName = \"SA\";\n List<Double> params2 = new ArrayList<>();\n List<OptimizationAlgorithm> algsTest = new ArrayList<>();\n for (double i = 1.0; i < 100.5; i+=1.0){\n \tparams2.add(i);\n \tsa = new SimulatedAnnealing(i, .1, hcp);\n \talgsTest.add(sa);\n }\n newExp.optParams(algsTest, ef, paramName, null, params2, algName, probName);\n \n // test cooling rate for SA\n paramName = \"CoolingRate\";\n params2 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (double i = 0.01; i < 0.51; i+=0.005){\n \tparams2.add(i);\n \tsa = new SimulatedAnnealing(1E1, i, hcp);\n \talgsTest.add(sa);\n }\n newExp.optParams(algsTest, ef, paramName, null, params2, algName, probName);\n \n // test populationSize for GA\n paramName = \"populationSize\";\n algName = \"GA\";\n List<Integer> params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 10; i < 1001; i+=10){\n \tparams1.add(i);\n \tga = new StandardGeneticAlgorithm(i, 0, 10, gap);\n \talgsTest.add(ga);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n // test toMate for GA\n paramName = \"toMate\";\n params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 0; i < 100; i+=1){\n \tparams1.add(i);\n \tga = new StandardGeneticAlgorithm(200, i, 10, gap);\n \talgsTest.add(ga);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n // test toMutate for GA\n paramName = \"toMutate\";\n params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 10; i < 1001; i+=10){\n \tparams1.add(i);\n \tga = new StandardGeneticAlgorithm(200, 0, i, gap);\n \talgsTest.add(ga);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n // test samples for MIMIC\n paramName = \"samples\";\n algName = \"MIMIC\";\n params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 100; i < 1101; i += 10){\n \tparams1.add(i);\n \tmimic = new MIMIC(i, 10, pop);\n \talgsTest.add(mimic);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n // test tokeep for MIMIC\n paramName = \"tokeeep\";\n params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 1; i < 101; i+=1){\n \tparams1.add(i);\n \tmimic = new MIMIC(200, i, pop);\n \talgsTest.add(mimic);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n \n // test different algorithms with various NQueensProblems\n // set up algorithms\n algs = new ArrayList<>();\n ga = new StandardGeneticAlgorithm(150, 98, 70, gap);\n algs.add(rhc);\n algs.add(sa);\n algs.add(ga);\n algs.add(mimic);\n // set up different efs\n List<EvaluationFunction> efs = new ArrayList<>();\n for (int i = 0; i < 50; i++){\n \tef = new NQueensFitnessFunction();\n \tefs.add(ef);\n }\n newExp.voteBest(algs, efs, 2000, probName);\n \n }", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }", "public void fillHeuristicData(){\n int[] temp;\n initHeuristic();\n for(int i = 0; i< variableLength; i++){\n temp=variables.clone();\n temp[i]=0;\n validateClauses(i,temp);\n temp[i]=1;\n validateClauses(i,temp);\n }\n }", "public static void main(String[] args) {\n\tRandom rdm = new Random();\r\n\tint size = 5;\r\n\tint[][] test = new int[size][size];\r\n\t// Generate Random Gates and initilize rest cells on maze\r\n\tfor (int i = 0; i < size; i++)\r\n\t for (int j = 0; j < size; j++)\r\n\t\ttest[i][j] = rdm.nextInt(2);\r\n\t// Generate Random Walls\r\n\tint num_walls = 2;\r\n\tfor (int i = 0; i < num_walls; ++i) {\r\n\t int x = rdm.nextInt(size);\r\n\t int y = rdm.nextInt(size);\r\n\t test[x][y] = -1;\r\n\t}\r\n\t// printMaze(test);\r\n\t// printMaze(solution(test));\r\n }", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "private static void testAlgorithmOptimality() {\n AlgoFunction testAlgo = SG16Algorithm::new;\n\n //printSeed = false; // keep this commented out.\n Random seedRand = new Random(1241);\n int initial = seedRand.nextInt();\n for (int i=0; i<50000000; i++) {\n int sizeX = seedRand.nextInt(150) + 5;\n int sizeY = seedRand.nextInt(150) + 5;\n int seed = i+initial;\n int ratio = seedRand.nextInt(50) + 5;\n \n int max = (sizeX+1)*(sizeY+1);\n int p1 = seedRand.nextInt(max);\n int p2 = seedRand.nextInt(max-1);\n if (p2 == p1) {\n p2 = max-1;\n }\n \n int sx = p1%(sizeX+1);\n int sy = p1/(sizeX+1);\n int ex = p2%(sizeX+1);\n int ey = p2/(sizeX+1);\n\n double restPathLength = 0, normalPathLength = 0;\n try {\n GridGraph gridGraph = DefaultGenerator.generateSeededGraphOnly(seed, sizeX, sizeY, ratio);\n for (int iii=0;iii<300;++iii) Utility.generatePath(testAlgo, gridGraph, seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1),seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1));\n int[][] path = Utility.generatePath(testAlgo, gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n restPathLength = Utility.computePathLength(gridGraph, path);\n \n path = Utility.computeOptimalPathOnline(gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n normalPathLength = Utility.computePathLength(gridGraph, path);\n }catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"EXCEPTION OCCURRED!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n }\n \n if (Math.abs(restPathLength - normalPathLength) > 0.000001f) {\n //if ((restPathLength == 0.f) != (normalPathLength == 0.f)) {\n System.out.println(\"============\");\n System.out.println(\"Discrepancy Discovered!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n System.out.println(restPathLength / normalPathLength);\n System.out.println(\"============\");\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n } else {\n if (i%1000 == 999) {\n System.out.println(\"Count: \" + (i+1));\n System.out.println(\"OK: Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n }\n }\n }\n }", "public FeasibleInitialization(Problem problem, int populationSize) {\r\n super(problem, populationSize);\r\n }", "public Iterable<Board> solution()\n {\n Stack<Board> solution = new Stack<Board>();\n \n // for case where initial board is goal board\n if (moves == 0) {\n solution.push(goalNode.board);\n return solution;\n }\n\n step = goalNode;\n \n // add chain of previous node from goal node \n while (step != null) {\n solution.push(step.board);\n step = step.prev;\n }\n \n return solution;\n }", "public Solution createSuggestion(Board board) {\n\t\t\n\t\t// use the room that the computer is currently in\n\t\tBoardCell currentLocation = board.getCell(this.getLocation()[1], this.getLocation()[0]);\n\t\tRoom currentRoom = board.getRoom(currentLocation);\n\t\troomCard = board.getCard(currentRoom.getName());\n\t\t\n\t\t// find possible people and weapons\n\t\tallCards = board.getCards();\n\t\tfor(Card card : allCards) {\n\t\t\tif(!this.getHand().contains(card) && !getSeen().contains(card)) {\n\t\t\t\tif(card.getType() == CardType.PERSON) {\n\t\t\t\t\tpossiblePeople.add(card);\n\t\t\t\t\t\n\t\t\t\t} else if(card.getType() == CardType.WEAPON) {\n\t\t\t\t\tpossibleWeapons.add(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// pick a person that isn't the computer's hand and hasn't been seen by the computer\n\t\t//TODO change this (iterating through a HashSet seams like a bad idea)\n\t\t// this code is awful, I know\n\t\t// thats what I get for procrastinating\n\t\tCard personGuess = null;\n\t\tint pos = rand.nextInt(possiblePeople.size());\n\t\tint iterator = 0;\n\t\tfor(Card card : possiblePeople) {\n\t\t\tif(iterator == pos) {\n\t\t\t\tpersonGuess = card;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\titerator++;\n\t\t}\n\t\t// pick a weapon that isn't the computer's hand and hasn't been seen by the computer\n\t\tCard weaponGuess = null;\n\t\tpos = rand.nextInt(possibleWeapons.size());\n\t\titerator = 0;\n\t\tfor(Card card : possibleWeapons) {\n\t\t\tif(iterator == pos) {\n\t\t\t\tweaponGuess = card;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\titerator++;\n\t\t}\n\n\t\t(board.getPlayer(personGuess.getName())).move(currentLocation.getLocation());\n\t\tboard.repaint();\n\n\t\treturn new Solution(roomCard, personGuess, weaponGuess);\n\t}", "public void generateSolution() {\n if (this.stateOfTheMaze != 1)\n throw new IllegalArgumentException(\"To generate the maze the state of it must be \\\"generated maze\\\".\");\n Queue<Box> queue = new LinkedList<>();\n queue.add(this.startBox);\n boolean notFinished = true;\n while (notFinished) {\n Box aux = queue.peek();\n LinkedList<Box> movements = movementWithWalls(aux);\n movements.remove(aux.getPrevious());\n for (Box box : movements) {\n box.setPrevious(aux);\n queue.add(box);\n if (box.equals(this.endBox))\n notFinished = false;\n }\n queue.remove();\n }\n Box anotherAux = this.endBox;\n while (!anotherAux.equals(this.startBox)) {\n anotherAux.setAsSolution();\n anotherAux = anotherAux.getPrevious();\n }\n this.stateOfTheMaze++;\n }", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }", "public static void makeGrid (Species map[][], int numSheepStart, int numWolfStart, int numPlantStart, int sheepHealth, int plantHealth, int wolfHealth, int plantSpawnRate) {\n \n // Declare coordinates to randomly spawn species\n int y = 0;\n int x = 0;\n \n // Initialise plants\n Plant plant;\n \n // Spawn plants\n for (int i = 0; i < numPlantStart; i++) {\n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Choose a random plant (50% chance healthy, 25% poisonous or energizing)\n int plantChoice = (int) Math.ceil(Math.random() * 100);\n \n // Create the new plants\n if ((plantChoice <= 100) && (plantChoice >= 50)) {\n plant = new HealthyPlant(plantHealth, x, y, plantSpawnRate);\n } else if ((plantChoice < 50) && (plantChoice >= 25)) {\n plant = new EnergizingPlant(plantHealth, x, y, plantSpawnRate);\n } else {\n plant = new PoisonousPlant(plantHealth, x, y, plantSpawnRate);\n }\n \n // Set plant coordinates\n plant.setX(x);\n plant.setY(y);\n map[y][x] = plant;\n \n // No space\n } else { \n i -= 1;\n }\n \n }\n \n // Spawn sheep\n for (int i = 0; i < numSheepStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) {\n \n // Create new sheep\n Sheep sheep = new Sheep(sheepHealth, x, y, 5); \n \n // Set sheep coordinates\n sheep.setX(x);\n sheep.setY(y);\n map[y][x] = sheep;\n \n // No space\n } else { \n i -= 1; \n }\n \n }\n \n // Spawn wolves\n for (int i = 0; i < numWolfStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Create new wolf\n Wolf wolf = new Wolf(wolfHealth, x, y, 5); \n \n // Set wolf coordinates\n wolf.setX(x);\n wolf.setY(y);\n map[y][x] = wolf; \n \n // No space\n } else { \n i -= 1; \n }\n }\n \n }", "private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }", "@Override\n\tpublic void makeDecision() {\n\t\tint powerMax = (int)(initPower) / 100;\n\t\tint powerMin = (int)(initPower * 0.3) / 100;\n\n\t\t// The value is calculated randomly from 0 to 10% of the initial power\n\t\tRandom rand = new Random();\n\t\tint actualPower = rand.nextInt((powerMax - powerMin) + 1) + powerMin;\n\t\tanswer.setConsumption(actualPower);\n\t}" ]
[ "0.7225074", "0.71319634", "0.6599828", "0.64720285", "0.63765883", "0.63173515", "0.62990224", "0.62587714", "0.61967736", "0.618383", "0.61400044", "0.6090689", "0.59977216", "0.5972988", "0.5972268", "0.5948268", "0.5927535", "0.5923516", "0.5864855", "0.58623844", "0.5833073", "0.5804343", "0.5789667", "0.5789255", "0.57834816", "0.5726567", "0.56668323", "0.56529486", "0.564807", "0.5643217", "0.5639306", "0.56376547", "0.5629106", "0.56203645", "0.55940765", "0.55910814", "0.55558574", "0.5552929", "0.5546264", "0.5539757", "0.5533107", "0.5499086", "0.5481374", "0.54736376", "0.54728603", "0.54521143", "0.5446304", "0.54379046", "0.5435121", "0.5429889", "0.5412787", "0.54024494", "0.5377468", "0.53743696", "0.5368688", "0.5364048", "0.5357939", "0.53569824", "0.535408", "0.5351771", "0.5337496", "0.5332245", "0.5315944", "0.53121454", "0.53085136", "0.5291828", "0.5277215", "0.52718794", "0.5270081", "0.52686876", "0.5261886", "0.52607036", "0.5256153", "0.52522546", "0.5247959", "0.52454984", "0.52429813", "0.5240322", "0.5237322", "0.5235954", "0.52310014", "0.52253306", "0.52249163", "0.52243775", "0.5219123", "0.52168804", "0.5211382", "0.52054936", "0.51996964", "0.51973456", "0.51931995", "0.518389", "0.5179885", "0.5179195", "0.51700735", "0.51693106", "0.5164389", "0.51618975", "0.5159608", "0.51582366" ]
0.6960746
2
Attempts to initialize a solution as a feasible solution.
protected abstract void attemptFeasibleInitialization(Solution solution);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public Solution[] initialize() {\r\n System.out.println(\"c Attempting feasible initialization\");\r\n Solution[] initial_pop = new Solution[populationSize];\r\n for (int i = 0; i < populationSize; ++i) {\r\n initial_pop[i] = problem.newSolution();\r\n attemptFeasibleInitialization(initial_pop[i]);\r\n }\r\n return initial_pop;\r\n }", "public abstract SolutionPartielle solutionInitiale();", "private void generateInitialSolution(Instance instance) {\n currentSol = new Solution(instance);\n switch (INITIAL) {\n case 0: mostValuePerWeightFirst(instance);\n case 1: leastWeightFirst(instance);\n default: randomConfiguration(instance);\n }\n // Set current best solution to initial solution\n bestSol = new Solution(currentSol);\n }", "public FeasibleInitialization(Problem problem, int populationSize) {\r\n super(problem, populationSize);\r\n }", "public void trySolve() {\n\t\tboolean change = true;\n\t\twhile (change) {\n\t\t\tchange = boardSolve();\n\t\t}\n\t}", "public void init()\n\t{\n\t\tint inN;\n\t\tdo{\n\t inN=getN();\n\t switch(inN)\n\t {\n\t case 1: problem1();break;\n\t case 2: problem2();break;\n\t case 3: problem3();break;\n\t default:\n\t }\n\t }while(inN != 0);\t\n\t}", "public Solver(Board initial) {\n if (initial == null)\n throw new java.lang.NullPointerException(\"null block\");\n \n final Board initConfig = initial;\n solve(initConfig);\n }", "public Solver(Board initial) {\n \tsolutionNode = null;\n \tpq = new MinPQ<>();\n \tpq.insert(new SearchNode(initial, null, 0));\n\n \twhile (true) {\n \t\tSearchNode currNode = pq.delMin();\n\t \tBoard currBoard = currNode.getBoard();\n\n\t \tif (currBoard.isGoal()) {\n\t \t\tisSolvable = true;\n\t \t\tsolutionNode = currNode;\n\t \t\tbreak;\n\t \t}\n\n\t \tif (currBoard.hamming() == 2 && currBoard.twin().isGoal()) {\n\t \t\tisSolvable = false;\n\t \t\tbreak;\n\t \t}\n\n\t \tint moves = currNode.getMoves();\n\t \tBoard prevBoard = moves > 0 ? currNode.prev().getBoard() : null;\n\t \tfor (Board nextBoard : currBoard.neighbors()) {\n\t \t\tif (nextBoard != null && nextBoard.equals(prevBoard)) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\tpq.insert(new SearchNode(nextBoard, currNode, moves + 1));\n\t \t}\n \t}\n \t\n }", "public Solver(Board initial) {\n this.initial = initial;\n if (this.isSolvable())\n minimumNumberOfMoves = this.solution.movesToBoard;\n else\n minimumNumberOfMoves = -1;\n }", "public Solver(WorldState initial) {\n solution = new ArrayList<>();\n\n // create a priority queue of search nodes\n MinPQ<SNode> pq = new MinPQ<>();\n\n // insert an “initial search node” into the priority queue\n SNode start = new SNode(initial, 0, null);\n pq.insert(start);\n\n // If the search node with minimum priority is the goal node, then we’re done.\n while (!pq.min().ws.isGoal()) {\n\n // Remove the search node with minimum priority.\n SNode X = pq.delMin();\n\n // for each neighbor of X’s world state, create a new search node and\n // insert it into the priority queue.\n for (WorldState nb: X.ws.neighbors()) {\n\n // critical optimization\n if (X.prev == null || !(nb.equals(X.prev.ws))) {\n SNode nbNode = new SNode(nb, X.numberOfMove + 1, X);\n pq.insert(nbNode);\n }\n }\n }\n\n // generate the solution\n SNode goal = pq.min();\n while (goal != null) {\n solution.add(0, goal.ws);\n goal = goal.prev;\n }\n }", "public Solver(Board initial) {\n if (initial == null) throw new IllegalArgumentException();\n initialNode = new BoardNode(initial);\n\n solution = solve();\n if (solution == null) return;\n\n for (Board board : solution)\n moves++;\n\n }", "public Solution() {\n this(DSL.name(\"solution\"), null);\n }", "public Solver(Board initial) {\n\t\tif (initial == null)\n\t\t\tthrow new NullPointerException();\n\t\torig = new MinPQ<>();\n\t\ttwin = new MinPQ<>();\n\t\torig.insert(new Node(initial, 0, null));\n\t\ttwin.insert(new Node(initial.twin(), 0, null));\n\t\twhile (!solved) {\n\t\t\tgoForSolution(orig);\n\t\t\tgoForSolution(twin);\n\t\t}\n\t}", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "public void solution() {\n\t\t\n\t}", "public NoSolutionException() {\n }", "public boolean solve()\n\t{\n\t\t// Call the internal solver with the initial values\n\t\treturn solve(numberOfDiscs, poles[0], poles[1], poles[2]);\n\t}", "public void findSolution() {\n\n\t\t// TODO\n\t}", "public void initialization() {\n iterations_ = 1;\n\n swarm_ = new SolutionSet(swarmSize_);\n best_ = new Solution[swarmSize_];\n\n dominance_ = new DominanceComparator();\n crowdingDistanceComparator_ = new CrowdingDistanceComparator();\n distance_ = new Distance();\n\n speed_ = new double[swarmSize_][problem_.getNumberOfVariables()];\n\n deltaMax_ = new double[problem_.getNumberOfVariables()];\n deltaMin_ = new double[problem_.getNumberOfVariables()];\n for (int i = 0; i < problem_.getNumberOfVariables(); i++) {\n deltaMax_[i] = (problem_.getUpperLimit(i) -\n problem_.getLowerLimit(i)) / 2.0;\n deltaMin_[i] = -deltaMax_[i];\n }\n\n for (int i = 0; i < swarmSize_; i++) {\n for (int j = 0; j < problem_.getNumberOfVariables(); j++) {\n speed_[i][j] = 0.0;\n }\n }\n }", "public Solution() {\r\n\t\tsolutionStatus = \"Not successful.\";\r\n\t\tinputInterpretation = \"Not received.\";\r\n\t\tclassification = \"Not received.\";\r\n\t\tsolution = \"Not received.\";\r\n\t\terror = \"ERROR Occured.\";\r\n\t\tinputInterpretImgURL = \"\";\r\n\t\tsolutionImgURL = \"\";\r\n\t\tsolutionGraphURL = \"\";\r\n\t\tsolutionImg = null;\r\n\t\tsolutionGraphImg = null;\r\n\t}", "public void initPopulation() throws JMException, ClassNotFoundException {\n population_ = new SolutionSet[problemSet_.size()];\n for (int i = 0; i < problemSet_.size(); i++){\n population_[i] = new SolutionSet(populationSize_);\n }\n\n for (int j = 0; j < problemSet_.size(); j++){\n for (int i = 0; i < populationSize_; i++) {\n Solution newSolution = new Solution(problemSet_);\n problemSet_.get(j).evaluate(newSolution);\n problemSet_.get(j).evaluateConstraints(newSolution);\n population_[j].add(newSolution);\n } // for\n }\n\n }", "public Solver(Board initial) {\n if (initial == null) {\n throw new IllegalArgumentException();\n }\n\n boolean solvable = false;\n int moves = -1;\n\n MinPQ<Node> queue = new MinPQ<Node>(new NodeComparator());\n queue.insert(new Node(initial, null));\n\n MinPQ<Node> queueTwin = new MinPQ<Node>(new NodeComparator());\n queueTwin.insert(new Node(initial.twin(), null));\n\n while (true) {\n Node node = queue.delMin();\n if (node._board.isGoal()) {\n moves = node._moves;\n solvable = true;\n _node = node;\n break;\n }\n\n Node nodeTwin = queueTwin.delMin();\n if (nodeTwin._board.isGoal()) {\n _node = null;\n break;\n }\n\n insert(node, queue);\n insert(nodeTwin, queueTwin);\n }\n\n _moves = moves;\n _solvable = solvable;\n if (_solvable) {\n _solution = new Board[_moves + 1];\n Node node = _node;\n for (int i = 0; i < _moves + 1; i++) {\n _solution[i] = node._board;\n node = node._prev;\n }\n }\n else {\n _solution = null;\n }\n }", "public void solveIt() {\n\t\tfirstFreeSquare.setNumberMeAndTheRest();\n\t}", "private void inicializarSolucion() {\n this.sol.numVerticesEmparejados = 0;\n this.sol.pesoEmparejamiento = 0;\n int size = this.G.numVertices();\n this.sol.emparejamientos = new int[size][size];\n for(int i = 0; i < size; ++i) {\n for(int j = 0; j < size; ++j) {\n if(i != j) this.sol.emparejamientos[i][j] = 0;\n else {\n this.sol.emparejamientos[i][j] = Integer.MAX_VALUE;\n }\n }\n }\n }", "@Override\n\t\tpublic boolean isValidSolution() {\n\t\t\treturn super.isValidSolution();\n\t\t}", "public boolean isSolvable() {\n\n return initialSolvable;\n }", "private Solution() { }", "private Solution() { }", "public boolean solve(){\n\t\treturn solve(0,0);\n\t}", "public Solution(String solution) {\n\t\tthis(solution, \"unspecified\");\n\t}", "@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}", "public void resetFeasible() {\r\n \tstillFeasible = true;\r\n }", "public Solver(final Board initial) {\n\n Node solutionNodeTwin; // Solution node twin\n MinPQ<Node> thePQ; // Minimum priority queue\n MinPQ<Node> thePQTwin; // Minimum priority queue for the twin\n boolean initialSolvableTwin = false; // is initial twin board solvable\n\n solutionNode = new Node();\n solutionNodeTwin = new Node();\n\n solutionNode.theBoard = initial;\n solutionNodeTwin.theBoard = initial.twin();\n\n solutionNode.previousNode = null;\n solutionNodeTwin.previousNode = null;\n\n thePQ = new MinPQ<>(boardOrder());\n thePQTwin = new MinPQ<>(boardOrder());\n\n thePQ.insert(solutionNode);\n thePQTwin.insert(solutionNodeTwin);\n solutionBoards = new Queue<>();\n\n int count = 0;\n while (!solutionNode.theBoard.isGoal()\n || !solutionNodeTwin.theBoard.isGoal()) {\n\n solutionNode = thePQ.delMin();\n solutionBoards.enqueue(solutionNode.theBoard);\n\n if (solutionNode.theBoard.isGoal()) {\n initialSolvable = true;\n break;\n } else {\n solutionNode.numberOfMovesMade++;\n Iterable<Board> neighborBoards = solutionNode.theBoard.neighbors();\n Iterator<Board> itr = neighborBoards.iterator();\n while (itr.hasNext()) {\n Node neighborNode = new Node();\n neighborNode.theBoard = itr.next();\n neighborNode.numberOfMovesMade = solutionNode.numberOfMovesMade;\n neighborNode.previousNode = solutionNode;\n if (count == 0) {\n thePQ.insert((neighborNode));\n } else if (!neighborNode.theBoard.equals(solutionNode\n .previousNode.theBoard)) {\n thePQ.insert(neighborNode);\n }\n }\n }\n\n solutionNodeTwin = thePQTwin.delMin();\n if (solutionNodeTwin.theBoard.isGoal()) {\n initialSolvableTwin = true;\n break;\n } else {\n solutionNodeTwin.numberOfMovesMade++;\n Iterable<Board> neighborBoardsTwin = solutionNodeTwin.theBoard.neighbors();\n Iterator<Board> itr2 = neighborBoardsTwin.iterator();\n while (itr2.hasNext()) {\n Node neighborNodeTwin = new Node();\n neighborNodeTwin.theBoard = itr2.next();\n neighborNodeTwin.numberOfMovesMade = solutionNodeTwin.numberOfMovesMade;\n neighborNodeTwin.previousNode = solutionNodeTwin;\n if (count == 0) {\n thePQTwin.insert(neighborNodeTwin);\n } else if (!neighborNodeTwin.theBoard.equals(solutionNodeTwin.previousNode.theBoard)) {\n thePQTwin.insert(neighborNodeTwin);\n }\n }\n }\n count++;\n }\n }", "public boolean isSolvable() {\n return solution != null || initialNode.board.isGoal();\n }", "public void isSatisfiable() throws SolverException, InterruptedException {\n final BooleanFormulaManager bmgr = context.getFormulaManager().getBooleanFormulaManager();\n if (bmgr.isFalse(formulaUnderTest)) {\n failWithoutActual(\n Fact.fact(\"expected to be\", \"satisfiable\"),\n Fact.fact(\"but was\", \"trivially unsatisfiable\"));\n return;\n }\n\n try (ProverEnvironment prover = context.newProverEnvironment()) {\n prover.push(formulaUnderTest);\n if (!prover.isUnsat()) {\n return; // success\n }\n }\n\n reportUnsatCoreForUnexpectedUnsatisfiableFormula();\n }", "private boolean checkSolutions() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tif (populationArray.get(i).getFitness() == 0) {\n\t\t\t\tsolution = populationArray.get(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public Solver(Board initial)\n {\n // validate input to Solver\n if (initial == null) throw new NullPointerException();\n if (!initial.isSolvable()) throw new IllegalArgumentException();\n \n // create first search node with pointer used for each iteration of A*\n step = new SearchNode();\n step.board = initial;\n \n // create new priority queue specifying the priority function\n MinPQ<SearchNode> pq = new MinPQ<SearchNode>(new HammingPriority());\n\n // run A-star search algorithm until goal board is dequeued\n while (!step.board.isGoal()) {\n // runs iterable of neighbors and adds non duplicates to pq\n Iterable<Board> neighbors = step.board.neighbors();\n for (Board b : neighbors) {\n // skips if possible board is duplicate of 2nd board back\n if (step.prev != null) // check not needed for first iteration\n if (b.equals(step.prev.board)) continue;\n \n // creates possible board's node and adds to pq\n SearchNode nextPossibleBoard = new SearchNode();\n nextPossibleBoard.board = b;\n nextPossibleBoard.prev = step;\n nextPossibleBoard.dist = step.dist + 1;\n pq.insert(nextPossibleBoard);\n }\n step = pq.delMin(); // dequeue next step toward goal board\n }\n \n moves = step.dist;\n goalNode = step;\n\n \n }", "@SuppressWarnings(\"null\")\r\n\t@Override\r\n\tpublic PWPSolution createSolution(InitialisationMode mode) {\n\t\t\r\n\t\tif (mode == InitialisationMode.RANDOM) {\r\n\t\t\r\n\t\tint[] solutions = new int[getNumberOfLocations()];//array of solutions\r\n\t\t\r\n\t\tfor (int i = 0 ; i <= getNumberOfLocations() -1 ; i++) { //enumerate the array, giving each location an integer value\r\n\t\t\t\r\n\t\t\tsolutions[i]= i;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tCollections.shuffle(Arrays.asList(solutions)); //shuffle the array\r\n\t\t\r\n\t\tSolutionRepresentation solution = new SolutionRepresentation(solutions); //create a new solution representation using the array of ints\r\n\t\t\r\n\t\tObjectiveFunctionInterface objfunc = getPWPObjectiveFunction(); //get the objective function to be used \r\n\r\n\t\tPWPSolution sol = new PWPSolution(solution, objfunc.getObjectiveFunctionValue(solution)); //create the new PWPSolution using the solution representation and the value of the objective function applied to the solution\r\n\t\t\r\n\t\treturn sol;\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void solve() {\n /** To solve the traveling salesman problem:\n * Set up the graph, choose a starting node, then call the recursive backtracking method and pass it the starting node.\n */\n\n // We need to pass a starting node to recursive backtracking method\n Node startNode = null;\n\n // Grab a node, any node...\n for( Node n : graph.nodes() ) {\n startNode = n;\n break;\n }\n\n // Visit the first node\n startNode.visit();\n\n // Add first node to the route\n this.route[0] = startNode;\n\n // Pass the number of choices made\n int nchoices = 1;\n\n // Recursive backtracking\n explore(startNode, nchoices );\n\n\n }", "@Test\n public void test04() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(4956.642689288169, 1711.029259737);\n Log1p log1p0 = new Log1p();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n // Undeclared exception!\n try { \n regulaFalsiSolver0.solve(0, (UnivariateRealFunction) log1p0, 4956.642689288169, 636.6, allowedSolution0);\n } catch(IllegalStateException e) {\n //\n // illegal state: maximal count (0) exceeded: evaluations\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver\", e);\n }\n }", "@Test\n public void test12() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n // Undeclared exception!\n try { \n illinoisSolver0.doSolve();\n } catch(IllegalStateException e) {\n //\n // illegal state: maximal count (0) exceeded: evaluations\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver\", e);\n }\n }", "public Solver(Board initial) {\r\n if (initial == null) throw new IllegalArgumentException();\r\n\r\n\r\n SearchNode initialAdjacent = new SearchNode(initial.twin(), null, 0);\r\n MinPQ<SearchNode> adjacentPriorityQueue = new MinPQ<>(1);\r\n adjacentPriorityQueue.insert(initialAdjacent);\r\n\r\n\r\n SearchNode initialNode = new SearchNode(initial, null, 0);\r\n MinPQ<SearchNode> priorityQueue = new MinPQ<>(1);\r\n priorityQueue.insert(initialNode);\r\n\r\n if (initial.isGoal()) {\r\n goal = initialNode;\r\n isSolvable = true;\r\n return;\r\n } else if (initialAdjacent.board.isGoal()) {\r\n isSolvable = false;\r\n }\r\n\r\n\r\n SearchNode currentAdjacent = initialAdjacent;\r\n SearchNode currentBoard = initialNode;\r\n\r\n while (!currentAdjacent.board.isGoal() && !currentBoard.board.isGoal()) {\r\n\r\n currentAdjacent = adjacentPriorityQueue.delMin();\r\n currentBoard = priorityQueue.delMin();\r\n\r\n for (Board adjacentNeighbor : currentAdjacent.board.neighbors()) {\r\n SearchNode toBeInserted = new SearchNode(adjacentNeighbor, currentAdjacent, currentAdjacent.previousMoves + 1);\r\n if (currentAdjacent.previousSearchNode == null || !toBeInserted.board.equals(currentAdjacent.previousSearchNode.board)) {\r\n adjacentPriorityQueue.insert(toBeInserted);\r\n }\r\n }\r\n\r\n\r\n for (Board neighbor : currentBoard.board.neighbors()) {\r\n SearchNode toBeInserted = new SearchNode(neighbor, currentBoard, currentBoard.previousMoves + 1);\r\n if (currentBoard.previousSearchNode == null || !toBeInserted.board.equals(currentBoard.previousSearchNode.board)) {\r\n\r\n priorityQueue.insert(toBeInserted);\r\n }\r\n }\r\n }\r\n if (currentAdjacent.board.isGoal()) {\r\n isSolvable = false;\r\n goal = initialNode;\r\n } else {\r\n goal = currentBoard;\r\n isSolvable = true;\r\n }\r\n\r\n }", "@Test\n public void test07() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(0.15, 0.0, 1315.10543666213);\n Asinh asinh0 = new Asinh();\n AllowedSolution allowedSolution0 = AllowedSolution.ABOVE_SIDE;\n // Undeclared exception!\n try { \n regulaFalsiSolver0.solve(0, (UnivariateRealFunction) asinh0, 2.479773539153719E-5, 2209.1881, 0.0, allowedSolution0);\n } catch(IllegalStateException e) {\n //\n // illegal state: maximal count (0) exceeded: evaluations\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver\", e);\n }\n }", "@Override\n public void solve() throws LaterationException, NotReadyException,\n LockedException {\n if (!isReady()) {\n throw new NotReadyException();\n }\n if (isLocked()) {\n throw new LockedException();\n }\n\n try {\n mLocked = true;\n\n if (mListener != null) {\n mListener.onSolveStart(this);\n }\n\n setupFitter();\n\n mFitter.fit();\n\n //estimated position\n mEstimatedPositionCoordinates = mFitter.getA();\n mCovariance = mFitter.getCovar();\n mChiSq = mFitter.getChisq();\n\n if (mListener != null) {\n mListener.onSolveEnd(this);\n }\n } catch (final NumericalException e) {\n throw new LaterationException(e);\n } finally {\n mLocked = false;\n }\n }", "public Solution(){\r\n\r\n this.path_solution =new ArrayList<AState>();\r\n this.sol_for_debbage =new ArrayList<MazeState>();\r\n }", "public PossibleSolutionPaths() {\n\t\tthis.possibleSolutionPaths = new ArrayList<Path>();\n\t}", "public static VehicleRoutingSolution emptySolution() {\n VehicleRoutingSolution solution = new VehicleRoutingSolution();\n solution.setVisitList(new ArrayList<>());\n solution.setDepotList(new ArrayList<>());\n solution.setVehicleList(new ArrayList<>());\n solution.setScore(HardSoftLongScore.ZERO);\n return solution;\n }", "@Test\n public void test00() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Abs abs0 = new Abs();\n AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE;\n double double0 = illinoisSolver0.solve(1166, (UnivariateRealFunction) abs0, 0.0, 0.0, allowedSolution0);\n }", "public Solution solve(ISearchable s) {\n return null;\n }", "@Override\n \tpublic Solution solve() {\n \t\tfor (int i = 0; i < n; i++) {\n \t\t\tnest[i] = generator.getSolution();\n \t\t}\n \n \t\tfor (int t = 0; t < maxGeneration; t++) { // While (t<MaxGeneration) or\n \t\t\t\t\t\t\t\t\t\t\t\t\t// (stop criterion)\n \t\t\t// Get a cuckoo randomly (say, i) and replace its solution by\n \t\t\t// performing random operations;\n \t\t\tint i = r.nextInt(n);\n \t\t\tSolution randomNest = nest[i];\n \t\t\t//FIXME: randomNest = solutionModifier.modify(nest[i]);\n \n \t\t\t// Evaluate its quality/fitness\n \t\t\tint fi = randomNest.f();\n \n \t\t\t// Choose a nest among n (say, j) randomly;\n \t\t\tint j = r.nextInt(n);\n \t\t\tint fj = f[j];\n \n \t\t\tif (fi > fj) {\n \t\t\t\tnest[i] = randomNest;\n \t\t\t\tf[i] = fi;\n \t\t\t}\n \n \t\t\tsort();\n \t\t\t// A fraction (pa) of the worse nests are abandoned and new ones are built;\n\t\t\tfor(i = n-toAbandon; i<n; i++) {\n \t\t\t\tnest[i] = generator.getSolution();\n \t\t\t}\n \t\t\t\n \t\t\t// Rank the solutions/nests and find the current best;\n \t\t\tsort();\n \t\t}\n \n \t\treturn nest[0];\n \t}", "public SolutionIterator(javax.constraints.Solver s) {\n\t\tsolver = (Solver) s;\n\t\tsolution = null;\n\t\tsolutionNumber = 0;\n\t}", "private Solution() {\n //constructor\n }", "public Iterable<Board> solution() {\n if (!solvable) {\n return null;\n }\n else {\n return new SolutionBoards();\n }\n\n }", "public boolean isSolvable() {\r\n return solution() != null;\r\n }", "public Solver(Board initial)\n {\n pq = new MinPQ<>();\n pqTwin = new MinPQ<>();\n\n pq.insert(new SearchNode(initial, 0, null));\n pqTwin.insert(new SearchNode(initial.twin(), 0, null));\n\n SearchNode solution = null;\n while (!pq.isEmpty() || !pqTwin.isEmpty()) {\n solution = processQueue(pq);\n if (solution != null) break;\n\n solution = processQueue(pqTwin);\n if (solution != null) {\n solution = null;\n break;\n }\n }\n if (solution != null) {\n numberOfMoves = solution.numberOfMoves;\n\n SearchNode current = solution;\n while (current != null) {\n shortestPath.add(0, current.board);\n current = current.previous;\n }\n }\n pq = null;\n pqTwin = null;\n }", "public Solver() {\n\t\t// TODO: Initialize the powersOf2 array with the first 16 powers of 2.\n\t}", "public Solver(Board initial) {\n\t\tgoal = null;\n\t\tminpq = new MinPQ<Solver.SearchNode>();\n\t\tminpqTwin = new MinPQ<SearchNode>();\n\t\tcheck = new HashMap<String, Integer>();\n\t\tcheckTwin = new HashMap<String, Integer>();\n\t\t\n\t\tminpq.insert(new SearchNode(initial, null));\n\t\tminpqTwin.insert(new SearchNode(initial.twin(), null));\n\t\t\n\t\tcheck.put(initial.toString(), 1);\n\t\tcheckTwin.put(initial.twin().toString(), 1);\n\t\t\n\t\t//StdOut.println(\"Hamming =\" + initial.hamming());\n\t\t//StdOut.println(\"Manhattan =\" + initial.manhattan());\n\t\t//StdOut.println(\"Original:\\n\" + initial.toString());\n\t\t//StdOut.println(\"Twin:\\n\" + initial.twin().toString());\n\t\t\n\t\tSearchNode minNode = minpq.delMin();\n\t\tSearchNode minNodeTwin = minpqTwin.delMin();\n\t\t\n\t\twhile (true) {\n\t\t\t\n\t\t\tif (minNode.getBoard().isGoal()) {\n\t\t\t\tgoal = minNode;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (minNodeTwin.getBoard().isGoal()) {\n\t\t\t\tgoal = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tpushNodes(minNode, minpq, check);\n\t\t\tpushNodes(minNodeTwin, minpqTwin, checkTwin);\n\t\t\t\n\t\t\tminNode = minpq.delMin();\n\t\t\tminNodeTwin = minpqTwin.delMin();\n\t\t}\n\t}", "public Solver(Board initial) {\r\n this.board = initial;\r\n\r\n final Comparator<SearchNode> solverComparator = new Comparator<SearchNode>() {\r\n @Override\r\n public int compare(SearchNode o1, SearchNode o2) {\r\n return o1.weight() - o2.weight();\r\n }\r\n };\r\n MinPQ<SearchNode> pq = new MinPQ<SearchNode>(solverComparator);\r\n MinPQ<SearchNode> twinPq = new MinPQ<SearchNode>(solverComparator);\r\n\r\n pq.insert(new SearchNode(board, null, 0));\r\n twinPq.insert(new SearchNode(board.twin(), null, 0));\r\n do {\r\n SearchNode current = pq.delMin();\r\n SearchNode twin = twinPq.delMin();\r\n\r\n //solution.enqueue(current.getBoard());\r\n if (!current.getBoard().isGoal()) {\r\n for (Board neighbour : current.getBoard().neighbors()) {\r\n if (current.getParent() == null || current.getParent() != null && !neighbour.equals(current.getParent().getBoard())) {\r\n pq.insert(new SearchNode(neighbour, current, current.moves() + 1));\r\n }\r\n }\r\n } else {\r\n solution = new LinkedStack<Board>();\r\n SearchNode node = current;\r\n while (node != null) {\r\n solution.push(node.getBoard());\r\n node = node.getParent();\r\n }\r\n break;\r\n }\r\n\r\n if (!twin.getBoard().isGoal()) {\r\n for (Board neighbour : twin.getBoard().neighbors()) {\r\n if (twin.getParent() == null || twin.getParent() != null && !neighbour.equals(twin.getParent().getBoard())) {\r\n twinPq.insert(new SearchNode(neighbour, twin, twin.moves() + 1));\r\n }\r\n }\r\n } else {\r\n break;\r\n }\r\n } while (!pq.isEmpty() || !twinPq.isEmpty());\r\n }", "@Test\n public void test14() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver();\n Log log0 = new Log();\n // Undeclared exception!\n try { \n regulaFalsiSolver0.solve(2048, (UnivariateRealFunction) log0, 0.0, (double) 2048);\n } catch(IllegalStateException e) {\n //\n // illegal state: maximal count (2,048) exceeded: evaluations\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver\", e);\n }\n }", "public boolean canSolve(Class<? extends Problem> problem, Class<? extends Solution> solution);", "private int[] generateInitialSolution(){\n int[] initialSolution = new int[tspProblem.getNumberOfCities()];\n ArrayList<Integer> listToGetRandomCities = new ArrayList<Integer>();\n\n for(int i = 0; i <= initialSolution.length - 1; i++){\n listToGetRandomCities.add(i);\n }\n\n for(int i = 0; i <= initialSolution.length - 1; i++){\n initialSolution[i] = getRandomCity(listToGetRandomCities);\n }\n\n return initialSolution;\n }", "public void restore() throws ContradictionException {\n if (empty) {\n throw new UnsupportedOperationException(\"Empty solution. No solution found\");\n }\n for (IntVar i : intmap.keySet()) {\n i.instantiateTo(intmap.get(i), this);\n }\n for (SetVar s : setmap.keySet()) {\n s.instantiateTo(setmap.get(s), this);\n }\n for (GraphVar g : graphmap.keySet()) {\n g.instantiateTo(graphmap.get(g), this);\n }\n for (RealVar r : realmap.keySet()) {\n double[] bounds = realmap.get(r);\n r.updateBounds(bounds[0], bounds[1], this);\n }\n }", "private void makeInitial(){\r\n for (int row = 0; row < 9; row++)\r\n System.arraycopy(solution[row], 0, initial[row], 0, 9);\r\n List<Position> fields = new ArrayList<Position>();\r\n for (int row = 0; row < 9; row++)\r\n for (int col = 0; col < 9; col++)\r\n fields.add(new Position(row, col));\r\n Collections.shuffle(fields);\r\n for (int index = 0; index < 40; index ++)\r\n initial[fields.get(index).row][fields.get(index).col] = 0;\r\n }", "public abstract OptimisationSolution getBestSolution();", "private Solution() {\n }", "public void initialize() {\n for (Location apu : this.locations) {\n Node next = new Node(apu.toString());\n this.cells.add(next);\n }\n \n for (Node helper : this.cells) {\n Location next = (Location)this.locations.searchWithString(helper.toString()).getOlio();\n LinkedList<Target> targets = next.getTargets();\n for (Target finder : targets) {\n Node added = this.path.search(finder.getName());\n added.setCoords(finder.getX(), finder.getY());\n helper.addEdge(new Edge(added, finder.getDistance()));\n }\n }\n \n this.startCell = this.path.search(this.source);\n this.goalCell = this.path.search(this.destination);\n \n /**\n * Kun lähtö ja maali on asetettu, voidaan laskea jokaiselle solmulle arvio etäisyydestä maaliin.\n */\n this.setHeuristics();\n }", "@Test\n public void test24() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Asin asin0 = new Asin();\n // Undeclared exception!\n try { \n illinoisSolver0.solve((-2213), (UnivariateRealFunction) asin0, 0.008336750013465571, (-2468.32548668046), 0.008336750013465571);\n } catch(IllegalStateException e) {\n //\n // illegal state: maximal count (-2,213) exceeded: evaluations\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver\", e);\n }\n }", "@Test\n public void test23() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver(1.0);\n Floor floor0 = new Floor();\n AllowedSolution allowedSolution0 = AllowedSolution.RIGHT_SIDE;\n double double0 = illinoisSolver0.solve(2297949, (UnivariateRealFunction) floor0, 0.5, 1.0, allowedSolution0);\n double double1 = illinoisSolver0.doSolve();\n }", "public Solver(Board initial) {\n MinPQ<Node> minPQ = new MinPQ<>();\n\n if (initial == null) {\n throw new java.lang.IllegalArgumentException(\"Null content is not allowed.\");\n }\n //minNode = new Node(initial, null);\n inNode = new Node(initial, null);\n Node inNodetwin = new Node(initial.twin(), null);\n minPQ.insert(inNode);\n minPQ.insert(inNodetwin);\n\n minNode = minPQ.delMin();\n while (!minNode.getBoard().isGoal()) {\n for (Board board : minNode.getBoard().neighbors()) {\n if (minNode.getPrevious() == null) {\n minPQ.insert(new Node(board, minNode));\n } else if (!minNode.getPrevious().getBoard().equals(board)) {\n minPQ.insert(new Node(board, minNode));\n }\n\n }\n\n minNode = minPQ.delMin();\n }\n\n }", "SolutionPopulation initialise(ArrayList<City> cities, int populationSize);", "public boolean isSolvable() {\n return _solvable;\n }", "@Override\npublic boolean restrictNeighborhood(Solution solution)\n{\n\n\tSolver solver = solution.getSolver();\n\tint nbTotalVars = solver.getNbIntVars() - 1;\n\n\tint n = nbTotalVars - nbRelaxedVars;\n\tboolean b = false;\n\tIntVar var;\n\tselected.clear();\n\twhile (n > 0) {\n\t\tint index = random.nextInt(nbTotalVars);\n\t\tvar = solver.getIntVarQuick(index);\n\t\tif (var != solver.getObjective() && !selected.contains(index)) {\n\t\t\tif (solution.getIntValue(index) != Solution.NULL) {\n\t\t\t\tsolver.LOGGER.info(\"fix \" + var);\n\t\t\t\tsolver.post(solver.eq(var, solution.getIntValue(index)));\n\t\t\t\tb = true;\n\t\t\t}\n\t\t\tselected.add(index);\n\t\t\tn--;\n\t\t}\n\t}\n\treturn b;\n}", "private FullyObservableProblem(int[] initialValuation,\n\t\t\tExplicitCondition goal, ArrayList<String> variableNames,\n\t\t\tList<List<String>> propositionNames,\n\t\t\tArrayList<Integer> domainSizes, ArrayList<Integer> axiomLayer,\n\t\t\tArrayList<Integer> defaultAxiomValues,\n\t\t\tLinkedHashSet<Operator> causativeOperators, Set<OperatorRule> axioms)\n\t{\n\t\tsuper(goal, variableNames, propositionNames, domainSizes, axiomLayer,\n\t\t\t\tdefaultAxiomValues, causativeOperators, axioms, true);\n\t\tGlobal.problem = this;\n\t\tperformSanityCheck();\n\t\tList<Integer> defaultValues = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < initialValuation.length; i++)\n\t\t{\n\t\t\tdefaultValues.add(i, initialValuation[i]);\n\t\t}\n\t\texplicitAxiomEvaluator = new ExplicitAxiomEvaluator();\n\t\tinitialState = new ExplicitState(initialValuation,\n\t\t\t\texplicitAxiomEvaluator);\n\t}", "public CustomSolver() {\n this.possibleSol = this.generateTokenSet();\n this.curToken = 0;\n }", "@Test\r\n public void testForCNSHIsFull() {\r\n createCNSHIsFull();\r\n this.sol = new Solution(this.studentList, this.schoolList, this.studentPreferences, this.schoolPreferences);\r\n assertEquals(solutionForCNSHIsFull(), sol.getSolution());\r\n }", "@Test\n public void test13() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Asin asin0 = new Asin();\n illinoisSolver0.setup(5, asin0, 907.1500599825578, 16, 16);\n // Undeclared exception!\n try { \n illinoisSolver0.doSolve();\n } catch(IllegalArgumentException e) {\n //\n // endpoints do not specify an interval: [907.15, 16]\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils\", e);\n }\n }", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "@Test\n public void test05() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(0.0, 0.0);\n Exp exp0 = new Exp();\n AllowedSolution allowedSolution0 = AllowedSolution.ABOVE_SIDE;\n // Undeclared exception!\n try { \n regulaFalsiSolver0.solve(1626, (UnivariateRealFunction) exp0, (double) 1626, 0.0, allowedSolution0);\n } catch(IllegalArgumentException e) {\n //\n // endpoints do not specify an interval: [1,626, 0]\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils\", e);\n }\n }", "@Test\n public void test21() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Minus minus0 = new Minus();\n double double0 = illinoisSolver0.solve(4037, (UnivariateRealFunction) minus0, (double) 4037, 0.0, (double) 4037);\n }", "private void initialize() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter number of items : \");\n\t\tn = sc.nextInt(); // number of items\n\t\tSystem.out.print(\"Enter W of knapsack : \");\n\t\tW = sc.nextInt(); // capacity of knapsack\n\t\tw = new int[n];\n\t\tv = new int[n];\n\t\tSystem.out.println(\"Enter ws and vs of items : \");\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tw[i] = sc.nextInt(); // weight of item\n\t\t\tv[i] = sc.nextInt(); // profit of item\n\t\t}\n\t\tV = new int[n + 1][W + 1]; // initializing the table to hold results\n\t\tfor (int i = 0; i <= W; i++)\n\t\t\tV[0][i] = 0;\n\t}", "@Test\n public void testPuzzle3x3Unsolvable() {\n int[][] block = generateBlock(new int[]{1, 2, 3, 4, 6, 5, 7, 8, 0});\n Solver solver = new Solver(new Board(block));\n assertFalse(solver.isSolvable());\n }", "public boolean isSolvable() {\r\n return isSolvable;\r\n }", "private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}", "public boolean generateSolution() {\n //first clear all filled in fields by user (they could be wrong)\n clearGame();\n\n //use solver\n SudokuSolver solver = new BacktrackSolver();\n return solver.solveSudoku(this);\n }", "public static void validateInitialConstraints(Constraints constraints) \n throws InvalidInputDataException, ArrayIndexOutOfBoundsException { \n \t\n \tint[][] constraintsArray = Utilities.convertSolutionToArray(constraints);\n \t//check that no non-zero number appears twice in a row\n \tfor (int x=0; x<constraints.getDimSq(); x++) {\n \t\tList<Integer> cellList = new ArrayList<Integer>();\n \t\tfor(int y=0; y<constraints.getDimSq(); y++) {\n \tif (constraintsArray[x][y] != 0){\n \t\tif ((constraintsArray[x][y] < 0) || (constraintsArray[x][y] > constraints.getDimSq())) {\n \t\t\tthrow new InvalidInputDataException(\"Out-of-range value \" + constraintsArray[x][y] + \" found at cell x = \" + x + \" y = \" + y);\n \t\t}\n \t\tInteger currentValue = new Integer(constraintsArray[x][y]);\n \t\tif (cellList.contains(currentValue)){\n \t\t\tthrow new InvalidInputDataException(\"Value \" + currentValue.intValue() + \" found twice in row \" + x);\n \t\t}\n \t\tcellList.add(currentValue);\n \t}\n }\n }\n //check that non-zero number appears twice in a column\n for (int y=0; y<constraints.getDimSq(); y++) {\n List<Integer> cellList = new ArrayList<Integer>();\n for(int x=0; x<constraints.getDimSq(); x++) {\n \tif (constraintsArray[x][y] != 0){\n \t\tInteger currentValue = new Integer(constraintsArray[x][y]);\n \t\tif (cellList.contains(currentValue)) {\n \t\t\tthrow new InvalidInputDataException(\"Value \" + currentValue.intValue() + \" found twice in column \" + y);\n \t\t}\n \t\tcellList.add(currentValue);\n \t}\n }\n }\n //check that no non-zero number appears twice in the same box\n for (int bx=0;bx<constraints.getDim();bx++){\n for (int by=0;by<constraints.getDim();by++) {\n \tList<Integer> cellList = new ArrayList<Integer>();\n \tfor (int x=0; x<constraints.getDimSq(); x++) {\n \t for(int y=0; y<constraints.getDimSq(); y++) {\n \t \tif ((x / constraints.getDim() == bx) && (y / constraints.getDim() == by)){\n \t \tif (constraintsArray[x][y] != 0){\n \t \t\tInteger currentValue = new Integer(constraintsArray[x][y]);\n \t \t\tif (cellList.contains(currentValue)) {\n \t \t\t\tthrow new InvalidInputDataException(\"Value \" + currentValue.intValue() + \" found twice in box \" + bx + \" \" + by);\n \t \t\t}\n \t \t\tcellList.add(currentValue);\n \t \t}\n \t \t}\n \t }\n \t}\n }\n }\n }", "public void generateSolutionList() {\n // Will probably solve it in a few years\n while (!isSolved()) {\n RubiksMove move = RubiksMove.random();\n solutionMoves.add(move);\n performMove(move);\n }\n }", "public TSPSimulatedAnnealing(TSPProblem tspProblem){\n super();\n this.tspProblem = tspProblem;\n this.random = new Random();\n\n this.initialSolution = generateInitialSolution();\n calculateInitialAndFinalTemperature();\n }", "public boolean isSolvable() {\n\t\tif (goal == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public Solution(boolean isSolvable, List<int[]> moves) {\n this.isSolvable = isSolvable;\n this.moves = moves;\n }", "@Test\n public void test08() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(152.236924);\n Sinc sinc0 = new Sinc();\n AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE;\n // Undeclared exception!\n try { \n regulaFalsiSolver0.solve(3, (UnivariateRealFunction) sinc0, 152.236924, 152.236924, 0.0, allowedSolution0);\n } catch(IllegalArgumentException e) {\n //\n // endpoints do not specify an interval: [152.237, 152.237]\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils\", e);\n }\n }", "public void solve() {\n// BruteForceSolver bfs = new BruteForceSolver(pointList);\n// bfs.solve(); // prints the best polygon, its area, and time needed\n// System.out.println(\"-------------\");\n\n// StarshapedSolver ss = new StarshapedSolver(pointList);\n// foundPolygons = ss.solve();\n// System.out.println(\"-------------\");\n\n// RandomAddPointHeuristic ra = new RandomAddPointHeuristic(pointList);\n// foundPolygons = ra.solve(750);\n// System.out.println(\"-------------\");\n\n// GreedyAddPointHeuristic ga = new GreedyAddPointHeuristic(pointList,false);\n// foundPolygons = ga.solve(750);\n// System.out.println(\"-------------\");\n\n// long time = 4000;\n// GreedyAddPointHeuristic gaInit = new GreedyAddPointHeuristic(pointList,false);\n// Polygon2D initSolution = gaInit.solve(time*1/4).get(0);\n// System.out.println(initSolution.area);\n// System.out.println(initSolution);\n//\n// SimulatedAnnealing sa = new SimulatedAnnealing(pointList,initSolution,3);\n// foundPolygons.addAll(sa.solve(time-gaInit.timeInit,2,0.005,0.95));\n// System.out.println(sa.maxPolygon);\n// System.out.println(\"-------------\");\n\n// foundPolygons.addAll(findMultiplePolygonsStarshaped(8,0.6));\n\n }", "private void solve() {\n\t\t//reads values from board\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tString value = field[i][k].getText();\n\t\t\t\tif(value.length() > 0){\n\t\t\t\t\tsudokuBoard.add(i, k, Integer.valueOf(value));\n\t\t\t\t} else {\n\t\t\t\t\tsudokuBoard.add(i, k, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(sudokuBoard.solve()){\n\t\t\t//presents the solution\n\t\t\tfor(int i = 0; i < 9; i++){\n\t\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\t\tfield[i][k].setText(String.valueOf(sudokuBoard.getValue(i, k)));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\talert.setTitle(null);\n\t\t\talert.setHeaderText(null);\n\t\t\talert.setContentText(\"The entered board has no solution\");\n\t\t\talert.showAndWait();\n\t\t}\n\t\t\n\t}", "public void solve() {\n \tsquares[0][0].fillInRemainingOfBoard();\n }", "private Solution() {\n\n }", "public Iterable<Board> solution() {\n if (!isSolvable()) {\n return null;\n }\n return new BoardIterable();\n }", "public Iterable<Board> solution()\n {\n Iterable<Board> result = null;\n if (isSolvable()) {\n result = shortestPath;\n }\n return result;\n }", "public Iterable<Board> solution() {\n if (!isSolvable) return null;\n return solutions;\n }", "public void init() throws InvariantError, PostconditionError;", "public boolean isSolvable() {\n return isSolvable;\n }", "public boolean isSolvable() {\n return isSolvable;\n }" ]
[ "0.753786", "0.726399", "0.65819263", "0.6222628", "0.62030405", "0.6199263", "0.61735255", "0.61254805", "0.60695577", "0.60558087", "0.6026255", "0.5998342", "0.5959055", "0.59480786", "0.5945658", "0.59370667", "0.5920144", "0.5912232", "0.58971477", "0.58719516", "0.58693564", "0.58517504", "0.583726", "0.58115244", "0.58076954", "0.5806662", "0.5803817", "0.5803817", "0.58022", "0.57972884", "0.57789963", "0.57704985", "0.57577676", "0.57569045", "0.5749248", "0.57445776", "0.5743382", "0.57189006", "0.5718155", "0.57165897", "0.56985396", "0.5685004", "0.56788653", "0.56650966", "0.56461155", "0.5644331", "0.5639186", "0.5636704", "0.56297714", "0.5627616", "0.56031495", "0.5595271", "0.5593867", "0.5593419", "0.55924153", "0.5562113", "0.5560211", "0.5531392", "0.55017203", "0.5489667", "0.548495", "0.54764", "0.54732776", "0.54704905", "0.54692894", "0.5447336", "0.5441321", "0.5426483", "0.54245853", "0.541824", "0.54085195", "0.54069066", "0.5403806", "0.53901184", "0.5387666", "0.538273", "0.53813416", "0.5346334", "0.5337531", "0.53316945", "0.5325979", "0.5325452", "0.5322677", "0.5319912", "0.5309663", "0.5309533", "0.5304426", "0.53034234", "0.5302996", "0.5295281", "0.5276957", "0.5276222", "0.5275244", "0.527213", "0.5271225", "0.5271105", "0.52687925", "0.52672565", "0.52637964", "0.52637964" ]
0.8643228
0
Retrive the contact list with selected contacts
@Override public final View getView(final int position, final View convertView, final ViewGroup parent) { // Initialize the TextView and the rows in the contact list View rowView = inflater.inflate(R.layout.contacts_dialog_listitem, null); TextView contactInfo = (TextView) rowView.findViewById(R.id.dialog_txt); // Shows the selected contact info in the TextView Object item = getItem(position); if (item != null) { contactInfo.setText(item.toString()); } else { Log.e(TAG, "Item selected in contact list is null"); contactInfo.setText(""); } return rowView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Contact> getAllContacts();", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "private List<BasicContact> getDataForListView() {\n\t\tlong groupId = getIntent().getLongExtra(Constants.INTENT_LONG_GROUP_ID, -1L);\r\n\t\tHashSet<Long> rawContactIds;\r\n\t\tif (groupId != -1) { // a group was selected\r\n\t\t\tList<Long> groupIds = new ArrayList<Long>(1);\r\n\t\t\tgroupIds.add(groupId);\r\n\t\t\trawContactIds = ContactsHelper.getRawContactIds(LabelView.this, groupIds);\r\n\t\t} else { // a tag was selected\r\n\t\t\trawContactIds = ContactsHelper.getRawContactIdsGivenTag(LabelView.this,\r\n\t\t\t\t\tmLabel);\r\n\t\t}\r\n\t\t\r\n\t\treturn ApplicationData.getBasicContacts(rawContactIds);\r\n\t}", "private void getContactList() {\r\n\r\n\t\tgroupData.clear();\r\n\t\tchildData.clear();\r\n\t\tDataHelper dataHelper = new DataHelper(ContactsActivity.this);\r\n\t\tdataHelper.openDatabase();\r\n\t\tgroupData = dataHelper.queryZoneAndCorpInfo(childData);\r\n\t\tdataHelper.closeDatabase();\r\n\t\thandler.sendEmptyMessage(1);\r\n\r\n\t\tif (groupData == null || groupData.size() == 0) {\r\n\t\t\tDataTask task = new DataTask(ContactsActivity.this);\r\n\t\t\ttask.execute(Constants.KServerurl + \"GetAllOrgList\", \"\");\r\n\t\t}\r\n\t}", "public Collection<Contact> getContacts();", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "@Override\n\tpublic List<Contact> getAllContact() {\n\n\t\tList<Contact> contactList = new ArrayList<>();\n\n\t\tList<ContactDetailsEntity> entityList = contactRepositeries.findAll();\n\n\t\tList<ContactDetailsEntity> filterEntity = entityList.stream()\n\t\t\t\t.filter(entity -> \"y\".equals(entity.getActiveSwitch())).collect(Collectors.toList());\n\n\t\tif (!filterEntity.isEmpty()) {\n\t\t\tfilterEntity.forEach(entity -> {\n\t\t\t\tContact c = new Contact();\n\t\t\t\tBeanUtils.copyProperties(entity, c);\n\t\t\t\tcontactList.add(c);\n\t\t\t});\n\t\t}\n\t\treturn contactList;\n\t}", "@Override\n\tpublic List<Contact> listContact() {\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* je suis dans Liste des contacts *********************************\");\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\n\t\t\tQuery query = session.createQuery(\"from Contact\");\n\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\n\t\t\tList<Contact> lc = (List<Contact>) query.list();\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lc;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> \n getContactList();", "public List<Contact> getAllContacts() {\n List<Contact> contactList = new ArrayList<Contact>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_CONTACTS;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n Contact contact = new Contact();\n contact.set_id((cursor.getInt(0)));\n contact.set_name(cursor.getString(1));\n contact.set_audios(cursor.getString(2));\n contact.set_captured_image(cursor.getString(3));\n contact.set_contents(cursor.getString(4));\n contact.set_delelte_var(cursor.getInt(5));\n contact.set_gallery_image(cursor.getString(6));\n contact.set_recycle_delete(cursor.getInt(7));\n contact.set_photo(cursor.getString(8));\n // Adding contact to list\n contactList.add(contact);\n } while (cursor.moveToNext());\n }\n\n // return contact list\n return contactList;\n }", "public String getContacts() {\n return contacts;\n }", "private List<Contact> getContactsList() {\n\n\t\tList<Contact> contactsList = new ArrayList<>();\n\n\t\tContentResolver cr = getActivity().getContentResolver();\n\n\t\t// Obtiene toda la informarciónd de los contactos\n\t\tCursor cursor = getActivity().getContentResolver().query(\n\t\t\t\tContactsContract.Contacts.CONTENT_URI, null, null, null,\n\t\t\t\t\"display_name\");\n\t\t// Obtiene el número de la columnas que queremos almacenar.\n\t\tint idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n\t\tint displayNameIndex = cursor\n\t\t\t\t.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);\n\n\t\tcursor.moveToFirst();\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// Comprueba que tenga numero de teléfono\n\t\t\tif (Integer\n\t\t\t\t\t.parseInt(cursor.getString(cursor\n\t\t\t\t\t\t\t.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {\n\t\t\t\tString id = cursor.getString(idIndex);\n\t\t\t\tString name = cursor.getString(displayNameIndex);\n\t\t\t\tString phone = null;\n\n\t\t\t\tString selectionArgs = Phone.CONTACT_ID + \" = ? AND \"\n\t\t\t\t\t\t+ Phone.TYPE + \"= \" + Phone.TYPE_MOBILE;\n\n\t\t\t\tCursor pCur = cr.query(\n\t\t\t\t\t\tContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n\t\t\t\t\t\tnew String[] { Phone.NUMBER }, selectionArgs,\n\t\t\t\t\t\tnew String[] { id }, null);\n\n\t\t\t\tif (pCur.moveToFirst()) {\n\t\t\t\t\tphone = pCur.getString(0);\n\n\t\t\t\t}\n\t\t\t\tpCur.close();\n\n\t\t\t\t// Crea el objeto contact\n\t\t\t\tContact contact = new Contact(id, name, phone);\n\t\t\t\tcontactsList.add(contact);\n\t\t\t}\n\n\t\t}\n\n\t\treturn contactsList;\n\n\t}", "public List<IContact> getContacts();", "public List<HashMap<String,String>> contacts() {\n final Uri uriContact = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n ContentResolver cr = getActivity().getContentResolver();\n Cursor cur = cr.query(uriContact, null, null, null, null);\n\n List<HashMap<String,String>> contacts=new ArrayList<>();\n if (cur.getCount() > 0) {\n while (cur.moveToNext()) {\n String id = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String name = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n\n String has_phone = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n HashMap<String,String> contact=new HashMap();\n if(!has_phone.endsWith(\"0\"))\n {\n contact.put(\"name\", name);\n String phoneNumber = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contact.put(\"number\",phoneNumber);\n contacts.add(contact);\n }\n }\n }\n this.contacts_phone=contacts;\n contacts=filter_to_app(contacts);\n return contacts;\n }", "public static ArrayList<Contact> read(Context context){\n ContactUtil contactUtil = new ContactUtil();\n ArrayList<Contact> result = contactUtil.getContactList(context);\n return result;\n }", "private void showContacts() {\n // Check the SDK version and whether the permission is already granted or not.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, PERMISSIONS_REQUEST_READ_CONTACTS);\n //After this point you wait for callback in onRequestPermissionsResult(int, String[], int[]) overriden method\n } else {\n\n // Android version is lesser than 6.0 or the permission is already granted.\n List contacts = getContactNames();\n final ContactAdapter cAdapter = new ContactAdapter(this, contacts);\n contactList.setAdapter(cAdapter);\n contactList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n Intent i = new Intent(getApplicationContext(), ChatActivity.class);\n\n //Få tak i navnet på kontakten man har valgt, og send den videre til chatActivity\n String contactName = cAdapter.getItem(position).getName();\n if(!(DomainSingleton.getSingleton(ContactActivity.this).getAllConversationNames().contains(contactName))) {\n i.putExtra(CONTACT_NAME, contactName);\n startActivity(i);\n }\n else\n {\n int conversationId = DomainSingleton.getSingleton(ContactActivity.this).getConversationIdByContactName(contactName);\n i.putExtra(CONVERSATION_ID, conversationId);\n i.putExtra(CONTACT_NAME, contactName);\n startActivity(i);\n }\n\n }\n });\n\n\n }\n }", "public List<ContactBE> getContacts() {\n List<ContactBE> contacts = new ArrayList<>();\n\n try (ContactCurserWrapper cursor = queryContacts(null, null)) {\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n contacts.add(cursor.getContact());\n cursor.moveToNext();\n }\n }\n return contacts;\n }", "public String getAllContacts() {\n\t\treturn \"SELECT * FROM CONTACTS\";\n\t}", "public ArrayList<Contact> loadContacts()\n\t{\n\t\t//TODO gestion des infos\n\t\t\n\t\t/* Requete SQL */\n\t\tCursor cursor = mainDatabase.rawQuery(\"SELECT \" + DBContract.ContactTable.CONTACT_ID[0] + \", \" +\n\t\t\t\tDBContract.ContactTable.NAME[0] + \", \" + DBContract.ContactTable.SURNAME[0] + \", \" + \n\t\t\t\tDBContract.ContactTable.BILL[0] + \" FROM \" + DBContract.ContactTable.TABLE_NAME, null);\n\t\t\n\t\tArrayList<Contact> result = new ArrayList<Contact>();\n\t\t\n\t\t/* Parcour du resultat */\n\t\tif(cursor.moveToFirst())\n\t\t{\n\t\t\t\twhile(!cursor.isAfterLast())\n\t\t\t\t{\n\t\t\t\t\t/* Instancie le nouveau contact : id-nom-prenom */\n\t\t\t\t\tContact tmp = new Contact(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\t\t\ttmp.addToBill(cursor.getDouble(3));\t\n\t\t\t\t\tresult.add((int) (tmp.getId() - 1), tmp); //TODO mod -1 //TODO verifier qu'il n'y a pas d'id 0 et que tout se passe bien !\n\t\t\t\t\tcursor.moveToNext();\n\t\t\t\t}\n\t\t}\n\t\tcursor.close();\n\t\treturn result;\n\t}", "private List getContactNames() {\n List<Contact> contacts = new ArrayList<>();\n // Get the ContentResolver\n ContentResolver cr = getContentResolver();\n // Get the Cursor of all the contacts\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n while (cursor.moveToNext()) {\n\n\n //Sjekker om kontakt har et tlf nummer\n String hasNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n String contactName = \"\";\n if (hasNumber.equals(\"1\")) {\n contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n Contact contact = new Contact(contactName);\n contacts.add(contact);\n\n\n }\n }\n cursor.close();\n return contacts;\n }", "private List<User> retrieveTravelContacts() {\n if (checkIfContactKeysExists()) {\n return SharedPrefsUtils.convertSharedPrefsToTravelContacts(context);\n }\n //TODO: display no contacts UI below header\n return new ArrayList<>();\n }", "public ArrayList<Contact> getAllContacts(){\r\n\t\t\r\n\t\tArrayList<Contact> contacts = new ArrayList<Contact>();\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\t\r\n\t\tCursor cursor = db.query(DBHelper.CONTACT_TABLE_NAME,\r\n\t\t\t\tnew String[] {DBHelper.COLUMN_NAME, DBHelper.COLUMN_GROUP,\r\n\t\t\t\tDBHelper.COLUMN_LATITUDE, DBHelper.COLUMN_LONGITUDE,\r\n\t\t\t\tDBHelper.COLUMN_MESSAGE, DBHelper.COLUMN_SHARE},\r\n\t\t\t\tnull, null,\r\n\t\t\t\tnull, null, null);\r\n\t\t\r\n\t\tcursor.moveToFirst();\r\n\t while (!cursor.isAfterLast()) {\r\n\t contacts.add(new Contact(cursor.getString(0), cursor.getString(1),\r\n\t \t\t cursor.getDouble(2), cursor.getDouble(3), cursor.getString(4),\r\n\t \t\t int_to_boolean(cursor.getInt(5))));\r\n\t cursor.moveToNext();\r\n\t }\r\n\t \r\n\t cursor.close();\r\n\t db.close();\r\n\t \r\n\t return contacts;\r\n\t}", "public static List<Contact> getContacts() {\n return new ArrayList<>(contacts.values());\n }", "@RequestMapping(value = \"\", method = RequestMethod.GET)\n\tpublic String getContacts(Model model) {\n\t\tmodel.addAttribute(contactService.getContacts());\n\t\treturn contactListViewName;\n\t}", "@Override\n\tpublic Set<Contact> getContacts(){\n\t\treturn contacts;\n\t}", "public ArrayList<String> getContacts()\r\n\t{\r\n\t\treturn contacts;\r\n\t}", "public List<contact> contact_get_all() {\n \treturn contact_get(null, KEY_CONTACT_LASTACT + \" DESC\");\n }", "public void viewAllContacts(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name of whose contact list you want to see\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tif (ContactList.isEmpty()) {\n\t\t\tlog.info(\"List is empty\");\n\t\t} else {\n\t\t\tlog.info(\"Contacts in address book \" + addressBookName + \"are :\");\n\t\t\tContactList.stream().forEach((System.out::println));\n\t\t\tlog.info(\"\\n\");\n\t\t}\n\t}", "public void loadContactListToView(){\r\n\t\ttry {\r\n\t\t\tclientView.clearContactList();\r\n\t\t\tHashMap <Long, String> contactList = userModel.getContactList().getClReader().getContactList();\r\n\t\t\tIterator iter = contactList.entrySet().iterator();\r\n\t\t\tMap.Entry <Long, String> pair;\r\n\t\t\tint i =0;\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSystem.out.println(i++);\r\n\t\t\t\tpair = (Map.Entry <Long, String>)iter.next();\r\n\t\t\t\t\tclientView.addNewUserToContactList(pair.getValue()+\" \"+pair.getKey());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tclientView.showMsg(\"Contact list can't be loaded\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic List<Contact> getAllContacts() {\n\t\t\n\t\treturn repository.findAll();\n\t}", "private String populateContacts() {\n // fetch the additional information (currently phone numbers)\n Map<Integer, List<Pair<String, Integer>>> numberCache = getAdditionalInformation();\n\n Cursor cursor = mContentResolver.query(\n ContactsContract.Contacts.CONTENT_URI, QUERY_PROJECTION_CONTACT, null, null, QUERY_ORDERING_CONTACT);\n\n int idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n int nameIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY);\n int hasNumberIndex = cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER);\n\n StringBuilder concatList = new StringBuilder();\n\n // First thing we need to do is sanitize the queryString and split into tokens. One\n // important purpose of doing this is to verify if we truly have tokens to apply to a\n // search process. If we are left with an empty query, then we can simply return the\n // entire contact list. The way the algorithm logic flows, there must be at least one\n // query token in the list, even if a blank placeholder.\n ArrayList<String> sanitizedQueryTokens = new ArrayList<String>();\n if (mQueryString != null) {\n // split up the query string into tokens, based on whitespace and asterisks\n String[] queryTokens = mQueryString.trim().split(\"[\\\\*\\\\s]+\");\n // get rid of any empty string references\n for (String currentString : queryTokens) {\n if (!currentString.equals(\"\")) {\n sanitizedQueryTokens.add(currentString);\n }\n }\n // if the ArrayList is empty, then we assume match everything\n if (sanitizedQueryTokens.size() == 0) {\n mQueryString = null;\n }\n }\n\n // Now perform the search. If the queryString is null, then the search reduces\n // to a dump of all contacts\n if ( mQueryString == null) {\n // The search algorithm is designed to work without search criteria (reduction to\n // entire list dumped). However we need at least one query token to enter the main\n // search loop.\n sanitizedQueryTokens.add(\"\");\n }\n\n StringBuilder concatListMatches = new StringBuilder();\n int numMatches = 0;\n\n while (cursor.moveToNext()) {\n String currentName = cursor.getString(nameIndex);\n\n if (currentName != null && !currentName.isEmpty()) {\n // If we are not actually performing a search, we still need to enter this loop\n // once (hence why we added a blank term above).\n for (String currentString : sanitizedQueryTokens) {\n // Add this contact to the list if we are either not performing a search\n // or if the current search criteria (token) matches\n if (mQueryString == null || currentName.toLowerCase().contains(\n currentString.toLowerCase())) {\n\n concatListMatches.append(currentName).append(\"\\n\");\n\n // If this contact has phone number(s), display them\n if (cursor.getInt(hasNumberIndex) > 0) {\n // grab the number(s) from the phat cache\n List<Pair<String, Integer>> phNums;\n if ((phNums = numberCache.get(cursor.getInt(idIndex))) != null) {\n // Pair<Phone Number, Type of Number>\n for (Pair<String, Integer> phNum : phNums) {\n concatListMatches.append(\"\\t\").append(phNum.first);\n switch(phNum.second) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n concatListMatches.append(\" [HOME]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n concatListMatches.append(\" [MOBILE]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n concatListMatches.append(\" [WORK]\");\n break;\n }\n concatListMatches.append(\"\\n\");\n }\n } else {\n // This should not happen. Means that there is a contact in which a\n // phone number is associated but yet no such number actually can\n // be found in the DB\n concatList.append(\"\\t<Phone number referenced, but not found>\\n\");\n }\n }\n\n ++numMatches;\n break;\n }\n }\n }\n }\n concatList.append(numMatches).append(\" Contacts Found\\n\\n\").append(concatListMatches);\n\n Log.d(\"populate contact list \",\"str \"+concatList.toString());\n return concatList.toString();\n }", "public com.ubtrobot.phone.PhoneCall.Contact getContactList(int index) {\n return contactList_.get(index);\n }", "public com.ubtrobot.phone.PhoneCall.Contact getContactList(int index) {\n return contactList_.get(index);\n }", "public com.ubtrobot.phone.PhoneCall.Contact getContactList(int index) {\n return contactList_.get(index);\n }", "public com.ubtrobot.phone.PhoneCall.Contact getContactList(int index) {\n return contactList_.get(index);\n }", "private void getContactDataBefore() {\n int i = 0;\n List<String> list = new ArrayList<>();\n\n Cursor c1 = getContentResolver()\n .query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n if ((c1 != null) && c1.moveToFirst()) {\n\n // add contact id's to the mIDs list\n do {\n String id = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n String name = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n // query all contact numbers corresponding to current id\n Cursor c2 = getContentResolver()\n .query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=?\",\n new String[]{id}, null);\n\n if (c2 != null && c2.moveToFirst()) {\n // Log.d(\"DEBUG\",\"name =\" + name);\n list = new ArrayList<>();\n\n if (idsHash.containsKey(name)) {\n list = idsHash.get(name);\n } else {\n mIDs.add(id);\n mNames.add(name);\n mNumbers.add(c2.getString(c2\n .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER)));\n }\n\n list.add(id);\n idsHash.put(name, list);\n\n c2.close();\n } else {\n c2.close();\n }\n\n i++;\n } while (c1.moveToNext() && i < c1.getCount());\n\n c1.close();\n }\n }", "public static List<Contact> getContacts() {\n List<Contact> contacts = new ArrayList<>();\n contacts.add(new Contact(\"Rabbit\", R.drawable.rabbit, \"4153508881\"));\n contacts.add(new Contact(\"Sheep\", R.drawable.sheep, \"4153508882\"));\n contacts.add(new Contact(\"Octopus\", R.drawable.octopus, \"4153508883\"));\n contacts.add(new Contact(\"Cat\", R.drawable.cat, \"4153508884\"));\n contacts.add(new Contact(\"Lion\", R.drawable.lion, \"4153508885\"));\n contacts.add(new Contact(\"Sheep\", R.drawable.sheep, \"4153508886\"));\n contacts.add(new Contact(\"Dog\", R.drawable.dog, \"4153508887\"));\n contacts.add(new Contact(\"Horse\", R.drawable.horse, \"4153508888\"));\n return contacts;\n }", "public static Cursor getDashboardContactList() {\n\t\tLog.d(\" QuizApp--SQLHelper\", \"Contact--Querying Data\");\n\t\treturn db.rawQuery(\"select * from Contact order by name\", null);\n\t}", "public Cursor getAllContact()\n {\n return db.query(DATABASE_TABLE,new String[]{KEY_ROWID,KEY_NAME,\n KEY_EMAIL},null,null,null,null,null);\n }", "@GetMapping(\"/list\")\n\tpublic String listContacts(Model theModel) {\n\t\tList<Contact> theContacts = contactService.findAll();\n\t\t\n\t\t// add to the model\n\t\ttheModel.addAttribute(\"contacts\", theContacts);\n\t\t\n\t\treturn \"contacts/list-contacts\";\n\t}", "public ArrayList<String[]> getAllContacts() {\n ArrayList<String[]> returnlist = new ArrayList<String[]>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n ArrayList<String> data = new ArrayList<String>();\n for (int i =0; i<cursor.getColumnCount(); i++){\n data.add(cursor.getString(i));\n }\n // Adding contact to list\n returnlist.add(data.toArray(new String[returnlist.size()]));\n } while (cursor.moveToNext());\n }\n\n // return contact list\n cursor.close();\n db.close();\n return returnlist;\n }", "public void allContacts(){\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tSystem.out.println(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private ArrayList<VOContactRecord> getContactRecordsFromEditor()\n\t{\n\t\tArrayList<VOContactRecord> list = new ArrayList();\n\t\t\n\t\tfor(Integer type_id : contact_editors.keySet()) \n\t\t{\n\t\t\tContactEditor editor = contact_editors.get(type_id);\n\t\t\tHashMap<ContactRecord, ContactRank> contacts = editor.getContactRecords();\n\t\t\tfor(ContactRecord contact : contacts.keySet()) {\n\t\t\t\tVOContactRecord rec = new VOContactRecord();\n\t\t\t\tContactRank rank = contacts.get(contact);\n\t\t\t\trec.contact_id = contact.id;\n\t\t\t\trec.contact_type_id = type_id;\n\t\t\t\trec.contact_rank_id = rank.id;\n\t\t\t\tlist.add(rec);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "@RequestMapping(value = \"contacts/all\", method = RequestMethod.GET)\n public String getContacts(Model model) {\n\n List<Contact> allBlocksContact = adminService.getAllBlocksContact();\n model.addAttribute(\"contactBlocks\", allBlocksContact);\n model.addAttribute(\"faIcons\", faIcon);\n\n return \"/admin/contacts/contacts\";\n }", "@Override\n\tpublic List<Contact> listContactForGroup(Set<Contact> contactsinGroup) {\n\t\ttry {\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\t\t\t\n\t\t\tArrayList<Long> listIds = new ArrayList<Long>();\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* \" + listIds.toString());\n\t\t\tList<Contact> lc = null;\n\t\t\tfor (Contact c : contactsinGroup) {\n\t\t\t\tlistIds.add(c.getId());\n\t\t\t}\n\t\t\t\t\n\t\t\tif (listIds.isEmpty()) {\n\t\t\t\tQuery query = session.createQuery(\"from Contact\");\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\t\t\t\tlc = (List<Contact>) query.list();\n\t\t\t} else {\n\t\t\t\tQuery query = session.createQuery(\"from Contact where id not in (:ids)\");\n\t\t\t\tquery.setParameterList(\"ids\", listIds);\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\t\t\t\tlc = (List<Contact>) query.list();\n\t\t\t}\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lc;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public List<PersonContact> getContacts() {\n if (this.contacts == null) {\n this.contacts = new ArrayList<>();\n }\n return contacts;\n }", "public java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> getContactList() {\n return contact_;\n }", "public com.ubtrobot.phone.PhoneCall.Contact getContactList(int index) {\n if (contactListBuilder_ == null) {\n return contactList_.get(index);\n } else {\n return contactListBuilder_.getMessage(index);\n }\n }", "public com.ubtrobot.phone.PhoneCall.Contact getContactList(int index) {\n if (contactListBuilder_ == null) {\n return contactList_.get(index);\n } else {\n return contactListBuilder_.getMessage(index);\n }\n }", "public com.ubtrobot.phone.PhoneCall.Contact getContactList(int index) {\n if (contactListBuilder_ == null) {\n return contactList_.get(index);\n } else {\n return contactListBuilder_.getMessage(index);\n }\n }", "public com.ubtrobot.phone.PhoneCall.Contact getContactList(int index) {\n if (contactListBuilder_ == null) {\n return contactList_.get(index);\n } else {\n return contactListBuilder_.getMessage(index);\n }\n }", "@Override\n public List<User> getContacts() {\n if (contacts.isEmpty()) {\n contacts.addAll(readFromFile());\n }\n\n // else return the current list of contacts\n return contacts;\n }", "Set<Person> getContacts();", "public java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> getContactList() {\n if (contactBuilder_ == null) {\n return java.util.Collections.unmodifiableList(contact_);\n } else {\n return contactBuilder_.getMessageList();\n }\n }", "public void loadContacts()\n {\n Contact sdhb = new Contact(\"SDHB\", \"(03) 474 00999\");\n //Hospitals\n Contact southland = new Contact(\"Southland Hospital\", \"(03) 218 1949\");\n Contact lakes = new Contact(\"Lakes District Hostpital\", \"(03) 441 0015\");\n Contact dunedin = new Contact(\"Dunedin Hospital\", \"(03) 474 0999\");\n Contact wakari = new Contact(\"Wakari Hospital\", \"(03) 476 2191\");\n //Departments\n Contact compD = new Contact(\"Complements & Complaints (Otago)\", \"(03) 470 9534\");\n Contact compS = new Contact(\"Complements & Complaints (Southland)\", \"(03) 214 5738\");\n\n contacts = new Contact[]{sdhb, dunedin, southland, lakes, wakari, compD, compS};\n }", "public Collection<Contact> getContacts() {\n\t\treturn this.contacts.values();\n\t}", "@Override\n\tpublic List<Contact> allContacts() {\n\t\treturn null;\n\t}", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n return contactList_;\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n return contactList_;\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n return contactList_;\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n return contactList_;\n }", "public void mostrarContactos() {\n\t\tfor (int i = 0; i < this.listaContactos.size(); i++) {\n\t\t\tSystem.out.println(this.listaContactos.get(i).mostrarDatos());\n\t\t}\n\t}", "public CallSpec<List<XingUser>, HttpError> getYourContacts() {\n return getContacts(ME);\n }", "java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress> \n getContactAddressList();", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n if (contactListBuilder_ == null) {\n return java.util.Collections.unmodifiableList(contactList_);\n } else {\n return contactListBuilder_.getMessageList();\n }\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n if (contactListBuilder_ == null) {\n return java.util.Collections.unmodifiableList(contactList_);\n } else {\n return contactListBuilder_.getMessageList();\n }\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n if (contactListBuilder_ == null) {\n return java.util.Collections.unmodifiableList(contactList_);\n } else {\n return contactListBuilder_.getMessageList();\n }\n }", "public java.util.List<com.ubtrobot.phone.PhoneCall.Contact> getContactListList() {\n if (contactListBuilder_ == null) {\n return java.util.Collections.unmodifiableList(contactList_);\n } else {\n return contactListBuilder_.getMessageList();\n }\n }", "public void selectContact() {\r\n Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);\r\n startActivityForResult(intent, PICK_CONTACT);\r\n }", "Page<Contact> getContacts(int index, int size);", "public List<Contact> getContactsInGroup() {\r\n\t\t/**\r\n\t\t * re-fresh the group attribute by re-getting the group object in the\r\n\t\t * database to keep updated all modifications made in group before.\r\n\t\t */\r\n\t\tthis.group = this.groupEjb.getGroupById(this.getGroupId());\r\n\t\treturn this.groupEjb.getAllContactsInGroup(this.group);\r\n\t}", "public List<Contact> getAllContactsByName(String searchByName);", "public List<Contact> getContacts(Long id){\n contacts.clear();\n return contactsAndChildrenParser.getContacts(id);\n }", "public void findContact(){\n EtecsaDB database = new EtecsaDB(this.getContext());\n if (!database.hasDatabase()){\n Toast.makeText(this.getContext(), R.string.no_database, Toast.LENGTH_SHORT).show();\n }\n else //buscar contacto\n new Search(this.getActivity()).execute(advancedSearch);\n }", "public ListSelectionModel getContactSelection() {\r\n if (contactSelection == null) {\r\n contactSelection = new DefaultListSelectionModel();\r\n contactSelection.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n setContactSelection(contactSelection);\r\n }\r\n return contactSelection;\r\n }", "public void prepareContactData(long num) {\n\n //ASSIGN SELECTION VARIABLE WITH NUMBER FROM NUMPAD\n String[] selectionArgs = {String.valueOf(num) + \"%\"};\n\n List<Contact> contactList = new ArrayList<>();\n\n cAdapter = new ContactAdapter(contactList);\n recyclerView.setAdapter(cAdapter);\n\n //DISPLAY ALL\n if(num == 0) {\n cursor = database.query(DBContract.Contact.TABLE_NAME, projection, null, null, null, null, null, null);\n }\n //DISPLAY ONLY SELECTED DATA\n else {\n cursor = database.query(DBContract.Contact.TABLE_NAME, projection, selection, selectionArgs, null, null, null, null);\n }\n\n String name, phone, id;\n\n while(cursor.moveToNext()) {\n int index;\n\n index = cursor.getColumnIndexOrThrow(\"name\");\n name = cursor.getString(index);\n\n index = cursor.getColumnIndexOrThrow(\"phone\");\n phone = cursor.getString(index);\n\n index = cursor.getColumnIndexOrThrow(\"uid\");\n id = cursor.getString(index);\n\n contactList.add(new Contact(name, Long.valueOf(phone)));\n\n Log.d(\"TAG\", \"Name : \" + name);\n Log.d(\"TAG\", \"Phone : \" + phone);\n Log.d(\"TAG\", \"ID : \" + id);\n }\n\n //REFRESH ADAPTER LIST\n cAdapter.notifyDataSetChanged();\n }", "@GetMapping(\"/viewContact\")\r\n\tpublic String handleViewContactsLink(Model model) {\r\n\t\tList<Contact> contactList = service.getAllContacts();\r\n\t\tmodel.addAttribute(\"contact\", contactList);\r\n\t\treturn \"viewContact\";\r\n\t}", "private void loadAssociatedContacts() {\n Gson gson = new Gson();\n // get the serialized contact file\n String serializedFile = ContactDAO.serializedFile;\n // deserialize the file to get all contacts information\n associatedContacts = gson.fromJson(serializedFile, new TypeToken<ArrayList<ContactDataModel>>(){}.getType());\n //display information\n if (associatedContacts != null) {\n adapter = new CustomContactAdapter(this, R.layout.view_contact_row, associatedContacts);\n cv.setAdapter(adapter);\n // In case that the user delete some contacts, we set the serialized file in the DAO to apply the change\n // list of contact\n // serialize and set the access file\n ContactDAO.serializedFile = gson.toJson(associatedContacts);\n }\n\n //on item click\n cv.setOnItemClickListener(itemDescription);\n }", "public static ObservableList<Contacts> getAllContacts() {\n try {\n Connection conn = DBConnection.getConnection();\n DBQuery.setStatement(conn);\n Statement statement = DBQuery.getStatement();\n String query = \"SELECT * FROM contacts\";\n ResultSet rs = statement.executeQuery(query);\n while(rs.next()) {\n\n Contacts newContact = new Contacts();\n newContact.setContact_ID(rs.getInt(\"Contact_ID\"));\n newContact.setContact_Name(rs.getString(\"Contact_Name\"));\n newContact.setEmail(rs.getString(\"Email\"));\n Contacts.addContacts(newContact); \n\n }\n statement.close();\n return contact;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n}", "public void importContactsFromPhone(View btnSelectContact) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI), REQUEST_CODE_PICK_CONTACTS);\n }", "@GetMapping(\"/contacts\")\r\n\tCollectionModel<EntityModel<Contact>> all() {\r\n\t\t//Use map to call toModel on each Contact resource\r\n\t List<EntityModel<Contact>> contacts = repo.findAll().stream()\r\n\t .map(assembler::toModel)\r\n\t .collect(Collectors.toList());\r\n\t return CollectionModel.of(contacts, linkTo(methodOn(ContactController.class).all()).withSelfRel());\r\n\t}", "@RequestMapping(value = \"/contact/list/{id}\", method = RequestMethod.GET)\n public Contact contactGetById(@PathVariable Long id) {\n Contact contact = contactService.list(id);\n return contact;\n }", "private static void showContacts(List<Contact> contactList) {\r\n\t\tcontactList.forEach(System.out::println);\r\n\t}", "@Override\r\n\tpublic List<Contacto> getContactosInatec() {\r\n\t\treturn null;\r\n\t}", "private void loadContacts() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {\n\n requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, PERMISSION_REQ);\n\n } else {\n mList.addAll(mProvider.getContactsDisplay());\n mAdapter = new ContactsRecyclerAdapter(mList,this, getSupportFragmentManager());\n mLayoutManager = new LinearLayoutManager(getApplicationContext());\n mRecyclerView.setLayoutManager(mLayoutManager);\n mRecyclerView.setAdapter(mAdapter);\n }\n }", "private void transferContactList() throws IOException {\n dbh.open();\n try {\n String[][] contacts = dbh.getContactsArray(user.toString());\n System.out.println(Arrays.toString(contacts));\n int nbrOfContacts = contacts.length;\n oos.writeObject(\"ContactList\");\n oos.writeObject(contacts);\n oos.flush();\n logListener.logInfo(\"Transfered \" + nbrOfContacts + \" contacts to: \" + user.toString());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }" ]
[ "0.75815284", "0.74925584", "0.7386674", "0.7386674", "0.7386674", "0.7386674", "0.7240267", "0.72140014", "0.7192933", "0.7180081", "0.71615666", "0.71615666", "0.71615666", "0.71615666", "0.7025903", "0.7021342", "0.6924323", "0.68736535", "0.6846754", "0.6822708", "0.681475", "0.6813375", "0.6799465", "0.6786289", "0.67752767", "0.67729723", "0.67727107", "0.6750071", "0.67494714", "0.6710707", "0.6691956", "0.6685323", "0.66751266", "0.6640293", "0.6636916", "0.6635647", "0.6635522", "0.656452", "0.65563184", "0.6554467", "0.65489095", "0.65301615", "0.65301615", "0.65301615", "0.65301615", "0.65068436", "0.650042", "0.64960414", "0.6482985", "0.6481089", "0.64723194", "0.6457479", "0.6451163", "0.64468414", "0.6429305", "0.6426046", "0.6416155", "0.6368217", "0.6368217", "0.6368217", "0.6368217", "0.6362202", "0.6361899", "0.6353477", "0.6345381", "0.6344903", "0.6334023", "0.6322076", "0.6310389", "0.6310389", "0.6310389", "0.6310389", "0.62996995", "0.629362", "0.62697244", "0.6262081", "0.6262081", "0.6262081", "0.6262081", "0.62532586", "0.62532586", "0.62532586", "0.62532586", "0.6244424", "0.62423414", "0.6240521", "0.62129134", "0.6203036", "0.61712056", "0.616159", "0.61605376", "0.61562186", "0.6155064", "0.6149361", "0.6148088", "0.6135855", "0.60865164", "0.6079599", "0.60686195", "0.60619926", "0.6061812" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { String text = getCurUser() + " : " + textField.getText(); textField.setText(""); final ChatMessage msg = new ChatMessage(); msg.setMessage(text); mainFrame.sendMessage(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Interventionpnds)) { return false; } Interventionpnds other = (Interventionpnds) object; if ((this.idinterventionpnds == null && other.idinterventionpnds != null) || (this.idinterventionpnds != null && !this.idinterventionpnds.equals(other.idinterventionpnds))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.6477893", "0.6426692", "0.6418966", "0.6416817", "0.6401561", "0.63664836", "0.63549376", "0.63515353", "0.6347672", "0.6324549", "0.6319196", "0.6301484", "0.62935394", "0.62935394", "0.62832105", "0.62710917", "0.62661785", "0.6265274", "0.6261401", "0.6259253", "0.62559646", "0.6251244", "0.6247282", "0.6247282", "0.6245526", "0.6238957", "0.6238957", "0.6232451", "0.62247443", "0.6220427", "0.6219304", "0.6211484", "0.620991", "0.62023336", "0.62010616", "0.6192621", "0.61895776", "0.61895776", "0.61893976", "0.61893976", "0.61893976", "0.6184292", "0.618331", "0.61754644", "0.6173718", "0.6168409", "0.6166131", "0.6161708", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.61556244", "0.61556244", "0.61430943", "0.61340135", "0.6128617", "0.6127841", "0.61065215", "0.61043483", "0.61043483", "0.6103568", "0.61028486", "0.61017346", "0.6101399", "0.6098963", "0.6094214", "0.6094", "0.6093529", "0.6093529", "0.6091623", "0.60896", "0.6076881", "0.60723215", "0.6071593", "0.6070138", "0.6069936", "0.6069529" ]
0.0
-1
clear Page level Variables
public void clearAllFields(){ //clear Page level Variables setRateOfferedPk(null); setCustomerRefNo(null); setDocumentNumber(null); setBeneficiaryName(null); setBeneficiaryBankId(null); setBeneficiaryBankName(null); setRateOffered(null); setCurrencyId(null); setCurrencyName(null); setTransctionAmount(null); setCustomerRefAndName(null); setRemitServiceId(null); setRemitRemittanceId(null); setRemitDeliveryId(null); setCustomerId(null); setCustomerName(null); setRateOfferedPk(null); setAmountAndQtyName(null); setBeneficiaryMasterId(null); setBeneficiaryAccountSeqId(null); setCurrencyQtyName(null); setRoutingCountry(null); setRoutingBank(null); setPaymentCode(null); //common Variables setErrorMessage(null);; setCreatedBy(null); setCreatedDate(null); setModifiedBy(null); setModifiedDate(null); setApprovedBy(null); setApprovedDate(null); setIsActive(null); //cheque and Card common Details setRemitamount(null);; setRemitBankId(null);; setCheckRefNo(null);; //cheque Details setRemitApproveCheckDate(null);; setApprovalNumber(null);; //card Details setCardNumber(null);; setNameOfTheCard(null); setApprovalNumberCard(null); setCardBankId(null); setLstRatePlaceOrderPk(null); setBooRenderSaveOrExit(false); setTotalAmount(null); setPaymentAmountPanel(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset()\n {\n pages.clear();\n ePortfolioTitle = \"\";\n selectedPage = null;\n }", "void reset(){\n if (vars!=null){\n vars.clear();\n }\n if (gVars!=null){\n gVars.clear();\n }\n }", "public void clearVariables()\n {\n if(arrayListPLPDetails!=null) {\n arrayListPLPDetails.clear();\n ProductListPageAdaptorNoView.SingletonInstance().updateData(false);\n }\n }", "public void resetVariables(){\n\t\tthis.queryTriplets.clear();\n\t\tthis.variableList.clear();\n\t\tthis.prefixMap.clear();\n\t}", "private void clearInternVariables () {\n\n currentPostVersionList = null;\n postVersionsThatShouldBeInvestigated = null;\n\n allElementsInGUI.clear();\n\n blockPairs_groundTruth.clear();\n blockPairs_computedSimilarity.clear();\n\n positionOfCurrentLeftVersionInViewedPost = 0;\n\n mapPostHistoryIdToVersion.clear();\n groundTruth_postBlockLifeSpanVersionList.clear();\n }", "public void resetPagina()\r\n {\r\n this.pagina = null;\r\n }", "private void clearLocals() {\n this.map = null;\n this.inputName = null;\n }", "public void destroy() {\n\t\texcludeItem = null;\r\n\t\tloginPage=null;\r\n\t\tloaginAction=null;\r\n\t\tauthority = null;\r\n\t}", "public static void DrivingNavi_clean(){\n navInitManager = null;\n\n }", "public static void reset(){\n breedToShapeMapping = null;\n contents = null;\n \n pages.clear();\n speciesMap.clear();\n blocks.clear();\n constraintsMap.clear();\n BlockData.reset();\n }", "public void resetWorkspace() {\n //clear all pages and their drawers\n //clear all drawers and their content\n //clear all block and renderable block instances\n workspace.reset();\n //clear procedure output information\n ProcedureOutputManager.reset();\t//*****\n\n }", "void clearValues() {\n percentMissing = \"-1\";\n PICValue = \"-1\";\n maf = \"-1\";\n phenoDataSummary = \"-1\";\n genoSummaryScript = sharedInformation.getWorkingDirectory() + scriptsRelativePath + dataSummaryScriptName;\n phenoSummaryScript = sharedInformation.getWorkingDirectory() + scriptsRelativePath + phenoSummaryScriptName;\n enginePath = sharedInformation.getWorkingDirectory() + rEngineRelativePath;\n }", "public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }", "void reset() {\n errors.clear();\n variables.clear();\n }", "public final void clear() {\r\n variablesCache.clear();\r\n }", "@Override\r\n\tpublic void action() throws Exception {\n\t\tthis.pageAction();\r\n\t\t//when action finished \r\n\t\tInteger currentPageNumber = (Integer) context.get(\"currentPageNumber\");\r\n\t\tString currentPageContent = (String)context.get(\"currentPageContent\");\r\n\t if(currentPageNumber!=null){\r\n\t\t\tcontext.remove(currentPageNumber);\r\n\t\t}\r\n\t\tif(currentPageContent!=null){\r\n\t\t\tcontext.remove(currentPageContent);\r\n\t\t}\r\n\t\t//action end\r\n\t\t//after action remove the previous variables\r\n\t\t\r\n\t\tcontext.remove(\"pageUrlRegex\");\r\n\t\tcontext.remove(\"contentRegex\");\r\n\r\n\t\tcontext.remove(\"pageSize\");\r\n\r\n\t\tcontext.remove(\"totalRecorderNumber\");\r\n\t\tcontext.remove(\"currentFieldName\");\r\n\r\n\t}", "@Override\r\n\tpublic void clearALL() {\n\t\tjavaScriptWindow.propertyTable = null;\r\n\r\n\t}", "void clear() {\n initialize(INITIAL_PIECES, BP);\n }", "public static void clear() {\n SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance();\n sharedPref.clearWeiboPref();\n }", "public void reset() {\n\t\tvar.clear();\n\t\tname.clear();\n\t}", "private void cleanup() {\n mCategory = null;\n mAccount = null;\n mCal = null;\n\n /* Reset value */\n etAmount.setText(\"\");\n tvCategory.setText(\"\");\n tvPeople.setText(\"\");\n tvDescription.setText(\"\");\n tvAccount.setText(\"\");\n tvEvent.setText(\"\");\n }", "private static void clear() {\n Context context = Leanplum.getContext();\n if (context != null) {\n SharedPreferences.Editor editor = context.getSharedPreferences(\n \"__leanplum__\", Context.MODE_PRIVATE).edit();\n if (editor != null) {\n editor.clear();\n editor.apply();\n }\n\n editor = context.getSharedPreferences(\"__leanplum_push__\", Context.MODE_PRIVATE).edit();\n if (editor != null) {\n editor.clear();\n editor.apply();\n }\n }\n }", "public static void reset() {\n prefs().edit()\n .remove(PREFKEY_USER_ID)\n .remove(PREFKEY_READER_TAG)\n .remove(PREFKEY_READER_RECOMMENDED_OFFSET)\n .remove(PREFKEY_READER_SUBS_PAGE_TITLE)\n .commit();\n }", "public static void reset() {\n\t\tCAUGHT.clear();\n\t\tLOAD_CACHE.clear();\n\t}", "public void removeVars(){\n this.values = new HashMap<>();\n }", "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void clear()\n {\n pages.stream().forEach((page) -> {\n page.clearCache();\n });\n\n pages.clear();\n listeners.clear();\n occupiedEntries.clear();\n }", "public void cleanUp() {\r\n if(getFunctionType() != VIEW_HIERARCHY)\r\n panel.dispose();\r\n cvGroupsData = null;\r\n cvHierarchyData = null;\r\n cvSortData = null;\r\n sponsorHierarchyBean = null;\r\n sponsorHierarchyTree = null;\r\n model = null;\r\n selectedNode = null;\r\n selTreePath = null;\r\n groupsController = null;\r\n hierarchyRenderer = null;\r\n hierarchyTreeCellEditor = null;\r\n treeDropTarget = null;\r\n panel = null;\r\n editor = null;\r\n changePassword = null;\r\n backGroundColor = null;\r\n maintainSponsorHierarchyBaseWindow = null;\r\n }", "void unsetSites();", "public static void reset() {\n\t\tvxlFragment = new StringBuffer();\n\t\tpreprocessorList = new LinkedList<ASTNode>();\n\t}", "public void exit()\n {\n m_doc = null;\n m_stylesheet = null;\n\n // m_defaultParaProperties = null;\n\n m_paragraph = null;\n m_paraProperties = null;\n m_charProperties = null;\n m_charPropertiesStack = null;\n m_container = null;\n m_containerStack = null;\n }", "public void clearVars() {\n setLatitude (FLOATNULL);\n setLongitude (FLOATNULL);\n setDepth (FLOATNULL);\n setTemperatureMin (FLOATNULL);\n setTemperatureMax (FLOATNULL);\n setSalinityMin (FLOATNULL);\n setSalinityMax (FLOATNULL);\n setOxygenMin (FLOATNULL);\n setOxygenMax (FLOATNULL);\n setNitrateMin (FLOATNULL);\n setNitrateMax (FLOATNULL);\n setPhosphateMin (FLOATNULL);\n setPhosphateMax (FLOATNULL);\n setSilicateMin (FLOATNULL);\n setSilicateMax (FLOATNULL);\n setChlorophyllMin (FLOATNULL);\n setChlorophyllMax (FLOATNULL);\n }", "public static void releaseState() {\n MockPageContext.methodArguments.clear();\n MockPageContext.methodResults.clear();\n MockPageContext.throwExceptions.clear();\n MockPageContext.globalException = null;\n }", "static void clearCache() {\n CONFIG_VALUES = null;\n RUN_MODE = null;\n }", "public static void reset() {\n\t\tE_Location.THIS.reset();\n\t\tE_Resource.THIS.reset();\n\t\t\n\t\tT_Object.reset();\n\t\tT_Location.reset();\n\t\tT_Resource.reset();\n\t\t\n\t}", "protected void unloadSections() {\n\t\tcoff.close();//make sure to close the file\n\t\tfor(int i=0; i < numPages; i++){\n\t\t\tUserKernel.addPhysicalPage(pageTable[i].ppn);\n\t\t\tpageTable[i] = null;\n\t\t}\n\t\tpageTable = null;\n\t}", "public void clear () {\n\n\t\tn_vars = 0;\n\t\tn_values = null;\n\t\tmin_probability = DEF_MIN_PROBABILITY;\n\n\t\tpeak_probability = 0.0;\n\t\tpeak_indexes = null;\n\t\ttotal_probability = 0.0;\n\t\tmarginal_probability = null;\n\t\tmarginal_mode_index = null;\n\t\tmarginal_peak_probability = null;\n\t\tmarginal_peak_indexes = null;\n\t\tmarginal_2d_probability = null;\n\t\tmarginal_2d_mode_index = null;\n\n\t\treturn;\n\t}", "public void reset() {\n mHsConfig = null;\n mLoginRestClient = null;\n mThirdPidRestClient = null;\n mProfileRestClient = null;\n mRegistrationResponse = null;\n\n mSupportedStages.clear();\n mRequiredStages.clear();\n mOptionalStages.clear();\n\n mUsername = null;\n mPassword = null;\n mEmail = null;\n mPhoneNumber = null;\n mCaptchaResponse = null;\n mTermsApproved = false;\n\n mShowThreePidWarning = false;\n mDoesRequireIdentityServer = false;\n }", "public void clear() {\n\t\tthis.count = (emptyItem ? 1 : 0);\n\t\tpages.clear();\n\t}", "public void reset() {\r\n properties.clear();\r\n }", "private void garbageColl(){\n\t\tfor(Page p: pageList){\n\t\t\tp.garbageColl();\n\t\t}\n\t\tpageIndex = 0;\n\t}", "private void resetDataForAddAfterSchoolAlly() \r\n\t{\n\t\tStaticVariables.showAllyName1InAfterSchool = false;\r\n\t\tStaticVariables.showAllyName2InAfterSchool = false;\r\n\r\n\t\t/*\tStaticVariables.allySetFor1 = null;\r\n\t\tStaticVariables.allySetFor2 = null;*/\r\n\r\n\t}", "private void clearFields() {\r\n keywords = \"\";\r\n searchBy = \"\";\r\n }", "void unsetBodySite();", "public static void reset() {\r\n\t\t// System.out.println(\"ExPar.reset()\");\r\n\t\t// new RuntimeException().printStackTrace();\r\n\t\truntimePars.clear();\r\n\t\tresetValues();\r\n\t\tGlobalAssignments.exec();\r\n\t}", "@Before\r\n\tpublic void cleanStart(){\n\t\tStartupFunctions.clearTabs();\r\n\t}", "@Before\r\n\tpublic void cleanStart(){\n\t\tStartupFunctions.clearTabs();\r\n\t}", "public static void variableReset() {\n\t\tLogic.pieceJumped = 0;\n\t\tLogic.bool = false;\n\t\tLogic.curComp = null;\n\t\tLogic.prevComp = null;\n\t\tLogic.jumpedComp = null;\n\t\tLogic.ydiff = 0;\n\t\tLogic.xdiff = 0;\n\t\tLogic.jumping = false;\n\t\tmultipleJump = false;\n\t\t\n\t}", "public static void clear(){\n preferences.edit().clear().apply();\n }", "@Override\n public void clearSharedPrefs() {\n\n }", "public void reset() {\n noIndex= false;\n noFollow= false;\n noCache= false;\n baseHref= null;\n }", "public void unload() {\n this.currentRooms.clear();\n // Zero the info panel.\n this.roomNameField.setText(\"\");\n this.includeField.setText(\"\");\n this.inheritField.setText(\"\");\n this.streetNameField.setSelectedIndex(0);\n this.determinateField.setText(\"\");\n this.lightField.setText(\"\");\n this.shortDescriptionField.setText(\"\");\n this.longDescriptionField.setText(\"\");\n this.exitPanel.removeAll();\n }", "public void clear_defineSetupPage_LoadDesc() {\r\n\t\tClearText(DefineSetup_LoadDesc_txtBx);\r\n\t}", "public void reset()\n {\n \tthis.heapFiles.clear();\n }", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}", "private void resetAll() {\n\t\trightHandNavPanel.clear();\n\t\tmainFlowPanel.clear();\n\t\tparameterNameTxtArea.setText(\"\");\n\t\tdefineNameTxtArea.setText(\"\");\n\t\tfuncNameTxtArea.setText(\"\");\n\t\t\n\t\tdefineAceEditor.setText(\"\");\n\t\tparameterAceEditor.setText(\"\");\n\t\tSystem.out.println(\" in resetAll doing setText\");\n\t\tcqlAceEditor.setText(\"\");\n\t\tfunctionBodyAceEditor.setText(\"\");\n\t\t\n\t\tviewParameterList.clear();\n\t\tviewDefinitions.clear();\n\t\tviewFunctions.clear();\n\t\t\n\t\tif (paramCollapse != null) {\n\t\t\tparamCollapse.clear();\n\t\t}\n\t\tif (defineCollapse != null) {\n\t\t\tdefineCollapse.clear();\n\t\t}\n\t\tif (functionCollapse != null) {\n\t\t\tfunctionCollapse.clear();\n\t\t}\n\t\t\n\t\tsetIsPageDirty(false);\n\t\tresetMessageDisplay();\n\t}", "public void resetTestVars() {\n\t\tuser1 = new User();\n\t\tuser2 = new User();\n\t\tuser3 = new User();\n\t\tsn = new SocialNetwork();\n\t\tstatus = SocialNetworkStatus.DEFAULT;\n\t\tearly = new Date(25L);\n\t\tmid = new Date(50L);\n\t\tlate = new Date(75L);\n\t}", "public void clear_defineSetupPage_SensorCount() {\r\n\t\tClearText(DefineSetup_Sensordata_txtBx);\r\n\t}", "private void resetAll() {\n\t\tif(mu1 != null)\n\t\t\tmodel.getView().reset(mu1);\n\t\tmu1 = null;\n\t\t\n\t\tif(mu2 != null)\n\t\t\tmodel.getView().reset(mu2);\n\t\tmu2 = null;\n\t\t\n\t\tif(functionWord != null)\n\t\t\tmodel.getView().reset(functionWord);\n\t\tfunctionWord = null;\n\t\t\n\t\tmodel.getSGCreatingMenu().reset();\n\t}", "public void resetLocals()\n {\n maxLocalSize = 0;\n localCnt = localIntCnt = localDoubleCnt = localStringCnt = localItemCnt = 0;\n locals = lastLocal = new LocalVariable(null, null, null);\n }", "public void unsetStartPage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STARTPAGE$12);\n }\n }", "public void clearVariable(int offset);", "public void resetVariables() {\n\t\tArrays.fill(variables, 0.0);\n\t}", "public void reset() {\n\t\treset(ModSettings.currentContext);\n\t}", "public void method_1895() {\n field_1241.clear();\n field_1242.clear();\n }", "private void nullify() {\n\t\tpaint = null;\n\t\tup = null;\n\t\tdown = null;\n\t\tleft = null;\n\t\tright = null;\n\t\tg_up = null;\n\t\tg_down = null;\n\t\tg_left = null;\n\t\tg_right = null;\n\t\tgrass = null;\n\t\tcake = null;\n\n\t\t// Call garbage collector to clean up memory.\n\t\tSystem.gc();\n\n\t}", "public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }", "public void removeTemplatesPage()\r\n {\r\n getSemanticObject().removeProperty(swpres_templatesPage);\r\n }", "@AfterAll\n public static void afterEverything() {\n //Set all instance variable to null\n oneHalf = null;\n oneFourth = null;\n twoThirds = null;\n negOneHalf = null;\n negOneFourth = null;\n negThreeNinths = null;\n negEightTwelfths = null;\n zeroTenth = null;\n zero = null;\n one = null;\n negOne = null;\n }", "private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }", "public void clear() {\n this.responseHeaders.clear();\n this.markupHeaders.clear();\n this.cookies.clear();\n }", "protected void nullifyTutorialObjectsAndStats() {\n\t\tthis.tutorial = null;\n\t\tthis.practiceDrillHuman = null;\n\t\tthis.practiceDrillAI = null;\n\t\tthis.finalMission = null;\n\t\tthis.numOfMoves = 0;\n\t\tthis.numOfTimesAITriggered = 0;\n\t}", "@Override\r\n protected void clearStaticReferences() {\r\n // free static fields :\r\n documentFactory = null;\r\n transformerFactory = null;\r\n schemaFactory = null;\r\n\r\n cacheDOM.clear();\r\n cacheDOM = null;\r\n\r\n cacheXSL.clear();\r\n cacheXSL = null;\r\n }", "void resetTesting() {\r\n\t\tcompanyCars.clear();\r\n\t\trentDetails.clear();\r\n\t}", "public void cleanUp(){\n\t\tbody.setActive(false);\n\t}", "public void clear()\n\t{\n\t if (logger.isTraceEnabled())\n\t logger.trace(\"clear() called for browser \" + this);\n\n\t // clear all internal members\n\t clearInternal();\n\t \n\t // and increment change counter\n\t incrementChangeCounter();\n\t}", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "void resetLocal();", "public static void clearWorld() {\r\n \tbabies.clear();\r\n \tpopulation.clear();\r\n }", "public void clear() {\r\n init();\r\n }", "public void clearController() {\n\t\tanswer = \"\";\n\t\thistory.clear();\n\t\tisLevelUp = false;\n\t\ttotalFullMark = 1;\n\t\ttotalMark = 0;\n\t\tmemberWordController.setSavedQuestion(new HashMap<PhoneticQuestion, Boolean>());\n\t}", "public static void reset(){\n\t\t\n\t\t// clear hashmap\n\t\tvisitorListMap.clear();\n\t\t\n\t\t// clear visitor list model\n\t\tvisitorListModel.clear();\n\t\t\n\t\t// clear server info\n\t\tlblServerInfoIP.setText(\"IP address: Not connected.\");\n\t\tlblServerInfoPort.setText(\"Port: \");\n\t\t\n\t\t// disable leave room\n\t\tlblLeave.setVisible(false);\n\t\t\n\t}", "public void clearAll() {\n bikeName = \"\";\n bikeDescription = \"\";\n bikePrice = \"\";\n street = \"\";\n zipcode = \"\";\n city = \"\";\n bikeImagePath = null;\n }", "public void reset() {\r\n textArea1.appendText(\"\\n --- Setting all \" + name + \" variables to null\");\r\n textArea1.setForeground(Color.red);\r\n \r\n\r\n Enumeration enum2 = variableList.elements() ;\r\n while(enum2.hasMoreElements()) {\r\n RuleVariable temp = (RuleVariable)enum2.nextElement() ;\r\n temp.setValue(null) ;\r\n }\r\n }", "private void clearHandler() {\n fileNames = null;\n fileName = null;\n image = null;\n displaySaveSupplier = false;\n displayUpdateSupplier = false;\n OcrHandler.getInstance().setInvoice(new Invoice());\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tif (web != null) {\r\n\t\t\tweb.clearCache(true);\r\n\t\t\tweb.clearDisappearingChildren();\r\n\t\t\tweb.clearFormData();\r\n\t\t\tweb.clearHistory();\r\n\t\t\tweb.clearMatches();\r\n\t\t\tweb.clearSslPreferences();\r\n\t\t\tweb.clearView();\r\n\t\t}\r\n\t}", "public static void clearAllCache() {\n page_cache.clear();\n key_relate.clear();\n }", "public String reset() {\n\t\tthis.element = null;\n\t\tthis.model = null;\n\t\treturn listPage();\n\t}", "private void clearViews()\n {\n prepareNumbers();\n }", "public static void reset()\n\t\t{\n\t\t\tfeatureSet = new THashMap();\n\t\t\tfeatureIds = new TObjectIntHashMap();\n\t\t\tnextID = 1;\t\t\t\n\t\t}", "private void clearAllState() {\n // Clear all layout records and views\n mLayoutRecords.clear();\n removeAllViews();\n\n // Reset to the top of the grid\n resetStateForGridTop();\n\n // Clear recycler because there could be different view types now\n mRecycler.clear();\n }", "private void reset() {\n }", "private void clearTemporaryData() {\n\n numbers.stream().forEach(n -> {\n n.setPossibleValues(null);\n n.setUsedValues(null);\n });\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tpilots.clear();\r\n\t\tcabinCrew.clear();\r\n\r\n\t}", "public void resetVariables() {\n this.name = \"\";\n this.equipLevel = 0;\n this.cpuCost = 0;\n this.bankDamageModifier = 1.0f;\n this.redirectDamageModifier = 1.0f;\n this.attackDamageModifier = 1.0f;\n this.ftpDamageModifier = 1.0f;\n this.httpDamageModifier = 1.0f;\n this.attackDamage = 0.0f;\n this.pettyCashReducePct = 1.0f;\n this.pettyCashFailPct = 1.0f;\n this.dailyPayChangeFailPct = 1.0f;\n this.dailyPayChangeReducePct = 1.0f;\n this.stealFileFailPct = 1.0f;\n this.installScriptFailPct = 1.0f;\n }", "public void clear()\r\n {\r\n // Create the tables stack and add the top level\r\n tables.clear();\r\n tables.add( new HashMap<String,T>() );\r\n \r\n // Ditto with the counts\r\n counts.clear();\r\n counts.add( 0 ); \r\n }", "public void Clean()\n\t{\n\t\tstorage.clear();\n\t}", "public static void cleanseInits() {\n delayDuration = null;\n timerFrequency = null;\n numProcessorThreads = null;\n maxProcessorTasks = null;\n }", "private void resetAll() {\n resetResources();\n resetStory();\n refresh();\n }" ]
[ "0.7319725", "0.7228497", "0.69837415", "0.6692591", "0.66829085", "0.6673341", "0.6661292", "0.6489878", "0.6451455", "0.64461637", "0.6424467", "0.6417232", "0.64118886", "0.6402454", "0.6374191", "0.63683456", "0.63533884", "0.6332395", "0.63323164", "0.6321712", "0.6312498", "0.6264974", "0.62450224", "0.6244141", "0.62409425", "0.6229429", "0.6222827", "0.6220111", "0.6193557", "0.6193447", "0.6187283", "0.6176845", "0.616029", "0.61296225", "0.61053306", "0.61028427", "0.60996985", "0.60887855", "0.60853803", "0.6065478", "0.6060337", "0.6050759", "0.60333765", "0.60278195", "0.60274", "0.6026512", "0.6026512", "0.6017663", "0.60090137", "0.5996732", "0.59962034", "0.5994758", "0.59940225", "0.5982778", "0.5978217", "0.5976535", "0.5975531", "0.59578156", "0.5957687", "0.595537", "0.59532833", "0.59487283", "0.59429747", "0.59203416", "0.5917577", "0.59170014", "0.5914408", "0.5913517", "0.5913341", "0.59063554", "0.58988947", "0.58970964", "0.58876127", "0.5877898", "0.58705896", "0.58693075", "0.5868167", "0.5863076", "0.5850093", "0.58500177", "0.58499616", "0.5847394", "0.58416486", "0.5838392", "0.5834122", "0.58331436", "0.5830203", "0.58300376", "0.58256745", "0.5823004", "0.58223367", "0.5812069", "0.5808619", "0.58021194", "0.5797871", "0.57971185", "0.57938015", "0.5791283", "0.5790142", "0.5785525" ]
0.6120056
34
on form load to fetch All records
public void tofetchAllRecords(){ setPaymentAmountPanel(false); lstPlaceOrderPendingTransction.clear(); List<RatePlaceOrder> lstRatePlaceOrder=placeOrderPendingTransctionService.toFetchAllRecordsFromDb(getCustomerId()); if(lstRatePlaceOrder.size()>0){ for (RatePlaceOrder ratePlaceOrder : lstRatePlaceOrder) { PlaceOrderPendingTransctionDataTable placeOrderPendingDT=new PlaceOrderPendingTransctionDataTable(); placeOrderPendingDT.setRateOfferedPk(ratePlaceOrder.getRatePlaceOrderId()); placeOrderPendingDT.setCustomerId(ratePlaceOrder.getCustomerId()); String custmerName=null; BigDecimal custrRef=null; String BeneName=null; String beneBankName=null; String curQtyName=null; //to Fetch Customer reference and Name custrRef=gSMPlaceOrderRateFeedService.toFetchCustomerRef(ratePlaceOrder.getCustomerId()); custmerName=generalService.getCustomerNameCustomerId(ratePlaceOrder.getCustomerId()); placeOrderPendingDT.setCustomerName(custmerName); placeOrderPendingDT.setCustomerRefNo(custrRef); placeOrderPendingDT.setCustomerRefAndName(custrRef+ "-" +custmerName); placeOrderPendingDT.setDocumentNumber(ratePlaceOrder.getDocumentNumber()); //to bene name placeOrderPendingDT.setBeneficiaryMasterId(ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId()); BeneName=gSMPlaceOrderRateFeedService.toFetchBeneficiaryName(ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId()); placeOrderPendingDT.setBeneficiaryName(BeneName); //bene bank name placeOrderPendingDT.setBeneficiaryBankId(ratePlaceOrder.getBeneficiaryBankId()); beneBankName=generalService.getBankName(ratePlaceOrder.getBeneficiaryBankId()); placeOrderPendingDT.setBeneficiaryBankName(beneBankName); placeOrderPendingDT.setRateOffered(ratePlaceOrder.getRateOffered()); placeOrderPendingDT.setTransctionAmount(ratePlaceOrder.getTransactionAmount()); placeOrderPendingDT.setCurrencyId(ratePlaceOrder.getDestinationCurrenyId()); //currency name qty code //ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId(),ratePlaceOrder.getAccountSeqquenceId().getBeneficaryAccountSeqId() /*curQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(ratePlaceOrder.getCurrencyId()); placeOrderPendingDT.setCurrencyQtyName("["+curQtyName+"]"); placeOrderPendingDT.setAmountAndQtyName(ratePlaceOrder.getTransactionAmount()+ "-" +curQtyName);*/ //remittance and service , delivery placeOrderPendingDT.setRemitServiceId(ratePlaceOrder.getServiceMasterId()); placeOrderPendingDT.setRemitRemittanceId(ratePlaceOrder.getRemittanceModeId()); placeOrderPendingDT.setRemitDeliveryId(ratePlaceOrder.getDeliveryModeId()); placeOrderPendingDT.setCreatedBy(ratePlaceOrder.getCreatedBy()); placeOrderPendingDT.setCreatedDate(ratePlaceOrder.getCreatedDate()); placeOrderPendingDT.setModifiedBy(ratePlaceOrder.getModifiedBy()); placeOrderPendingDT.setModifiedDate(ratePlaceOrder.getModifiedDate()); placeOrderPendingDT.setApprovedBy(ratePlaceOrder.getApprovedBy()); placeOrderPendingDT.setApprovedDate(ratePlaceOrder.getApprovedDate()); placeOrderPendingDT.setIsActive(ratePlaceOrder.getIsActive()); placeOrderPendingDT.setRoutingCountry(ratePlaceOrder.getRoutingCountryId()); placeOrderPendingDT.setRoutingBank(ratePlaceOrder.getRoutingBankId()); placeOrderPendingDT.setRemitDocumentNumber(ratePlaceOrder.getApplDocumentNumber()); placeOrderPendingDT.setRemitDocumentFinanceYear(ratePlaceOrder.getApplDocumentFinanceYear()); placeOrderPendingDT.setPaymentCode(ratePlaceOrder.getCollectionMode()); placeOrderPendingDT.setBeneficiaryCountryId(ratePlaceOrder.getBeneficiaryCountryId()); List<RemittanceApplication> lstRemittanceApplication= placeOrderPendingTransctionService.getTransactionDetails(ratePlaceOrder.getRatePlaceOrderId()); if(lstRemittanceApplication!=null && lstRemittanceApplication.size()>0) { BigDecimal equivalentRemitAmount= lstRemittanceApplication.get(0).getLocalNetTranxAmount(); BigDecimal equivalentCurrencyId=lstRemittanceApplication.get(0).getExCurrencyMasterByForeignCurrencyId().getCurrencyId(); BigDecimal equivalentForeignTranxAmount= lstRemittanceApplication.get(0).getForeignTranxAmount(); List<PopulateData> lstofCurrency = new ArrayList<PopulateData>(); lstofCurrency= iPlaceOnOrderCreationService.getBasedOnCountyCurrency(ratePlaceOrder.getBeneficiaryCountryId()); if(lstofCurrency!=null && lstofCurrency.size()>0) { if(lstofCurrency.get(0).getPopulateId().compareTo(ratePlaceOrder.getDestinationCurrenyId())==0) { curQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(ratePlaceOrder.getDestinationCurrenyId()); placeOrderPendingDT.setCurrencyQtyName("["+curQtyName+"]"); placeOrderPendingDT.setAmountAndQtyName(ratePlaceOrder.getTransactionAmount()+ "-" +"["+curQtyName+"]"); placeOrderPendingDT.setRemitLocalAmount(equivalentRemitAmount); }else { curQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(equivalentCurrencyId); placeOrderPendingDT.setAmountAndQtyName(equivalentForeignTranxAmount+ "-" +"["+curQtyName+"]"); placeOrderPendingDT.setRemitLocalAmount(equivalentRemitAmount); } } } lstPlaceOrderPendingTransction.add(placeOrderPendingDT); } if(lstPlaceOrderPendingTransction.size()>0) { setPaymentAmountPanel(true); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadCriteriaList() {\n DataBaseManager DBM = new DataBaseManager();\n criteriaList = DBM.loadCriteriaList(pantallaIdentificacion.this);\n }", "@Deferred\n @RequestAction\n @IgnorePostback\n public void loadData() {\n users = userRepository.findAll();\n }", "private void fetchData() {\n mFirstNameLabel = \"First name:\";\n mFirstNameValue = \"Taylor\";\n mSurnameLabel = \"Surname:\";\n mSurnameValue = \"Swift\";\n\n initFields();\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "private void loadRecords() {\r\n\t\tpanContent.updateContent();\r\n\t}", "@Override\n\t@Transactional(propagation = Propagation.SUPPORTS)\n\t@SuppressWarnings(\"unchecked\")\n\tpublic List<Form> getAll() {\n\t\treturn entityManager.createNamedQuery(\"Form.findAll\").getResultList();\n\t}", "@Override\n\tpublic List<SocialInsuranceRecord> selectAll() {\n\t\treturn dao.selectAll();\n\t}", "public void loadForm() {\n if (!selectedTipo.equals(\"accion\")) {\n this.renderPaginaForm = true;\n } else {\n this.renderPaginaForm = false;\n }\n if (selectedTipo.equals(null) || selectedTipo.equals(\"menu\")) {\n this.renderGrupoForm = false;\n } else {\n this.renderGrupoForm = true;\n }\n populateListaObjetos();\n }", "public void fristLoadPage(AnnualReportForm myForm) {\n\t\tList<AnnualReportTable> l = myAnnualReportTableDao.getAllYear();\n\t\tmyForm.setFrmAnnualList(l);\n\t\tmyForm.setFrmAllYearViewList(null);\n\n\t\tList<AnnualReportTable> c = myAnnualReportTableDao.getAllCategoryList();\n\t\tmyForm.setFrmCategoryList(c);\n\t\tSystem.out.print(\"Category_____________\" + c.size() + \"-------------\");\n\t}", "public void loadInfo(){\n list=control.getPrgList();\n refreshpsTextField(list.size());\n populatepsListView();\n }", "public CustomerListForm() {\n initComponents();\n findAllData();\n }", "private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }", "public PrintAllRecords() {\n initComponents();\n }", "public void loadAllLists(){\n }", "private void initRecords() {\r\n\t\tthis.records = recHandler.getRecords(RecordsDisplayPanel.DEFAULT_MAX_ONSCREEN);\r\n\t}", "private void loading(){\n mDbHelper = new DbHelper(getActivity());\n if(!(mDbHelper.getPlanCount() == 0)){\n plan_list.addAll(mDbHelper.getAllPlan());\n }\n refreshList();\n }", "@ModelAttribute(\"allEmployees\")\n public List<EmployeeEntity> populateEmployees() \n {\n List<EmployeeEntity> employees = manager.getAllEmployees();\n return employees;\n }", "public List<ModelObject> readAll();", "private void iniciaFrm() {\n statusLbls(false);\n statusBtnInicial();\n try {\n clientes = new Cliente_DAO().findAll();\n } catch (Exception ex) {\n Logger.getLogger(JF_CadastroCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }", "@Override\n\tpublic List<RegistrationForm> findAll(int start, int num) {\n\t\tlogger.info(\"select all registration form\");\n\t\treturn rfi.findAll(start, num);\n\t}", "List<Model> selectAll();", "@Override\n public void setRecords() {\n fields = recordNotifier.getFields();\n recordCount = recordNotifier.getRowCount();\n \n createComponents();\n \n }", "@PostConstruct\n public void load() {\n try {\n if (!JsfUti.isAjaxRequest()) {\n restriccionesLazy = new BaseLazyDataModel<>(Restricciones.class, \"codigoRestriccion\");\n restricionPredios = new BaseLazyDataModel<>(RestricionPredio.class, \"numeroTramite\");\n }\n } catch (Exception e) {\n LOG.log(Level.SEVERE, \"Init View\", e);\n }\n }", "public String loadModel() {\n\t\tgatherCriteria();\n\t\trefreshModel();\n\t\treturn listPage();\n\t}", "private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }", "List<TbCrmTask> selectAll();", "@Override\r\n\tprotected String doInit(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping) {\n\t\tManageSalaryForm myForm = (ManageSalaryForm) form;\r\n\t\tmySalaryService.firstLoadSearch(myForm);\r\n\t\treturn \"gotoCalculateAllStaff\";\r\n\t}", "private void getAll(){\n if (!LOADED_ALL) {\n Message msg_getpersons = Message.obtain(getPersonsHandlerThread.getHandler());\n msg_getpersons.what = GetPersonsHandlerThread.TASK_GET_PERSONS;\n int table1 = TABLE_ALL;\n msg_getpersons.arg1 = table1;\n Log.d(TAG, \"DbOperationsRunnable: run(): preparing message msg_getperson with following attributes:\");\n Log.d(TAG, \"DbOperationsRunnable: run(): msg_getpersons.what = \" + msg_getpersons.what);\n Log.d(TAG, \"DbOperationsRunnable: run(): msg_getpersons.arg1 = \" + msg_getpersons.arg1);\n Log.d(TAG, \"DbOperationsRunnable: run(): sending message...\");\n msg_getpersons.sendToTarget();\n while (true) {\n if (DONE_TASK_GETPERSONS) {\n DONE_TASK_GETPERSONS = false;\n break;\n }\n }\n LOADED_ALL = true;\n } else {\n persons_list.clear();\n persons_list.addAll(all_list);\n }\n }", "public void search() {\n\n lazyModel = new LazyDataModel<Pesquisa>() {\n private static final long serialVersionUID = -6541913048403958674L;\n\n @Override\n public List<Pesquisa> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {\n\n pesquisarBC.searhValidation(searchParam);\n\n int count = pesquisarBC.count(searchParam);\n lazyModel.setRowCount(count);\n\n if (count > 0) {\n if (first > count) {\n // Go to last page\n first = (count / pageSize) * pageSize;\n }\n SearchFilter parameters = new SearchFilter();\n parameters.setFirst(first);\n parameters.setPageSize(pageSize);\n List<Pesquisa> list = pesquisarBC.search(searchParam, parameters);\n\n logger.info(\"END: load\");\n return list;\n } else {\n return null;\n }\n }\n };\n\n }", "public void listAll() {\n\t\tfor (Cineplex m: records) {\n\t\t\tSystem.out.printf(\"(ID: %s) %s\\n\", m.getId(), m.getName());\n\t\t}\n\t}", "private void consultantsFieldFill(){\n ObservableList<String> userList = FXCollections.observableArrayList();\n userList.add(\"All\");\n //Query and get results\n String query = \"SELECT * FROM user\";\n QueryDB.returnQuery(query);\n ResultSet result = QueryDB.getResult();\n try {\n while (result.next()) {\n userList.add(result.getString(\"userName\"));\n }\n }\n catch (SQLException e){\n dialog(\"ERROR\",\"SQL Error\",\"Error: \"+ e.getMessage());\n }\n consultantsField.setItems(userList);\n }", "public void searchAll() {\r\n\t\tconfiguracionUoDet = new ConfiguracionUoDet();\r\n\t\tidConfiguracionUoDet = null;\r\n\t\tidBarrio = null;\r\n\t\tidCiudad = null;\r\n\t\tidCpt = null;\r\n\t\tidDpto = null;\r\n\t\tmodalidadOcupacion = null;\r\n\t\tcodigoUnidOrgDep = null;\r\n\t\tdenominacion = null;\r\n\t\tllenarListado1();\r\n\t}", "public void update(){\r\n\t\tthis.loadRecords();\r\n\t}", "public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }", "private void init() {\n dao = new ProductDAO();\n model = new DefaultTableModel();\n \n try {\n showAll();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n \n }", "@Override\r\n\tpublic void loadData() {\r\n\t\t// Get Session\r\n\r\n\t\tSession ses = HibernateUtil.getSession();\r\n\r\n\t\tQuery query = ses.createQuery(\"FROM User\");\r\n\r\n\t\tList<User> list = null;\r\n\t\tSet<PhoneNumber> phone = null;\r\n\t\tlist = query.list();\r\n\t\tfor (User u : list) {\r\n\t\t\tSystem.out.println(\"Users are \" + u);\r\n\t\t\t// Getting phones for for a particular user Id\r\n\t\t\tphone = u.getPhone();\r\n\t\t\tfor (PhoneNumber ph : phone) {\r\n\t\t\t\tSystem.out.println(\"Phones \" + ph);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "List<ClinicalData> selectAll();", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "@PostConstruct\r\n public void init() {\r\n all.addAll(allFromDB());\r\n Collections.sort(all);\r\n }", "private void loadData() {\r\n titleField.setText(existingAppointment.getTitle());\r\n descriptionField.setText(existingAppointment.getDescription());\r\n contactField.setText(existingAppointment.getContact());\r\n customerComboBox.setValue(customerList.stream()\r\n .filter(x -> x.getCustomerId() == existingAppointment.getCustomerId())\r\n .findFirst().get());\r\n typeComboBox.setValue(existingAppointment.getType());\r\n locationComboBox.setValue(existingAppointment.getLocation());\r\n startTimeComboBox.setValue(existingAppointment.getStart().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n endTimeComboBox.setValue(existingAppointment.getEnd().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n startDatePicker.setValue(existingAppointment.getStart().toLocalDate());\r\n endDatePicker.setValue(existingAppointment.getEnd().toLocalDate());\r\n }", "public find() {\n initComponents();\n loadTBL(\"select * from before_production order by date\");\n loadSupp();\n }", "public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }", "void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}", "public void loadList() {\n // Run the query.\n nodes = mDbNodeHelper.getNodeListData();\n }", "@Override\n\tpublic List<Record> getAllRecord() {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tlist = dao.findAll();\n\t\t\ttx.commit();\n\t\t} catch (RuntimeException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\n\t\treturn list;\n\t}", "@Override\n\tpublic List<Map<String, Object>> selectList(Map<String, Object> form, Boolean isPagination) throws Exception {\n\t\treturn null;\n\t}", "List<InvoiceDTO> fetchAll();", "@Override\r\n\t@Transactional\r\n\tpublic List<FmtEstado> listAll(int init, int limit){\r\n\t\ttry{\r\n\t\t\tString sql = \"select \"+FmtEstado.getColumnNames()\r\n\t\t\t\t\t + \"from FMT_ESTADO \";\r\n\t\t\t\t\t\t\r\n\t\t\tQuery query = getSession().createSQLQuery(sql)\r\n\t\t\t\t\t\t .addEntity(FmtEstado.class);\r\n\t\t\t\t\t\t \r\n\t\t\tif(limit!=0){\r\n\t\t\t\tquery.setFirstResult(init);\t\t\t\r\n\t\t\t\tquery.setMaxResults(limit);\r\n\t\t\t}\r\n\t\t\t\t\t \r\n\t\t\treturn query.list();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void loadData(){\n mTipoEmpleadoList=TipoEmpleado.getTipoEmpleadoList();\n ArrayList<String> tipoEmpleadoName=new ArrayList();\n for(TipoEmpleado tipoEmpleado: mTipoEmpleadoList)\n tipoEmpleadoName.add(tipoEmpleado.getDescripcion()); \n mFrmMantenerEmpleado.cmbEmployeeType.setModel(new DefaultComboBoxModel(tipoEmpleadoName.toArray()));\n \n \n }", "private static void buildList() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (connection == null || connection.isClosed()) \r\n\t\t\t\tconnection = DataSourceManager.getConnection();\r\n\t\t\t\r\n\t\t\tstatement = connection.prepareStatement(LOAD_ALL);\r\n\t \tresultset = statement.executeQuery();\r\n\t \t\r\n\t \tgroups = getCollectionFromResultSet(resultset);\r\n\t \tresultset.close();\r\n\t statement.close();\r\n\t\t\t\r\n\t\t} catch (ClassNotFoundException | SQLException e) {\r\n\t\t\tlog.fatal(e.toString());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t}", "private void addLoad() {\n\n\t\ttry {\n\t\t\tString company_name = company_name_txtfield.getText();\n\t\t\tString company_phone = company_phone_txtfield.getText();\n\t\t\tString pickup_name_of_place = pickup_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_street_address = pickup_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_city = pickup_city_txtfield.getText();\n\t\t\tString pickup_state = pickup_state_txtfield.getText();\n\t\t\tString pickup_zip_code = pickup_zipcode_txtfield.getText();\n\t\t\tString delivery_name_of_place = delivery_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_street_address = delivery_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_city = delivery_city_txtfield.getText();\n\t\t\tString delivery_state = delivery_state_txtfield.getText();\n\t\t\tString delivery_zip_code = delivery_zipcode_txtfield.getText();\n\t\t\tString pickup_date = Utils.getDate(pickup_date_field);// pickup_date_field.getDate().toString();\n\t\t\tString delivery_date = Utils.getDate(delivery_date_field);// delivery_date_field.getDate().toString();\n\t\t\tString driver_assigned = driver_assigned_combolist\n\t\t\t\t\t.getSelectedItem().toString();\n\t\t\tString status = status_combolist.getSelectedItem().toString();\n\t\t\tString driver_assigned_id = driver_assigned.split(\"/\")[0];\n\t\t\tString driver_assigned_name = driver_assigned.split(\"/\")[1];\n\n\t\t\tLoadBean bean = new LoadBean();\n\t\t\tbean.setCompany_name(company_name);\n\t\t\tbean.setCompany_phone(company_phone);\n\t\t\tbean.setPickup_name_of_place(pickup_name_of_place);\n\t\t\tbean.setPickup_street_address(pickup_street_address);\n\t\t\tbean.setPickup_state(pickup_state);\n\t\t\tbean.setPickup_city(pickup_city);\n\t\t\tbean.setPickup_zip_code(pickup_zip_code);\n\t\t\tbean.setPickup_date(pickup_date);\n\t\t\tbean.setDelivery_date(delivery_date);\n\t\t\tbean.setDelivery_name_of_place(delivery_name_of_place);\n\t\t\tbean.setDelivery_state(delivery_state);\n\t\t\tbean.setDelivery_street_address(delivery_street_address);\n\t\t\tbean.setDelivery_city(delivery_city);\n\t\t\tbean.setDelivery_zip_code(delivery_zip_code);\n\t\t\tbean.setDriver_assigned_id(driver_assigned_id);\n\t\t\tbean.setDriver_assigned_name(driver_assigned_name);\n\t\t\tbean.setStatus(status);\n\n\t\t\tif (DatabaseManager.getInstance() != null) {\n\t\t\t\tif (DbConnectionManager.getConnection() != null) {\n\t\t\t\t\tboolean flag = DatabaseManager.getInstance().insertLoad(\n\t\t\t\t\t\t\tDbConnectionManager.getConnection(), bean);\n\t\t\t\t\tif (flag) {\n\t\t\t\t\t\tframe.updateLoadList();\n\t\t\t\t\t\tAddLoadInformations.this.dispose();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tUtils.infoBox(\"DB Connection Error\", \"Connection Error\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public FetchingAllDataModel() {\n\n context = AppController.getInstance().getApplicationContext();\n }", "public List<JianliBean> selectAll() {\n\t\treturn jianliDao.selectAll();\r\n\t}", "@ModelAttribute\r\n\tpublic void loadDataEveryTime(Model model)\r\n\t{\r\n\t\tmodel.addAttribute(\"brands\",mobservice.getAllBrandNames());\r\n\t\tmodel.addAttribute(\"ram\",mobservice.getRamSize());\r\n\t\tmodel.addAttribute(\"rating\",mobservice.getRating());\r\n\t}", "public List<Record> listAllRecords();", "@Override\n\tpublic List<MyFoodDTO> selectAll() {\n\t\tString sql = \" SELECT * FROM view_식품정보 \";\n\t\tPreparedStatement pStr = null;\n\t\ttry {\n\t\t\tpStr = dbConn.prepareStatement(sql);\n\t\t\tList<MyFoodDTO> brList = this.select(pStr);\n\t\t\tpStr.close();\n\t\t\treturn brList;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public void updateObservers() throws Exception {\n loadAlLNameCustomer();\n loadAllCustomerss();\n \n OrderTabelAddCustomerPanel.selectAll();\n }", "public void reloadDatasources(){\n refreshDataCache();\n refreshListbox();\n \n if (this.geselecteerdeStageplaats != null)\n { \n this.geselecteerdeStageplaats = this.dbFacade.getStageplaatsByID(this.geselecteerdeStageplaats.getId());\n }\n refreshDisplayedStageplaats();\n }", "@Override\n\tpublic int getFindAllCount() {\n\t\tint num = rfi.getFindAllCount();\n\t\tlogger.info(\"select all registration form count:\" + num);\n\t\treturn num;\n\t}", "public void listAllCustomers() {\n List<Customer> list = model.findAllCustomers();\n if(list != null){\n if(list.isEmpty())\n view.showMessage(not_found_error);\n else\n view.showTable(list);\n }\n else\n view.showMessage(retrieving_data_error); \n }", "public InstitutionBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM institution\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "private void loadDataFromDBJSON() {\n loadCriteriaList();\n loadCriteriaLeft();\n Button btnNextEnable = (Button) findViewById(R.id.btnNext);\n btnNextEnable.setEnabled(true);\n }", "List<BlogDetails> selectAll();", "public List findEngEditForm() {\n\t\tString sql = \"SELECT FO_ID,FO_NAME FROM ENG_FORM_FORM where FO_FTYPE='editpage' \";\n\t\tjdbcTemplate.setDataSource(initDataSource);\n\t\treturn jdbcTemplate.queryForList(sql);\n\t}", "public SampletypeBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM sampletype\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "@Override\n\tpublic void loadData() {\n\t\tint sel = getSelected() == null ? -1 : getSelected().getWardId();\n\t\ttry {\n\t\t\tList<Ward> list = searchInput.getText().equals(\"\") ? WardData.getList()\n\t\t\t\t\t: WardData.getBySearch(searchInput.getText());\t\t\t\n\t\t\ttableData.removeAll(tableData);\n\t\t\tfor (Ward p : list) {\n\t\t\t\ttableData.add(p);\n\t\t\t}\n\t\t} catch (DBException e) {\n\t\t\tGlobal.log(e.getMessage());\n\t\t}\n\n\t\tif (sel > 0) {\n\t\t\tsetSelected(sel);\n\t\t}\n\t}", "public FindOrdersForm(boolean autoLoad) {\n super(UtilUi.MSG.crmFindOrders());\n \n // change the form dimensions to accommodate two columns\n setLabelLength(100);\n setInputLength(180);\n setFormWidth(675);\n \n orderIdInput = new TextField(UtilUi.MSG.orderOrderId(), \"orderId\", getInputLength());\n externalIdInput = new TextField(UtilUi.MSG.orderExternalId(), \"externalId\", getInputLength());\n orderNameInput = new TextField(UtilUi.MSG.orderOrderName(), \"orderName\", getInputLength());\n customerInput = new CustomerAutocomplete(UtilUi.MSG.crmCustomer(), \"partyIdSearch\", getInputLength());\n productStoreInput = new ProductStoreAutocomplete(UtilUi.MSG.orderProductStore(), \"productStoreId\", getInputLength());\n orderStatusInput = new OrderStatusAutocomplete(UtilUi.MSG.commonStatus(), \"statusId\", getInputLength());\n correspondingPoIdInput = new TextField(UtilUi.MSG.opentapsPONumber(), \"correspondingPoId\", getInputLength());\n fromDateInput = new DateField(UtilUi.MSG.commonFromDate(), \"fromDate\", getInputLength());\n thruDateInput = new DateField(UtilUi.MSG.commonThruDate(), \"thruDate\", getInputLength());\n createdByInput = new TextField(UtilUi.MSG.commonCreatedBy(), \"createdBy\", getInputLength());\n lotInput = new LotAutocomplete(UtilUi.MSG.productLotId(), \"lotId\", getInputLength());\n serialNumberInput = new TextField(UtilUi.MSG.productSerialNumber(), \"serialNumber\", getInputLength());\n productInput = new ProductAutocomplete(UtilUi.MSG.orderProduct(), \"productId\", getInputLength());\n findAllInput = new CheckboxField(UtilUi.MSG.commonFindAll(), \"findAll\");\n \n // add a listener to disable the find all option if a status is specified\n // since this option will be ignored\n orderStatusInput.addListener(new FieldListenerAdapter() {\n @Override public void onChange(Field field, Object newVal, Object oldVal) {\n if (orderStatusInput.getText() != null && !\"\".equals(orderStatusInput.getText())) {\n findAllInput.setValue(false);\n }\n }\n });\n // and vice versa if find all is selected clear the status input\n findAllInput.addListener(new FieldListenerAdapter() {\n @Override public void onChange(Field field, Object newVal, Object oldVal) {\n if (findAllInput.getValue()) {\n orderStatusInput.setValue(\"\");\n }\n }\n });\n \n // Build the filter tab\n filterPanel = getMainForm().addTab(UtilUi.MSG.crmFindOrders());\n Panel mainPanel = new Panel();\n mainPanel.setLayout(new ColumnLayout());\n \n SubFormPanel columnOnePanel = new SubFormPanel(getMainForm());\n SubFormPanel columnTwoPanel = new SubFormPanel(getMainForm());\n \n mainPanel.add(columnOnePanel, new ColumnLayoutData(.5));\n mainPanel.add(columnTwoPanel, new ColumnLayoutData(.5));\n \n columnOnePanel.addField(orderIdInput);\n columnTwoPanel.addField(externalIdInput);\n \n columnOnePanel.addField(correspondingPoIdInput);\n columnTwoPanel.addField(orderNameInput);\n \n columnOnePanel.addField(customerInput);\n columnTwoPanel.addField(productStoreInput);\n \n columnOnePanel.addField(orderStatusInput);\n columnTwoPanel.add(UtilUi.makeBlankFormCell());\n \n columnOnePanel.addField(productInput);\n columnTwoPanel.add(UtilUi.makeBlankFormCell());\n \n columnOnePanel.addField(lotInput);\n columnTwoPanel.addField(serialNumberInput);\n \n columnOnePanel.addField(fromDateInput);\n columnTwoPanel.addField(thruDateInput);\n \n columnOnePanel.addField(createdByInput);\n columnTwoPanel.add(UtilUi.makeBlankFormCell());\n \n columnOnePanel.addField(findAllInput);\n columnTwoPanel.add(UtilUi.makeBlankFormCell());\n filterPanel.add(mainPanel);\n \n shippingToNameInput = new TextField(UtilUi.MSG.partyToName(), \"toName\", getInputLength());\n shippingAttnNameInput = new TextField(UtilUi.MSG.partyAttentionName(), \"attnName\", getInputLength());\n shippingAddressInput = new TextField(UtilUi.MSG.address(), \"address\", getInputLength());\n shippingCityInput = new TextField(UtilUi.MSG.city(), \"city\", getInputLength());\n shippingPostalCodeInput = new TextField(UtilUi.MSG.postalCode(), \"postalCode\", getInputLength());\n shippingCountryInput = new CountryAutocomplete(UtilUi.MSG.country(), \"country\", getInputLength());\n shippingStateInput = new StateAutocomplete(UtilUi.MSG.stateOrProvince(), \"state\", shippingCountryInput, getInputLength());\n // Build the filter by advanced tab\n filterByAdvancedTab = getMainForm().addTab(UtilUi.MSG.findByShippingAddress());\n Panel advancedPanel = new Panel();\n advancedPanel.setLayout(new ColumnLayout());\n \n SubFormPanel columnOneAdvancedPanel = new SubFormPanel(getMainForm());\n SubFormPanel columnTwoAdvancedPanel = new SubFormPanel(getMainForm());\n \n advancedPanel.add(columnOneAdvancedPanel, new ColumnLayoutData(.5));\n advancedPanel.add(columnTwoAdvancedPanel, new ColumnLayoutData(.5));\n \n columnOneAdvancedPanel.addField(shippingToNameInput);\n columnTwoAdvancedPanel.addField(shippingAttnNameInput);\n \n columnOneAdvancedPanel.addField(shippingAddressInput);\n columnTwoAdvancedPanel.add(UtilUi.makeBlankFormCell());\n \n columnOneAdvancedPanel.addField(shippingCityInput);\n columnTwoAdvancedPanel.add(UtilUi.makeBlankFormCell());\n \n columnOneAdvancedPanel.addField(shippingCountryInput);\n columnTwoAdvancedPanel.addField(shippingStateInput);\n \n columnOneAdvancedPanel.addField(shippingPostalCodeInput);\n columnTwoAdvancedPanel.add(UtilUi.makeBlankFormCell());\n \n filterByAdvancedTab.add(advancedPanel);\n \n orderListView = new SalesOrderListView();\n orderListView.setAutoLoad(autoLoad);\n orderListView.init();\n addListView(orderListView);\n \n \n }", "List<Customer> loadAllCustomer();", "public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "private void populateAutoComplete() {\n if (!mayRequestContacts()) {\n return;\n }\n\n getLoaderManager().initLoader(0, null, this);\n }", "@Transactional(readOnly = true)\n\t@Override\n\tpublic List<RegistrationEntity> getAllForms() {\n\t\treturn dao.getAllForms();\n\t}", "@RequestMapping(\"/load\")\n public String loadList(Pager<Publisher> pager, String name, Model model) {\n\n pager.setSearch_str(name);\n List<Data_sets> dataList = data_setsService.loadData_sets(pager, null);\n\n model.addAttribute(\"dataList\", dataList);\n return \"admin/data_set/table\";\n }", "public ResultSetFunctionalities() {\n initComponents();\n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "public void getAllMartyrs() {\n\t\tDispatcher.forwardEvent(AppEvents.MARTYRS_HOMEPAGE_EVENT, JSONDataReader.loadMartyrs());\n\t}", "private void initForm() {\n DefaultListModel listModel = new DefaultListModel();\n filterList.setModel(listModel);\n Vector filters = null;\n if (transmutor instanceof Refiner) {\n filters = ((Refiner) transmutor).getPrefilters();\n } else {\n filters = ((Extractor) transmutor).getPrefilters();\n }\n Enumeration filterE = filters.elements();\n \n while (filterE.hasMoreElements()) {\n listModel.addElement(filterE.nextElement());\n }\n }", "@Override\n\tpublic void onLoadMore() {\n\t\tLog.d(\"load\", \"\");\n\t\tcurrentPage++;\n\t\tmodel.getPostsByType(userId, currentPage, method, postListiner);\n\t}", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\n\t@Override\n\t/**\n\t * Leo todos los empleados.\n\t */\n\tpublic List<Employees> readAll() {\n\t\tList<Employees> ls = null;\n\n\t\tls = ((SQLQuery) sm.obtenerSesionNueva().createQuery(\n\t\t\t\tInstruccionesSQL.CONSULTAR_TODOS)).addEntity(Employees.class)\n\t\t\t\t.list();// no creo que funcione, revisar\n\n\t\treturn ls;\n\t}", "SelectQueryBuilder selectAll();", "private void refreshTable() {\n dataPanel.getModel().setRowCount(0);\n try {\n ResultSet resultSet = reg.get();\n while (resultSet.next()) {\n dataPanel.getModel().addRow(new Object[]{\n resultSet.getInt(\"id\"),\n resultSet.getString(\"first_name\"),\n resultSet.getString(\"last_name\"),\n resultSet.getString(\"username\"),\n resultSet.getString(\"password\"),\n resultSet.getInt(\"age\"),\n resultSet.getString(\"gender\"),\n });\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "List<Report> selectAll();", "private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}", "@Override\n\t@Transactional\n\tpublic List<T> getAll() {\n\t\tList<?> result = hibernateTemplate.getSessionFactory().getCurrentSession()\n\t\t\t\t.createCriteria(getGenericClass())\n\t\t\t\t.list();\n\t\treturn result.stream()\n\t\t\t\t.map(e -> initialize(checkType(e)))\n\t\t\t\t.filter(e -> e != null)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "public void reload() {\r\n\t\tif(!this.isVisible()){\r\n\t\t\tthis.list.show(new Vector<Record>());\r\n\t\t\tpanForm.clear();\r\n\t\t}else{\r\n\t\t\tthis.list.show(new Vector<Record>());\r\n\t\t\tperformSearch();\r\n\t\t}\r\n\t\tpanForm.reload();\r\n\t}", "@Override\n protected void initData()\n {\n super.initData();\n\n entityProps = getFormSession().getAssemblingMessageEntityProperties();\n\n refreshDataTable(entityProps);\n }", "List<Userinfo> selectAll();", "private void loadEntryList() {\n EntryAdapter adapter = new EntryAdapter(MainActivity.this, db.selectAll());\n listView.setAdapter(adapter);\n }", "private synchronized void loadDrug() {\n\n LoadArrayList();\n if(searchquery.equals(\"all\")){\n result = drugModels;\n }else {\n result = new ArrayList<>();\n for (int i = 0; i < drugModels.size(); i++) {\n if (drugModels.get(i).getName().toLowerCase().contains(searchquery.toLowerCase())) {\n result.add(drugModels.get(i));\n }\n }\n }\n\n\n\n\n if(result==null || result.size()==0){\n tvNoDrug.setVisibility(View.VISIBLE);\n\n }else {\n pasteToRecyclerView();\n }\n\n progressBar.setVisibility(View.GONE);\n }", "List<User> loadAll();", "@Override\n\tpublic List<Map<String, Object>> readAll() {\n\t\treturn rolDao.readAll();\n\t}", "public Prisoner_details() {\n initComponents();\n fetch();\n }", "@FXML\r\n\tprivate void initialize() throws SQLException {\r\n\t\tGetUserID();\r\n\t\tregUsernameField.setText(\"\");\r\n\t\tregFirstNameField.setText(\"\");\r\n\t\tregLastNameField.setText(\"\");\r\n\t\tregPhoneField.setText(\"\");\r\n\t\tregAddressField.setText(\"\");\r\n\t\tregEmailField.setText(\"\");\r\n\t\tregPassField.setText(\"\");\r\n\t\tregConfField.setText(\"\");\r\n\t\tshowList();\r\n\t}", "private void loadForm() {\n CodingProxy icd9 = problem.getIcd9Code();\n \n if (icd9 != null) {\n txtICD.setText(icd9.getProxiedObject().getCode());\n }\n \n String narr = problem.getProviderNarrative();\n \n if (narr == null) {\n narr = icd9 == null ? \"\" : icd9.getProxiedObject().getDisplay();\n }\n \n String probId = problem.getNumberCode();\n \n if (probId == null || probId.isEmpty()) {\n probId = getBroker().callRPC(\"BGOPROB NEXTID\", PatientContext.getActivePatient().getIdElement().getIdPart());\n }\n \n String pcs[] = probId.split(\"\\\\-\", 2);\n lblPrefix.setValue(pcs[0] + \" - \");\n txtID.setValue(pcs.length < 2 ? \"\" : pcs[1]);\n txtNarrative.setText(narr);\n datOnset.setValue(problem.getOnsetDate());\n \n if (\"P\".equals(problem.getProblemClass())) {\n radPersonal.setSelected(true);\n } else if (\"F\".equals(problem.getProblemClass())) {\n radFamily.setSelected(true);\n } else if (\"I\".equals(problem.getStatus())) {\n radInactive.setSelected(true);\n } else {\n radActive.setSelected(true);\n }\n \n int priority = NumberUtils.toInt(problem.getPriority());\n cboPriority.setSelectedIndex(priority < 0 || priority > 5 ? 0 : priority);\n loadNotes();\n }", "private void showAll() {\n getAll();\n //show persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "@Override\n\tpublic void loadData(){\n\t\tsuper.loadData();\n\t\topenProgressDialog();\n\t\tBmobQuery<Goods> query = new BmobQuery<Goods>();\n\t\tpageSize = 5;\n\t\tquery.setLimit(pageSize);\n\t\tquery.setSkip((pageNum - 1) * pageSize);\n\t\tif(point == 1){\n\t\t\tquery.addWhereEqualTo(\"type\", type);\n\t\t}else if(point == 2){\n\t\t\tquery.addWhereEqualTo(\"tradeName\", type);\n\t\t}\n\t\tquery.findObjects(this, new FindListener<Goods>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<Goods> object){\n\t\t\t\t// TODO Auto-generated method st\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tonRefreshComplete();\n\t\t\t\tlist.addAll(object);\n\t\t\t\tLog.v(\"AAA\", JSON.toJSONString(list));\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(int code,String msg){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(mContext, \"查询失败\", Toast.LENGTH_SHORT).show();\n\t\t\t\tcloseProgressDialog();\n\t\t\t}\n\t\t});\n\n\t}", "public void initializeAll() {\n getConsole_inclusionFactor().getSelectionModel().selectFirst();\n getConsole_sortingDirection().getSelectionModel().selectFirst();\n getConsole_firstSortingFactor().getSelectionModel().selectFirst();\n getConsole_secondSortingFactor().getSelectionModel().selectFirst();\n getAction_inclusionFactor().getSelectionModel().selectFirst();\n getAction_sortingDirection().getSelectionModel().selectFirst();\n getAction_firstSortingFactor().getSelectionModel().selectFirst();\n getAction_secondSortingFactor().getSelectionModel().selectFirst();\n getAction_Status().getSelectionModel().selectFirst();\n getAction_Member().getSelectionModel().selectFirst();\n getAction_Team().getSelectionModel().selectFirst();\n \n }", "private void getDataFromDb() {\n viewModel.getCachedResults().observe(getViewLifecycleOwner(), searchResults -> {\n// Log.d(TAG, \"queryMusic: \" + new GsonBuilder().create().toJson(searchResults));\n\n //Checks if results is empty, will show the empty message if it do else, clears the list and adds the new one\n if (searchResults.isEmpty()) {\n resultsRv.setVisibility(View.GONE);\n progressBar.setVisibility(View.GONE);\n resultText.setVisibility(View.VISIBLE);\n } else {\n resultsRv.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n resultText.setVisibility(View.GONE);\n mSearchResultList.clear();\n mSearchResultList.addAll(searchResults);\n resultsListAdapter.setData(mSearchResultList);\n// Log.d(TAG, \"setData: mSearchResultList: \"+ new GsonBuilder().create().toJson(mSearchResultList));\n }\n });\n }" ]
[ "0.6359602", "0.6330869", "0.62587446", "0.62242544", "0.6183135", "0.61343896", "0.6105451", "0.60605216", "0.6054701", "0.6018605", "0.60078305", "0.60060513", "0.598722", "0.5945865", "0.5902331", "0.58761895", "0.5865024", "0.5835511", "0.57938164", "0.5790422", "0.5783132", "0.57788247", "0.57746124", "0.5764781", "0.5760614", "0.57571536", "0.57062334", "0.56986475", "0.56884694", "0.5678482", "0.5671609", "0.5669624", "0.5660602", "0.56370246", "0.5631719", "0.56190544", "0.56030107", "0.559106", "0.557926", "0.556953", "0.5567152", "0.5558955", "0.55584496", "0.5554554", "0.55455744", "0.5541575", "0.5533089", "0.5525537", "0.5518693", "0.55180293", "0.5516534", "0.5512512", "0.5508053", "0.5497604", "0.5493891", "0.5490158", "0.5486166", "0.5485281", "0.5483599", "0.5481881", "0.54813224", "0.54773986", "0.54767615", "0.5476702", "0.547654", "0.54610956", "0.5457071", "0.5451205", "0.5449394", "0.5446226", "0.5445965", "0.54440916", "0.54246604", "0.5424274", "0.5423481", "0.5423099", "0.54106134", "0.54063976", "0.5406215", "0.5404975", "0.54015076", "0.53997785", "0.5389711", "0.5389435", "0.5387456", "0.5387098", "0.53854084", "0.538468", "0.5382867", "0.53798807", "0.5379388", "0.5367927", "0.5366343", "0.5364829", "0.536287", "0.5357991", "0.53579605", "0.5357253", "0.5354599", "0.5349098" ]
0.55427545
45
to get the local bank list or customer bank list
public void getLocalBankListforIndicator() { List<BigDecimal> duplicateCheck = new ArrayList<BigDecimal>(); List<BigDecimal> duplicateCheck1 = new ArrayList<BigDecimal>(); List<ViewBankDetails> lstofBank = new ArrayList<ViewBankDetails>(); List<ViewBankDetails> lstofBank1 = new ArrayList<ViewBankDetails>(); bankMasterList.clear(); chequebankMasterList.clear(); setRemitBankId(null); setCardBankId(null); clearKnetDetails(); localbankList = generalService.getLocalBankListFromView(session.getCountryId()); // cheque banks purpose if(localbankList.size() != 0){ chequebankMasterList.addAll(localbankList); } List<ViewBankDetails> localBankListinCollection = icustomerBankService.customerBanks(getCustomerId(), getColBankCode()); if (localBankListinCollection.size() > 0) { bankMasterList.addAll(localBankListinCollection); } else { bankMasterList.addAll(localbankList); } if (bankMasterList.size() != 0) { for (ViewBankDetails lstBank : bankMasterList) { if (!duplicateCheck.contains(lstBank.getChequeBankId())) { duplicateCheck.add(lstBank.getChequeBankId()); lstofBank.add(lstBank); } } } bankMasterList.clear(); bankMasterList.addAll(lstofBank); if (chequebankMasterList.size() != 0) { for (ViewBankDetails lstBank : chequebankMasterList) { if (!duplicateCheck1.contains(lstBank.getChequeBankId())) { duplicateCheck1.add(lstBank.getChequeBankId()); lstofBank1.add(lstBank); } } } chequebankMasterList.clear(); chequebankMasterList.addAll(lstofBank1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Branch> getBranchListForBank(String name);", "Databank getBank();", "@RequestMapping(value = \"/viewAllBank\", method = RequestMethod.GET)\n\tpublic List<Bank> viewAllBank() {\n\t\tAtmDAO ad = new AtmDAO();\n\t\tList<Bank> listBank = ad.getAllBank();\n\t\treturn listBank;\n\t}", "@Override\r\n\tpublic ArrayList<BankAccountVO> getBankAccountVOList() {\n\t\tArrayList<BankAccountVO> BankAccountList = new ArrayList<>();\r\n\t\tBankAccountList.add(new BankAccountVO(\"SS141250110\",200000));\r\n\t\treturn BankAccountList;\r\n\t}", "public List<Bank> findAllBanks() {\n return em.createNamedQuery(\"Bank.findAll\").getResultList();\n\n }", "List<Client> getAllClients(Bank bankId);", "public String getBank() {\r\n return bank;\r\n }", "public String getBank() {\r\n return bank;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Bank [customerList=\" + customerList + \", employeeList=\" + employeeList + \", adminList=\" + adminList\n\t\t\t\t+ \"]\";\n\t}", "@Override\r\n\tpublic List<SbiBank> DisplayingRecord() {\n\t\tTransaction tx=null;\r\n\t\tSession ses=HBNutility.getSession();\r\n\t\ttx=ses.beginTransaction();\r\n\t\tCriteria ct=ses.createCriteria(SbiBank.class);\r\n\t\tList<SbiBank> sb=ct.list();\r\n\t\treturn sb;\r\n\t}", "public String getBank() {\n return bank;\n }", "Object getBcclist();", "@Override\n\tpublic List<Map> getBankInfoList(Map<String, Object> params) {\n\t\treturn tBankInfoMapper.getBankInfoList(params);\n\t}", "@Override\n\tpublic List<BankCategory> getBankCategoryList() throws Exception {\n\t\tString sql = \" SELECT bank_category_id , bank_name , bank_cate FROM bank_category WHERE 1 = 1 \";\n\t\tList<BankCategory> list = this.getList(sql, new Object[]{}, BankCategory.class);\n\t\treturn list;\n\t}", "@Override\r\n\tpublic ArrayList<BankAccountPO> findBankAccountPOList() {\n\t\tArrayList<BankAccountPO> BankAccountList = new ArrayList<>();\r\n\t\tBankAccountList.add(new BankAccountPO(\"SS141250110\",200000));\r\n\t\treturn BankAccountList;\r\n\t}", "private void listBalances() {\n\t\t\r\n\t}", "String getAccountList(int accountId);", "public List<Bank> findAll() {\n return em.createQuery(\"SELECT b FROM Bank b\").getResultList();\n }", "public java.lang.String getBankaccount() {\r\n return localBankaccount;\r\n }", "public ClanBank getClanBank() {\n return clanBank;\n }", "IBank getBankFromName(String bankName) throws RemoteException;", "java.lang.String getBankName();", "IBank getBank(int rekeningNr) throws RemoteException;", "public String getBankAccountType();", "public String getBank() {\n\t\tthis.setBank(this.bank);\n\t\treturn this.bank;\n\t}", "public static Bank getBank() {\n return Bank;\n }", "public List<Bank> getBankList(String name, String location) {\n\n return em.createQuery(getCriteriaQuery(name, location)).getResultList();\n }", "public Bank getBank() {\r\n return bank;\r\n }", "@Override\n\tpublic List<TBankInfo> selectAllBnkInfo() {\n\t\treturn tBankInfoMapper.selectAllBnkInfo();\n\t}", "private static String[] getBank(String addr) {\r\n\t\tint tail = Integer.valueOf(addr.substring(addr.length()-2, addr.length()), 2);\r\n\t\t\r\n\t\tswitch (tail) {\r\n\t\t\tcase 0:\r\n\t\t\t\treturn bank0;\r\n\t\t\tcase 1: \r\n\t\t\t\treturn bank1;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn bank2;\r\n\t\t\tdefault:\r\n\t\t\t\treturn bank3;\r\n\t\t}\r\n\t}", "public String getSubBank() {\r\n return subBank;\r\n }", "public List<Brands> LoadAllBrands() {\n Brands brands = null;\n List<Brands> brandsList = new ArrayList<>();\n try {\n Connection connection = DBConnection.getConnectionToDatabase();\n // String sql = \"SELECT * FROM `humusam_root`.`Users` WHERE UserEmail=\" + email;\n String sql = \"SELECT * FROM `brands`\";\n Statement statment = connection.createStatement();\n ResultSet set = statment.executeQuery(sql);\n ListBrands(brandsList, set);\n } catch (SQLException exception) {\n System.out.println(\"sqlException in Application in LoadAllBrands Section : \" + exception);\n exception.printStackTrace();\n }\n\n return brandsList;\n }", "public List <Account> getAllAccountsByRIB(String RIB);", "public java.lang.String getBankNo() {\r\n return localBankNo;\r\n }", "public java.lang.String getBankNo() {\r\n return localBankNo;\r\n }", "java.lang.String getBankNo();", "public com.redknee.util.crmapi.soap.subscriptions.xsd._2009._04.SubscriptionBundleBalance[] getBalances(){\n return localBalances;\n }", "@Override\n public List<BloodBank> getAllBloodBank() throws SQLException {\n logger.info(\"in the List<BloodBank> getAllBloodBank() method in \"+BloodBankSvcJDBCImpl.class.getName());\n List<BloodBank> displayList = new ArrayList();\n try\n {\n logger.warn(\"in try, may cause errors\");\n this.connectToDatabase();\n \n Statement stmt = this.getConnection().createStatement();\n //sql query\n String selectSql = \"SELECT * FROM `blood_bank`;\"\n + \"SELECT * FROM `blood_bank_address`;\";\n //set join string here\n ResultSet rs = stmt.executeQuery(selectSql);\n \n boolean result = rs.next();\n \n if(result == false)\n {\n logger.warn(\"NO results found!!\");\n System.out.println(\"Empty!!\\n\");\n }\n else\n {\n while(rs.next())\n {\n BloodBank bloodBank = new BloodBank();\n \n bloodBank.setId(rs.getString(\"idblood_bank\"));\n bloodBank.setName(rs.getString(\"name\"));\n bloodBank.setNumber(rs.getString(\"phone\"));\n //bloodBank.getBloodBankAddress().setAddressId(rs.getString(\"address_id\"));\n \n displayList.add(bloodBank);\n }\n System.out.println(\"Success!!!\");\n //return displayList;\n }\n }\n catch(SQLException ex)\n {\n logger.error(\"JDBC List all error\"+ex.toString()+\" in->\"+BloodBankSvcJDBCImpl.class.getName());\n System.out.println(\"Error: \" + ex.toString() + \" could not retreive list\");\n }\n finally{\n close();\n }\n return displayList;\n }", "shared.data.Bank getBank();", "public boolean collectAccountInfo(IBankAPI bankAPI){\n\t}", "public String getList_Base();", "public DataBank getDataBank() {\n return dataBank;\n }", "@Override\n public List<Bank> find(String name) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public List<BusinessAccount> searchAllContractors() {\n\t\tfactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);\n\t\tEntityManager em = factory.createEntityManager();\t\n\t\n\t\t\tem.getTransaction().begin();\n\t\t\tQuery myQuery = em.createQuery(\"SELECT b FROM BusinessAccount b\");\n\t\t\tcontractorList=myQuery.getResultList();\n\t\t em.getTransaction().commit();\n\t\t em.close();\n\t\t\t\n\t\t\treturn contractorList;\n\t\t}", "List<TransactionRec> loadRecordsByAccount(BankAccount account);", "public Map<Integer, BankClient> getBankDatabase() {\n return bankDatabase;\n }", "List<Customer> getCustomerList();", "public ArrayList<Institution> getFinalBank() {\n\t\treturn Bank;\n\t}", "@Override\r\n\tpublic List getAccountList() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic ArrayList<BankAccountVO> getBankAccountVOListByKey(String key) {\n\t\tif(key.equals(\"ss\")){\r\n\t\t\tArrayList<BankAccountVO> BAVOList = new ArrayList<>();\r\n\t\t\tBAVOList.add(new BankAccountVO(\"ss141250110\",20000));\r\n\t\t\treturn BAVOList;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public ArrayList getAccountList() throws RemoteException, SQLException, Exception;", "public String getBankName() {\n return bankName;\n }", "List<Account> getAccounts(String login);", "@Override\n public List<BloodBank> findAll() {\n return findResults( \"BloodBank.findAll\", null );\n }", "public String getBankCode() {\r\n return bankCode;\r\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.BranchOfficeList getBranchOfficeList();", "private void getWalkinList(){\n sendPacket(CustomerTableAccess.getConnection().getWalkinList());\n \n }", "public List<CountryMasterDesc> getCountryListFromDB() {\n\t\t sessionStateManage = new SessionStateManage(); \n\t\tcountryList = new ArrayList<CountryMasterDesc>();\n\t\tcountryList.addAll( getGeneralService().getCountryList(new BigDecimal(sessionStateManage.isExists(\"languageId\")?sessionStateManage.getSessionValue(\"languageId\"):\"1\")));\n\t\tfor(CountryMasterDesc countryMasterDesc:countryList) {\n\t\t\tmapCountryList.put(countryMasterDesc.getFsCountryMaster().getCountryId(), countryMasterDesc.getCountryName());\n\t\t}\n \t\treturn countryList;\n\t}", "public int getRequestableBank() \n {\n return -1; \n }", "List selectByExample(CusBankAccountExample example);", "public String getSupAcctBank() {\n return supAcctBank;\n }", "public List<BankAccount> getAllByClient(Client client){\n\t\treturn this.getRepo().getAllByClient(client);\n\t}", "List<Customer> getList();", "public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\t public List<Country> listCountry(){\n\t Session session = factory.openSession();\n\t Transaction tx = null;\n\t List<Country> countries = null;\n\t \n\t tx = session.beginTransaction();\n\t Query query = session.createQuery(\"FROM Country\");\n\t //countries = (List<Country>)session.createQuery(\"FROM Country\");\n\t countries = (List<Country>)query.list();\n\t \n\t System.out.print(\"Currency: \" );\n\t \n\t tx.commit();\n\t return countries;\n\t }", "@GetMapping( value = \"/bank\",produces = MediaType.APPLICATION_JSON_VALUE)\n public List<BankAccount> getBankAccount() throws ExecutionException, InterruptedException {\n CompletableFuture<List<BankAccount>> bankAccount = walletBankService.getBankAccount();\n CompletableFuture.allOf(bankAccount).join();\n List<BankAccount> bankAccounts = bankAccount.get();\n return bankAccounts;\n }", "public List<bill> selectBill() {\n\t\treturn this.b.selectBill();\n\t}", "public byte[] requestBankDump(int bank) \n {\n return null; \n }", "public void listAllCustomers () {\r\n\t\t\r\n customersList = my.resturnCustomers();\r\n\t\t\r\n\t}", "public int[] getBanks(byte[] bankSysex) \n {\n return super.getBanks(bankSysex); \n }", "public static String getFullCurrentBill(String account){\n return \"select * from current_bills where cb_account = '\"+account+\"'\";\n }", "private static void assignBankAccounts() {\n\t\tfor (Customer customer : customerList) {\n\t\t\t//make sure customer has no current accounts before adding serialized accounts\n\t\t\tcustomer.clearAccounts();\n\t\t\t\n\t\t\tfor (BankAccount account : accountList) {\n\t\t\t\tif (account.getCustomer().getUsername().equals(customer.getUsername())) {\n\t\t\t\t\tcustomer.addAccount(account);\n\t\t\t\t} else if (account.getJointCustomer() != null\n\t\t\t\t\t\t&& account.getJointCustomer().getUsername().equals(customer.getUsername()))\n\t\t\t\t\tcustomer.addAccount(account);\n\t\t\t}\n\t\t}\n\t}", "public List<Branch> getBranchs()\r\n\t{\t\r\n\t\tif (branchs.size() == 0)\r\n\t\t{\r\n\t\t\t//Lacos abertos carga x terra (redes radiais)\r\n\t\t\tbranchs.addAll(findBranchs());\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn branchs; \r\n\t}", "@Transactional(readOnly = true)\n public List<DropdownDTO> getBranchCodeList(Integer status) {\n sqlQuery = properties.getProperty(\"CommonDao.getBranchCodeList\");\n Query hQuery = hibernateQuery(sqlQuery, DropdownDTO.class)\n .setParameter(\"status\", status);\n return (List<DropdownDTO>) hQuery.list();\n }", "@Override\n public List<Programador> list() {\n return memoryDataBank;//To change body of generated methods, choose Tools | Templates.\n }", "public List<BillingRecord> list() {\n\t\tList<BillingRecord> billingRecords = new ArrayList<BillingRecord>();\n\t\tbillingRecords = billingRecordRepo.findAll();\n\t\treturn billingRecords;\n\t}", "@RequestMapping(value=\"creditLedgerAccountHead\" , method={RequestMethod.GET})\n\tpublic List<DropDownModel> creditLedgerAccountHead() {\n\t\tlogger.info(\"Method : creditLedgerAccountHead starts\");\n\n\t\tlogger.info(\"Method : creditLedgerAccountHead ends\");\n\t\treturn creditLedgerDao.creditLedgerAccountHead();\n\t}", "public String list(){\n\t\tif(name == null) {\n\t\t\ttry {\n\t\t\t\tlist = customerBO.getAll();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tList<Customer> l = new ArrayList<Customer>();\n\t\t\ttry {\n\t\t\t\tl = customerBO.getAll();\n\t\t\t\tfor(Customer cus: l) {\n\t\t\t\t\tString CustomerName = cus.getFirstName() + \" \" + cus.getLastName();\n\t\t\t\t\tif(CustomerName.compareTo(name) == 0) {\n\t\t\t\t\t\tlist.add(cus);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint total = list.size();\n\t\t\t\tint div = total / STATIC_ROW_MAX;\n\t\t\t\tif(div * STATIC_ROW_MAX == total) {\n\t\t\t\t\ttotalPage = div;\n\t\t\t\t} else {\n\t\t\t\t\ttotalPage = div + 1;\n\t\t\t\t}\t\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\n\t\treturn \"list\";\n\t}", "private void getGiveBackBillList() {\n User user = DataFunctionUtil.findFirstUserByName(HuIZhanApplication.getLName(mContext));\n Service.stringGet(this, Const.URL_DOWNLOAD_GIVBACK + user.getStorageID(), new DownloadGiveBackBillCallBack(\"正在下载出库单...\", mHandler, this), 104);\n\n }", "List<AccountTypeDTO> lookupAccountTypes();", "List<WayBill> getAllWayBill();", "public static List<Boekhouding.Bank> oldBankinstellingToNewBank() {\r\n List<Boekhouding.Bank> newBanken = new ArrayList();\r\n List<Old.Boekhouding.Bankinstelling> bankInstellingen = Import.getBankinstellingen().stream().map(b -> (Old.Boekhouding.Bankinstelling) b).collect(Collectors.toList());\r\n\r\n bankInstellingen.forEach(b -> {\r\n newBanken.add(new Bank(b.getId_bank(), b.getNaam(), b.getBankcode()));\r\n });\r\n return newBanken;\r\n }", "public List<MicroFinanceModel> getMicroFinance() {\n List<MicroFinanceModel> microFinanceList = new ArrayList<MicroFinanceModel>();\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.query(TABLE_BANKS, new String[]{\n KEY_MICRO_FINANCE_ID, KEY_MICRO_FINANCE_OBJECT_ID, KEY_MICRO_FINANCE_NAME, KEY_MICRO_FINANCE_IMAGE, KEY_MICRO_FINANCE_ADDRESS, KEY_MICRO_FINANCE_STATUS, KEY_MICRO_FINANCE_SUMMARY\n }, null, null, null, null, null);\n try {\n if (cursor.moveToFirst()) {\n do {\n MicroFinanceModel microFinanceDetails = new MicroFinanceModel();\n microFinanceDetails.setMicroFinanceObjectId(cursor.getString(1));\n microFinanceDetails.setMicroFinanceName(cursor.getString(2));\n microFinanceDetails.setMicroFinanceImage(cursor.getString(3));\n microFinanceDetails.setMicroFinanceAddress(cursor.getString(4));\n microFinanceDetails.setMicroFinanceStatus(cursor.getString(5));\n microFinanceDetails.setMicroFinanceSummary(cursor.getString(6));\n microFinanceList.add(microFinanceDetails);\n } while (cursor.moveToNext());\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error Retrieving Banks\");\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n return microFinanceList;\n\n }", "List<Country> listCountries();", "BankTellers getBankTeller(String userName);", "public List<Bill> findAllBill() {\n\treturn iBillRespository.findAll();\n}", "public ArrayList<BankAccount> getAccounts() {\n return accounts;\n }", "public List<Loan> getLoan();", "public int getBankAccount() {\n return bankAccount;\n }", "public String list(){\n\t\tlist = connC.getAll();\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\t\treturn \"list\";\n\t}", "@Override\n public List<Account> listAccounts() {\n currentCustomer.findAndUpdateAccounts();\n // return list of accounts the customer owns\n return currentCustomer.getAccounts();\n }", "@Override\n\tpublic AccountBean[] list() {\n\t\treturn null;\n\t}", "@Override\n\tpublic ArrayList<InBillsPO> getBill(String division) {\n\t\t\n\t\treturn null;\n\t}", "public List<DietaBalanceada> consultar_dietaBalanceada();", "BankAccountDTO getCustomerBankAccountDetails(Long slNo);", "@GetMapping(\"/banking.herokuapp.com/banks/bankbranches/{bankname}/{city}\")\r\n\t@ResponseBody\r\n\tpublic ResponseEntity<List<Banks>> getByBankname(@PathVariable String bankname, @PathVariable String city){\r\n\t\tList<Banks> bank;\r\n\t\tList<Banks> banks = new ArrayList<Banks>();\r\n\t\ttry {\r\n\t\t\tbank = banksDAO.findByBanknameAndCity(bankname,city);\r\n\t\t\tfor (Banks e : bank) {\r\n\t\t\t\tbanks.add(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception ex)\r\n\t\t{\r\n\t\t\tResponseEntity.notFound().build();\r\n\t\t}\r\n\t\treturn ResponseEntity.ok().body(banks);\r\n\t}", "public static List<String> getMidfielderFromBrazil() throws URISyntaxException, IOException {\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/66\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n Team66Pojo team66Pojo =objectMapper.readValue(response.getEntity().getContent(),Team66Pojo.class);\n List<Squad> squad = team66Pojo.getSquad();\n List<String> midFielderName= new ArrayList<>();\n for (int i = 0; i <squad.size() ; i++) {\n try {\n if(squad.get(i).getPosition().equals(\"Midfielder\")&&squad.get(i).getNationality().equals(\"Brazil\")){\n\n midFielderName.add(squad.get(i).getName());\n }\n }catch (NullPointerException e){\n continue;\n }\n\n }\n return midFielderName;\n }", "@Override\n\tpublic List<AfterBrandGclass> findAfterBrandList() {\n\t\tString sql=\" select brand_id brandId,brand_name_s brandName from tb_brand where is_display=0\";\n\t\treturn this.queryList(sql, new Object[]{}, new BeanPropertyRowMapper(AfterBrandGclass.class));\n\t}", "public static ArrayList<Table> listBan(int idKhuVuc){\n ArrayList<Table> listban = null;\n SVConnect connect = new SVConnect();\n String url = SVConnect.urlAPI + \"area/\" + idKhuVuc;\n try {\n String result = connect.sendGet(url);\n System.out.println(result);\n Gson gson = new Gson();\n listban = gson.fromJson(result, new TypeToken<ArrayList<Table>>(){}.getType());\n System.out.println(listban.toString());\n return listban;\n } catch (Exception ex) {\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null; \n }", "public List getFiBcoinPayconfigs(FiBcoinPayconfig fiBcoinPayconfig);" ]
[ "0.73088837", "0.7199256", "0.69677013", "0.6834443", "0.6688672", "0.66554004", "0.6540885", "0.6540885", "0.65120447", "0.6488619", "0.6485507", "0.6452043", "0.63935864", "0.6364416", "0.6363527", "0.63444746", "0.63244617", "0.62811047", "0.6280373", "0.62682354", "0.6216764", "0.62041354", "0.6202935", "0.6176541", "0.61762553", "0.6168092", "0.6164593", "0.6130747", "0.6101628", "0.60154384", "0.6009061", "0.59813064", "0.5976861", "0.5949651", "0.5949651", "0.5946886", "0.5936273", "0.59008974", "0.58946294", "0.5883325", "0.5848009", "0.58476007", "0.584702", "0.58466077", "0.5843552", "0.5830408", "0.5820648", "0.5819405", "0.5806265", "0.57899946", "0.5784688", "0.57842046", "0.57665354", "0.5751994", "0.5737375", "0.5731642", "0.5719849", "0.57100224", "0.5707674", "0.5705111", "0.5703841", "0.5703393", "0.5670504", "0.56684524", "0.56672174", "0.5664056", "0.5662976", "0.56605077", "0.5659928", "0.5641647", "0.5640173", "0.56351537", "0.5629576", "0.562756", "0.56274164", "0.5623926", "0.5602804", "0.5592592", "0.559189", "0.558262", "0.55806166", "0.5571446", "0.5571025", "0.55703986", "0.5568609", "0.55623925", "0.5561635", "0.5558401", "0.55575264", "0.55543536", "0.55490166", "0.55457044", "0.5539509", "0.5538197", "0.55323994", "0.552098", "0.5517025", "0.5515474", "0.55124795", "0.55041665" ]
0.7233235
1
ajax event changes changes
public void changeBanksForPayment(){ getLocalBankListforIndicator(); setPaymentmodeId(null); if(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase("B")) { setBooChequePanel(true); setBooCardPanel(false); setRemitamount(null); BigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode()); setPaymentmodeId(PaymentId); //clearKnetDetails(); }else { setBooChequePanel(false); setBooCardPanel(true); setRemitamount(null); BigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode()); setPaymentmodeId(PaymentId); } setBooRenderSaveOrExit(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void eventChanged();", "@Override\n protected void onUpdate(AjaxRequestTarget target) {\n }", "protected abstract void onEvent(final AjaxRequestTarget target);", "public void ajaxListener() {\n System.out.println(\"!ttttt \" );\n }", "@Override\n public void eventsChanged() {\n }", "public void changedUpdate(DocumentEvent event) {\n\t\t\t}", "@Override\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\n\t\t}", "public void changedUpdate(DocumentEvent e) {\n\n\t}", "public void stateChanged( ChangeEvent event )\n {\n \n }", "@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t}", "public void stateChanged (ChangeEvent e)\n {\n }", "@Override\r\n public void changedUpdate(DocumentEvent e)\r\n {\n }", "@Override\n\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}", "@Override\n\tpublic void changedUpdate(DocumentEvent e)\n\t{\n\t\t\n\t}", "public void changedUpdate(DocumentEvent e)\n {\n performFlags();\n }", "@Override\n\tpublic void changedUpdate(DocumentEvent de) {\n\n\t}", "public void handleChange(AjaxBehaviorEvent event) {\n logger.info(\"Entro al evento...\");\n if (perfilSeleccionado.compareTo(TipoPerfilEnum.SUPLENTE.getId()) == 0) {\n UserProfileDTO userProfileDTO = (UserProfileDTO) session.getAttribute(\"userProfile\");\n EmpleadoDTO empleadoDTO;\n try {\n empleadoDTO = getEmpleadoService().getEmpleadoCompleto(userProfileDTO.getRfc());\n if (empleadoDTO != null) {\n suplentes = fecetSuplenciaService.obtenerSuplentesPorSuplente(empleadoDTO.getIdEmpleado());\n } else {\n FacesUtil.addErrorMessage(null, \"No existen el firmante seleccionado\");\n }\n\n } catch (EmpleadoServiceException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Suplentes: \" + suplentes.size());\n if (suplentes.isEmpty()) {\n FacesUtil.addErrorMessage(null, \"No existen suplentes para el firmante\");\n perfilSeleccionado = BigDecimal.ZERO.intValue();\n } else {\n mostrarRfc = true;\n }\n } else {\n mostrarRfc = false;\n }\n }", "public void stateChanged(ChangeEvent e) {\n }", "@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}", "@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "@Override\r\n public void stateChanged(ChangeEvent e) {\n }", "public void companyidChange(AjaxBehaviorEvent ev) {\n\t\tLOG.info(\"[companyidChange] ev = {}\", ev);\n\t\tcompanyidChange();\n\t}", "public void changed(ProgressEvent event) {\n\t\t\t}", "public void dataUpdateEvent();", "@Override\r\n\t\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\t\tcheckID();\r\n\t\t\t\t\t}", "void onDataChanged();", "public void stateChanged(ChangeEvent e) {\n isChanged = true;\n refreshComponents();\n }", "void changed(DiscoveryEvent e);", "@Override\n public void changedUpdate(DocumentEvent e) {\n verifierSaisie();\n }", "public void dataChanged(DataChangeEvent e) {\n\t\t\t}", "public void receivedUpdateFromServer();", "public void costcenterChange(AjaxBehaviorEvent ev) {\n\t\tLOG.info(\"[costcenterChange] ev => {}\", ev);\n\t\tcostcenterChange();\n\t}", "@Override\r\n public void changedUpdate(DocumentEvent e) {\n ActivoTimer();\r\n }", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t}", "public void onDataChanged();", "public void onDataChanged(){}", "public void changedUpdate(DocumentEvent event)\n\t{\n\t\t// do nothing\n\t}", "public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) {\n }", "@Override\n\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\n\t}", "private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}", "public void stateChanged(ChangeEvent event)\r\n {\r\n fireChangeEvent(event);\r\n }", "@Override\n\t\t\tpublic void statusChanged(WebBrowserEvent arg0) {\n\n\t\t\t}", "public void onStationSelected(AjaxBehaviorEvent event){\n SelectOneMenu som = (SelectOneMenu)event.getSource();\n selectedStation = (Stations)som.getValue();\n if(selectedStation==null){\n stationIdChanged = true;\n FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(Constants.STATION_ID, new Long(-1));\n }else{\n if(!defaultStationId.equals(selectedStation.getStationId())){\n stationIdChanged = true;\n System.out.println(\"STATION ID CHANGED!\");\n }\n FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(Constants.STATION_ID, selectedStation.getStationId());\n }\n }", "public void handleModified(ModifiedEvent source) {}", "@Override\n public void actionPerformed (ActionEvent e) {\n fireChanged();\n }", "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}", "protected void onEvent(DivRepEvent e) {\n\t\t}", "protected void onEvent(DivRepEvent e) {\n\t\t}", "public void fireChangeEvent(ChangeEvent event);", "@Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n }", "@Override\t// Listen for an Event's edit or a Temporal Relationship's edit\n\tpublic void dataChanged(Object source) \n\t{\n\t\tif ( source == this.myTemporalModePanel ) \t\t// an Event or a Temporal Relationship has been edited\n\t\t\tthis.myInnerDeck.autoSetButtonsEnabled();\t// make sure next SlideDeck transition buttons are properly set \n\t}", "public void statusChanged() {\n\t\tif(!net.getArray().isEmpty()) {\n\t\t\tigraj.setEnabled(true);\n\t\t}else\n\t\t\tigraj.setEnabled(false);\n\t\t\n\t\tupdateKvota();\n\t\tupdateDobitak();\n\t}", "@Override\n\tpublic void update(Event e) {\n\t}", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {\r\n\t}", "private void SelectionChanged(String type) {\n try {\n VaadinSession.getCurrent().getLockInstance().lock();\n Listeners_Map.values().stream().forEach((filter) -> {\n filter.selectionChanged(type);\n });\n } finally {\n VaadinSession.getCurrent().getLockInstance().unlock();\n busyTask.setVisible(false);\n }\n\n }", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\n public void cycleStarted(ModelEvent event)\n {\n checkForChange();\n }", "@Override\n\tpublic void setOnChangeEvent(String functionName) {\n\t\t\n\t}", "boolean hasStatusChanged();", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "void instanceChanged();", "public void update(@Observes FirePushEventsEnum event) {\n switch(event) {\n case NODE_EVENT:\n this.nodeEventUpdateRequest.set(true);\n break;\n case RUN_TASK_EVENT:\n this.runTaskEventUpdateRequest.set(true);\n break;\n }\n }", "boolean hasChangeEvent();", "@Override\n\t\tprotected void onEvent(DivRepEvent arg0) {\n\t\t\t\n\t\t}", "public void localeChanged(AjaxBehaviorEvent e) {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\tstep2Bean step2bean = (step2Bean) context\n\t\t\t\t.getApplication()\n\t\t\t\t.evaluateExpressionGet(context, \"#{step2Bean}\", step2Bean.class);\n\t\tstep2bean.setHandlerType(this.handlerType);\n\n\t}", "@Override\n\tpublic void valueChange(ValueChangeEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void update(Observable observable, Object data) {\n\t\tif(data instanceof STBEvent) {\n\t\t\t\n\t\t}\n\t}", "private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}", "@Override\n public void onStatusChange(int status) {\n }", "@Override\n\t\t\tpublic void onRequestEvent(RequestEvent event) {\n\t\t\t\tif (event.getRequestedClassName().equals(\n\t\t\t\t\t\tSettingsChangedEvent.class.getName())) {\n\t\t\t\t\teventBus.fireEvent(new SettingsChangedEvent(settings));\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tmHandler.sendEmptyMessage(1);\n\t\t\tLog.i(\"message\", \"dataChange\");\n\t\t\tsuper.onChange(selfChange);\n\t\t}", "public boolean isEventUpdated(Event event) \n\t{\n\t\treturn false;\n\t}", "public IServerState changeState(ServerEvents serverEvent);", "public void markChanged()\n \t{\n \t\tbChanged=true;\n \t}", "protected synchronized void setChanged() {\n changed = true;\n }", "public void isChanged()\n\t{\n\t\tchange = true;\n\t}", "void onNewEvent(Event event);", "protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "public void modelsChanged(IModelProviderEvent event);", "@Override\n\tpublic void onUpdate() {\n\t\tlistener.onUpdate();\n\t}", "public void buttonChangeStatus(ActionEvent actionEvent) {\n }", "public void changed() {\n // from ChangeHandler\n configSave.enable();\n }", "public void onLanguageSelected(AjaxBehaviorEvent event){\n SelectOneMenu som = (SelectOneMenu)event.getSource();\n selectedLanguage = som.getValue().toString();\n if(selectedLanguage!=null && !selectedLanguage.equals(defaultLanguage)){\n languageChanged = true;\n System.out.println(\"Language changed!\");\n }\n }", "void onListenerChanged(ListenerUpdate update);", "@Override\n public void onChanged() {\n }", "public void doSomeChanges() {\n\n eventBus.publish(\"our.event.coming.from.model\", \"some data passed\");\n }", "void onModelChange();", "@Override\r\n\t\tpublic void setstatuschanged(int status, Bundle data) {\n\t\t}", "private void changed() {\n // Ok to have a race here, see the field javadoc.\n if (!changed)\n changed = true;\n }", "public void insertUpdate(DocumentEvent e) {\r\n changed();\r\n }", "@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "void onStatusChanged(Status newStatus);" ]
[ "0.65117866", "0.6496045", "0.6404613", "0.6328995", "0.63177234", "0.6259833", "0.6163742", "0.61587566", "0.60439104", "0.60434437", "0.60373986", "0.5972947", "0.5960957", "0.5950678", "0.59038603", "0.58952117", "0.5824127", "0.58197004", "0.5805284", "0.5782417", "0.57634205", "0.57570636", "0.5750175", "0.5746218", "0.5713291", "0.57061285", "0.5704818", "0.57026744", "0.5702461", "0.57020414", "0.56906235", "0.56643176", "0.5663228", "0.5633069", "0.5624134", "0.55671954", "0.55561084", "0.5529135", "0.55242646", "0.55173534", "0.55171895", "0.5485268", "0.547868", "0.54615897", "0.54545534", "0.5453394", "0.5434691", "0.54156333", "0.54156333", "0.53753936", "0.5364927", "0.53590816", "0.53472465", "0.5345139", "0.5338914", "0.5322088", "0.5322088", "0.5322088", "0.5322088", "0.5315622", "0.5304714", "0.52860916", "0.52860916", "0.52818334", "0.52738065", "0.52727365", "0.5259787", "0.5259787", "0.52562237", "0.52550566", "0.5250602", "0.52467465", "0.5240852", "0.52372265", "0.52344155", "0.52289265", "0.5228561", "0.5226571", "0.52262855", "0.5225066", "0.5217876", "0.52174234", "0.52124107", "0.5210722", "0.520936", "0.5208669", "0.520508", "0.5202393", "0.5180061", "0.51762414", "0.5168499", "0.51555353", "0.515412", "0.51410115", "0.51399523", "0.51386464", "0.5131612", "0.51296407", "0.51249045", "0.5119617", "0.51168007" ]
0.0
-1
checking customer name and debit card name of card
public void firstNameCheck() { if (getNameOfTheCard().equalsIgnoreCase(getCustomerFullName())) { setColAuthorizedby(null); setColpassword(null); setBooAuthozed(false); } else { List<DebitAutendicationView> localEmpllist = iPersonalRemittanceService.getdebitAutendicationList(); setEmpllist(localEmpllist); setColAuthorizedby(null); setColpassword(null); setBooAuthozed(true); // populate alert msg if customer name not match setExceptionMessage(Constants.NameCheckAlertMsg); RequestContext.getCurrentInstance().execute("alertmsg.show();"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getCompany(String _card){\r\n\t\t\tString _errorLength = \"Invalid number of digits.\";\r\n\t\t\tString _errorInvalid = \"Invalid credit card number.\";\r\n\t\t\t\r\n\t\t\tif (_card.length() >= 13 && _card.length() <=16){\r\n\t\t\t\tif (_card.charAt(0) == '4'){\r\n\t\t\t\t\treturn \"Visa\";\r\n\t\t\t\t}else if (_card.charAt(0) == '5'){\r\n\t\t\t\t\treturn \"Mastercard\";\r\n\t\t\t\t}else if (_card.charAt(0) == '6'){\r\n\t\t\t\t\treturn \"Discover\";\r\n\t\t\t\t}else if (_card.charAt(0) == '3' && _card.charAt(1) == '7'){\r\n\t\t\t\t\treturn \"American Express\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn _errorInvalid;\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\treturn _errorLength;\r\n\t\t\t}\r\n\t}", "private boolean validateCard() {\n Card card = new Card(\n editTextCreditCardNumber.getText().toString(),\n selectedMonth,\n selectedYear,\n editTextCCV.getText().toString()\n );\n boolean validation = card.validateCard();\n if (validation) {\n return true;\n } else if (!card.validateNumber()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorNumber), Toast.LENGTH_SHORT).show();\n return false;\n } else if (!card.validateExpiryDate()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorExpiryDate), Toast.LENGTH_SHORT).show();\n return false;\n } else if (!card.validateCVC()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorCCV), Toast.LENGTH_SHORT).show();\n return false;\n } else {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardError), Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "CarPaymentMethod cardHolder(String firstName, String lastName);", "private String creditCardValidate(CardPayment payment) {\r\n \tString validate = null;\r\n \t\r\n \tString cardType = payment.getCreditCardType();\r\n \t\r\n \tif(cardType.equals(\"MASTERCARD\") || cardType.equals(\"VISA\")) {\r\n \t\tif(payment.getCreditCardNumber().matches(\"[0-9]+\") && payment.getCreditCardNumber().length() != 16) {\r\n \t\t\treturn \"Credit Card Number is invalid\";\r\n \t\t} else if(String.valueOf(payment.getCreditcardcvv()).length() != 3) {\r\n \t\t\treturn \"Credit Card CVV is invalid\";\r\n \t\t}\r\n \t} else if(cardType.equals(\"AMEX\")) {\r\n \t\tif(payment.getCreditCardNumber().matches(\"[0-9]+\") && payment.getCreditCardNumber().length() != 15) {\r\n \t\t\treturn \"Credit Card Number is invalid\";\r\n \t\t} else if(String.valueOf(payment.getCreditcardcvv()).length() != 4) {\r\n \t\t\treturn \"Credit Card CVV is invalid\";\r\n \t\t}\r\n \t} else {\r\n \t\tvalidate = \"Invalid card type\";\r\n \t}\r\n \t\r\n \treturn validate;\r\n }", "public void showCreditCardByCustomerName(String string) {\n\t\tSystem.out.println(\"Mostrant credit cards del customer \" + string);\n\n\t\tObjectSet<Customer> customers = db.query(new Predicate<Customer>() {\n\t\t\tpublic boolean match(Customer customer) {\n\t\t\t\treturn customer.getName().equalsIgnoreCase(string);\n\t\t\t}\n\t\t});\n\t\tcustomers.stream()\n\t\t\t\t.peek(System.out::println)\n\t\t\t\t.forEach(c -> System.out.println(c.getCreditCard()));\n\t}", "@Test\n\tpublic void testChargePinDebitCardWithOutName() throws Exception {\n\t\tHashMap<String, Object> mapBody = new HashMap<String, Object>();\n\t\tmapBody.put(\"amount\", 1.00);mapBody.put(\"currency\", \"USD\");\n\t\tHashMap<String, Object> card = returnMapCardWithCardPresent();\n\t\tcard.put(\"name\", \"\");\n\t\tmapBody.put(\"card\", card);\n\t\t\n\t\tHttpResponse response = TestUtil.post(CCChargeUrl,\n\t\t\t\tCCChargeHeaderParams, mapBody);\n\t\tvalidateErrorRes(response, 400, \"invalid_request\", \"PMT-4000\", \"card.name is invalid.\", \"card.name\", \"https://developer.intuit.com/v2/docs?redirectID=PayErrors\");\n\t}", "public static void main(String[] args) {\n\t\tjava.util.Scanner stdin = new java.util.Scanner(System.in);\n\t\tSystem.out.println(\"Enter the credit card number: \");\n\t\tString creditCard = stdin.next();\n\n\t\t// First check that the card has a known prefix and a valid length for that prefix\n\t\tboolean validLength = true;\n\t\tString cardType = null;\n\t\tif (creditCard.startsWith(\"34\") || creditCard.startsWith(\"37\")) {\n\t\t\t// American Express\n\t\t\tvalidLength = (creditCard.length() == 15);\n\t\t\tcardType = \"American Express\";\n\t\t} else if (creditCard.startsWith(\"4\")) {\n\t\t\t// Visa\n\t\t\tvalidLength = (creditCard.length() == 13 || creditCard.length() == 16 || creditCard.length() == 19);\n\t\t\tcardType = \"Visa\";\n\t\t} else if (creditCard.startsWith(\"5\")) {\n\t\t\t// MasterCard \n\t\t\tint prefix = Integer.valueOf(creditCard.substring(0, 2));\n\t\t\tif (prefix >= 51 && prefix <= 55) {\n\t\t\t\tvalidLength = (creditCard.length() == 16);\n\t\t\t\tcardType = \"MasterCard\";\n\t\t\t}\n\t\t}\n\n\t\t// If card type is unknown, exit with no further checks\n\t\tif (cardType == null) {\n\t\t\tSystem.out.println(\"Unknown card type\");\n\t\t\tSystem.exit(0);\n\t\t} \n\t\t\n\t\t// Known card type -- print it out and check length\n\t\tSystem.out.println(\"Card type: \" + cardType);\n\t\tif (!validLength) {\n\t\t\tSystem.out.println(\"Invalid length\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\n\t\t\n\t\tstdin.close();\n\t}", "public Boolean isPrimaryCreditCard();", "boolean CanBuyDevCard();", "public String getCardName() {\n \t\treturn cardName;\n \t}", "CarPaymentMethod creditCardNumber(String cardNumber);", "boolean isCreditCardIsSingleAvailablePayment();", "public String getCardName()\n {\n String returnString = \"\";\n if(num == 14)\n {\n returnString+=(\"Ace\");\n }\n else if(num == 11)\n {\n returnString+=(\"Jack\");\n }\n else if(num == 12)\n {\n returnString+=(\"Queen\");\n }\n else if(num == 13)\n {\n returnString+=(\"King\");\n }\n else\n {\n returnString+=(num);\n }\n returnString+=(\" of \");\n if(suit == 1)\n {\n returnString+=(\"Spades\");\n }\n else if(suit == 2)\n {\n returnString+=(\"Hearts\");\n }\n else if(suit == 3)\n {\n returnString+=(\"Diamonds\");\n }\n else\n {\n returnString+=(\"Clubs\");\n }\n return returnString;\n }", "public void creditCard() {\n\t\tSystem.out.println(\"hsbc --- credit card\");\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tCustomer customer = new Customer(true);\r\n\t\tdouble amount = 105.78;\r\n\t\tdouble donation;\r\n\t\tString cardType= \" \";\r\n\t\t//YOUR CODE GOES BELOW THIS LINE\r\n\t\tCreditCard creditcard = new CreditCard(customer, amount, donation=0);\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t\r\n\t\t// call for setCardname\r\n\t\tsetCardname(creditcard, scan);\r\n\t\t\r\n\t\t// set card type\r\n\t\tcardType= getCardType(scan, cardType);\r\n\t\t\r\n\t\t// request the card number\r\n\t\tsetCardnumber(creditcard, scan);\r\n\t\t\r\n\t\t//request the expiration date\r\n\t\tsetExpirationDate (creditcard,scan);\r\n\t\r\n\t\t// request the Security Code\r\n\t\tsetSecurityCode (creditcard,scan);\r\n\t\t\r\n\t\t// request billing address\r\n\t\tsetBillingAddress(creditcard, scan);\r\n\t\t\r\n\t\t//request shipping address\r\n\t\tSystem.out.println(\"Shipping address:\\n\" + \"Press 1 if the shipping address is the same as the customer address \\n\" +\r\n\t\t\t\t \"Press 2 if the shipping address is a new address \");\r\n\t\tsetShippingAddress( creditcard, customer, scan);\r\n\t\t\r\n\t\t//\r\n\t\t// get donation\r\n\t\t//\r\n\t\tString userAnswer= (scan.nextLine()).toUpperCase();\r\n\t\tSystem.out.println(\"Would you like to donate? Yes/No: \");\r\n\t\tuserAnswer= (scan.nextLine()).toUpperCase();\r\n\t\t\r\n\t\tif (userAnswer.equals(\"YES\"))\r\n\t\t\tdonation= getDonation(customer, creditcard, scan, donation, amount);\r\n\t\telse\r\n\t\t\tSystem.out.println(\" \");\t\r\n\t\t\r\n\t\t//\r\n\t\t// print summary\r\n\t\t//\r\n\t\tSystem.out.println(\"---------------------------------------------------------------------------\\n\"\r\n\t\t +(customer.firstName).toUpperCase() + \",\" + \"Here Is Your Purchase Summary:\\n\"\r\n\t\t\t\t + \"------------------------------------------------------------------------------\");\r\n\t\tprintSummary( customer, creditcard, donation, cardType, amount,scan);\r\n\t\t\r\n\t\tLastCheck(customer, creditcard, donation, cardType, amount, scan);\r\n\t\t\r\n\t\tscan.close();\r\n\t}", "boolean hasAlreadCheckCard();", "public String getCardName() {\r\n\t\treturn cardName;\r\n\t}", "UserPayment validate(String cardHolderName,String cardType,String securityCode,String paymentType);", "public String getCreditCardName() {\n return getCreditCardName(getCreditCardType());\n }", "public static boolean isValidCard(String card) {\n if (card == null || \"\".equals(card)) return false;\n if (card.length() == 10 || card.length() == 15) {\n return true;\n } else if (card.length() == 18) {\n return isValidChinaCard(card);\n }\n return false;\n\n }", "private boolean nameEntry() {\n EditText nameField = (EditText) findViewById(R.id.batman_identity);\n String batmanIdentity = nameField.getText().toString();\n\n if (batmanIdentity.equalsIgnoreCase(\"bruce wayne\")) {\n return true;\n }\n\n return false;\n\n }", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "private static void setCardname(CreditCard creditcard, Scanner scan)\r\n\t{\n\t\twhile (true)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Name on credit card: \");\r\n\t\t\t\tString cardName = scan.nextLine();\r\n\t\t\t\tcreditcard.setNameOnCard(cardName); \r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (NullPointerException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}", "public void setCardName(String name) {\n \t\tthis.cardName = name;\n \t\tsetUniqueID(UUID.randomUUID());\n \t}", "public static boolean validateCard(String[] args) {\n return true;\n }", "public void printCardHoldersName(ArrayList<VentraCard> cards) {\n \t\n \tfor(int i=0; i<cards.size(); i++) {\n \t\tSystem.out.println(\"Name \"+ cards.get(i).getFullName()+\" Cardnumber: \"+cards.get(i).getCardNumber());\n \t}\n }", "CarPaymentMethod processCreditCard();", "private boolean checkCustomerID(int CusIDPty, int CusID) {\n\t\tint getCusIDPtyValue = 0 ; \t\t\r\n\t\ttry {\r\n\t\t\tgetCusIDPtyValue = SDKSession.getCameraPropertyClint().getCurrentPropertyValue(CusIDPty);\r\n\t\t} catch (IchInvalidSessionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchSocketException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchCameraModeException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchDevicePropException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\tif ((getCusIDPtyValue & 0xffff) == (CusID & 0xffff) ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static boolean isValid(String _card){\r\n\t\t//communication with sumOfDoubleEvenPlace() and sumOfOddPlace()\r\n\t\tsumOfDoubleEvenPlace(_card);\r\n\t\tsumOfOddPlace(_card);\r\n\t\tgetCompany(_card);\r\n\t\tString _errorLength = \"Invalid number of digits.\";\r\n\t\tString _errorInvalid = \"Invalid credit card number.\";\r\n\t\t\r\n\t\t//condition for valid credit card.\r\n\t\tif((getCompany(_card) != _errorInvalid) && (getCompany(_card) != _errorLength)){\r\n\t\t\tif((sumOfDoubleEvenPlace(_card) + sumOfOddPlace(_card) != 0)){\t//if user enters all zeroes\r\n\t\t\t\tif ((sumOfDoubleEvenPlace(_card) + sumOfOddPlace(_card)) % 10 == 0 ){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "private static Card getCard(String bank, String number, Date date) throws InvalidBankException {\n \n Card card = new Card(bank, number, date);\n \n if (HSBCCA.equalsName(bank)) {\n card.setComponents(new SixteenDigitsWithDashes(),\n new ShowFirstTwoMasker());\n } else if (RBC.equalsName(bank)) {\n card.setComponents(new SixteenDigitsWithDashes(),\n new ShowFirstFourMasker());\n } else if (AMEX.equalsName(bank)) {\n card.setComponents(new FifteenDigitsWithDashesValidator(),\n new ShowLastThreeMasker());\n } else {\n throw new InvalidBankException(\"Bank \" + bank + \" is not a valid bank name\");\n }\n \n return card;\n }", "public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }", "public void cards() {\n System.out.print(\"Enter a card: \");\n in.nextLine();\n String cardName = in.nextLine().toUpperCase();\n String cardSuit = cardName.substring(1);\n String cardRank = cardName.substring(0, 1);\n\n switch (cardRank) {\n case \"2\":\n cardRank = \"Two\";\n break;\n case \"3\":\n cardRank = \"Three\";\n break;\n case \"4\":\n cardRank = \"Four\";\n break;\n case \"5\":\n cardRank = \"Five\";\n break;\n case \"6\":\n cardRank = \"Six\";\n break;\n case \"7\":\n cardRank = \"Seven\";\n break;\n case \"8\":\n cardRank = \"Eight\";\n break;\n case \"9\":\n cardRank = \"Nine\";\n break;\n case \"T\":\n cardRank = \"Ten\";\n break;\n case \"J\":\n cardRank = \"Jack\";\n break;\n case \"Q\":\n cardRank = \"Queen\";\n break;\n case \"K\":\n cardRank = \"Kind\";\n break;\n case \"A\":\n cardRank = \"Ace\";\n break;\n default:\n cardRank = \"Invalid\";\n break;\n }\n\n switch (cardSuit) {\n case \"C\":\n cardSuit = \"Clubs\";\n break;\n case \"H\":\n cardSuit = \"Hearts\";\n break;\n case \"D\":\n cardSuit = \"Diamonds\";\n break;\n case \"S\":\n cardSuit = \"Spades\";\n break;\n default:\n cardSuit = \"Invalid\";\n break;\n }\n\n if (cardRank == \"Invalid\") {\n System.out.println(\"\\nThat's not a valid rank.\\n\");\n } else if (cardSuit == \"Invalid\" || cardName.length() != 2) {\n System.out.println(\"\\nThat's not a valid suit.\\n\");\n } else {\n System.out.println(\"\\n\" + cardRank + \" of \" + cardSuit + \".\");\n }\n }", "void addCustomerCard(CardDto cardDto, String name) throws EOTException;", "boolean hasCardType();", "public boolean hasUnwantedChar(String name, String field) {\r\n\t\tboolean unwantedCharacter = false;\r\n\t\tchar checkName[] = name.toCharArray();\r\n\t\tif(field == \"names\") {\r\n\t\t\tint find = 0;\r\n\t\t\twhile(find < checkName.length) {\r\n\t\t\t\tswitch(checkName[find]) {\r\n\t\t\t\tcase 'A':case 'a':case 'B':case 'b':case 'C':case 'c':case 'D':case 'd':case 'E':case 'e':case 'F':case 'f':case 'G':case 'g':\r\n\t\t\t\tcase 'H':case 'h':case 'I':case 'i':case 'J':case 'j':case 'K':case 'k':case 'L':case 'l':case 'M':case 'm':case 'N':case 'n':\r\n\t\t\t\tcase 'O':case 'o':case 'P':case 'p':case 'Q':case 'q':case 'R':case 'r':case 'S':case 's':case 'T':case 't':case 'U':case 'u':\r\n\t\t\t\tcase 'V':case 'v':case 'W':case 'w':case 'X':case 'x':case 'Y':case 'y':case 'Z':case 'z':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tunwantedCharacter = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(unwantedCharacter == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t++find;\r\n\t\t\t}\t\r\n\t\t}else if(field == \"password & physical address\") {\r\n\t\t\tint find = 0;\r\n\t\t\twhile(find < checkName.length) {\r\n\t\t\t\tswitch(checkName[find]) {\r\n\t\t\t\tcase 'A':case 'a':case 'B':case 'b':case 'C':case 'c':case 'D':case 'd':case 'E':case 'e':case 'F':case 'f':case 'G':case 'g':\r\n\t\t\t\tcase 'H':case 'h':case 'I':case 'i':case 'J':case 'j':case 'K':case 'k':case 'L':case 'l':case 'M':case 'm':case 'N':case 'n':\r\n\t\t\t\tcase 'O':case 'o':case 'P':case 'p':case 'Q':case 'q':case 'R':case 'r':case 'S':case 's':case 'T':case 't':case 'U':case 'u':\r\n\t\t\t\tcase 'V':case 'v':case 'W':case 'w':case 'X':case 'x':case 'Y':case 'y':case 'Z':case 'z':\t\r\n\t\t\t\tcase '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9':case '0':case ' ':case '-':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\t\r\n\t\t\t\t\tunwantedCharacter = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(unwantedCharacter == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t++find;\r\n\t\t\t}\t\r\n\t\t}else if(field == \"email\") {\r\n\t\t\tint find = 0;\r\n\t\t\twhile(find < checkName.length) {\r\n\t\t\t\tswitch(checkName[find]) {\r\n\t\t\t\tcase 'A':case 'a':case 'B':case 'b':case 'C':case 'c':case 'D':case 'd':case 'E':case 'e':case 'F':case 'f':case 'G':case 'g':\r\n\t\t\t\tcase 'H':case 'h':case 'I':case 'i':case 'J':case 'j':case 'K':case 'k':case 'L':case 'l':case 'M':case 'm':case 'N':case 'n':\r\n\t\t\t\tcase 'O':case 'o':case 'P':case 'p':case 'Q':case 'q':case 'R':case 'r':case 'S':case 's':case 'T':case 't':case 'U':case 'u':\r\n\t\t\t\tcase 'V':case 'v':case 'W':case 'w':case 'X':case 'x':case 'Y':case 'y':case 'Z':case 'z':\t\r\n\t\t\t\tcase '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9':case '0':case '@':case '.':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tunwantedCharacter = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(unwantedCharacter == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t++find;\r\n\t\t\t}\r\n\t\t}else if(field == \"mobileNumber\") {\r\n\t\t\tint find = 0;\r\n\t\t\twhile(find < checkName.length) {\r\n\t\t\t\tswitch(checkName[find]) {\r\n\t\t\t\tcase '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9':case '0':case ' ':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tunwantedCharacter = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(unwantedCharacter == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t++find;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn unwantedCharacter;\r\n\t}", "void askDevCardProduction();", "public UnoCard getCardByName(String cardName){\n Drawable color_change_plus4 = this.appContext.getResources().getDrawable(R.drawable.color_change_plus4);\n Drawable card_back = this.appContext.getResources().getDrawable(R.drawable.card_back);\n UnoCard card = new UnoCard(this.appContext, deckPos, new Point(20, 20), color_change_plus4, card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\");\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardName)){\n card = c;\n break;\n }\n }\n return card;\n }", "public void checkCreditCard() throws BusinessException;", "public boolean sameCustomer(String name, int mobile, String email) {\n if (this.getName().equalsIgnoreCase(name)&&\n this.getMobile()==mobile&&\n this.getEmail().equalsIgnoreCase(email)) {return true;}\n else {return false;}\n }", "public void setCustomerName(String name) // this method set the customer name and do validation for customer name\r\n {\r\n if(hitNcounter!=3) // validation for customer name for 3 times, hitNcounter variable count how many times cutomer entered wrone customer name\r\n {\r\n int length=name.length();\r\n \r\n \r\n if(20 <= length) // condition for checking customer name length\r\n {\r\n JOptionPane.showMessageDialog(null,\"Please enter Name between 1 to 20 characters\");\r\n b=false;\r\n hitNcounter++;\r\n }\r\n else if(name.isEmpty()) // condition for checking customer name is empty or not\r\n {\r\n JOptionPane.showMessageDialog(null, \"Please enter Name\");\r\n b=false;\r\n hitNcounter++;\r\n } \r\n else // condition for correct customer name\r\n {\r\n counter++;\r\n if(counterN>=0)\r\n {\r\n \r\n custName=name; // set customer name into custName variable\r\n this.customerName[counterN]=name; // store all customer name in customerName array\r\n \r\n b=true;//set the value of name into itemName array \r\n counterN++; // counterN count the number of customer name entered \r\n }\r\n \r\n }\r\n \r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Sorry, You cannot use this service as you have entered wrong data 3 times\");\r\n // if customer enter 3 time wrong data the application is closed\r\n System.exit(0);\r\n }\r\n }", "public void creditcard() {\n\t\tBy cd=By.xpath(\"//input[@name='creditCard']\");\r\n\t\tWebElement W_cd=wt.WaitForElement(cd, 10);\r\n\t\tW_cd.sendKeys(\"5462897859858\");\r\n\t\t\r\n\t\t}", "public CareerCard (String name)\r\n {\r\n super (name);\r\n setDegreeRequired ();\r\n setMaxPayRaise ();\r\n }", "boolean CheckIfRealPerson(Customer customer);", "public boolean enterCustomer(String username) {\n\n\n Accounts a = accountsRepo.checkByUsernameCustomer(username);\n return a != null;\n }", "boolean similarCard(Card c);", "private boolean Nob() {\r\n String Nob1=\"J\" + Card[Card.length-1].substring(1,2);\r\n for (int i = 0; i < Card.length-1; i++) {\r\n if (Card[i].equals(Nob1)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n\r\n }", "private boolean isCardValid(Card data) {\n // Check card if it valid to save isValid == true\n boolean isValid = (StringUtils.isEmpty(data.getName()) == false &&\n StringUtils.isEmpty(data.getAddress()) == false &&\n StringUtils.isEmpty(data.getPosition()) == false &&\n StringUtils.isEmpty(data.getGender()) == false);\n\n return isValid;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "void askBuyDevCards();", "public String checkUpCustomer(String userName, Cache cache) {\n StringBuilder sb = new StringBuilder();\n if (cache.getUserType() == UserType.MANAGER && customers.containsKey(userName)) {\n Customer tmp = customers.get(userName);\n sb.append(\"-------Clients info-------\\n\");\n sb.append(\"Customer String: \").append(tmp.getUserName()).append(\"\\n\");\n sb.append(\"Account Info: \\n\").append(tmp.accountToString()).append(\"\\n\");\n } else {\n sb.append(\"Bank Notice: No such customer found\");\n }\n return sb.toString();\n }", "public void checkInputCompany(TextField phoneNo, TextField zip, TextField name, KeyEvent event) {\n if (event.getSource() == phoneNo) {\n redFieldNumber(phoneNo, event);\n } else if (event.getSource() == zip) {\n redFieldCPRNoAndZip(zip, event);\n } else if (event.getSource() == name) {\n checkIfRedName(name, event);\n }\n }", "public boolean containsCustomer(String c){\n\t\tfor (int i = 0; i < this.list.size(); i++){\n\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private static boolean equalsIgnoreCase(String inputOfCustomer) {\n\t\treturn false;\n\t}", "public void registerCard(String alias, int card_nr, String Bank_name) {\n }", "boolean hasCustomer();", "boolean hasCustomer();", "@Test\n public void testInsuredPayerPayersName() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setPayersName,\n RdaFissPayer::getPayersName,\n RdaFissPayer.Fields.payersName,\n 32);\n }", "private String verifyAccount(String number){\n\t\t\n\t\tif(databaseAccess.verifyAccountNumber(number) == true){\n\t\t\t\n\t\t\tthis.examinedAccount = databaseAccess.getAccountByNumber(number);\n\t\t\t\n\t\t\treturn \"ok\";\n\t\t}\n\t\t\n\t\treturn Languages.getMessages().get(chosenLanguage).get(\"wrongCard\");\n\t}", "@Then(\"^user selects and validates credit cards$\")\r\n\t public void selctcardstocompareandValidate(DataTable table) {\r\n\t\t try {\r\n\t\t WebElement ele;\r\n\t\t List<Map<String, String>> ccards = table.asMaps(String.class, String.class);\r\n\t String cc1 = ccards.get(0).get(\"card1\");\r\n\t String cc2 = ccards.get(0).get(\"card2\");\r\n\t \r\n\t\t//selecting card1\r\n\t ele=dbsdriver.findElement(By.xpath(\"//div[text()='\"+cc1+\"']/../../..//div[text()='Compare']/..//div\"));\r\n\t\t((JavascriptExecutor) dbsdriver).executeScript(\"arguments[0].scrollIntoView(true);\", ele);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(ele));\r\n\t\t((JavascriptExecutor) dbsdriver).executeScript(\"arguments[0].click();\",ele );\r\n\t\tThread.sleep(2500);\t\r\n\t\t\r\n\t\t//selecting card2\r\n\t\tele=dbsdriver.findElement(By.xpath(\"//div[text()='\"+cc2+\"']/../../..//div[text()='Compare']/..//div\"));\r\n\t\t((JavascriptExecutor) dbsdriver).executeScript(\"arguments[0].scrollIntoView(true);\", ele);\r\n\t\t((JavascriptExecutor) dbsdriver).executeScript(\"arguments[0].click();\", ele);\r\n\t\t\r\n\t\t//click on compare button\r\n\t\tdbsdriver.findElement(By.xpath(\"//button[@id='cardCompareBtn']\")).click();\r\n\t\ttest.log(LogStatus.PASS, \"user selected cards and clicked on compare button\");\r\n\t\t//validate the data displayed for each card for comparison\r\n\t\tcreditcardspage.validatecredicarddata(table);\r\n\t\t } catch (Exception e) {\r\n\t\t\t test.log(LogStatus.FAIL, e);\r\n\t\t\tcreditcardspage.aborttest(e+\"\");\r\n\t\t}\r\n\t }", "void buyDevCard();", "public Patron issueCard(String nameOfPatron){\n //Check whether the patron has already had a card!\n if (!this.patron.containsKey(nameOfPatron)){\n Patron newPatron = new Patron(nameOfPatron,this);\n this.patron.put(nameOfPatron, newPatron);\n this.println(\"OK! A card has beed issued to \"+ nameOfPatron);\n return newPatron;\n }\n else{\n this.println(\"No two cards! This Patron has already had a Library Card!!!\");\n return null;\n }\n\n }", "public boolean checkCustId(Connection conn, String cust_no) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select custno from customer_XXXX\");\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\tif (cust_no == rset.getString(1))\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean ifCard(int cid, String passed) {\n\t\treturn cb.ifCard(cid, passed);\n\t}", "Boolean checkPass(Customer customer, String pass);", "private Card murdererName(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"characters\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the name of the character you want to question from the list below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < CHARACTER_NAMES.length; i++) {\n ui.getInfo().addText(CHARACTER_NAMES[i].toString().substring(0,1) + CHARACTER_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n CharacterNames murderer = null;\n String murderersName;\n // check the input from the user whether it is a character name, help command, notes command or the wrong input\n do {\n murderersName = ui.getCmd().getCommand().toLowerCase();\n switch (murderersName) {\n case \"mustard\":\n case \"joey\":\n System.out.println(\"MERP\");\n murderer = CharacterNames.JOEY;\n System.out.println(\"DERP\");\n break;\n case \"scarlet\":\n case \"phoebe\":\n murderer = CharacterNames.PHOEBE;\n break;\n case \"white\":\n case \"monica\":\n murderer = CharacterNames.MONICA;\n break;\n case \"green\":\n case \"chandler\":\n murderer = CharacterNames.CHANDLER;\n break;\n case \"plum\":\n case \"ross\":\n murderer = CharacterNames.ROSS;\n break;\n case \"peacock\":\n case \"rachel\":\n murderer = CharacterNames.RACHEL;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Enter the player from the list above to question!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter ther player from the list above to question!\");\n break;\n }\n } while (murderer == null); // while the player input was not a character\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderer.toString()); // return a card with the murderer selected by the user\n }", "@Test\n public void testGetCardID() {\n DevCard devCard = new DevCard(cost, level, color, victoryPoints, productionPower);\n String s = devCard.getCardID();\n }", "public static void isValidNameOnCreditCard(String userInput) {\n\t\tif (!userInput.matches(\"^(?!.* )[a-zA-Z ]+$\")) {\n\t\t\tthrow new IllegalArgumentException(\"You must enter your name as it appears on the card. Please try again:\");\n\t\t}\n\t}", "public DebitCard(String n, int c, int p, Date e, Customer h, Provider p) {}", "String getCardLastName(String bookingRef);", "String getCardFirstName(String bookingRef);", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "@Test\n public void testBeneZPayerPayersName() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setPayersName,\n RdaFissPayer::getPayersName,\n RdaFissPayer.Fields.payersName,\n 32);\n }", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}", "boolean hasAlreadShowCard();", "@Override\r\n\tpublic void showNoCardMessage(String name) {\n\t}", "@Override\n public boolean equals(Object other) {\n if (null == other) {\n return false;\n }\n if (this == other) {\n return true;\n }\n if (!(other instanceof Card)) {\n return false;\n }\n Card that = (Card) other;\n return this.getName().equals(that.getName());\n }", "java.lang.String getBankName();", "public boolean pickCard(String codename)\n {\n // Does the structure actually keep track of this Card?\n // Better check just to be sure\n Card card;\n if (this.cards.containsKey(codename))\n {\n card = this.cards.get(codename);\n }\n else\n {\n return false;\n }\n\n // Update the bookkeeping information for each clue that was associated with the picked card\n for (String relatedClue : card.getClues())\n {\n Clue clue = clues.get(relatedClue);\n if (clue != null)\n {\n // This clue can now be used!\n if (clue.word.equals(codename)) { clue.isActiveCodename = false; }\n\n // No longer associate a clue with a card that is not in play\n clue.removeCard(card);\n\n // If a clue only suggests the assassin or civilians or suggests nothing it is useless\n if (!clue.suggestsSomeCard() || clue.onlySuggestsAssassinOrCivilian())\n {\n clues.remove(clue.word);\n }\n }\n }\n return true;\n }", "public String getCreditCardType();", "boolean hasAlreadFoldCard();", "public void SetCreditCarddetails(String ccnumber, String ccname, String ccmonth, String ccyear, String ccseccode){\r\n\t\tString countrygroup_ccdetails= \"UK,PresselAustria\";\r\n\t\tString CCnum = getValue(ccnumber);\r\n\t\tString CCName = getValue(ccname);\r\n\t\tString CCMonth = getValue(ccmonth);\r\n\t\tString CCYear = getValue(ccyear);\r\n\t\tString CCSecCode = getValue(ccseccode);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+CCnum+\", \"+CCName+\", \"+CCMonth+\", \"+CCYear+\", \"+CCSecCode);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The CreditCard details should be entered\");\r\n\t\ttry{\r\n\t\t\tif(!(countrygroup_ccdetails).contains(countries.get(countrycount))){\r\n\t\t\t\tswitchframe(\"TokenizationPage\");\r\n\t\t\t\tsleep(2000);\r\n\t\t\t\tsendKeys(locator_split(\"txtCCnumber\"), CCnum);\r\n\t\t\t\tclearWebEdit(locator_split(\"txtCCname\"));\r\n\t\t\t\tsendKeys(locator_split(\"txtCCname\"), CCName);\r\n\t\t\t\tsendKeys(locator_split(\"dpCCMonth\"), CCMonth);\r\n\t\t\t\tsendKeys(locator_split(\"dpCCYear\"), CCYear);\r\n\t\t\t\tclearWebEdit(locator_split(\"txtCCcode\"));\r\n\t\t\t\tsendKeys(locator_split(\"txtCCcode\"), CCSecCode);\t\t\t\t\t\t\r\n\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The CreditCard details are entered\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The new CreditCard details are applicable to this \" +country);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- The CreditCard details are not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"One of the element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCCnumber\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCCname\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"dpCCMonth\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"dpCCYear\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCCcode\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" are not found\");\r\n\r\n\t\t}\r\n\t}", "public boolean isValidCard(String card) {\n\t\t// check if given card name is in deck\n\t\tfor(int i = 0; i < cards.size(); ++i) {\n\t\t\tif(cards.elementAt(i).getName().equals(card))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "Card dealOneCard();", "private boolean containCreditCard(ArrayList<CreditCard> card){\n\t\tfor (CreditCard creditCard : creditCards){\n\t\t\tfor (CreditCard creditCard1 : card){\n\t\t\t\tif(creditCard.equals(creditCard1))return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "public String toString(){//method of return card number and balance\r\n return \"Card no:\" +number+\" has a balance of: \"+balance; \r\n }", "public Boolean removeCustomer() {\r\n boolean ok = false;\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\tif (f != null) {\r\n ok = my.remove(f);\r\n\t\t\t\r\n\t\t}\r\n\t\telse alert(\"Customer not found\\n\");\t\r\n return ok;\r\n\t}", "public static String chosenCard2IsNull() {\n return \"The second card you chose is invalid, please select again: \";\n }", "public static boolean checkSequence(String cards){\r\n //split all the cards and store in card array\r\n String[] cardArray = cards.split(\",\");\r\n //convert card array into card object arrayList\r\n ArrayList<Card> cardList = new ArrayList<Card>();\r\n int numCards = cardArray.length;\r\n //if there is less than 3 cards eliminate deck\r\n if(numCards < 3) return false;\r\n //store suit and face value in card object\r\n for(int i=0;i<numCards;i++){\r\n Card c = new Card(cardArray[i].split(\"#\")[0].trim(),cardArray[i].split(\"#\")[1].trim());\r\n cardList.add(c);\r\n }\r\n int i=0;\r\n String cardSuit=\"\",nextCardSuit=\"\";\r\n int cardValue=-1,nextCardValue=-1,prevCardValue = -1;\r\n \r\n //loop till penultimate card\r\n for(i=0; i<numCards-1 ;i++){ \r\n \r\n cardValue = cardList.get(i).value;\r\n nextCardValue = cardList.get(i+1).value;\r\n cardSuit = cardList.get(i).suit;\r\n nextCardSuit = cardList.get(i+1).suit;\r\n \r\n //suit check\r\n if(!cardSuit.equals(nextCardSuit)) return false;\r\n \r\n //card check\r\n if(cardValue != nextCardValue-1){\r\n \r\n //exception only for queen followed by king followed by ace\r\n if(!(prevCardValue==11 && cardValue == 12 && nextCardValue ==0)){\r\n return false;\r\n }\r\n }\r\n //execption for king followed by ace followed by 2\r\n if(prevCardValue == 12 && cardValue == 0 && nextCardValue==1) return false;\r\n prevCardValue = cardValue;\r\n }\r\n \r\n return true;\r\n }", "private static void printDescriptionCard(String cardName){\n String descWeaponFound = descriptionWeaponFoundOnView(cardName);\n String descPowerUpFound = descriptionPowerUpFoundOnView(cardName);\n String descToPrint;\n if(descWeaponFound == null && descPowerUpFound == null){\n System.out.println(\"The card you are searching for is not visible to you now, or does not exist.\");\n }\n else{\n if(descWeaponFound != null){\n descToPrint = descWeaponFound;\n }\n else{\n descToPrint = descPowerUpFound;\n }\n System.out.println(\"\\\"\" + descToPrint + \"\\\"\");\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<CardIssue> SSCgetCardDetails(String customerName,String SchemeName){\r\n\t\tObject[] param = {customerName,SchemeName};\r\n\t\treturn (List<CardIssue>) getHibernateTemplate().find(\"SELECT cardNo from CardIssue where customerName = ? and schemeName = ? and (status='Active' or status='Matured')\",param);\r\n\t}", "public static String chosenCard1IsNull() {\n return \"The first card you chose is invalid, please select again: \";\n }", "public String getCardRequired() {\n return cardRequired1;\n }", "@Override\n\tpublic Map checkCard(String seatId, String cardNo) {\n\t\tMap ret = new HashMap();\n\t\tret.put(\"user\",billMapper.selectUserByCardNo(cardNo));\n\t\tret.put(\"seat\",billMapper.selectSeatByCard(cardNo,seatId));\n\t\treturn ret;\n\t}", "@Override\n\tpublic void onCardSucess() {\n\t\tLoggerUtils.d(\"onCardSucess Start!!!\");\n\t\tonSucess();\n\t}", "public void checkInputEmployee(TextField nameTF, TextField cprNo, TextField phoneNo, KeyEvent event) {\n if (event.getSource() == nameTF) {\n checkIfRedName(nameTF, event);\n } else if (event.getSource() == phoneNo) {\n redFieldNumber(phoneNo, event);\n } else if (event.getSource() == cprNo) {\n redFieldCPRNoAndZip(cprNo, event);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tszCardHolderName = nameTextBox.getText().toString();\n\t\t\t\tszCardHolderSurname = surnameTextBox.getText().toString();\n\t\t\t\tszBankName = ccbankname_et.getText().toString();\n\t\t\t\tszCardnumberfirst = cardnumberfirstTextBox.getText().toString();\n\t\t\t\tszCardnumbersecond = cardnumbersecondTextBox.getText()\n\t\t\t\t\t\t.toString();\n\t\t\t\tszCardnumberthird = cardnumberthirdTextBox.getText().toString();\n\t\t\t\tszCardnumberfourth = cardnumberfourthTextBox.getText()\n\t\t\t\t\t\t.toString();\n\t\t\t\tszCVVCode = cvvcodeTextBox.getText().toString();\n\t\t\t\tszCardHolderMail = emailTextBox.getText().toString();\n\t\t\t\tszCreditCardNumber = szCardnumberfirst + szCardnumbersecond\n\t\t\t\t\t\t+ szCardnumberthird + szCardnumberfourth;\n\t\t\t\tszValidityYear = yearSpinner.getSelectedItem().toString();\n\t\t\t\tszValidityMonth = expirymonthsSpinner.getSelectedItem()\n\t\t\t\t\t\t.toString();\n\n\t\t\t\tif (AppValues.szName.equals(\"\")\n\t\t\t\t\t\t&& (szCardHolderSurname.length() == 0\n\t\t\t\t\t\t\t\t|| szCardHolderName.length() == 0\n\t\t\t\t\t\t\t\t|| nationalitySpinner.getSelectedItemPosition() == 0\n\t\t\t\t\t\t\t\t|| szCardHolderMail.length() == 0 || passwordTextBox\n\t\t\t\t\t\t\t\t.getText().toString().length() == 0)) {\n\t\t\t\t\temptyfieldsalertdialog(\"Please enter member info Or Proceed to login\");\n\t\t\t\t} else if (AppValues.szName.equals(\"\")\n\t\t\t\t\t\t&& passwordTextBox.getText().toString().length() < 6) {\n\t\t\t\t\temptyfieldsalertdialog(\"Password length less than 6\");\n\t\t\t\t} else if (!AppValues.szName.equals(\"\")\n\t\t\t\t\t\t&& (szCardHolderSurname.length() > 0 && surnameTextBox\n\t\t\t\t\t\t\t\t.getText().toString().length() == 0)) {\n\t\t\t\t\temptyfieldsalertdialog(\"Please enter Surname\");\n\t\t\t\t} else if (!AppValues.szName.equals(\"\")\n\t\t\t\t\t\t&& (szCardHolderName.length() == 0 && nameTextBox\n\t\t\t\t\t\t\t\t.getText().toString().length() > 0)) {\n\t\t\t\t\temptyfieldsalertdialog(\"Please enter Name\");\n\t\t\t\t} else if (ccbankname_et.length() == 0) {\n\t\t\t\t\temptyfieldsalertdialog(\"Please enter Bank Name\");\n\t\t\t\t} else if (szCardnumberfirst.length() < 4\n\t\t\t\t\t\t|| szCardnumbersecond.length() < 4\n\t\t\t\t\t\t|| szCardnumberthird.length() < 4\n\t\t\t\t\t\t|| szCardnumberfourth.length() < 4\n\t\t\t\t\t\t|| szCVVCode.length() < 3\n\t\t\t\t\t\t|| cardTypeSpinner.getSelectedItemPosition() == 0) {\n\t\t\t\t\temptyfieldsalertdialog(\"Please enter Card Details properly\");\n\t\t\t\t} else {\n\t\t\t\t\tif (!AppValues.szLoggedInEmail.equals(\"\")) {\n\t\t\t\t\t\tszCardHolderMail = AppValues.szLoggedInEmail;\n\t\t\t\t\t\tif (szCardHolderName.equals(\"\"))\n\t\t\t\t\t\t\tszCardHolderName = AppValues.szName;\n\t\t\t\t\t\tif (szCardHolderSurname.equals(\"\"))\n\t\t\t\t\t\t\tszCardHolderSurname = AppValues.szSurName;\n\t\t\t\t\t}\n\t\t\t\t\tif (isEmailAddressValid(szCardHolderMail)) {\n\t\t\t\t\t\t// proceed\n\t\t\t\t\t\tif (AppValues.szName.equals(\"\")) {\n\t\t\t\t\t\t\tszCountryName = nationalitySpinner\n\t\t\t\t\t\t\t\t\t.getSelectedItem().toString();\n\n\t\t\t\t\t\t\tDataBaseHelper dbHelper;\n\t\t\t\t\t\t\tCursor cursor;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdbHelper = new DataBaseHelper(\n\t\t\t\t\t\t\t\t\t\tTravellerDetailsTabActivity.this);\n\n\t\t\t\t\t\t\t\tString whereClause = \"CountryName =?\";\n\t\t\t\t\t\t\t\t// String[] whereArgs = new String[] {\n\t\t\t\t\t\t\t\t// \"Bangkok\",\n\t\t\t\t\t\t\t\t// \"Thailand\" };\n\t\t\t\t\t\t\t\tString[] whereArgs = new String[] { szCountryName };\n\t\t\t\t\t\t\t\tcursor = dbHelper.myDataBase.query(\"codes\",\n\t\t\t\t\t\t\t\t\t\tnull, whereClause, whereArgs, null,\n\t\t\t\t\t\t\t\t\t\tnull, null);\n\t\t\t\t\t\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\t\t\t\t\t\tszPaxPassport = cursor.getString(1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tLog.d(\"TravellerDetailsTabActivity\",\n\t\t\t\t\t\t\t\t\t\t\"CountryName:: \" + szCountryName);\n\t\t\t\t\t\t\t\tLog.d(\"TravellerDetailsTabActivity\",\n\t\t\t\t\t\t\t\t\t\t\"CountryCode or PaxPassPort:: \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ szPaxPassport);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (NetworkBroadcastReceiver.ms_bIsNetworkAvailable) {\n\n\t\t\t\t\t\t\tif (AppValues.szLoggedInEmail.equals(\"\")) {\n\n\t\t\t\t\t\t\t\tmDialog = showProgressDialog(\"Registering...\");\n\t\t\t\t\t\t\t\tSignupTask task = new SignupTask(\n\t\t\t\t\t\t\t\t\t\tTravellerDetailsTabActivity.this,\n\t\t\t\t\t\t\t\t\t\tmHandler);\n\t\t\t\t\t\t\t\ttask.szAddress = \"\";\n\t\t\t\t\t\t\t\ttask.szCityCode = \"\";\n\t\t\t\t\t\t\t\ttask.szCountryCode = szBankCountryCode;\n\t\t\t\t\t\t\t\ttask.szEmail = szCardHolderMail;\n\t\t\t\t\t\t\t\tAppValues.szMemberName = task.szFirstName = szCardHolderName;\n\t\t\t\t\t\t\t\tAppValues.szMemberSurname = task.szLastName = szCardHolderSurname;\n\t\t\t\t\t\t\t\tAppValues.szMemberPrefix = task.szPrefix = personaltitleSpinner\n\t\t\t\t\t\t\t\t\t\t.getSelectedItem().toString();\n\t\t\t\t\t\t\t\ttask.szPassword = passwordTextBox.getText()\n\t\t\t\t\t\t\t\t\t\t.toString();\n\t\t\t\t\t\t\t\ttask.szPaxPassport = szPaxPassport;\n\t\t\t\t\t\t\t\ttask.szPhone = \"\";\n\t\t\t\t\t\t\t\tif (offersCheckBox.isChecked())\n\t\t\t\t\t\t\t\t\ttask.szSubscription = \"Y\";\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\ttask.szSubscription = \"N\";\n\n\t\t\t\t\t\t\t\ttask.execute();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (!bIsPaymentSuccess) {\n\t\t\t\t\t\t\t\t\tmDialog = showProgressDialog(\"Payment processing...\");\n\t\t\t\t\t\t\t\t\tPaymentTask task = new PaymentTask(\n\t\t\t\t\t\t\t\t\t\t\tTravellerDetailsTabActivity.this,\n\t\t\t\t\t\t\t\t\t\t\tmHandler);\n\t\t\t\t\t\t\t\t\ttask.szXMLData = createXMLStructure(\"\", \"\",\n\t\t\t\t\t\t\t\t\t\t\tszCurrencyCode, szAmount,\n\t\t\t\t\t\t\t\t\t\t\tszCreditCardNumber,\n\t\t\t\t\t\t\t\t\t\t\tszValidityMonth, szValidityYear,\n\t\t\t\t\t\t\t\t\t\t\tszCVVCode, szBankCountryCode,\n\t\t\t\t\t\t\t\t\t\t\tszBankName, szCardHolderName,\n\t\t\t\t\t\t\t\t\t\t\tszCardHolderMail);\n\t\t\t\t\t\t\t\t\ttask.execute();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmDialog = showProgressDialog(\"Booking Hotel...\");\n\n\t\t\t\t\t\t\t\t\tAppValues.szMemberName = szCardHolderName;\n\t\t\t\t\t\t\t\t\tAppValues.szMemberSurname = szCardHolderSurname;\n\t\t\t\t\t\t\t\t\tAppValues.szMemberPrefix = personaltitleSpinner\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedItem().toString();\n\n\t\t\t\t\t\t\t\t\tBookHotelTask task = new BookHotelTask(\n\t\t\t\t\t\t\t\t\t\t\tTravellerDetailsTabActivity.this,\n\t\t\t\t\t\t\t\t\t\t\tmHandler);\n\t\t\t\t\t\t\t\t\ttask.posInList = posInList;\n\t\t\t\t\t\t\t\t\ttask.szHotelID = m_szHotelID;\n\t\t\t\t\t\t\t\t\ttask.roomCategPosition = roomCategPosition;\n\t\t\t\t\t\t\t\t\ttask.execute();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(TravellerDetailsTabActivity.this,\n\t\t\t\t\t\t\t\t\t\"No network connection\", Toast.LENGTH_LONG)\n\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalidemailalertdialog();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Toast.makeText(\n\t\t\t\t// TravellerDetailsTabActivity.this,\n\t\t\t\t// \"\" + szCardHolderName + szCardHolderSurname\n\t\t\t\t// + szBankName + szCreditCardNumber\n\t\t\t\t// + szCardHolderMail + szValidityYear\n\t\t\t\t// + szValidityMonth + szCVVCode\n\t\t\t\t// + szBankCountryCode + szCardHolderMail,\n\t\t\t\t// Toast.LENGTH_LONG).show();\n\n\t\t\t}", "@Override\n\tpublic String checkAccount(int idc) {\n\t\treturn null;\n\t}", "@Then(\"^user enters customer details$\")\n\tpublic void user_enters_customer_details(DataTable customer) {\n\t\tfor(Map<String, String> data :customer.asMaps())\n\t\t{\n\t\t\t \tdriver.findElement(By.name(\"name\")).sendKeys(data.get(\"customer\"));\n\t\t\t driver.findElement(By.xpath(\"//input[@type='radio'][@value='m']\")).click();\n\t\t\t driver.findElement(By.xpath(\"//input[@type='date']\")).sendKeys(data.get(\"DOB\"));\n//\t\t\t driver.findElement(By.name(\"addr\")).sendKeys(data.get(\"add\"));\n\t\t\t driver.findElement(By.name(\"city\")).sendKeys(data.get(\"city\"));\n\t\t\t driver.findElement(By.name(\"state\")).sendKeys(data.get(\"state\"));\n\t\t\t driver.findElement(By.name(\"pinno\")).sendKeys(data.get(\"pin\"));\n\t\t\t driver.findElement(By.name(\"telephoneno\")).sendKeys(data.get(\"mobile\"));\n\t\t\t driver.findElement(By.name(\"emailid\")).sendKeys(data.get(\"emailid\"));\n\t\t\t driver.findElement(By.name(\"password\")).sendKeys(data.get(\"password\"));\n\t\t\t \n\t\t}\n\t \n\t \n\t}" ]
[ "0.6576959", "0.610665", "0.60891354", "0.60468704", "0.60467184", "0.6040354", "0.6034957", "0.5986865", "0.59768784", "0.59761095", "0.59694713", "0.5945217", "0.5936836", "0.5864403", "0.58377355", "0.5832899", "0.5820835", "0.5806386", "0.58054674", "0.5789266", "0.578706", "0.57772803", "0.5760865", "0.5758957", "0.574715", "0.5710938", "0.56741196", "0.56663233", "0.56619495", "0.5638468", "0.5637887", "0.5637654", "0.5637558", "0.56372637", "0.5632724", "0.5623751", "0.5618279", "0.5600223", "0.559185", "0.55749977", "0.5572261", "0.5568282", "0.5566669", "0.55445224", "0.55393106", "0.55274236", "0.55228597", "0.55228275", "0.5512874", "0.5512442", "0.5511803", "0.5510654", "0.55063045", "0.5503786", "0.5499359", "0.5499359", "0.5489351", "0.5478277", "0.547148", "0.5468614", "0.5466699", "0.54632694", "0.54617095", "0.5453534", "0.54510325", "0.54451406", "0.5427248", "0.5422863", "0.5419857", "0.54071456", "0.54054374", "0.5404306", "0.53968155", "0.5394612", "0.53831494", "0.53800315", "0.537895", "0.5367754", "0.5363624", "0.5362375", "0.53607595", "0.53606105", "0.5349667", "0.5340317", "0.53272736", "0.5318768", "0.53139657", "0.5304496", "0.53014004", "0.5295149", "0.5294717", "0.5286846", "0.5282472", "0.5281544", "0.5280772", "0.52799004", "0.5278713", "0.5275353", "0.5271375", "0.5269497" ]
0.6647382
0
populate new bankList for Customer
public void addNewBenificiary() { setColBankCode(null); setCardNumber(null); setPopulatedDebitCardNumber(null); setApprovalNumberCard(null); setRemitamount(null); setColAuthorizedby(null); setColpassword(null); setApprovalNumber(null); setBooAuthozed(false); bankMasterList.clear(); localbankList.clear();// From View V_EX_CBNK lstDebitCard.clear(); // to fetch All Banks from View //getLocalBankListforIndicatorFromView(); localbankList = generalService.getLocalBankListFromView(session.getCountryId()); List<BigDecimal> duplicateCheck = new ArrayList<BigDecimal>(); List<ViewBankDetails> lstofBank = new ArrayList<ViewBankDetails>(); if (localbankList.size() != 0) { for (ViewBankDetails lstBank : localbankList) { if (!duplicateCheck.contains(lstBank.getChequeBankId())) { duplicateCheck.add(lstBank.getChequeBankId()); lstofBank.add(lstBank); } } } setBankMasterList(lstofBank); setBooRenderSingleDebit(true); setBooRenderMulDebit(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void assignBankAccounts() {\n\t\tfor (Customer customer : customerList) {\n\t\t\t//make sure customer has no current accounts before adding serialized accounts\n\t\t\tcustomer.clearAccounts();\n\t\t\t\n\t\t\tfor (BankAccount account : accountList) {\n\t\t\t\tif (account.getCustomer().getUsername().equals(customer.getUsername())) {\n\t\t\t\t\tcustomer.addAccount(account);\n\t\t\t\t} else if (account.getJointCustomer() != null\n\t\t\t\t\t\t&& account.getJointCustomer().getUsername().equals(customer.getUsername()))\n\t\t\t\t\tcustomer.addAccount(account);\n\t\t\t}\n\t\t}\n\t}", "public static void addBankAccount(Customer customer) {\r\n\t\tcustomerBankAccountList.add(customer);\t\r\n\t\tcustomer.makeBankAccount();\r\n\t}", "List<Customer> loadAllCustomer();", "public Bank() {\n\n\t\tcustomerList = new ArrayList<Customer>();\n\t\tCustomer C = new Customer(\"madison\", \"bynum\", \"madb\", \"123\");\n\t\tcustomerList.add(C);\n\t\temployeeList = new ArrayList<Employee>();\n\t\tEmployee E = new Employee(\"madi\", \"by\", \"madib\", \"1234\");\n\t\temployeeList.add(E);\n\t\tadminList = new ArrayList<Admin>();\n\t\tAdmin A = new Admin(\"amber\", \"stone\", \"amberstone195\", \"12345\");\n\t\tadminList.add(A);\n\t\tsbank.writeSerializeMyBank();\n\t\tsbank.loadSerializeMyBank();\n\t}", "List<Customer> getCustomerList();", "@Override\n\tpublic String toString() {\n\t\treturn \"Bank [customerList=\" + customerList + \", employeeList=\" + employeeList + \", adminList=\" + adminList\n\t\t\t\t+ \"]\";\n\t}", "public void getLocalBankListforIndicator() {\n\t\t\tList<BigDecimal> duplicateCheck = new ArrayList<BigDecimal>();\n\t\t\tList<BigDecimal> duplicateCheck1 = new ArrayList<BigDecimal>();\n\t\t\tList<ViewBankDetails> lstofBank = new ArrayList<ViewBankDetails>();\n\t\t\tList<ViewBankDetails> lstofBank1 = new ArrayList<ViewBankDetails>();\n\t\t\tbankMasterList.clear();\n\t\t\tchequebankMasterList.clear();\n\t\t\tsetRemitBankId(null);\n\t\t\tsetCardBankId(null);\n\t\t\tclearKnetDetails();\n\t\t\tlocalbankList = generalService.getLocalBankListFromView(session.getCountryId());\n\n\t\t\t// cheque banks purpose \n\t\t\tif(localbankList.size() != 0){\n\t\t\t\tchequebankMasterList.addAll(localbankList);\n\t\t\t}\n\n\t\t\t\n\t\t\tList<ViewBankDetails> localBankListinCollection = icustomerBankService.customerBanks(getCustomerId(), getColBankCode());\n\t\t\tif (localBankListinCollection.size() > 0) {\n\t\t\t\tbankMasterList.addAll(localBankListinCollection);\n\t\t\t} else {\n\t\t\t\tbankMasterList.addAll(localbankList);\n\t\t\t}\n\t\t\tif (bankMasterList.size() != 0) {\n\t\t\t\tfor (ViewBankDetails lstBank : bankMasterList) {\n\t\t\t\t\tif (!duplicateCheck.contains(lstBank.getChequeBankId())) {\n\t\t\t\t\t\tduplicateCheck.add(lstBank.getChequeBankId());\n\t\t\t\t\t\tlstofBank.add(lstBank);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbankMasterList.clear();\n\t\t\tbankMasterList.addAll(lstofBank);\n\n\n\t\t\tif (chequebankMasterList.size() != 0) {\n\t\t\t\tfor (ViewBankDetails lstBank : chequebankMasterList) {\n\t\t\t\t\tif (!duplicateCheck1.contains(lstBank.getChequeBankId())) {\n\t\t\t\t\t\tduplicateCheck1.add(lstBank.getChequeBankId());\n\t\t\t\t\t\tlstofBank1.add(lstBank);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tchequebankMasterList.clear();\n\t\t\tchequebankMasterList.addAll(lstofBank1);\n\n\t\t}", "public void listAllCustomers () {\r\n\t\t\r\n customersList = my.resturnCustomers();\r\n\t\t\r\n\t}", "public void populateCustomerTable() throws SQLException {\n\n try {\n\n PreparedStatement populateCustomerTableview = DBConnection.getConnection().prepareStatement(\"SELECT * from customers\");\n ResultSet resultSet = populateCustomerTableview.executeQuery();\n allCustomers.removeAll();\n\n while (resultSet.next()) {\n\n int customerID = resultSet.getInt(\"Customer_ID\");\n String name = resultSet.getString(\"Customer_Name\");\n String address = resultSet.getString(\"Address\");\n String postal = resultSet.getString(\"Postal_Code\");\n String phone = resultSet.getString(\"Phone\");\n String created = resultSet.getString(\"Create_Date\");\n String createdBy = resultSet.getString(\"Created_By\");\n String lastUpdate = resultSet.getString(\"Last_Update\");\n String updatedBy = resultSet.getString(\"Last_Updated_By\");\n String divisionID = resultSet.getString(\"Division_ID\");\n\n Customer newCustomer = new Customer(customerID, name, address, postal, phone, created, createdBy, lastUpdate,\n updatedBy, divisionID);\n\n allCustomers.add(newCustomer);\n }\n\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "public CustomerDatabase(){\n\t\tlist = new ArrayList<Customer>();\n\t}", "@Override\r\n\tpublic ArrayList<BankAccountVO> getBankAccountVOList() {\n\t\tArrayList<BankAccountVO> BankAccountList = new ArrayList<>();\r\n\t\tBankAccountList.add(new BankAccountVO(\"SS141250110\",200000));\r\n\t\treturn BankAccountList;\r\n\t}", "private void loadCustomerData() {\n\t\tCustomerDTO cust1 = new CustomerDTO();\n\t\tcust1.setId(null);\n\t\tcust1.setFirstName(\"Steven\");\n\t\tcust1.setLastName(\"King\");\n\t\tcust1.setEmail(\"king@gmail.com\");\n\t\tcust1.setCity(\"Hyderabad\");\n\t\tcustomerService.createCustomer(cust1);\n\n\t\tCustomerDTO cust2 = new CustomerDTO();\n\t\tcust2.setId(null);\n\t\tcust2.setFirstName(\"Neena\");\n\t\tcust2.setLastName(\"Kochhar\");\n\t\tcust2.setEmail(\"kochhar@gmail.com\");\n\t\tcust2.setCity(\"Pune\");\n\t\tcustomerService.createCustomer(cust2);\n\n\t\tCustomerDTO cust3 = new CustomerDTO();\n\t\tcust3.setId(null);\n\t\tcust3.setFirstName(\"John\");\n\t\tcust3.setLastName(\"Chen\");\n\t\tcust3.setEmail(\"johnr@gmail.com\");\n\t\tcust3.setCity(\"Bangalore\");\n\t\tcustomerService.createCustomer(cust3);\n\n\t\tCustomerDTO cust4 = new CustomerDTO();\n\t\tcust4.setId(null);\n\t\tcust4.setFirstName(\"Nancy\");\n\t\tcust4.setLastName(\"Greenberg\");\n\t\tcust4.setEmail(\"nancy@gmail.com\");\n\t\tcust4.setCity(\"Mumbai\");\n\t\tcustomerService.createCustomer(cust4);\n\n\t\tCustomerDTO cust5 = new CustomerDTO();\n\t\tcust5.setId(5L);\n\t\tcust5.setFirstName(\"Luis\");\n\t\tcust5.setLastName(\"Popp\");\n\t\tcust5.setEmail(\"popp@gmail.com\");\n\t\tcust5.setCity(\"Delhi\");\n\t\tcustomerService.createCustomer(cust5);\n\n\t}", "private void loadCustomerCombo() {\n ArrayList<CustomerDTO> allCustomers;\n try {\n allCustomers = ctrlCustomer.get();\n for (CustomerDTO customer : allCustomers) {\n custIdCombo.addItem(customer.getId());\n }\n } catch (Exception ex) {\n Logger.getLogger(PlaceOrderForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public BankAccount(Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t\tcustomerBankAccountList.add(customer);\r\n\t\t\r\n\t\tCustomerController.addBankAccountList(this);\r\n\t\t\r\n\t\tsilverState = new SilverLevel(this);\r\n\t\tgoldState = new GoldLevel(this);\r\n\t\tplatinumState = new PlatinumLevel(this);\r\n\t\t\r\n\t\tlevelState = silverState;\r\n\t\t\r\n\t}", "public CustomerService() {\n\n Customer c1 = new Customer(\"Brian May\", \"45 Dalcassian\", \"brian@gmail.com\", 123);\n Customer c2 = new Customer(\"Roger Taylor\", \"40 Connaught Street\", \"roger@gmail.com\", 123);\n Customer c3 = new Customer(\"John Deacon\", \"2 Santry Avenue\", \"john@gmail.com\", 123);\n Customer c4 = new Customer(\"Paul McCartney\", \"5 Melville Cove\", \"paul@gmail.com\", 123);\n\n c1.setIdentifier(1);\n c2.setIdentifier(2);\n c3.setIdentifier(3);\n c4.setIdentifier(4);\n customers.add(c1);\n customers.add(c2);\n customers.add(c3);\n customers.add(c4);\n\n c1.addAccount(new Account(101));\n c2.addAccount(new Account(102));\n c2.addAccount(new Account(102));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c4.addAccount(new Account(104));\n\n }", "List<Client> getAllClients(Bank bankId);", "List<Customer> getList();", "public void addMigratedCustomers(Bank bank, List<Klient> migratedCustomers) {\n migratedCustomers.forEach(k -> {\n k.setUID(bank.getNextCustomerNumber());\n k.getBills().stream().forEach(r-> {\n fixAccountKind(r);\n fixAccountNumber(r, bank.getNextAccountNumber());\n });\n }\n );\n //ustawiamy rodzaje kont i poprawiamy numery IBAN\n\n //dodajemy zmigrowanych klientow do aktualnych klientow banku\n List<Klient> bankCustomers = bank.getClients();\n bankCustomers.addAll(migratedCustomers);\n bank.setClients(bankCustomers);\n }", "public static ArrayList<CustomerInfoBean> getCustomers() {\r\n\t\tSystem.out.println(\"CustomerBAL.get_customers()\");\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, e_status, c_status, state;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tConnection connection = Connect.getConnection();\r\n\t\ttry {\r\n\r\n\t\t\tif (connection != null) {\r\n\t\t\t\t// Begin Stored Procedure Calling -- Jetander\r\n\t\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t\t.prepareCall(\"{call get_customers()}\");\r\n\t\t\t\tResultSet rs = prepareCall.executeQuery();\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tcustomerId = rs.getInt(\"customer_id\");\r\n\t\t\t\t\tcustomerName = rs.getString(\"customer_name\");\r\n\t\t\t\t\tcnicNo = rs.getString(\"customer_cnic\");\r\n\t\t\t\t\tphoneNo = rs.getString(\"customer_phone\");\r\n\t\t\t\t\tdistrict = rs.getString(\"district_name\");\r\n\t\t\t\t\tmonthlyIncome = rs.getString(\"salary_range\");\r\n\t\t\t\t\tgsmNumber = rs.getString(\"appliance_gsmno\");\r\n\t\t\t\t\tstate = rs.getInt(\"appliance_status\");\r\n\t\t\t\t\tsalesmanName = rs.getString(\"salesman_name\");\r\n\r\n\t\t\t\t\tapplianceId = rs.getInt(\"appliance_id\");\r\n\t\t\t\t\tsalesmanId = rs.getInt(\"salesman_id\");\r\n\t\t\t\t\tapplianceName = rs.getString(\"appliance_name\");\r\n\t\t\t\t\te_status = rs.getInt(\"e.status\");\r\n\t\t\t\t\tc_status = rs.getInt(\"cs.status\");\r\n\t\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\t\tbean.setApplianceStatus(state);\r\n\t\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\t\tbean.setStatus(e_status);\r\n\t\t\t\t\tbean.setCustomerStatus(c_status);\r\n\t\t\t\t\tcustomerList.add(bean);\r\n\t\t\t\t\t// End Stored Procedure Calling -- Jetander\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (connection != null) {\r\n\t\t\t\tconnection.close();\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public List<Branch> getBranchListForBank(String name);", "public static ObservableList<Customer> getCustomerList() throws SQLException{\r\n customerList.clear();\r\n Connection conn = DBConnection.getConnection();\r\n String selectStatement = \"SELECT * FROM customers;\";\r\n DBQuery.setPreparedStatement(conn, selectStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.execute();\r\n ResultSet rs = ps.getResultSet();\r\n\r\n //creates customer and adds to list\r\n while(rs.next())\r\n {\r\n int customerID = rs.getInt(\"Customer_ID\");\r\n String customerName = rs.getString(\"Customer_Name\");\r\n String address = rs.getString(\"Address\");\r\n String state = getDivisionName(rs.getInt(\"Division_ID\"));\r\n String postalCode = rs.getString(\"Postal_Code\");\r\n String country = getCountryName(getCountryID(rs.getInt(\"Division_ID\")));\r\n String phoneNumber = rs.getString(\"Phone\");\r\n Customer customer = new Customer(customerID,customerName,address,state,postalCode,country,phoneNumber);\r\n customerList.add(customer);\r\n }\r\n return customerList;\r\n }", "public CustomerTableModel(List list) {\n this();\n customers.addAll(list);\n }", "public BankModel() {\n accounts = new ArrayList<AccountModel>();\n\n // Master account inbedded into system for easy access to test features.\n accounts.add(new AccountModel(\"c\", \"123\", 500));\n }", "public static ArrayList<CustomerInfoBean> getDoCutomers(int districtId) {\r\n\t\tSystem.out.println(\"CustomerBAL.get_do_customers()\");\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status, familySize, state;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tConnection connection = Connect.getConnection();\r\n\t\ttry {\r\n\t\t\tif (connection != null) {\r\n\t\t\t\t// Begin Stored Procedure Calling -- Jetander\r\n\t\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t\t.prepareCall(\"{call get_do_customers(?)}\");\r\n\t\t\t\tprepareCall.setInt(1, districtId);\r\n\t\t\t\tResultSet rs = prepareCall.executeQuery();\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\t\tstate = rs.getInt(8);\r\n\t\t\t\t\tsalesmanName = rs.getString(9);\r\n\t\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\t\tfamilySize = rs.getInt(14);\r\n\t\t\t\t\t// End Stored Procedure Calling -- Jetander\r\n\t\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\t\tbean.setApplianceStatus(state);\r\n\t\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\t\tbean.setStatus(status);\r\n\t\t\t\t\tbean.setFamilySize(familySize);\r\n\t\t\t\t\tcustomerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\trs.close();\r\n\t\t\t\tconnection.close();\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "List<Customer> getCustomers();", "public void prepareAdd() {\r\n\t\tcurrent = new Customer();\r\n\t\tcurrent.setCustomerCode(generateCode.generateCustomerCode());\r\n\t}", "List<TransactionRec> loadRecordsByAccount(BankAccount account);", "public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}", "public Customer(String name, double initialAmount) { //constructor for our customer class\r\n this.name = name;\r\n addId++;\r\n this.custId=addId;\r\n this.transactions = new ArrayList<>();\r\n balance=initialAmount;\r\n transactions.add(initialAmount);\r\n }", "@Override\n\tpublic List<Customer> getCustomerList() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"Select c from Customer c\");\n\t\tList<Customer> list=(List<Customer>)query.getResultList();\n\t\t/*\n\t\t * Customer customer = (Customer)session.load(Customer.class,customerId);\n\t\t * */\n\t\treturn list;\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_onCash() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name ,sld.payement_option, a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\" WHERE sld.payement_option=0\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "private void initData() {\n ContractList conl = new ContractList();\n String iCard = txtindentify.getText().trim();\n if (conl.getacc(iCard) == 0) {\n txtAcc.setText(\"NEW CUSTOMER\");\n\n } else {\n Customer cus = new Customer();\n CustomerList cl = new CustomerList();\n cus = cl.getcus(iCard);\n txtAcc.setText(Integer.toString(cus.acc));\n\n }\n }", "public static ArrayList<CustomerBean> getCutomerByDistrict(String District) {\r\n\t\tCustomerBean bean = null;\r\n\t\tArrayList<CustomerBean> list = new ArrayList<CustomerBean>();\r\n\t\tint customerId, familyMember;\r\n\t\tdouble monthlyIncome, familyIncome;\r\n\t\tString customerName, cnicNo, phoneNo, address, district, customer_pic, accountCreatedDate;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT customer_id, customer_name, customer_cnic, customer_address, customer_district, customer_family_size, customer_phone,customer_monthly_income, customer_family_income, customer_payment_type, customr_image, created_on FROM customer Where customer_address = ?;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tstmt.setString(1, District);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\taddress = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tfamilyMember = rs.getInt(6);\r\n\t\t\t\tphoneNo = rs.getString(7);\r\n\t\t\t\tmonthlyIncome = rs.getDouble(8);\r\n\t\t\t\tfamilyIncome = rs.getDouble(9);\r\n\t\t\t\trs.getString(10);\r\n\t\t\t\tcustomer_pic = rs.getString(11);\r\n\t\t\t\taccountCreatedDate = rs.getString(12);\r\n\t\t\t\tbean = new CustomerBean();\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setAddress(address);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setFamilyMember(familyMember);\r\n\t\t\t\tbean.setFamilyIncome(familyIncome);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\r\n\t\t\t\tbean.setAccountCreatedDate(accountCreatedDate);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\tbean.setCustomer_pic(customer_pic);\r\n\t\t\t\tlist.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public Bank() {\n\t\tnamesTree = new BankAccountsBinarySearchTree(new AccountComparatorByName());\n\t\taccountNumbersTree = new BankAccountsBinarySearchTree(new AccountComparatorByNumber());\n\t}", "List<Account> getAccountsForCustomerId(int customerId);", "@Override\r\n\tpublic boolean createAccount(CustomerBean cb) {\n\t\r\n\t\treturn customerList.add(cb);\r\n\t}", "@Override\n public List<BloodBank> getAllBloodBank() throws SQLException {\n logger.info(\"in the List<BloodBank> getAllBloodBank() method in \"+BloodBankSvcJDBCImpl.class.getName());\n List<BloodBank> displayList = new ArrayList();\n try\n {\n logger.warn(\"in try, may cause errors\");\n this.connectToDatabase();\n \n Statement stmt = this.getConnection().createStatement();\n //sql query\n String selectSql = \"SELECT * FROM `blood_bank`;\"\n + \"SELECT * FROM `blood_bank_address`;\";\n //set join string here\n ResultSet rs = stmt.executeQuery(selectSql);\n \n boolean result = rs.next();\n \n if(result == false)\n {\n logger.warn(\"NO results found!!\");\n System.out.println(\"Empty!!\\n\");\n }\n else\n {\n while(rs.next())\n {\n BloodBank bloodBank = new BloodBank();\n \n bloodBank.setId(rs.getString(\"idblood_bank\"));\n bloodBank.setName(rs.getString(\"name\"));\n bloodBank.setNumber(rs.getString(\"phone\"));\n //bloodBank.getBloodBankAddress().setAddressId(rs.getString(\"address_id\"));\n \n displayList.add(bloodBank);\n }\n System.out.println(\"Success!!!\");\n //return displayList;\n }\n }\n catch(SQLException ex)\n {\n logger.error(\"JDBC List all error\"+ex.toString()+\" in->\"+BloodBankSvcJDBCImpl.class.getName());\n System.out.println(\"Error: \" + ex.toString() + \" could not retreive list\");\n }\n finally{\n close();\n }\n return displayList;\n }", "static void register() {\r\n\t\tSystem.out.println(\"enter no of customers\");\r\n\t\tint n=scan.nextInt();\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\tCustomer cust=new Customer();\r\n\t\tSystem.out.println(\"enter first name\");\r\n\t\tcust.setFirstName(scan.next());\r\n\t\tSystem.out.println(\"enter last name\");\r\n\t\tcust.setLastName(scan.next());\r\n\t\tSystem.out.println(\"enter aadhar number\");\r\n\t\tcust.setAadharNo(scan.nextLong());\r\n\t\tSystem.out.println(\"enter address\");\r\n\t\tcust.setAddress(scan.next());\r\n\t\tSystem.out.println(\"enter mobile number\");\r\n\t\tcust.setMobileNo(scan.nextLong());\r\n\t\tSystem.out.println(\"enter password\");\r\n\t\tcust.setPassword(scan.next());\r\n\t\tSystem.out.println(\"enter account number\");\r\n\t\tlong no= 10000 + new Random().nextInt(90000);\r\n\t\t//System.out.println(Math.abs(cust.getAccNo()));\r\n\t\tlist.add(cust);\r\n\t\t}\r\n\t}", "List selectByExample(CusBankAccountExample example);", "public static List<Customer> getCustomers(){\n \treturn Customer.findAll();\n }", "public BankImpl() {\n accounts = new HashMap<Integer,Account>();\n }", "void generate(List<Customer> customers);", "@Override\n public List<Customer> listAll() {\n\n\n Customer c1 = new Customer();\n Customer c2 = new Customer();\n Customer c3 = new Customer();\n\n List<Customer> list = new ArrayList<>();\n list.add(c1);\n list.add(c2);\n list.add(c3);\n\n System.out.println(\"demo\");\n System.out.println(\"Entering test\");\n\n return list;\n }", "public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }", "public CustomerListForm() {\n initComponents();\n findAllData();\n }", "@Override\n\tpublic List<BankCategory> getBankCategoryList() throws Exception {\n\t\tString sql = \" SELECT bank_category_id , bank_name , bank_cate FROM bank_category WHERE 1 = 1 \";\n\t\tList<BankCategory> list = this.getList(sql, new Object[]{}, BankCategory.class);\n\t\treturn list;\n\t}", "private void listBalances() {\n\t\t\r\n\t}", "private static void initializeLists() {\n\t\t\n\t\t//read from serialized files to assign array lists\n\t\t//customerList = (ArrayList<Customer>) readObject(customerFile);\n\t\t//employeeList = (ArrayList<Employee>) readObject(employeeFile);\n\t\t//applicationList = (ArrayList<Application>) readObject(applicationFile);\n\t\t//accountList = (ArrayList<BankAccount>) readObject(accountFile);\n\t\t\n\t\t//read from database to assign array lists\n\t\temployeeList = (ArrayList<Employee>)employeeDao.readAll();\n\t\tcustomerList = (ArrayList<Customer>)customerDao.readAll();\n\t\taccountList = (ArrayList<BankAccount>) accountDao.readAll();\n\t\tapplicationList = (ArrayList<Application>)applicationDao.readAll();\n\t\t\n\t\tassignBankAccounts();\n\t}", "public static List<Boekhouding.Bank> oldBankinstellingToNewBank() {\r\n List<Boekhouding.Bank> newBanken = new ArrayList();\r\n List<Old.Boekhouding.Bankinstelling> bankInstellingen = Import.getBankinstellingen().stream().map(b -> (Old.Boekhouding.Bankinstelling) b).collect(Collectors.toList());\r\n\r\n bankInstellingen.forEach(b -> {\r\n newBanken.add(new Bank(b.getId_bank(), b.getNaam(), b.getBankcode()));\r\n });\r\n return newBanken;\r\n }", "Databank getBank();", "public List<Customer> getCustomerList() {\n return new ArrayList<Customer>(customersList);\n }", "public BankDataBase()\n {\n accounts = new Account[ 2 ];\n accounts[ 0 ] = new Account( 12345, 54321, 1000.0, 1200.0 );\n accounts[ 1 ] = new Account( 98765, 56789, 200.0, 200.0 );\n }", "public ArrayList<Customer> getRegisterList();", "public List<CustomerModel> getCustomers();", "public static void setList(CustomerList list){\n\t\tUserInterface.list = list;\n\t}", "public static ArrayList<CustomerBean> getCutomerByName(\r\n\t\t\tString customerFirstName) {\r\n\t\tCustomerBean bean = null;\r\n\t\tArrayList<CustomerBean> list = new ArrayList<CustomerBean>();\r\n\t\tint customerId, familyMember;\r\n\t\tdouble monthlyIncome, familyIncome;\r\n\t\tString customerName, cnicNo, phoneNo, address, district, customer_pic, accountCreatedDate;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT customer_id, customer_name, customer_cnic, customer_address, customer_district, customer_family_size, customer_phone,customer_monthly_income, customer_family_income, customer_payment_type, customr_image, created_on FROM customer Where user_name = ?;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tstmt.setString(1, customerFirstName);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\taddress = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tfamilyMember = rs.getInt(6);\r\n\t\t\t\tphoneNo = rs.getString(7);\r\n\t\t\t\tmonthlyIncome = rs.getDouble(8);\r\n\t\t\t\tfamilyIncome = rs.getDouble(9);\r\n\t\t\t\trs.getString(10);\r\n\t\t\t\tcustomer_pic = rs.getString(11);\r\n\t\t\t\taccountCreatedDate = rs.getString(12);\r\n\t\t\t\tbean = new CustomerBean();\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setAddress(address);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setFamilyMember(familyMember);\r\n\t\t\t\tbean.setFamilyIncome(familyIncome);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\r\n\t\t\t\tbean.setAccountCreatedDate(accountCreatedDate);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\tbean.setCustomer_pic(customer_pic);\r\n\t\t\t\tlist.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tlogger.error(\"\", ex);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "@RequestMapping(value = \"/viewAllBank\", method = RequestMethod.GET)\n\tpublic List<Bank> viewAllBank() {\n\t\tAtmDAO ad = new AtmDAO();\n\t\tList<Bank> listBank = ad.getAllBank();\n\t\treturn listBank;\n\t}", "public ArrayList<Customer> getAllCustomers();", "@Override\n\tpublic void setBankCustomerPerson() {\n\t\t\n\t}", "@Override\n\n\t\tpublic List<Bill> viewBillsByCustomerId(String custId) {\n\t\t\tList<Bill> bills = billDao.findBillByCustomerId(custId);\n\t\t\tif(bills.size()==0) {\n\t\t\t\tthrow new BillNotFoundException(\"No bills with given customer id\");\n\t\t\t}\n\t\t\treturn bills;\n\t\t}", "@Override\r\n\tpublic List<SbiBank> DisplayingRecord() {\n\t\tTransaction tx=null;\r\n\t\tSession ses=HBNutility.getSession();\r\n\t\ttx=ses.beginTransaction();\r\n\t\tCriteria ct=ses.createCriteria(SbiBank.class);\r\n\t\tList<SbiBank> sb=ct.list();\r\n\t\treturn sb;\r\n\t}", "public static ArrayList<CustomerBean> getCutomersById(int customerID) {\r\n\t\tCustomerBean bean = null;\r\n\t\tArrayList<CustomerBean> customerList = new ArrayList<CustomerBean>();\r\n\t\tint customerId, familyMember;\r\n\t\tdouble monthlyIncome, familyIncome;\r\n\t\tString customerName, cnicNo, phoneNo, address, district, customer_pic, accountCreatedDate;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT customer_id, customer_name, customer_cnic, customer_address, customer_district, customer_family_size, customer_phone,customer_monthly_income, customer_family_income, customer_payment_type, customr_image, created_on FROM customer where customer_id=?;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tstmt.setInt(1, customerID);\r\n\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\taddress = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tfamilyMember = rs.getInt(6);\r\n\t\t\t\tphoneNo = rs.getString(7);\r\n\t\t\t\tmonthlyIncome = rs.getDouble(8);\r\n\t\t\t\tfamilyIncome = rs.getDouble(9);\r\n\t\t\t\trs.getString(10);\r\n\t\t\t\tcustomer_pic = rs.getString(11);\r\n\t\t\t\taccountCreatedDate = rs.getString(12);\r\n\t\t\t\tbean = new CustomerBean();\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setAddress(address);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setFamilyMember(familyMember);\r\n\t\t\t\tbean.setFamilyIncome(familyIncome);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\r\n\t\t\t\tbean.setAccountCreatedDate(accountCreatedDate);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\tbean.setCustomer_pic(customer_pic);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t\trs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tcon.close();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_Accepted() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id WHERE e.status=1 or e.status=6;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public String list(){\n\t\tif(name == null) {\n\t\t\ttry {\n\t\t\t\tlist = customerBO.getAll();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tList<Customer> l = new ArrayList<Customer>();\n\t\t\ttry {\n\t\t\t\tl = customerBO.getAll();\n\t\t\t\tfor(Customer cus: l) {\n\t\t\t\t\tString CustomerName = cus.getFirstName() + \" \" + cus.getLastName();\n\t\t\t\t\tif(CustomerName.compareTo(name) == 0) {\n\t\t\t\t\t\tlist.add(cus);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint total = list.size();\n\t\t\t\tint div = total / STATIC_ROW_MAX;\n\t\t\t\tif(div * STATIC_ROW_MAX == total) {\n\t\t\t\t\ttotalPage = div;\n\t\t\t\t} else {\n\t\t\t\t\ttotalPage = div + 1;\n\t\t\t\t}\t\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\n\t\treturn \"list\";\n\t}", "public CustomerTableModel() {\n customers = new ArrayList();\n }", "public void listCustomers() {\n\t\tSystem.out.println(\"\\nCustomers llegits desde la base de dades\");\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(System.out::println);\n\n\t}", "private void loadAllToTable() {\n \n try {\n ArrayList<CustomerDTO> allCustomers=cusCon.getAllCustomers();\n DefaultTableModel dtm=(DefaultTableModel) tblCustomers.getModel();\n dtm.setRowCount(0);\n \n if(allCustomers!=null){\n for(CustomerDTO customer:allCustomers){\n \n Object[] rowdata={\n customer.getcId(),\n customer.getcName(),\n customer.getContact(),\n customer.getCreditLimit(),\n customer.getCreditDays()\n };\n dtm.addRow(rowdata);\n \n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AddCustomer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<BookingCus> BookingC() {\n\n try {\n //create a new vector to save the data on DB\n List<BookingCus> bookCus = new ArrayList<BookingCus>();\n //SQL code\n String cmdsql = \"SELECT * FROM BookingCust;\";\n PreparedStatement stmt = connect.prepareStatement(cmdsql);\n ResultSet rs = stmt.executeQuery();\n\n //While there is some register, save it in the list\n while (rs.next()) {\n BookingCus BookingCuslist = new BookingCus();\n\n BookingCuslist.setIdBookingCust(rs.getInt(\"idBookingCust\"));\n BookingCuslist.setidCus(rs.getInt(\"idCus\"));\n BookingCuslist.setfname(rs.getString(\"fname\"));\n BookingCuslist.setDate(rs.getString(\"Date\"));\n BookingCuslist.setTime(rs.getString(\"Time\"));\n\n bookCus.add(BookingCuslist);\n }\n return bookCus;\n\n } catch (SQLException error) {\n JOptionPane.showMessageDialog(null, \"ERROR: FAIL TO BOOK YOUR SLOT, TRY AGAIN!\", \"ERROR MESSAGE!\", JOptionPane.ERROR_MESSAGE);\n }\n return null;\n }", "@Override\r\n\tpublic Account loadAccount(String accountNumber) {\n\t\tAccount account1=null;\r\n\t\ttry {\r\n\t\t\taccount1 = account.getclone(account);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tString sql = \"SELECT a.accountNumber, a.balance, a.accountType, b.name, b.email, c.street, c.city, c.zip, c.state \"+\r\n \"FROM customer b \"+\r\n \"INNER JOIN address c \"+\r\n \"ON b.addressID = c.ID \"+\r\n \"INNER JOIN account a \"+\r\n \"ON b.ID = a.CustomerID \"+\r\n\t\t\"WHERE a.accountNumber = \"+accountNumber+\";\" ;\r\n\t\tPreparedStatement preparedStatement;\r\n\r\n\r\n\r\ntry {\r\n\r\n\tpreparedStatement = con.prepareStatement(sql);\r\n\t\r\n\t\r\n ResultSet rs=preparedStatement.executeQuery();\r\n\r\n\r\n while ( rs.next() ) {\r\n \taccount1.setAccountNumber(Integer.toString(rs.getInt(1)));\r\n \taccount1.setBalance((double) rs.getInt(2));\r\n \tAccountType accty=BankAccountType.CHECKING;\r\n \tif(\"SAVING\".equalsIgnoreCase(rs.getString(3))){\r\n \t\taccty=BankAccountType.SAVING;\r\n \t}\r\n \taccount1.setAccountType(accty);\r\n \taccount1.getCustomer().setName(rs.getString(4));\r\n \taccount1.getCustomer().setEmail(rs.getString(5));\r\n \taccount1.getCustomer().getAddress().setStreet(rs.getString(6));\r\n \taccount1.getCustomer().getAddress().setCity(rs.getString(7));\r\n \taccount1.getCustomer().getAddress().setZip(rs.getString(8));\r\n \taccount1.getCustomer().getAddress().setState(rs.getString(9));\r\n \taccount1.setAccountEntries(getAccountEntry(accountNumber));\r\n \t\r\n System.out.println(account1);\r\n \r\n }\r\n} catch (SQLException e) {\r\n\t// TODO Auto-generated catch block\r\n\tSystem.out.println(\"Connection Failed! Check output console\");\r\n\te.printStackTrace();\r\n}\r\nlog();\r\n\r\n \r\nreturn account1;\r\n\t}", "BankDetail() {\n this.isValid = new Boolean(false);\n this.bankAccountNo = new String();\n this.bankAccountHolderName = new String();\n this.bankCountry = new String();\n this.IFSC = new String();\n }", "@Override\n public List<Account> listAccounts() {\n currentCustomer.findAndUpdateAccounts();\n // return list of accounts the customer owns\n return currentCustomer.getAccounts();\n }", "public Bank() {\n accounts = new Account[2];\n numOfAccounts = 0;\n }", "public ArrayList<Customer> getAllCustomers(){\n ArrayList<Customer> customers = new ArrayList<>();\n\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email FROM Customer \");\n\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n customers.add(\n new Customer(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\")\n ));\n\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return customers;\n }", "private void initList(CartInfo ci) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void showCreateCustomer(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n request.setAttribute(\"customerTypes\",customerTypeService.findAll());\n RequestDispatcher dispatcher= request.getRequestDispatcher(\"/customer/create.jsp\");\n dispatcher.forward(request,response);\n System.out.println(\"customerTypes\" + customerTypeService.findAll());\n }", "void newLoans(List<Loan> loans);", "Customers createCustomers();", "@Override\r\n\tpublic Map<String, List<NewAccount>> Accountlist(int UserID) throws SQLException {\n\t\tList<NewAccount> accounts = createAccountDao.Accountlist(UserID);\r\n\t\tSystem.out.println(\"[CreateAccountDaoImp][save] New account save status : \" + accounts);\r\n\t\tList<NewAccount> loanAccounts = new ArrayList<NewAccount>();\r\n\t\tList<NewAccount> savingAccount = new ArrayList<NewAccount>();\r\n\t\tList<NewAccount> creditAccount = new ArrayList<NewAccount>();\r\n\t\tMap<String, List<NewAccount>> accountsMap = new HashMap<String, List<NewAccount>>();\r\n\r\n\t\t// Account Sorting\r\n\t\tfor (int i = 0; i < accounts.size(); i++) {\r\n\t\t\t\r\n\t\t\tif (accounts.get(i).getAccountType().equals(\"Loans\")) {\r\n\t\t\t\t\r\n\t\t\t\tloanAccounts.add(accounts.get(i));\r\n\t\t\t\t\r\n\t\t\t} else if (accounts.get(i).getAccountType().equals(\"Accounts\")) {\r\n\t\t\t\t\r\n\t\t\t\tsavingAccount.add(accounts.get(i));\r\n\t\t\t\t\r\n\t\t\t} else if (accounts.get(i).getAccountType().equals(\"Cards\")) {\r\n\t\t\t\tcreditAccount.add(accounts.get(i));\r\n\t\t\t}\r\n\t\t\t// credit //accountsMap.put(\"loan\",accounts.get(i));\r\n\t\t}\r\n\t\taccountsMap.put(\"loanAccount\", loanAccounts);\r\n\t\taccountsMap.put(\"savingsAccount\", savingAccount);\r\n\t\taccountsMap.put(\"creditAccount\", creditAccount);\r\n\t\tSet<String> key = accountsMap.keySet();\r\n\t\tIterator<String> iterator = key.iterator();\r\n\t/*\twhile (iterator.hasNext()) {\r\n\t\t\tString accountType = iterator.next();\r\n\r\n\t\t\tSystem.out.println(\"----------------------\" + accountType + \"------------------------\");\r\n\t\t\tSystem.out.println(\"|------------\" + accountsMap.get(accountType) + \"---------------|\");\r\n\t\t\tSystem.out.println(\"-----------------End of first Account Type-------------------\");\r\n\t\t}*/\r\n\r\n\t\treturn accountsMap;\r\n\t}", "public void TestAccount1() {\n\n AccountCreator account = new AccountCreator();\n account.setFirstName(\"Bob\");\n account.setLastName(\"Smith\");\n account.setAddress(\"5 Rain Road\");\n account.setPIN();\n account.setTestBalance(300);\n accountList.add(account);\n\n }", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "public BankDatabase() {\r\n accounts = new Account[3];\r\n Connection c = null;\r\n Statement stmt = null;\r\n try {\r\n Class.forName(\"org.postgresql.Driver\");\r\n c = DriverManager\r\n .getConnection(\"jdbc:postgresql://localhost:5432/ATM\",\r\n \"postgres\", \"0000\");\r\n c.setAutoCommit(false);\r\n stmt = c.createStatement();\r\n ResultSet rs = stmt.executeQuery( \"SELECT * FROM accounts;\" );\r\n var i = 0;\r\n while ( rs.next() ) {\r\n int theAccountNumber = rs.getInt(\"accountnumber\");\r\n int thePin = rs.getInt(\"pin\");\r\n double theAvailiableBalance = rs.getDouble(\"availiablebalance\");\r\n double theTotalBalance = rs.getDouble(\"totalbalance\");\r\n accounts[i] = new Account( theAccountNumber, thePin, theAvailiableBalance, theTotalBalance);\r\n i++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n c.close();\r\n } catch ( Exception e ) {\r\n System.err.println( e.getClass().getName()+\": \"+ e.getMessage() );\r\n System.exit(0);\r\n }\r\n\r\n\r\n// accounts = new Account[2]; // just 2 accounts for testing\r\n// accounts[0] = new Account(12345, 54321, 1000.0, 1200.0);\r\n// accounts[1] = new Account(98765, 56789, 200.0, 200.0);\r\n }", "public void addCustomer(String c){\n\t\tif(!containsCustomer(c)){\n\t\t\tCustomer e = new Customer(c);\n\t\t\tlist.add(e);\n\t\t}\n\t}", "public static List<Address> listAddressBillingByIdCustomer(int a) throws SQLException, NamingException {\n List<Address> result = new ArrayList<Address>();\n Database database = Database.getInstance();\n Connection connection;\n connection = database.getConnection();\n PreparedStatement statement = connection.prepareStatement(viewAddressBillingByIdCustomer);\n statement.setInt(1, a);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n Address address = new Address(\n rs.getInt(\"ADDRESS_ID\"),\n rs.getString(\"ADDRESS_COMPANY_NAME\"),\n rs.getString(\"ADDRESS_L_NAME\"),\n rs.getString(\"ADDRESS_F_NAME\"),\n rs.getString(\"ADDRESS_STREET\"),\n rs.getString(\"ADDRESS_STREET_EXTRA\"),\n rs.getString(\"ADDRESS_POSTCODE\"),\n rs.getString(\"ADDRESS_CITY\"),\n rs.getString(\"ADDRESS_PHONE\"),\n rs.getString(\"ADDRESS_PHONE_EXTRA\"));\n result.add(address);\n }\n return result;\n }", "private void createClinicList(){\n\n ArrayList<Clinic> clinics = LogIn.clinicDAO.getAllClinics();\n for(Clinic cn : clinics){\n double avgRating = LogIn.rateDAO.getAvgRating(cn.getClinicID());\n clinicList.add(new ClinicItem(cn.getClinicName(), drawable.clinic_logo, \"Singapore\", Double.toString(avgRating)));\n }\n }", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "void openAccount(String name, String address, String cnic, int contact_no, int age, String email_address,\r\n int noOfAccounts, String incomeSource, String AccountType, String securityquestion) {\n\r\n if (bankPolicy.isEligibilityCriteriaFulfilled(age)) {// is customer eligible\r\n System.out.println(\"Criteria fulfilled\");\r\n\r\n boolean newCustomer = isItANewCustomer(cnic);\r\n\r\n if (newCustomer) {// is customer new\r\n Customer C = new Customer(Integer.toString(customers.size() + 1), cnic, name, address, contact_no,\r\n email_address, incomeSource, securityquestion);\r\n // Print and ASK FOR SECURITY QUESTION\r\n System.out.println(\"Its a new Customer\");\r\n System.out.println(\"Password: \" + C.credentials.password);\r\n // add customer to arraylist\r\n customers.add(C);\r\n // save new customer to database\r\n record.SaveCustomer(C);\r\n // save customer credentials to database\r\n record.SaveCredentials(C.credentials, C.customerID);\r\n\r\n }\r\n int index = -1;\r\n for (int i = 0; i < customers.size(); i++) {\r\n if (customers.get(i).CNIC.equals(cnic))\r\n index = i;\r\n }\r\n\r\n Account A = new Account(String.valueOf(accounts.size() + 1), getDateFormat(), AccountType,\r\n \"Pending\", customers.get(index).customerID);\r\n // add account to customer\r\n accounts.add(A);\r\n customers.get(index).customerAccount.add(A);\r\n // save account to database\r\n record.SaveAccount(A);\r\n }\r\n\r\n }", "public Bank ()\n {\n super (\"Bank\", defaults, trans, sharedQueue);\n customer = new Source (0, defaults [0], \"Bank$Customer\", customer_es, sharedQueue);\n teller = new Facility (1, defaults [1], new LinkedList<Coroutine> (), teller_es, sharedQueue);\n exit = new Sink (2, defaults [2], null, sharedQueue);\n initModel (new DynamicNode [] { customer, teller, exit });\n \n }", "@Override\r\n\tpublic ArrayList<BankAccountPO> findBankAccountPOList() {\n\t\tArrayList<BankAccountPO> BankAccountList = new ArrayList<>();\r\n\t\tBankAccountList.add(new BankAccountPO(\"SS141250110\",200000));\r\n\t\treturn BankAccountList;\r\n\t}", "public static ArrayList<CustomerBean> getCutomers(Date fromDate, Date toDate) {\r\n\t\tCustomerBean bean = null;\r\n\t\tArrayList<CustomerBean> customerList = new ArrayList<CustomerBean>();\r\n\t\tint customerId, familyMember;\r\n\t\tdouble monthlyIncome, familyIncome;\r\n\t\tString customerName, cnicNo, phoneNo, address, district, customer_pic, accountCreatedDate;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT customer_id, customer_name, customer_cnic, customer_address, customer_district, customer_family_size, customer_phone,customer_monthly_income, customer_family_income, customer_payment_type, customr_image, created_on FROM customer where created_on BETWEEN(\"\r\n\t\t\t\t\t+ fromDate + \"\" + toDate + \") ;\";\r\n\t\t\tStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\taddress = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tfamilyMember = rs.getInt(6);\r\n\t\t\t\tphoneNo = rs.getString(7);\r\n\t\t\t\tmonthlyIncome = rs.getDouble(8);\r\n\t\t\t\tfamilyIncome = rs.getDouble(9);\r\n\t\t\t\trs.getString(10);\r\n\t\t\t\tcustomer_pic = rs.getString(11);\r\n\t\t\t\taccountCreatedDate = rs.getString(12);\r\n\t\t\t\tbean = new CustomerBean();\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setAddress(address);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setFamilyMember(familyMember);\r\n\t\t\t\tbean.setFamilyIncome(familyIncome);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\r\n\t\t\t\tbean.setAccountCreatedDate(accountCreatedDate);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\tbean.setCustomer_pic(customer_pic);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public List<Bank> findAll() {\n return em.createQuery(\"SELECT b FROM Bank b\").getResultList();\n }", "public void initData(Customer customer) throws SQLException{\n this.selectedCustomer = customer ;\n this.fullnameLabel.setText(selectedCustomer.getFullname());\n this.username.setText(selectedCustomer.getUsername());\n this.phone.setText(selectedCustomer.getPhone());\n this.email.setText(selectedCustomer.getEmail());\n this.address.setText(selectedCustomer.getAddress());\n this.customer_id.setText(Integer.toString(selectedCustomer.getCustomer_id()));\n this.tableView.setItems(getOrders());\n }", "@Override\n\tpublic List<Map> getBankInfoList(Map<String, Object> params) {\n\t\treturn tBankInfoMapper.getBankInfoList(params);\n\t}", "@Override\r\n\tpublic ArrayList<BankAccountVO> getBankAccountVOListByKey(String key) {\n\t\tif(key.equals(\"ss\")){\r\n\t\t\tArrayList<BankAccountVO> BAVOList = new ArrayList<>();\r\n\t\t\tBAVOList.add(new BankAccountVO(\"ss141250110\",20000));\r\n\t\t\treturn BAVOList;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String list(){\n\t\tlist = connC.getAll();\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\t\treturn \"list\";\n\t}", "public void listCustomers() {\r\n\t\tSystem.out.println(store.listCustomers());\r\n\t}", "public JComboBox getCustomerList() {\n\t\t\t\tJComboBox customerSelectBox = new JComboBox();\n\t\t\t\tConnection connection = null;\n\t\t\t\tStatement statement = null;\n\n\t\t\t\ttry {\n\t\t\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\t\t\tstatement = connection.createStatement();\n\t\t\t\t\tResultSet customerResultSet = statement\n\t\t\t\t\t\t\t.executeQuery(\"select customerId, firstName, lastName from customer;\");\n\t\t\t\t\tResultSetMetaData customerMetaData = customerResultSet.getMetaData();\n\t\t\t\t\tint numberOfColumns = customerMetaData.getColumnCount();\n\t\t\t\t\twhile (customerResultSet.next()) {\n\t\t\t\t\t\tfor (int i = 1; i <= numberOfColumns; i = i + 3) {\n\t\t\t\t\t\t\tcustomerSelectBox.addItem(\"ID (\" + customerResultSet.getObject(i) + \") \"\n\t\t\t\t\t\t\t\t\t+ customerResultSet.getObject(i + 1) + \" \" + customerResultSet.getObject(i + 2));\n\t\t\t\t\t\t}\n\t\t\t\t\t} // end while\n\t\t\t\t} // end try\n\n\t\t\t\tcatch (SQLException sqlException) {\n\t\t\t\t\tsqlException.printStackTrace();\n\t\t\t\t} // end catch\n\n\t\t\t\tfinally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstatement.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} // end try\n\n\t\t\t\t\tcatch (Exception exception) {\n\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t} // end catch\n\t\t\t\t} // end finally\n\n\t\t\t\treturn customerSelectBox;\n\t\t\t}", "public List<Customer> list() throws CustomerEmptyListException{\n\t\tList<Customer> customerList = new LinkedList<Customer>();\n\t\t\n\t\tif (repository.findAll() == null) {\n\t\t\tthrow new CustomerEmptyListException(\"There is no customer in the repository!\");\n\t\t}\n\t\t\n\t\tfor (Customer customer : repository.findAll()) {\n\t\t\tcustomerList.add(customer);\n\t\t}\n\t\treturn customerList;\n\t}", "@Test\n public void testGetCustomerList() {\n System.out.println(\"getCustomerList\");\n CustomerCtr instance = new CustomerCtr();\n// instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"85352010\");\n ArrayList<Customer> result = instance.getCustomerList();\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }", "@Override\n public List<Account> getAccounts(Long customerId) {\n return customerDao.getAccounts(customerId);\n }" ]
[ "0.7031983", "0.6666988", "0.6513183", "0.6498906", "0.6442061", "0.6427305", "0.6423004", "0.6370794", "0.6337694", "0.6308811", "0.6304182", "0.6298601", "0.62911314", "0.62580013", "0.62522405", "0.62242174", "0.61798733", "0.61704326", "0.6147762", "0.60809636", "0.6022022", "0.6003604", "0.59963214", "0.59920794", "0.596596", "0.5926904", "0.5921544", "0.5917856", "0.59091777", "0.5901987", "0.5897234", "0.58778733", "0.58774346", "0.5865733", "0.5862128", "0.58478504", "0.58424014", "0.5833087", "0.5822513", "0.5821594", "0.57956254", "0.57719076", "0.5767945", "0.57633173", "0.5759179", "0.5752717", "0.5750765", "0.5744483", "0.57277936", "0.57232445", "0.5723127", "0.57192224", "0.57185894", "0.57018316", "0.56941843", "0.5686766", "0.5686402", "0.56838113", "0.5674867", "0.5661704", "0.56610954", "0.56586504", "0.56526726", "0.56523055", "0.5646021", "0.56447005", "0.5638619", "0.56153727", "0.561379", "0.560579", "0.55930376", "0.55864716", "0.5577249", "0.5576908", "0.5574306", "0.55713296", "0.5568561", "0.5557728", "0.5554761", "0.5554119", "0.5552484", "0.5550892", "0.55478185", "0.5542771", "0.5535695", "0.55352485", "0.553089", "0.5526442", "0.55149686", "0.55032724", "0.55026126", "0.549387", "0.5475335", "0.5473835", "0.5461587", "0.54581624", "0.5445971", "0.54445183", "0.54431224", "0.5441902" ]
0.5964915
25
/content provider on create
@Override public boolean onCreate() { Log.e(TAG,"onCreate"); DatabaseHelper.createDatabase(getContext(), new AppDb()); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Content createContent();", "protected IContentProvider createContentProvider() {\r\n\t\treturn new ProjectAndSourceFolderContentProvider(this);\r\n\t}", "public AssignVehicleContentProvider() {\r\n\t}", "ContentFactory getContentFactory();", "abstract public Content createContent();", "protected abstract Content newContent();", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "public FuncContentProvider() {\n\t\t}", "@Override\r\n public String create(final String xmlData) throws InvalidContentException, MissingAttributeValueException,\r\n SystemException, XmlCorruptedException {\r\n \r\n final ContentModelCreate contentModel = parseContentModel(xmlData);\r\n \r\n // check that the objid was not obtained from the representation\r\n contentModel.setObjid(null);\r\n \r\n contentModel.setIdProvider(getIdProvider());\r\n validate(contentModel);\r\n contentModel.persist(true);\r\n final String objid = contentModel.getObjid();\r\n final String resultContentModel;\r\n try {\r\n resultContentModel = retrieve(objid);\r\n }\r\n catch (final ResourceNotFoundException e) {\r\n final String msg =\r\n \"The Content Model with id '\" + objid + \"', which was just created, \"\r\n + \"could not be found for retrieve.\";\r\n throw new IntegritySystemException(msg, e);\r\n }\r\n fireContentModelCreated(objid, resultContentModel);\r\n return resultContentModel;\r\n }", "ProviderManagerExt()\n {\n load();\n }", "protected void createContents() {\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "public ServiceProvider() {\n super();\n setContent(\"\");\n }", "@Override\n public void onProviderInstalled() {\n }", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) {\n\n Log.d(NewsSyncAdapter.class.getCanonicalName(), \"Starting sync...\");\n\n //testing\n ContentValues values = new ContentValues();\n values.put(DatabaseHelper.NEWS_COL_HEADLINE, \"Aliens are attacking; seek shelter\");\n\n Uri uri = NewsContentProvider.CONTENT_URI;\n mContentResolver.insert(uri, values);\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\ttxtName = (TextView)getView().findViewById(R.id.txtName);\n\t\ttxtDate =(TextView)getView().findViewById(R.id.txtDateOfCreation);\n\t\ttxtDesc = (TextView)getView().findViewById(R.id.txtDesc);\n\t\t\n\t\tvalidateExtra();\n\t\tif(entity!=null)\n\t\t{\n\t\t\tsetData();\n\t\t}else\n\t\t{\n\t\t\t//error\n\t\t}\n\n\t}", "protected String getAuthority() {\n return \"com.activeharmony.content.ContentProvider\";\n }", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\tdb = new Db(this);\n\t\tsetContentView(R.layout.activity_test);\n\n\t\t//创建观察者\n\t\t observer = new MyContentObserver(new Handler());\n\t\t\n\t\t//Uri uri=Uri.parse(\"content://account/add/1);\n\t\t//Uri uri=Uri.parse(\"content://account/add/2);\n\t\tUri uri=Uri.parse(\"content://account/add\");\n\t\t//Descendents 子孙\n\t\t//notifyForDescendents 是否通知子路径\n\t\tgetContentResolver().registerContentObserver(uri, true, observer);\n\t}", "public interface Md2ContentProvider {\n /**\n * Gets key.\n *\n * @return the key\n */\n String getKey();\n\n /**\n * Gets content.\n *\n * @return the content\n */\n Md2Entity getContent();\n\n /**\n * Sets content.\n *\n * @param content the content\n */\n void setContent(Md2Entity content);\n\n /** set content directly without loading it from the database */\n void overwriteContent(Md2Entity content);\n void overwriteContent(List<Md2Entity> content);\n\n /**\n * Register attribute on change handler.\n *\n * @param attribute the attribute\n * @param onAttributeChangedHandler the on attribute changed handler\n */\n void registerAttributeOnChangeHandler(String attribute, Md2OnAttributeChangedHandler onAttributeChangedHandler);\n\n /**\n * Unregister attribute on change handler.\n *\n * @param attribute the attribute\n */\n void unregisterAttributeOnChangeHandler(String attribute);\n\n /**\n * Gets on attribute changed handler.\n *\n * @param attribute the attribute\n * @return the on attribute changed handler\n */\n Md2OnAttributeChangedHandler getOnAttributeChangedHandler(String attribute);\n\n /**\n * Gets value.\n *\n * @param attribute the attribute\n * @return the value\n */\n Md2Type getValue(String attribute);\n\n /**\n * Sets value.\n *\n * @param attribute the attribute\n * @param value the value\n */\n void setValue(String attribute, Md2Type value);\n\n /**\n * Reset content provider to empty element.\n */\n void reset();\n\n /**\n * Reset local content provider to the remote element.\n */\n void resetLocal();\n\n /**\n * Load from the database.\n */\n void load();\n\n /**\n * Save a new or existing element to the database.\n */\n void save();\n\n /**\n * Remove from database.\n */\n void remove();\n\n /** Replace current version of content from the most recent version from the datastore */\n void update();\n\n /** Replace current version of content from the most recent version in the list of elements */\n void updateContent(List<Md2Entity> updates);\n /** Remove current version of content if it has been removed in the meantime */\n void purgeContent(List<Md2Entity> updates);\n}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.contentprovidersample1);\n \n // 登録ボタンのクリックリスナー設定\n Button insertBtn = (Button)findViewById(R.id.insert);\n insertBtn.setTag(\"insert\");\n insertBtn.setOnClickListener(new ButtonClickListener());\n // 更新ボタンのクリックリスナー設定\n Button updateBtn = (Button)findViewById(R.id.update);\n updateBtn.setTag(\"update\");\n updateBtn.setOnClickListener(new ButtonClickListener());\n // 削除ボタンのクリックリスナー設定\n Button delBtn = (Button)findViewById(R.id.delete);\n delBtn.setTag(\"delete\");\n delBtn.setOnClickListener(new ButtonClickListener());\n // 表示ボタンのクリックリスナー設定\n Button selectBtn = (Button)findViewById(R.id.select);\n selectBtn.setTag(\"select\");\n selectBtn.setOnClickListener(new ButtonClickListener());\n \n // DB作成\n helper = new CreateProductHelper(ContentProviderSample1Activity.this);\n }", "public void initForAddNew() {\r\n\r\n\t}", "Provider createProvider();", "@Override\r\n\tpublic void onNew() {\n\t\t\r\n\t}", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "@Override\n public void Create() {\n initView();\n initData();\n }", "@Override\n public void onClick(View view) {\n\n Movie movie = new Movie(\"abc\");\n ContentValues contentValues = new ContentValues();\n contentValues.put(MoviesContract.Movies.TITLE,movie.getTitle());\n getContentResolver().insert(MoviesContract.Movies.CONTENT_URI,contentValues);\n //fetchMovies();\n\n }", "public abstract String getNewContent();", "@Override\n public void onAdded() {\n }", "@Override\n\tpublic void create() {\n\n\t}", "private void fireContentModelCreated(final String id, final String xmlData) throws SystemException {\r\n for (final ResourceListener contentModelListener : this.contentModelListeners) {\r\n contentModelListener.resourceCreated(id, xmlData);\r\n }\r\n }", "void additionalCreationCallback() {\n }", "public interface IDSManager {\n Boolean addUser(ContentValues user);\n Boolean addBusiness(ContentValues business);\n Boolean addActivity(ContentValues activity);\n Boolean checkChangeInBusinessesAndActivities();\n Cursor getUsers();\n Cursor getBusinesses();\n Cursor getActivities();\n Boolean checkChangeInDataSource();\n Boolean dbChange();\n //Content Provider to check what that means.\n}", "@Override\n\tpublic void create () {\n\n\t}", "public void addProvider() {\n\t\tproviderDatabase.addProvider();\n\t\t\n\t}", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public void onClickAddName(View vew) {\n ContentValues values = new ContentValues();\n\n values.put(StudentsProvider.NAME,\n ((EditText) findViewById(R.id.txtName)).getText().toString());\n\n values.put(StudentsProvider.GRADE,\n ((EditText) findViewById(R.id.txtGrade)).getText().toString());\n\n\n Uri uri = getContentResolver().insert(StudentsProvider.CONTENT_URI, values);\n\n Toast.makeText(getBaseContext(),\n uri.toString(), Toast.LENGTH_LONG).show();\n }", "interface WithCreate {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n TrustedIdProvider create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n TrustedIdProvider create(Context context);\n }", "@Override\n public void Create() {\n\n initView();\n }", "public DataSummaryOverviewPageModContentFactoryImpl() {\n\t\tsuper();\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "public static void addRegistrationEntry(Context context) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(RegistrationProvider.APP_NAME , context.getString(R.string.app_name));\n contentValues.put(RegistrationProvider.INSTALL_DATE , String.valueOf(new Date().getTime()));\n contentValues.put(RegistrationProvider.LAST_DATE , String.valueOf(new Date().getTime()));\n Uri uri = context.getContentResolver().insert(RegistrationProvider.CONTENT_URI, contentValues);\n Log.d(MainActivity.APP_TAG, \"Utility: Added registration uri: \" + uri.toString());\n }", "public interface ContentDuplicator {\n\n /**\n * Gets the ID of the store from which content is to be retrieved\n * @return storeId of the FROM storage provider\n */\n public String getFromStoreId();\n\n /**\n * Gets the ID of the store to which content is to be duplicated\n * @return storeId of the TO storage provider\n */\n public String getToStoreId();\n\n /**\n * This method creates a newly duplicated content item in the arg spaceId\n * with the arg contentId.\n *\n * @param spaceId of content item\n * @param contentId of content item\n * @return checksum of content\n */\n public String createContent(String spaceId, String contentId);\n\n /**\n * This method updates an existing content item in the arg spaceId with the\n * arg contentId\n *\n * @param spaceId of content item\n * @param contentId of content item\n */\n public void updateContent(String spaceId, String contentId);\n\n /**\n * This method deletes an existing content item in the arg spaceId with the\n * arg contentId\n *\n * @param spaceId of content item\n * @param contentId of content item\n */\n public void deleteContent(String spaceId, String contentId);\n\n /**\n * This method performs any necessary clean-up of the ContentDuplicator.\n */\n public void stop();\n}", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\n protected void commitCreates(ViewImpl view, ObjectInstance oi)\n {\n }", "@Override\r\n public Uri insert(Uri uri, ContentValues initValues) {\n return null;\r\n }", "@Override\r\n\tpublic void manage() {\n\t\t\r\n\t}", "protected void onAfterCreateView(View view) {\n\n }", "private void establishContext() {\n ParcelableNote encoded = getIntent().getParcelableExtra(NOTE_EXTRA);\n mCtx = (encoded == null) ? Context.CREATE : Context.UPDATE;\n\n if (mCtx == Context.UPDATE) {\n mNote = encoded.getNote();\n mTags.addAll(mNote.tags());\n\n EditText title = findViewById(R.id.edit_note_title);\n title.setText(mNote.title());\n EditText body = findViewById(R.id.edit_note_body);\n body.setText(mNote.body());\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tUri insertedUri = context.getContentResolver().insert(uri,\n\t\t\t\t\t\tvalues);\n\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t// msg.what=INSERT_OPERATION;\n\t\t\t\tif (ContentUris.parseId(insertedUri) > 0) {\n\t\t\t\t\tmsg.what = SUCCESS;\n\t\t\t\t} else {\n\t\t\t\t\tmsg.what = FAIL;\n\t\t\t\t}\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t}", "ContentLoader getContentLoader(ClientRequestContext context);", "protected void shoAddNewDataEditor () {\n\t\t\n\t\t\n\t\tinstantiateDataForAddNewTemplate(new AsyncCallback< DATA>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t// ini tidak mungkin gagal\n\t\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onSuccess(final DATA result) {\n\t\t\t\teditorGenerator.instantiatePanel(new ExpensivePanelGenerator<BaseDualControlDataEditor<PK,DATA>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onPanelGenerationComplete(\n\t\t\t\t\t\t\tBaseDualControlDataEditor<PK, DATA> widget) {\n\t\t\t\t\t\tconfigureAndPlaceEditorPanel(widget);\n\t\t\t\t\t\twidget.requestDoubleSubmitToken(null);\n\t\t\t\t\t\twidget.addAndEditNewData(result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}); \n\t\t\n\t\t\n\t}", "AbstractAdminSystemPageModContentFactoryImpl() {\n\t\tsuper();\n\t}", "@Override\r\n public boolean onCreate(){\n db = new DatabaseHelper(getContext()).getWritableDatabase();\r\n return true;\r\n }", "public Content addContent(Content content){\n\n contentRepository.save(content);\n return content;\n }", "void setDataFromDBContent() {\n\n }", "@Override\r\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\r\n\t\tcontext=this;\r\n\t}", "public ContentDaoImp(String content_type){\r\n\t\tsetTbl_name(content_type);\r\n\t}", "@Override\n \t\t\t\tpublic void doNew() {\n \n \t\t\t\t}", "public ContentProviderAdapter(_IStructuredContentProvider<T> contentProvider)\r\n\t{\r\n\t\tif(contentProvider == null)\r\n\t\t\tthrow new NullPointerException(\"Content provider can't be null\");\r\n\r\n\t\tthis.contentProvider = contentProvider;\r\n\t}", "public SiteItemProvider ( AdapterFactory adapterFactory )\n {\n super ( adapterFactory );\n }", "@DSModeled\n public DroidSafeContentResolver(Context context) {\n \tsuper(context);\n \tthis.context = context;\n }", "public interface CreatePostView{\n\n Context getViewContext();\n void dismissDialog();\n void showProgressDialog(String message);\n void hideProgressDialog();\n void showErrorMessage(String message);\n void showSuccessMessage(String message);\n void showImagePreview(Uri imgUri);\n void removeImagePreview();\n void openImageChooser();\n void showEditPostData();\n\n}", "CreationData creationData();", "public void init()\r\n {\r\n eventPublisher.publishEvent(new CachedContentCleanerCreatedEvent(this));\r\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "private void insertintoCP(Context new_context) {\n\t\tContentValues new_value = new ContentValues();\n\t\tLog.d(\"values are:\",seqList.get(i).toString() + \":\" );\n\t\tnew_value.put(Databse_for_CP.COLUMN_KEY, seqList.get(i).toString());\n\t\tnew_value.put(Databse_for_CP.COLUMN_VAL, messageList.get(i).toString());\n\t\tnew_context.getApplicationContext();\n\t\tUri uri = context.getContentResolver().insert(Content_Provider.cp_uri,\n\t\t\t\tnew_value);\n\t\tSQLiteDatabase db = Content_Provider.cp_database.getWritableDatabase();\n\t\tlong r_id = db.insert(Databse_for_CP.TABLE_NAME, null, new_value);\n\t\tif (r_id > 0) {\n\t\t\tUri new_uri = ContentUris.withAppendedId(Content_Provider.cp_uri, r_id);\n\t\t\tcontext.getApplicationContext().getContentResolver().notifyChange(new_uri, null);\n\t\t\turi = new_uri;\n\t\t}\n\t\tLog.d(\"Data Inserted : \", \" \" + new_value);\n\t\t//throw new IllegalArgumentException(\"Unknown \" + uri);\n\n\t}", "public interface CreateAdContentMode {\n\n /**\n * 红包创建\n *\n * @param token\n * @param mAdEntity\n * @param title\n * @param content\n * @param listener\n */\n void commitAdCreate(String token, AdEntity mAdEntity, String title, String content, UserLoseMultiLoadedListener listener);\n\n /**\n * 圈子创建\n *\n * @param mToken\n * @param mAdEntity\n * @param title\n * @param content\n * @param listener\n */\n void commitCircleCreate(String mToken, AdEntity mAdEntity, String title, String content, UserLoseMultiLoadedListener listener);\n\n /**\n * 拼手气红包创建\n *\n * @param token\n * @param adEntity\n * @param title\n * @param content\n * @param listener\n */\n void commitLuckCreate(String token, AdEntity adEntity, String title, String content, UserLoseMultiLoadedListener listener);\n}", "private void _createContentHandler(final String uri, final String localName, \n final String qName, final Attributes attrs) throws SAXException {\n IXTMContentHandler contentHandler = null;\n if (uri == XTM2ContentHandler.NS_XTM) {\n contentHandler = new XTM2ContentHandler();\n }\n else if (uri == XTM10ContentHandler.NS_XTM) {\n contentHandler = new XTM10ContentHandler();\n }\n else if (localName == XTM10ContentHandler.TOPIC_MAP) {\n final String version = attrs.getValue(\"\", \"version\");\n contentHandler = version != null ? new XTM2ContentHandler()\n : new XTM10ContentHandler();\n }\n else {\n contentHandler = new XTM10ContentHandler();\n }\n // Provide the missing info\n contentHandler.setMapHandler(_mapHandler);\n contentHandler.setIRIContext(_context);\n contentHandler.setDocumentIRI(_docIRI);\n contentHandler.setSubordianate(_isSubordinate);\n for (String key: _properties.keySet()) {\n contentHandler.setProperty(key, _properties.get(key));\n }\n final boolean validate = !Boolean.FALSE.equals(_properties.get(Property.VALIDATE));\n _contentHandler = validate ? RelaxNGValidatingContentHandler.create(contentHandler, contentHandler.getRelaxURL()) \n : contentHandler;\n // Provide the missing events\n _contentHandler.startDocument();\n for (String key: _prefixes.keySet()) {\n _contentHandler.startPrefixMapping(key, _prefixes.get(key));\n }\n }", "@Override\n\tpublic void onCreate(SQLiteDatabase db, ConnectionSource connectionSource) {\n\n\t}", "@Override\n public boolean onCreate() {\n mOpenHelper = new DatabaseHelper(getContext());\n return true;\n }", "public void LoadContent(){\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "public void create(HandlerContext context, Management request, Management response) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\n public void onSuccess(Uri uri) {\n newCategory = new Category(editText_categoryName.getText().toString() , uri.toString());\n }", "public void onCreation(java.lang.Object init)\n {\n }", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "public void seeFreshContent();", "private void createSource(String sourceName, String content) {\n\t\t\n\t}", "private DisplayProviderEntity dbEntityToDisplayEntity(ProviderEntity providerEntity) {\n\t\tDisplayProviderEntity displayProviderEntity = new DisplayProviderEntity();\n\t\tdisplayProviderEntity.setId(providerEntity.getId());\n\t\tdisplayProviderEntity.setUserId(providerEntity.getUserId());\n\t\tdisplayProviderEntity.setProvider(providerEntity.getProvider());\n\t\treturn displayProviderEntity;\n\t}", "@Override\n public void onViewCreate() {\n }", "public Provider() {\n\t\t\tsuper(SCHEME);\n\t\t}", "HateosContentType() {\n super();\n }", "@Override\n public void onCreate() {\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@objid (\"42b4c367-1917-11e2-bc4e-002564c97630\")\n public NoteChooserContentProvider(IMModelServices modelService) {\n this.modelService = modelService;\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "protected FedoraContentModelHandler() {\r\n }" ]
[ "0.6240027", "0.6022114", "0.60105884", "0.5889401", "0.5877084", "0.58339304", "0.5763408", "0.5739459", "0.57030106", "0.56967133", "0.5676452", "0.5668294", "0.56679344", "0.5622051", "0.56145597", "0.5587789", "0.5573016", "0.5544787", "0.55346036", "0.55296946", "0.55249625", "0.5524838", "0.55030286", "0.5498616", "0.54984695", "0.5494091", "0.54879546", "0.5478545", "0.5476157", "0.54634666", "0.54547065", "0.5426638", "0.541615", "0.54112387", "0.54081947", "0.53971773", "0.53750926", "0.536737", "0.53671414", "0.5345092", "0.5336482", "0.5317741", "0.52991617", "0.5285777", "0.52850187", "0.5280476", "0.52423966", "0.5239754", "0.5237525", "0.5231106", "0.52304226", "0.5227852", "0.5227126", "0.5222095", "0.52194935", "0.51967704", "0.519564", "0.51950514", "0.5194407", "0.5189727", "0.5185062", "0.5182095", "0.51758736", "0.5174954", "0.51637363", "0.5162888", "0.51575106", "0.51567465", "0.51566756", "0.51565444", "0.51553255", "0.51553255", "0.51522374", "0.5151315", "0.51471716", "0.51441073", "0.5130854", "0.5126776", "0.5123621", "0.5116192", "0.5116192", "0.5116192", "0.5116192", "0.5116192", "0.5116192", "0.51128167", "0.511238", "0.5105479", "0.5105444", "0.5103707", "0.5103571", "0.50928086", "0.5091627", "0.5087252", "0.50795066", "0.50753796", "0.5072421", "0.5072421", "0.50716084", "0.5058958", "0.5057927" ]
0.0
-1
Handles requests for the MIME type (Type of Data) of the data at the URI
@Override public String getType(Uri uri) { // Used to match uris with Content Providers switch (uriMatcher.match(uri)) { // vnd.android.cursor.dir/cpcontacts states that we expect multiple pieces of data case URI_CODE_USER: return "vnd.android.cursor.dir/cpuser"; case URI_CODE_ORDER: return "vnd.android.cursor.dir/cporder"; default: throw new IllegalArgumentException("Unsupported URI: " + uri); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Object getData(String mimeType) {\n return data;\n }", "public interface HttpMimeType {\n\n\t// Image\n \n public static final String APNG_IMAGE = \"image/apng\";\n \n public static final String BMP_IMAGE = \"image/bmp\";\n\n\tpublic static final String GIF_IMAGE = \"image/gif\";\n\t\n\tpublic static final String ICO_IMAGE = \"image/ico\";\n\n\tpublic static final String JPEG_IMAGE = \"image/jpeg\";\n\n\tpublic static final String JPG_IMAGE = \"image/jpg\";\n\n public static final String PNG_IMAGE = \"image/png\";\n\n\tpublic static final String SVG_IMAGE = \"image/svg+xml\";\n\n\tpublic static final String TIFF_IMAGE = \"image/tiff\";\n\t\n\tpublic static final String WEBP_IMAGE = \"image/webp\";\n\n\t// text formats\n\n\tpublic static final String TEXT_PLAIN = \"text/plain\";\n\n\tpublic static final String CSV = \"text/csv\";\n\n\tpublic static final String CSS = \"text/css\";\n\n\tpublic static final String HTML = \"text/html\";\n\n\tpublic static final String JAVASCRIPT = \"text/javascript\";\n\n\tpublic static final String RTF = \"text/rtf\";\n\n\tpublic static final String XML = \"text/xml\";\n\n\t// document formats\n\n\tpublic static final String JSON = \"application/json\";\n\n\tpublic static final String ATOM = \"application/atom+xml\";\n\n\tpublic static final String PDF = \"application/pdf\";\n\n\tpublic static final String POSTSCRIPT = \"application/postscript\";\n\n\tpublic static final String XLS = \"application/vnd.ms-excel\";\n\n\tpublic static final String XLSX = \"application/vnd.ms-excel\";\n\n\tpublic static final String PPT = \"application/vnd.ms-powerpoint\";\n\n\tpublic static final String PPTX = \"application/vnd.ms-powerpoint\";\n\n\tpublic static final String XPS = \"application/vnd.ms-xpsdocument\";\n\n\t// binary\n\n\tpublic static final String BINARY = \"application/octet-stream\";\n\n\t// music ones\n\n\tpublic static final String MP4_AUDIO = \"audio/mp4\";\n\n\tpublic static final String MP3_AUDIO = \"audio/mpeg\";\n\n\tpublic static final String OGG_VORBIS_AUDIO = \"audio/ogg\";\n\n\tpublic static final String OPUS_AUDIO = \"audio/opus\";\n\n\tpublic static final String VORBIS_AUDIO = \"audio/vorbis\";\n\n\tpublic static final String WEBM_AUDIO = \"audio/webm\";\n\n\t// video\n\n\tpublic static final String MPEG_VIDEO = \"video/mpeg\";\n\n\tpublic static final String MP4_VIDEO = \"video/mp4\";\n\n\tpublic static final String OGG_THEORA_VIDEO = \"video/ogg\";\n\n\tpublic static final String QUICKTIME_VIDEO = \"video/quicktime\";\n\n\tpublic static final String WEBM_VIDEO = \"video/webm\";\n\n\t// feeds\n\n\tpublic static final String RDF = \"application/rdf+xml\";\n\n\tpublic static final String RSS = \"application/rss+xml\";\n\n}", "String getMimeType();", "public String getMimeType();", "java.lang.String getMimeType();", "java.lang.String getMimeType();", "@Override\n public String getType(Uri uri) {\n final int match = sUriMatcher.match(uri);\n switch (match) {\n case DATA:\n return DataEntry.CONTENT_LIST_TYPE;\n case DATA_ID:\n return DataEntry.CONTENT_DATA_TYPE;\n default:\n throw new IllegalStateException(\"Unknown URI \" + uri + \" with match \" + match);\n }\n }", "MimeType mediaType();", "@Override\n public String getType(Uri uri) {\n // Return a string that identifies the MIME type\n // for a Content Provider URI\n switch (uriMatcher.match(uri)) {\n case ALLROWS: \n return \"vnd.android.cursor.dir/vnd.paad.elemental\";\n case SINGLE_ROW: \n return \"vnd.android.cursor.item/vnd.paad.elemental\";\n case SEARCH : \n return SearchManager.SUGGEST_MIME_TYPE;\n default: \n throw new IllegalArgumentException(\"Unsupported URI: \" + uri);\n }\n }", "@NotNull\n String getMimeType();", "@Override\n public void fetchSuccess(String path, byte[] data, String mediaType, long dataLength) {\n headers.put(CONTENT_TYPE, mediaType);\n headers.put(CONTENT_LENGTH, String.valueOf(dataLength));\n // Send data as 404 Not Found\n send404NotFound(ctx, headers, data, true);\n }", "public int lookupReadMimeType(String mimeType);", "boolean hasMimeType();", "public void setMime_type(String value)\r\n {\r\n getSemanticObject().setProperty(data_mime_type, value);\r\n }", "@Override\n public String getType(Uri uri) {\n List<String> segments = uri.getPathSegments();\n String accountId = segments.get(0);\n String id = segments.get(1);\n String format = segments.get(2);\n if (FORMAT_THUMBNAIL.equals(format)) {\n return \"image/png\";\n } else {\n uri = ContentUris.withAppendedId(Attachment.CONTENT_URI, Long.parseLong(id));\n Cursor c = getContext().getContentResolver().query(uri, MIME_TYPE_PROJECTION,\n null, null, null);\n try {\n if (c.moveToFirst()) {\n String mimeType = c.getString(MIME_TYPE_COLUMN_MIME_TYPE);\n String fileName = c.getString(MIME_TYPE_COLUMN_FILENAME);\n mimeType = inferMimeType(fileName, mimeType);\n return mimeType;\n }\n } finally {\n c.close();\n }\n return null;\n }\n }", "String getContentType();", "String getContentType();", "String getContentType();", "public boolean handles(String contentType, String packaging);", "abstract public URIType getURIType();", "public String getContentType();", "public String getContentType();", "String getFileMimeType();", "public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }", "public interface IURI {\n String MIMETYPE_NAME = \"vnd.android.cursor.item/name\";\n String MIMETYPE_EMAIL = \"vnd.android.cursor.item/email_v2\";\n String MIMETYPE_ADDRESS = \"vnd.android.cursor.item/postal-address_v2\";\n String MIMETYPE_PHONE = \"vnd.android.cursor.item/phone_v2\";\n\n}", "@Override\n\tpublic String getType(Uri uri) {\n\t\t// Return a string that identifies the MIME type\n\t\t// for a Content Provider URI\n\t\tswitch (uriMatcher.match(uri)) {\n\t\tcase ALLROWS://da la direccion del directorio\n\t\t\treturn ContentResolver.CURSOR_DIR_BASE_TYPE + \"/vnd.aprendeandroid.album\";\n\t\tcase SINGLE_ROW://da la direccion del item\n\t\t\treturn ContentResolver.CURSOR_ITEM_BASE_TYPE + \"/vnd.aprendeandroid.album\";\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException(\"Unsupported URI: \" + uri);\n\t\t}\n\t}", "default String getContentType() {\n return \"application/octet-stream\";\n }", "public void setType(URI type) {\n this.type = type;\n }", "public String getMimeType() {\n return null;\n }", "public String getMimeType() {\n return null;\n }", "public void setMimeType(String value) {\n this.mimeType = value;\n }", "@Override\r\n public String getType(Uri uri) {\n return \"\";\r\n }", "@Override\n public void setContentType(String arg0) {\n\n }", "@Override\n\tpublic String getType(Uri uri) {\n\t\tfinal int match = sUriMatcher.match(uri);\n\t\tswitch (match) {\n\t\tcase ROUTE_ENTRIES:\n\t\t\treturn CONTENT_TYPE;\n\t\tcase ROUTE_ENTRIES_ID:\n\t\t\treturn CONTENT_ITEM_TYPE;\n\t\tdefault:\n\t\t\tthrow new UnsupportedOperationException(\"Unknown uri: \" + uri);\n\t\t}\n\t}", "public String getMimeType() {\n return mimeType;\n }", "public String getMimeType() {\n return mimeType;\n }", "public interface DataContentHandler {\n /**\n * Returns an array of DataFlavor objects indicating the flavors the\n * data can be provided in. The array should be ordered according to\n * preference for providing the data (from most richly descriptive to\n * least descriptive).\n *\n * @return The DataFlavors.\n */\n public ActivationDataFlavor[] getTransferDataFlavors();\n\n /**\n * Returns an object which represents the data to be transferred.\n * The class of the object returned is defined by the representation class\n * of the flavor.\n *\n * @param df The DataFlavor representing the requested type.\n * @param ds The DataSource representing the data to be converted.\n * @return The constructed Object.\n * @exception IOException\tif the data can't be accessed\n */\n public Object getTransferData(ActivationDataFlavor df, DataSource ds)\n\t\t\t\tthrows /*UnsupportedFlavorException,*/ IOException;\n\n /**\n * Return an object representing the data in its most preferred form.\n * Generally this will be the form described by the first DataFlavor\n * returned by the <code>getTransferDataFlavors</code> method.\n *\n * @param ds The DataSource representing the data to be converted.\n * @return The constructed Object.\n * @exception IOException\tif the data can't be accessed\n */\n public Object getContent(DataSource ds) throws IOException;\n\n /**\n * Convert the object to a byte stream of the specified MIME type\n * and write it to the output stream.\n *\n * @param obj\tThe object to be converted.\n * @param mimeType\tThe requested MIME type of the resulting byte stream.\n * @param os\tThe output stream into which to write the converted\n *\t\t\tbyte stream.\n * @exception IOException\terrors writing to the stream\n */\n public void writeTo(Object obj, String mimeType, OutputStream os)\n\t throws IOException;\n}", "public String getReadMimeType(int formatIndex);", "private String detectMimeType(XDIMEContextInternal context,String path){\n int lastDot = path.lastIndexOf('.');\n String resultMimeType = null;\n\n if (lastDot != -1) {\n MarinerPageContext pageContext = getPageContext(context);\n EnvironmentContext envContext = pageContext.getEnvironmentContext();\n resultMimeType = envContext.getMimeType(path);\n }\n return resultMimeType;\n }", "void shouldParseTheDataIfContentTypeIsApplicationXWwwFormUrlencoded() {\n }", "public String getMimeType() {\r\n return mimeType;\r\n }", "public void setMimeType(String mimeType) {\n this.mimeType = mimeType;\n }", "public void setMimeType(String mimeType) {\n this.mimeType = mimeType;\n }", "@Override\r\n\tpublic String getType(Uri uri) {\r\n\r\n\t\tswitch (sURIMatcher.match(uri)) {\r\n\t\t\tcase SEARCH_SUGGEST:\r\n\t\t\t\treturn SearchManager.SUGGEST_MIME_TYPE;\r\n\t\t\tcase SHORTCUT_REFRESH:\r\n\t\t\t\treturn SearchManager.SHORTCUT_MIME_TYPE;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new IllegalArgumentException(\"Unknown URL \" + uri);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String getType(Uri uri) {\n\t\tint match = _mi_uriMatcher.match(uri);\r\n\t\tswitch (match) {\r\n\t\tcase USUARIOS:\r\n\t\t\treturn \"vnd.android.cursor.dir/vnd.MiContentProvider.cliente\";\r\n\t\tcase USUARIO:\r\n\t\t\treturn \"vnd.android.cursor.item/vnd.MiContentProvider.cliente\";\r\n\t\tdefault:\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private Uri getFileUriAndSetType(Intent intent, String str, String str2, String str3, int i) throws IOException {\n String str4;\n String str5;\n String str6;\n if (str2.endsWith(\"mp4\") || str2.endsWith(\"mov\") || str2.endsWith(\"3gp\")) {\n intent.setType(\"video/*\");\n } else if (str2.endsWith(\"mp3\")) {\n intent.setType(\"audio/x-mpeg\");\n } else {\n intent.setType(\"image/*\");\n }\n if (str2.startsWith(\"http\") || str2.startsWith(\"www/\")) {\n String fileName = getFileName(str2);\n String str7 = \"file://\" + str + \"/\" + fileName.replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (str2.startsWith(\"http\")) {\n URLConnection openConnection = new URL(str2).openConnection();\n String headerField = openConnection.getHeaderField(\"Content-Disposition\");\n if (headerField != null) {\n Matcher matcher = Pattern.compile(\"filename=([^;]+)\").matcher(headerField);\n if (matcher.find()) {\n fileName = matcher.group(1).replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (fileName.length() == 0) {\n fileName = \"file\";\n }\n str7 = \"file://\" + str + \"/\" + fileName;\n }\n }\n saveFile(getBytes(openConnection.getInputStream()), str, fileName);\n str2 = str7;\n } else {\n saveFile(getBytes(this.webView.getContext().getAssets().open(str2)), str, fileName);\n str2 = str7;\n }\n } else if (str2.startsWith(\"data:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring = str2.substring(str2.indexOf(\";base64,\") + 8);\n if (!str2.contains(\"data:image/\")) {\n intent.setType(str2.substring(str2.indexOf(\"data:\") + 5, str2.indexOf(\";base64\")));\n }\n String substring2 = str2.substring(str2.indexOf(\"/\") + 1, str2.indexOf(\";base64\"));\n if (notEmpty(str3)) {\n StringBuilder sb = new StringBuilder();\n sb.append(sanitizeFilename(str3));\n if (i == 0) {\n str6 = \"\";\n } else {\n str6 = \"_\" + i;\n }\n sb.append(str6);\n sb.append(\".\");\n sb.append(substring2);\n str4 = sb.toString();\n } else {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"file\");\n if (i == 0) {\n str5 = \"\";\n } else {\n str5 = \"_\" + i;\n }\n sb2.append(str5);\n sb2.append(\".\");\n sb2.append(substring2);\n str4 = sb2.toString();\n }\n saveFile(Base64.decode(substring, 0), str, str4);\n str2 = \"file://\" + str + \"/\" + str4;\n } else if (str2.startsWith(\"df:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring3 = str2.substring(str2.indexOf(\"df:\") + 3, str2.indexOf(\";data:\"));\n String substring4 = str2.substring(str2.indexOf(\";data:\") + 6, str2.indexOf(\";base64,\"));\n String substring5 = str2.substring(str2.indexOf(\";base64,\") + 8);\n intent.setType(substring4);\n saveFile(Base64.decode(substring5, 0), str, sanitizeFilename(substring3));\n str2 = \"file://\" + str + \"/\" + sanitizeFilename(substring3);\n } else if (str2.startsWith(\"file://\")) {\n intent.setType(getMIMEType(str2));\n } else {\n throw new IllegalArgumentException(\"URL_NOT_SUPPORTED\");\n }\n return Uri.parse(str2);\n }", "@Override\n public void receive(int type, String data) {\n ((CarReportActivity) mContext).disMissCustomDialog();\n switch (type) {\n case 10001:\n parseJson(data);\n break;\n case 400:\n setNull();\n break;\n }\n }", "@Override\n public String getType(Uri uri) {\n ensureUriMatcherInitialized();\n int match = mUriMatcher.match(uri);\n switch (match) {\n case URI_MATCH_BOOKMARKS:\n case URL_MATCH_API_BOOKMARK:\n return BROWSER_CONTRACT_BOOKMARK_CONTENT_TYPE;\n case URI_MATCH_BOOKMARKS_ID:\n case URL_MATCH_API_BOOKMARK_ID:\n return BROWSER_CONTRACT_BOOKMARK_CONTENT_ITEM_TYPE;\n case URL_MATCH_API_SEARCHES:\n return BROWSER_CONTRACT_SEARCH_CONTENT_TYPE;\n case URL_MATCH_API_SEARCHES_ID:\n return BROWSER_CONTRACT_SEARCH_CONTENT_ITEM_TYPE;\n case URL_MATCH_API_HISTORY_CONTENT:\n return BROWSER_CONTRACT_HISTORY_CONTENT_TYPE;\n case URL_MATCH_API_HISTORY_CONTENT_ID:\n return BROWSER_CONTRACT_HISTORY_CONTENT_ITEM_TYPE;\n default:\n throw new IllegalArgumentException(TAG + \": getType - unknown URL \" + uri);\n }\n }", "public String getMimeType() {\n return mimeType;\n }", "@Nullable\n @Override\n public String getType(Uri uri) {\n final int match = sUriMatcher.match(uri);\n\n switch (match) {\n case CHORES:\n case CHORE_TEMPLATE_BY_ROOM:\n case CHORES_BY_FREQUENCY:\n case CHORES_BY_DUE_DATE:\n return ChoreContract.ChoresEntry.CONTENT_ITEM_TYPE;\n\n default:\n throw new UnsupportedOperationException(\"Unknown uri: \" + uri);\n }\n }", "int getContentTypeValue();", "@Override\n public String getMimeType() {\n return \"text/text\"; //$NON-NLS-1$\n }", "protected abstract MediaType getSupportedMediaType();", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\n public String getType(Uri uri) {\n return null;\n }", "@Override\r\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\r\n }", "@Override\r\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\r\n }", "@Nullable\n @Override\n public String getType(Uri uri) {\n final int match = sUriMatcher.match(uri);\n\n switch (match) {\n // Student: Uncomment and fill out these two cases\n case LOCATION:\n return LocationContract.LocationEntry.CONTENT_TYPE;\n case USER:\n return LocationContract.UserEntry.CONTENT_TYPE;\n case USER_BY_UID:\n return LocationContract.UserEntry.CONTENT_ITEM_TYPE;\n default:\n throw new UnsupportedOperationException(\"Unknown uri: \" + uri);\n }\n }", "com.google.protobuf.ByteString getMimeTypeBytes();", "public String getMimeType() {\n return this.mimeType;\n }", "public String getMimeType ()\n {\n final String METHOD_NAME = \"getMimeType\";\n this.logDebug(METHOD_NAME + \"1/2: Started\");\n\n String mimeType = null;\n try\n {\n\tint contentType = this.document.getContentType();\n\tif ( contentType >= 0 ) mimeType = MediaType.nameFor[contentType];\n }\n catch (Exception exception)\n {\n\tthis.logWarn(METHOD_NAME + \"Failed to retrieve mime type\", exception);\n }\n\n this.logDebug(METHOD_NAME + \" 2/2: Done. mimeType = \" + mimeType);\n return mimeType;\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public String getType(Uri uri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "public void setMimeType(String mimeType) {\n this.mimeType = mimeType;\n }", "@Override\r\n public String getType(Uri uri){\r\n switch (URI_MATCHER.match(uri)){\r\n case LIST_TASK:\r\n return TASKS_MIME_TYPE;\r\n case ITEM_TASK:\r\n return TASK_MIME_TYPE;\r\n default:\r\n throw new IllegalArgumentException(\"Unknown Uri:\" + uri);\r\n }\r\n }", "public int lookupWriteMimeType(String mimeType);", "@Override\r\n\tpublic String getType(Uri uri) {\n\t\tint match = matcher.match(uri);\r\n\t\tswitch(match){\r\n\t\t\tcase all:\r\n\t\t\t\treturn \"vnd.android.cursor.dir/\"+AUTHORITY;\r\n\t\t\tcase single:\r\n\t\t\t\treturn \"vnd.android.cursor.item/\"+AUTHORITY;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new IllegalArgumentException(\"Unknown URI: \" + uri);\r\n\t\t}\r\n\t}", "public String getMimeType() {\n return mimeType;\n }", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "@Override\n public String getType(@NonNull Uri uri) {\n final int match = sUriMatcher.match(uri);\n switch (match) {\n case FAVORITE_MOVIES:\n return MovieContract.MovieEntry.CONTENT_LIST_TYPE;\n case MOVIE_ID:\n return MovieContract.MovieEntry.CONTENT_ITEM_TYPE;\n default:\n throw new IllegalStateException(\"Unknown URI \" + uri + \" with match \" + match);\n }\n }", "@Override\n public String getType(Uri uri) {\n int match = sUriMatcher.match(uri);\n switch (match) {\n case INVENTORY:\n return InventoryEntry.CONTENT_LIST_TYPE;\n case INVENTORY_ID:\n return InventoryEntry.CONTENT_ITEM_TYPE;\n default:\n throw new IllegalArgumentException(\"Unknown URI \" + uri + \" with match \" + match);\n }\n }", "protected String getContentType(Resource resource, @SuppressWarnings(\"unused\") SlingHttpServletRequest request) {\n String mimeType = JcrBinary.getMimeType(resource);\n if (StringUtils.isEmpty(mimeType)) {\n mimeType = ContentType.OCTET_STREAM;\n }\n return mimeType;\n }", "@Override\n public int getContentType() {\n return 0;\n }", "@Override\r\n\tpublic String getType(Uri arg0) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic String getContentType(String filename) {\n\t\treturn null;\n\t}", "public String getMimeType() {\n\t\treturn mimeType;\n\t}", "public String getMimeType() {\n\t\treturn mimeType;\n\t}", "public String getMimeType() {\n\t\treturn mimeType;\n\t}", "public String getMimeType() {\r\n\t\treturn this.mimeType;\r\n\t}", "@Override\n public String getContentType() {\n return null;\n }", "public void setContentType(String contentType);" ]
[ "0.6931247", "0.64950466", "0.6494639", "0.6421392", "0.6369582", "0.6369582", "0.62585336", "0.6129696", "0.60893446", "0.6031234", "0.5990665", "0.5941924", "0.5771044", "0.5769367", "0.57440853", "0.57215923", "0.57215923", "0.57215923", "0.5705659", "0.5704974", "0.56956935", "0.56956935", "0.5677338", "0.56665087", "0.5659069", "0.5650457", "0.56429094", "0.5574437", "0.5553036", "0.5553036", "0.55245376", "0.5511766", "0.54889673", "0.5486065", "0.54800725", "0.54800725", "0.54694957", "0.5404396", "0.5402939", "0.5394795", "0.5379347", "0.5351708", "0.5351708", "0.5350765", "0.5316651", "0.5316429", "0.53093815", "0.53042364", "0.5296595", "0.5290443", "0.5282303", "0.5278031", "0.5270869", "0.526399", "0.526399", "0.526399", "0.526399", "0.526399", "0.526399", "0.526399", "0.526399", "0.526399", "0.526399", "0.52615947", "0.52615947", "0.52463865", "0.5235174", "0.52321935", "0.52305686", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.5228434", "0.52245194", "0.52202386", "0.5209735", "0.52059317", "0.5201539", "0.51968265", "0.5195041", "0.51905507", "0.5189228", "0.5185441", "0.5176616", "0.51720333", "0.5162176", "0.5162176", "0.5162176", "0.5160362", "0.51545966", "0.5141121" ]
0.56304264
27
Used to update a row or a selection of rows Returns to number of rows updated
@Override public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { int rowsUpdated = 0; // // // Used to match uris with Content Providers // switch (uriMatcher.match(uri)) { // case uriCode: // // Update the row or rows of data // rowsUpdated = sqlDB.update(TABLE_NAME, values, selection, selectionArgs); // break; // default: // throw new IllegalArgumentException("Unknown URI " + uri); // } // // // getContentResolver provides access to the content model // // notifyChange notifies all observers that a row was updated // getContext().getContentResolver().notifyChange(uri, null); return rowsUpdated; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void rowsUpdated(int firstRow, int endRow);", "public abstract void rowsUpdated(int firstRow, int endRow, int column);", "@Override\n\t\t\t\tpublic void rowsUpdated(int firstRow, int endRow) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void rowsUpdated(int firstRow, int endRow, int column) {\n\n\t\t\t\t}", "private void updateEqualRows(String tableName, String[][] tableData, String[][] selectedCells) \n {\n String[][] modifiedCells = new String[selectedCells.length][selectedCells[0].length];\n// int cont = 0;\n for (int i = 0; i < selectedCells.length; i++) \n {\n for (int j = 0; j < selectedCells[0].length; j++) \n {\n if (!selectedCells[i][j].toString().equals(tableData[i][j].toString())) \n {\n adapter.updateRow(tableName, tableData[0][j], selectedCells[i][j], tableData[i][0]);\n// cont++;\n// System.out.println(\"GOT HERE: \" + cont);\n// System.out.println(\"table name: \" + tableName);\n// System.out.println(\"table data 0j: \" + tableData[0][j]);\n// System.out.println(\"selected cells ij: \" + selectedCells[i][j]);\n// System.out.println(\"tabledata i0: \" + tableData[i][0]);\n// System.out.println(\"\\n\");\n }\n }\n// cont = 0;\n }\n }", "public void update(int rowSelected, Posto p) {\n postos.set(rowSelected, p);\n fireTableRowsUpdated(rowSelected, rowSelected);\n }", "public void fireTableRowsUpdated(int firstRow, int lastRow);", "public abstract void allRowsChanged();", "public void updateRow() throws SQLException\n {\n m_rs.updateRow();\n }", "public void updateDataCell();", "@Override\n public int getRowChange() {\n return rowChange;\n }", "private void setNumRows(int rows) {\n\t\tnumRows = rows; \n\t}", "public String updateRowCount() {\n return null;\n }", "public void update(int rowSelected, Combustivel c) {\n combs.set(rowSelected, c);\n fireTableRowsUpdated(rowSelected, rowSelected);\n }", "public void updateRow() throws SQLException {\n\n try {\n debugCodeCall(\"updateRow\");\n checkClosed();\n if (insertRow != null) { throw Message.getSQLException(ErrorCode.NOT_ON_UPDATABLE_ROW); }\n checkOnValidRow();\n if (updateRow != null) {\n UpdatableRow row = getUpdatableRow();\n Value[] current = new Value[columnCount];\n for (int i = 0; i < updateRow.length; i++) {\n current[i] = get(i + 1);\n }\n row.updateRow(current, updateRow);\n for (int i = 0; i < updateRow.length; i++) {\n if (updateRow[i] == null) {\n updateRow[i] = current[i];\n }\n }\n Value[] patch = row.readRow(updateRow);\n patchCurrentRow(patch);\n updateRow = null;\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public void setRow(int newRow) {\n this.row = newRow;\n }", "@Override\n\t\t\t\tpublic void allRowsChanged() {\n\n\t\t\t\t}", "public void setRow(int value) {\n this.row = value;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnUpdate\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-update-select\" + i);\n\t\t\t\t\tSystem.out.println(\"row-update-supp-id\" + textSuppD.getText());\n\t\t\t\t\tint suppID = Integer.parseInt(textSuppD.getText().trim());\n\t\t\t\t\tString suppName = textSuppName.getText();\n\t\t\t\t\tString suppAddr = textSuppAddr.getText();\n\t\t\t\t\tString suppPhone = textSuppPhone.getText();\n\t\t\t\t\tString suppEmail = textSuppEmail.getText();\n\n\t\t\t\t\tDatabase db = new Database();\n\t\t\t\t\tSuppliersDAO suppDAO = new SuppliersDAO(db);\n\t\t\t\t\tSuppliersModel suppModel = new SuppliersModel();\n\t\t\t\t\tsuppModel.setSuppliers_id(suppID);\n\t\t\t\t\tsuppModel.setName(suppName);\n\t\t\t\t\tsuppModel.setAddress(suppAddr);\n\t\t\t\t\tsuppModel.setPhone(suppPhone);\n\t\t\t\t\tsuppModel.setEmail(suppEmail);\n\n\t\t\t\t\tsuppDAO.Update(suppModel);\n\n\t\t\t\t\tdb.commit();\n\t\t\t\t\tdb.close();\n\n\t\t\t\t\tsetTableGet(i, model);\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t}", "private int updateItem(Uri uri, ContentValues values, String selection, String[] selectionArgs, String table_name, String column_name) {\n /** If the {@link column_name} key is present, check that the name value is not null.*/\n if (values.containsKey(column_name)) {\n // Check that the name is not null\n String name = values.getAsString(column_name);\n if (name == null) {\n throw new IllegalArgumentException(\"Task requires a name\");\n }\n }\n\n // If there are no values to update, then don't try to update the database\n if (values.size() == 0) {\n return 0;\n }\n SQLiteDatabase database = dataDbHelper.getWritableDatabase();\n // Perform the update on the database and get the number of rows affected\n int rowsUpdated = database.update(table_name, values, selection, selectionArgs);\n\n // If 1 or more rows were updated, then notify all listeners that the data at the\n // given URI has changed\n if (rowsUpdated != 0) {\n getContext().getContentResolver().notifyChange(uri, null);\n }\n //Return the number of rows that were affected\n return rowsUpdated;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tint RowNum=jt.getSelectedRow();\n\t\t\t\tif(RowNum==-1){\n\t\t\t\t\tJOptionPane.showMessageDialog(jt, \"请选择一行\");\n\t\t\t\t return ;\n\t\t\t }\n\t\t \n\t\t String info=((String)mit.getValueAt(RowNum, 1));\n\t\t \n\t\t\t\tString majorNewIn=JOptionPane.showInputDialog(\"请修改专业\",info);\n\t\t\t\tif(majorNewIn!=null)\n\t\t\t\t{\n\t\t\t\t\tif(!majorNewIn.equals(\"\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\tString majorIdSql=\"select id from majorinfo where majorName='\"+Tool.string2UTF8(info)+\"'\";\n\t\t\t\t\t\tString majorid=SqlModel.getInfo(majorIdSql);\n\t\t\t\t\t\t\n\t\t\t\t\t\tString mclassSql=\"update classinfo set major='\"+Tool.string2UTF8(majorNewIn)+\"' where major='\"+Tool.string2UTF8(info)+\"'\";\n\t\t\t\t\t\tString mjobSql=\"update jobinfo set major='\"+Tool.string2UTF8(majorNewIn)+\"' where major='\"+Tool.string2UTF8(info)+\"'\";\n\t\t\t\t\t\tString mmajorSql=\"update majorinfo set majorName='\"+Tool.string2UTF8(majorNewIn)+\"' where id='\"+majorid+\"'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tSqlModel.updateInfo(mclassSql);\n\t\t\t\t\t\tSqlModel.updateInfo(mjobSql);\n\t\t\t\t\t\tif(SqlModel.updateInfo(mmajorSql)){\n\t\t\t\t\t\t\trefresh(jt);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"修改失败\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t \n\t\t\t}", "@Action\n public void modifyAction() {\n E rowObject = (E) dataTable.getSelectedRowObject();\n if (rowObject != null) {\n rowObject = (E) rowObject.clone();\n\n if (viewRowState) {\n viewRow(rowObject);\n } else {\n E newRowObject = modifyRow(rowObject);\n if (newRowObject != null) {\n replaceTableObject(newRowObject);\n fireModify(newRowObject);\n }\n }\n }\n }", "@Override\n\tpublic int updateByPrimaryKeySelective(Cell record) {\n\t\t\t\tSqlSession sqlSession =null;\n\t\t\t\tint count=0;\n\t\t\t\ttry {\n\t\t\t\t\tsqlSession = MySqlSessionFactory.getSqlSession(true);\n\t\t\t\t\tCellMapper cellMapper = sqlSession.getMapper(CellMapper.class);\n\t\t\t\t\tcount = cellMapper.updateByPrimaryKeySelective(record);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\tif(sqlSession != null) {\n\t\t\t\t\t\tsqlSession.close();\n\t\t\t\t\t\tsqlSession = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn count;\n\t}", "public void updateSelection() {\n\t\t\n\t}", "@Override\r\n public int getRowCount() {\n return this.rowData.size();\r\n }", "public void updateButtonActionPerformed(ActionEvent evt)\n {\n int row = rateMediaTable.getSelectedRow();\n double rating = Double.parseDouble(ratingTextField.getText());\n String theName = nameTextField.getText();\n String theArtist = artistTextField.getText();\n double theLength = Double.parseDouble(lengthTextField.getText());\n \n if(row >= 0) \n {\n if(rating > 5)\n {\n System.err.println(\"Update Error. ENTER RATING LESSER OR EQUAL TO 5.\");\n }\n else\n {\n if(theName.equalsIgnoreCase(\"Select Row\") || theArtist.equalsIgnoreCase(\"Select Row\") || theLength == 0)\n {\n System.err.println(\"Update Error. SELECT A ROW.\");\n }\n else if(row == -1)\n {\n System.err.println(\"Update Error. SELECT A ROW.\");\n }\n else\n {\n theMediaListCntl.updateName(nameTextField.getText(), row, 0);\n theMediaListCntl.updateArtist(artistTextField.getText(), row, 1);\n theMediaListCntl.updateDoubleLength(lengthTextField.getText(), row, 2);\n theMediaListCntl.updateDoubleRating(ratingTextField.getText(), row, 3);\n }\n \n }\n }\n else\n {\n System.err.println(\"Update Error. SELECT A ROW.\");\n }\n \n }", "@Override\n\tpublic void updateSelective(TblMulitData t) throws SQLException {\n\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\teditRow();\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\teditRow();\n\t\t\t}", "public void rowField()\n\t{ \n\t\tviewTable.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e)\n\t\t\t{\n\t\t\t\tint c;\n\t\t\t\tString id ,oldname,oladdress,oldcontact,oldemail,oldusername, oldpassword;\n\t\t\t\tDefaultTableModel viewTablemodel = (DefaultTableModel)viewTable.getModel();\n\t\t\t\tc=viewTable.getSelectedRow();\n\t\t\t\tid= viewTablemodel.getValueAt(c, 1).toString();\n\t\t\t\toldname= viewTablemodel.getValueAt(c,2).toString();\n\t\t\t\toldcontact= viewTablemodel.getValueAt(c,3).toString();\n\t\t\t\toladdress= viewTablemodel.getValueAt(c,4).toString();\n\t\t\t\toldemail= viewTablemodel.getValueAt(c,5).toString();\n\t\t\t\toldusername= viewTablemodel.getValueAt(c,6).toString();\n\t\t\t\toldpassword= viewTablemodel.getValueAt(c,7).toString();\n\t\t\t\tupdatePanel(id, oldname, oldcontact, oladdress, oldemail, oldusername, oldpassword);\n\t\t\t\tsetRowCount(viewTable.getSelectedRow());\n\t\t\t}\n\t\t});\n\t}", "public void setRows () {\n\t\t\n\t}", "public void setRow(int row)\n\t{\n\t\tthis.row = row;\n\t}", "public void setRow(int row)\n\t{\n\t\tthis.row = row;\n\t}", "public void setCurrentRow(int rowNumber) throws SQLException {\n/* 163 */ notSupported();\n/* */ }", "public void setRowCount(int[] rowCount) {\r\n this.rowCount = rowCount;\r\n }", "public void updateTable(String tableName, String[][] tableData, String[][] selectedCells, Cell [][]cells) \n {\n this.cells = cells;\n int tableDataRows = tableData.length;\n int selectedCellsRows = selectedCells.length;\n \n// System.out.println(\"tableDataRows = \" + tableDataRows);\n// System.out.println(\"selectedCellsRows = \" + selectedCellsRows);\n\n /*\n * if selected cells have more rows than table data then we need to at\n * least insert new data into the database\n */\n if (selectedCellsRows > tableDataRows) \n {\n /* creating a new array with only the \"extra\" rows in the spreadsheet */\n int startIndex = tableDataRows;\n// System.out.println(\"startIndex = \" + startIndex);\n String [][]newRows = new String[selectedCells.length - startIndex][tableData[0].length];\n for(int i = 0; i < newRows.length; i++)\n {\n for(int j = 0; j < newRows[0].length; j++)\n {\n newRows[i][j] = selectedCells[i + startIndex][j];\n// System.out.println(newRows[i][j]);\n }\n// System.out.println(\"-----------\");\n \n }\n /* inserts the \"extra\" selected cells in the database */\n adapter.insertNewData(tableName, newRows);\n /* at this point we need to make sure the rows are equal in both\n * tables so we call the following methods before update takes place */\n selectedCells = cellsTo2dArray(cells);\n tableData = loadTable(tableName);\n updateEqualRows(tableName, tableData, selectedCells);\n }\n\n// /*\n//\t\t * if selected cells have less rows than table data then we need to at\n//\t\t * least remove a record from the database\n//\t\t */\n// else if (selectedCellsRows < tableDataRows) \n// {\n// \n// }\n\n /* if row count is the same then we only need to update the table */\n else \n {\n updateEqualRows(tableName, tableData, selectedCells);\n }\n\n\t}", "protected abstract E modifyRow(E rowObject);", "public void setRow(int row) {\n\t\tthis.row = row; \n\t}", "private void selectTableRow () {\n int selectedRow = itemTable.getSelectedRow();\n if (selectedRow >= 0 && selectedRow < clubEventList.size()) {\n boolean modOK = modIfChanged();\n if (modOK) {\n position = clubEventList.positionUsingListIndex (selectedRow);\n positionAndDisplay();\n }\n }\n }", "public void setRows(Integer rows) {\n this.rows = rows;\n }", "public void setRows(Integer rows) {\n this.rows = rows;\n }", "public void setRows(int rows)\n {\n this.rows = rows;\n }", "private int numRows(){\n return attrTable.getModel().getRowCount();\n }", "public void setNumRows(int newSize) {\r\n\t\tif ((newSize < 0) || (newSize == getRowCount()))\r\n\t\t\treturn;\r\n\t\tint oldNumRows = getRowCount();\r\n\t\tif (newSize <= getRowCount()) {\r\n\t\t\t// newSize is smaller than our current size, so we can just\r\n\t\t\t// let Vector discard the extra rows\r\n\t\t\tdataVector.setSize(newSize);\r\n\r\n\t\t\t// Generate notification\r\n\t\t\tfireTableRowsDeleted(getRowCount(), oldNumRows - 1);\r\n\t\t} else {\r\n\t\t\tint columnCount = getColumnCount();\r\n\t\t\t// We are adding rows to the model\r\n\t\t\twhile (getRowCount() < newSize) {\r\n\t\t\t\tVector newRow = new Vector(columnCount);\r\n\t\t\t\tnewRow.setSize(columnCount);\r\n\t\t\t\tdataVector.addElement(newRow);\r\n\t\t\t}\r\n\r\n\t\t\t// Generate notification\r\n\t\t\tfireTableRowsInserted(oldNumRows, getRowCount() - 1);\r\n\t\t}\r\n\t}", "int rowCount();", "@Override\n\tpublic int updateByPrimaryKey(Cell record) {\n\t\treturn 0;\n\t}", "void updateRow(int rowId, int[] newRow) {\n int oldHead = 0;\n int newHead = 0;\n int[] oldRow = this.rows[rowId];\n while (oldHead < oldRow.length && newHead < newRow.length) {\n int oldColId = oldRow[oldHead];\n int newColId = newRow[newHead];\n if (oldColId < newColId) {\n synchronized (this.getColumn(oldColId)) {\n this.getColumn(oldColId).remove(rowId);\n }\n oldHead++;\n } else if (oldColId > newColId) {\n synchronized (this.getColumn(newColId)) {\n this.getColumn(newColId).add(rowId);\n }\n newHead++;\n } else {\n oldHead++;\n newHead++;\n }\n }\n while (oldHead < oldRow.length) {\n int oldColId = oldRow[oldHead];\n synchronized (this.getColumn(oldColId)) {\n this.getColumn(oldColId).remove(rowId);\n }\n oldHead++;\n }\n while (newHead < newRow.length) {\n int newColId = newRow[newHead];\n synchronized (this.getColumn(newColId)) {\n this.getColumn(newColId).add(rowId);\n }\n newHead++;\n }\n this.rows[rowId] = newRow;\n }", "public void setRow(int row) {\n\t\tthis.row = row;\n\t}", "public void setRow(int row) {\n\t\tthis.row = row;\n\t}", "private void deleteRow(int selectedRow){\r\n BudgetSubAwardBean budgetSubAwardBean = (BudgetSubAwardBean)data.get(selectedRow);\r\n if(budgetSubAwardBean.getAcType() == null || budgetSubAwardBean.getAcType().equals(TypeConstants.UPDATE_RECORD)){\r\n budgetSubAwardBean.setAcType(TypeConstants.DELETE_RECORD);\r\n budgetSubAwardBean.setUpdateUser(userId);\r\n if(deletedData ==null) {\r\n deletedData = new ArrayList();\r\n }\r\n deletedData.add(budgetSubAwardBean);\r\n }\r\n data.remove(selectedRow);\r\n \r\n //If Last Row nothing to do\r\n //else Update Sub Award Number for rest of the Rows\r\n /*int size = data.size();\r\n if(selectedRow != size) {\r\n for(int index = selectedRow; index < size; index++) {\r\n budgetSubAwardBean = (BudgetSubAwardBean)data.get(index);\r\n budgetSubAwardBean.setSubAwardNumber(index + 1);\r\n if(budgetSubAwardBean.getAcType() == null) {\r\n budgetSubAwardBean.setAcType(TypeConstants.UPDATE_RECORD);\r\n }\r\n }//End For\r\n }//End If\r\n */\r\n \r\n subAwardBudgetTableModel.fireTableRowsDeleted(selectedRow, selectedRow);\r\n }", "private void refreshRows( final int[] rows ) {\n\t\tfinal NodesTableModel tableModel = getNodesTableModel();\n\t\tfor ( final int row : rows ) {\n\t\t\ttableModel.fireTableRowsUpdated( row, row );\n\t\t}\n\t}", "@Override\r\n\tpublic void updateNbCol() {\r\n\t\treturn;\r\n\t}", "public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }", "public void setRowCounts(entity.LoadRowCount[] value);", "public void setPositionRow(int value){this.positionRow = value;}", "public void setRow(int r) {\n\t\tthis.row = r;\n\t}", "private void editButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editButtonActionPerformed\n try ( Connection con = DbCon.getConnection()) {\n int rowCount = flightsTable.getRowCount();\n selectedRow = flightsTable.getSelectedRow();\n //if row is chosen\n if (selectedRow >= 0) {\n\n PreparedStatement pst = con.prepareStatement(\"update Flights set departure = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 0)\n + \"', destination = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 1)\n + \"', depTime = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 2)\n + \"', arrTime = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 3)\n + \"', number = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 4)\n + \"', price = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 5)\n + \"' where number = '\" + flightsDftTblMdl.getValueAt(selectedRow, 4) + \"'\");\n\n pst.execute();\n initFlightsTable();//refresh the table after edit\n } else {\n JOptionPane.showMessageDialog(null, \"Please select row first\");\n }\n\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(CustomerRecords.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "@Override\r\n\tpublic boolean updateTable() {\r\n\t\t/*\r\n\t\t * VERSION 1\r\n\t\t *\r\n\t\tobjectCollection.clear();\r\n\t\tobjectCollection.addAll(retrieveObjects());\r\n\t\trefreshTable();*/\r\n\t\tlong size=objectCollection.size();\r\n\t\tobjectCollection.clear();\r\n\t\tint index=getSelectionIndex();\r\n\t\tupdateTable(SWT.DEFAULT);\r\n\t\tselectElement(index);\r\n\t\treturn objectCollection.size()!=size;\r\n\t}", "private void toEdit() {\n int i=jt.getSelectedRow();\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No data has been added to the details\");\n }\n else if(i==-1)\n {\n JOptionPane.showMessageDialog(rootPane,\"No item has been selected for the update\");\n }\n else\n {\n if(tfPaintId.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the Paint ID\");\n }\n else if(tfName.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the Product name\");\n }\n else if(rwCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Select the raw materials used\");\n }\n else if(bCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! select the brand you want\");\n }\n else if(tfPrice.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the price\");\n }\n else if(tfColor.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the colour\");\n }\n else if(typeCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Select something from paint type\");\n }\n else if(getQuality()==null) \n {\n JOptionPane.showMessageDialog(rootPane,\"Quality is not selected\");\n }\n else if(tfQuantity.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the quantity\");\n }\n else\n {\n try\n {\n jtModel.setValueAt(tfPaintId.getText(),i,0);\n jtModel.setValueAt(tfName.getText(),i,1);\n jtModel.setValueAt(Integer.valueOf(tfPrice.getText()),i,2);\n jtModel.setValueAt(tfColor.getText(),i,3);\n jtModel.setValueAt(rwCombo.getSelectedItem(),i,4);\n jtModel.setValueAt(bCombo.getSelectedItem(),i,5);\n jtModel.setValueAt(typeCombo.getSelectedItem(),i,6);\n jtModel.setValueAt(getQuality(),i,7);\n jtModel.setValueAt(Integer.valueOf(tfQuantity.getText()),i,8);\n JOptionPane.showMessageDialog(rootPane,\"Successfully updated the data in details\");\n toClear();\n }\n catch(Exception ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Excepted integer but entered another character at price or quantity.\");\n }\n }\n }\n }", "private void selectedRowInvoice(){\r\n //numOrdenInv = tb_factura.getSelectionModel().getSelectedIndex();\r\n }", "public int getRowCount();", "public final void incrementRowsReadEvent() {\n rowsRead_++;\n }", "int updateByPrimaryKeySelective(Assist_table record);", "public void setRow(final int newI) {\n\t\tthis.i = newI;\n\t}", "@Override\r\n\tpublic int update(Trolley trolley) {\n\t\tint rows = -1;\r\n\t\tString updSql = \"UPDATE trolley SET buy_num = '\" + trolley.getBuyNum() + \"' WHERE id= '\" + trolley.getId()\r\n\t\t\t\t+ \"'\";\r\n\t\trows = conn.executeUpdate(updSql);\r\n\t\tconn.close();\r\n\t\treturn rows;\r\n\t}", "public void setRows(int rows) {\n this.rows = rows;\n }", "public abstract void rowsInserted(int firstRow, int endRow);", "int atRow();", "public void setRows_affected(Long rows_affected) {\n this.rows_affected = rows_affected;\n }", "public void addToRowCounts(entity.LoadRowCount element);", "@Override\n public int getUpdateCount() throws SQLException {\n int to_return = getUpdateCountInternal();\n update_result = -1;\n return to_return;\n }", "public void executeUpdate();", "@Override\n public int getUpdateCount() throws SQLException {\n return -1;\n }", "int executeUpdate() throws SQLException;", "void setRowSelection(int index, String value) {\r\n int val;\r\n try {\r\n val = ( (Integer) nameToIndexMap.get(value)).intValue();\r\n }\r\n catch (Exception e) {\r\n return;\r\n }\r\n ySelections[index] = val;\r\n\r\n // now, for all the plots in this row, update the objectives\r\n for (int i = 0; i < 2; i++) {\r\n plots[index][i].setObjectives(xSelections[i], val);\r\n /////////////////////////////////\r\n plots[index][i].redraw();\r\n /////////////////////////////////\r\n }\r\n fireTableDataChanged();\r\n }", "public abstract void update (org.apache.spark.sql.expressions.MutableAggregationBuffer buffer, org.apache.spark.sql.Row input) ;", "public void absIncrementRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n va[index] = va[index + 1];\n va[index + 1] = vTemp;\n\n setRows(va);\n }", "public void setRows(int rows) {\n\t\tthis.rows = rows;\n\t}", "public int row();", "public abstract int getNumRows();", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public abstract int getModelRowCount();", "public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}", "private void enableSelectedRowForUpdate(ComponentEvent evt) {\n\t\tint tipoRolSeleccionado = getTblTipoRol().getSelectedRow(); \r\n\t\tif ( tipoRolSeleccionado != -1) {\r\n\t\t\ttipoRolSeleccionado = getTblTipoRol().convertRowIndexToModel(tipoRolSeleccionado); \r\n\t\t\ttipoRolIf = (TipoRolIf) tipoRolVector.get(tipoRolSeleccionado);\r\n\t\t\tgetTxtCodigo().setText(tipoRolIf.getCodigo());\r\n\t\t\tgetTxtNombre().setText(tipoRolIf.getNombre());\r\n\t\t\tgetTxtNemonico().setText(tipoRolIf.getNemonico());\r\n\t\t\t\r\n\t\t\tgetCmbFechaInicio().setDate(tipoRolIf.getFechaInicio());\r\n\t\t\tgetCmbFechaInicio().repaint();\r\n\t\t\t\r\n\t\t\tgetCmbFechaFin().setDate(tipoRolIf.getFechaFin());\r\n\t\t\tgetCmbFechaFin().repaint();\r\n\t\t\t\r\n\t\t\tString rubroEventual = tipoRolIf.getRubroEventual(); \r\n\t\t\tif ( rubroEventual != null ){\r\n\t\t\t\tif( RUBRO_EVENTUAL_SI.substring(0,1).equals(rubroEventual) ){\r\n\t\t\t\t\tgetCmbRubroEventual().setSelectedItem(RUBRO_EVENTUAL_SI);\r\n\t\t\t\t}else if( RUBRO_EVENTUAL_NO.substring(0,1).equals(rubroEventual) ){\r\n\t\t\t\t\tgetCmbRubroEventual().setSelectedItem(RUBRO_EVENTUAL_NO);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tgetCmbRubroEventual().setSelectedItem(null);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString provisionado = tipoRolIf.getRubroProvisionado();\r\n\t\t\tif ( provisionado != null ){\r\n\t\t\t\tif( TipoRolProvisionado.SI.getLetra().equals(provisionado) ){\r\n\t\t\t\t\tgetCmbRubroProvisionado().setSelectedItem(TipoRolProvisionado.SI);\r\n\t\t\t\t}else if( TipoRolProvisionado.NO.getLetra().equals(provisionado) ){\r\n\t\t\t\t\tgetCmbRubroProvisionado().setSelectedItem(TipoRolProvisionado.NO);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tgetCmbRubroProvisionado().setSelectedItem(null);\r\n\t\t\t}\r\n\t\t\tgetCmbRubroProvisionado().repaint();\r\n\t\t\t\r\n\t\t\tString formaPagoLetra = tipoRolIf.getFormaPago();\r\n\t\t\tif (formaPagoLetra != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTipoRolFormaPago formaPago = TipoRolFormaPago.getTipoRolPagoByLetra(formaPagoLetra);\r\n\t\t\t\t\tgetCmbFormaPago().setSelectedItem(formaPago);\r\n\t\t\t\t} catch (GenericBusinessException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tSpiritAlert.createAlert(e.getMessage(), SpiritAlert.ERROR);\r\n\t\t\t\t}\r\n\t\t\t} else \r\n\t\t\t\tgetCmbFormaPago().setSelectedItem(null);\r\n\t\t\tgetCmbFormaPago().repaint();\r\n\t\t\t\r\n\t\t\tsetUpdateMode();\r\n\t\t}\r\n\t}", "public void setEditRow(int row) {\n this.editRow = row;\n }", "int updateByPrimaryKeySelective(UserCount record);", "private int executeUpdateInternal(List<Object> values) {\r\n\t\tif (logger.isDebugEnabled()) {\r\n\t\t\tlogger.debug(\"The following parameters are used for update \" + getUpdateString() + \" with: \" + values);\r\n\t\t}\r\n\t\tint updateCount = jdbcTemplate.update(updateString, values.toArray(), columnTypes);\r\n\t\treturn updateCount;\r\n\t}", "public abstract int rows();", "public int getRow() { return _row; }", "public int updateByPrimaryKeySelective(State record) {\n int rows = getSqlMapClientTemplate().update(\"lgk_state.abatorgenerated_updateByPrimaryKeySelective\", record);\n return rows;\n }", "int updateByPrimaryKeySelective(RepStuLearning record);", "@Override\n public void tableRows_()\n {\n }", "synchronized void refresh() {\n\n\t\t// We must not call fireTableDataChanged, because that would clear the\n\t\t// selection in the task window\n\t\tfireTableRowsUpdated(0, size - 1);\n\n\t}", "public void setRow(int row) {\n\t\t\tif (row > 0)\n\t\t\t\tthis.row = row;\n\t\t}", "int updateByPrimaryKeySelective(NjProductTaticsRelation record);", "@Override\n\t\t\tpublic int getRow() {\n\t\t\t\treturn count;\n\t\t\t}", "int updateByPrimaryKeySelective(NjOrderWork2 record);", "@Override\n\tpublic int getRowCount() {\n\t\treturn rowCount;\n\t}", "@Override\n\tpublic int getRowCount() {\n\t\treturn rowCount;\n\t}", "int updateByPrimaryKeySelective(AdminTab record);", "public int getRowNum(){ return this.rowNum; }" ]
[ "0.71394426", "0.7000633", "0.6804444", "0.6531333", "0.6501594", "0.646775", "0.63628274", "0.633744", "0.6314711", "0.6295163", "0.62809426", "0.62755114", "0.62713164", "0.6230688", "0.62193894", "0.6209061", "0.62055296", "0.6193726", "0.6131181", "0.6125166", "0.61097735", "0.60848737", "0.6084408", "0.60107416", "0.597389", "0.5969116", "0.596199", "0.5953577", "0.5953577", "0.59533167", "0.5943697", "0.5942948", "0.5942948", "0.59408474", "0.5939625", "0.5934847", "0.5923509", "0.59010214", "0.5893016", "0.5891768", "0.5891768", "0.58855987", "0.5867995", "0.5866186", "0.5864669", "0.58529466", "0.5851187", "0.58476126", "0.58476126", "0.5845955", "0.58438194", "0.58421504", "0.58324593", "0.5824474", "0.5804112", "0.5793808", "0.579207", "0.5790704", "0.57843536", "0.5781794", "0.57557184", "0.57517153", "0.5751687", "0.5747182", "0.5745985", "0.5745946", "0.5737766", "0.5727537", "0.5714562", "0.57137096", "0.5698792", "0.5698249", "0.56975126", "0.5691791", "0.56898606", "0.5669326", "0.5669189", "0.5655157", "0.5649756", "0.56447303", "0.564174", "0.5638341", "0.56382203", "0.5636361", "0.5632638", "0.56313336", "0.56304455", "0.5630314", "0.56275785", "0.5626751", "0.5622191", "0.5618655", "0.5615545", "0.561061", "0.56089467", "0.56088895", "0.5605331", "0.5605178", "0.5605178", "0.56037414", "0.560148" ]
0.0
-1
Retrieve the list of all products within the DAO
@Test public void testListProducts() { List<Product> allProducts = testDao.listProducts(); // First check the general contents of the list assertNotNull(allProducts, "The list of products must not null"); assertEquals(4, allProducts.size(),"List of products should have 4 products."); // Then the specifics // assertTrue(testDao.getAllMonsters().contains(firstMonster), // "The list of monsters should include Vladmir."); // assertTrue(testDao.getAllMonsters().contains(secondMonster), // "The list of monsters should include Warwick."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Product> getAllProducts() throws PersistenceException;", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts() throws DataBaseException;", "@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}", "@Override\r\n\tpublic List<Product> getallProducts() {\n\t\treturn dao.getallProducts();\r\n\t}", "List<Product> retrieveProducts();", "@Override\n\t@Transactional\n\tpublic List<Product> getAllProducts() {\n\t\treturn (List<Product>)productDAO.findAll();\n\t\t\n\t}", "@Override\n\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}", "public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}", "public List<Product> getAll() {\n\t\treturn productRepository.findAll();\n\n\t}", "@Override\r\n\tpublic List<ProductDAO> list() {\n\t\treturn null;\r\n\t}", "@Override\r\n public List<Product> findAll() {\r\n return productRepository.findAll();\r\n }", "public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }", "@Override\n\tpublic List<Product> getProducts() {\n\t\treturn productDao.getProducts();\n\t}", "@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}", "@Override\n\tpublic List<Products> getProducts() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Products> theQuery = currentSession.createQuery(\"from Products order by id\", Products.class);\n\n\t\t// execute query and get result list\n\t\tList<Products> products = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn products;\n\n\t}", "public List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\n\t}", "public List<Product> findAll();", "@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}", "List<Product> getProductsList();", "List<Product> findAll();", "List<Product> findAll();", "@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}", "@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}", "@Override\r\n\tpublic List<Product> findAllProducts() {\n\t\treturn productRepository.findAllProducts();\r\n\t}", "public List<Product> get() {\r\n return sessionFactory.getCurrentSession()\r\n .createCriteria(Product.class)\r\n .addOrder(Order.asc(\"name\"))\r\n .list();\r\n }", "@GetMapping(\"/getproduct\")\n\t\tpublic List<Product> getAllProduct() {\n\t\t\tlogger.info(\"products displayed\");\n\t\t\treturn productService.getAllProduct();\n\t\t}", "public List<Product> getProducts();", "public List<Product> getProducts();", "public List<Product> getProductList(){\n List<Product> productList = mongoDbConnector.getProducts();\n return productList;\n }", "public List<Product> getProducts() {\n\t\treturn productRepository.findAll();\n\t}", "@NonNull\n public List<Product> findAll() {\n return productRepository.findAll();\n }", "public List<Products> getProducts() {\n\t\treturn pdao.getProducts();\r\n\t}", "@Override\n\tpublic List<Product> getAll() throws SQLException {\n\t\treturn null;\n\t}", "@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }", "public List<Product> findAll() {\n\t\treturn repository.findAll();\n\t}", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Product> getProductFindAll() {\n return em.createNamedQuery(\"Product.findAll\", Product.class).getResultList();\n }", "public List<Product> returnProducts() throws FlooringMasteryDaoException {\n\n List<Product> products = dao.loadProductInfo();\n return products;\n\n }", "private void getAllProducts() {\n }", "public List<Product> getAll() {\n List<Product> list = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + PRODUCT_TABLE;\n SQLiteDatabase database = this.getReadableDatabase();\n try (Cursor cursor = database.rawQuery(selectQuery, null)) {\n if (cursor.moveToFirst()) {\n do {\n int id = cursor.getInt(0);\n String name = cursor.getString(1);\n String url = cursor.getString(2);\n double current = cursor.getDouble(3);\n double change = cursor.getDouble(4);\n String date = cursor.getString(5);\n double initial = cursor.getDouble(6);\n Product item = new Product(name, url, current, change, date, initial, id);\n list.add(item);\n }\n while (cursor.moveToNext());\n }\n }\n return list;\n }", "@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn list;\n\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<Producto> findAll() {\n\n\t\treturn (List<Producto>) productoDao.findAll();\n\t}", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }", "@Override\r\n\tpublic List<ProductMaster> getAllProducts() {\n\t\treturn this.repository.findAll();\r\n\t}", "public static ObservableList<Product> getAllProducts() {\n return allProducts;\n }", "@GetMapping(\"/view-all\")\r\n\tpublic List<ProductDetails> viewAllProducts() {\r\n\r\n\t\treturn productUtil.toProductDetailsList(productService.viewAllProducts());\r\n\t}", "@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}", "public ArrayList<Product> viewAllProduct() throws ProductException{\r\n\t\t\tArrayList<Product> products=new ArrayList<Product>();\r\n\t\t\tif(ProductRepository.productsList.isEmpty()) {\r\n\t\t\t\tthrow new ProductException(\"there are no products in the store\");\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\r\n\t\t\tproducts.addAll(pDoa.viewProductsDoa());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn products;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@GetMapping(\"/findAllProduct\")\n @ResponseBody\n public ResponseEntity<List<ProductEntity>> findAllProduct() {\n List<ProductEntity> productResponse = productService.viewProduct();\n return new ResponseEntity<>(productResponse, HttpStatus.OK);\n }", "public ObservableList<Product> getAllProducts() {\n return allProducts;\n }", "public ObservableList<Product> getAllProducts() { return allProducts; }", "@GetMapping(path =\"/products\")\n public ResponseEntity<List<Product>> getProducts() {\n return ResponseEntity.ok(productService.getAll());\n }", "@Override\r\n\tpublic List<Producto> getAll() throws Exception {\n\t\treturn productRepository.buscar();\r\n\t}", "@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}", "@CrossOrigin()\r\n @GetMapping(\"/products/all\")\r\n List<ProductEntity> getAllProducts() {\r\n // TODO add error if there are not enough products\r\n return productRepository.findAll();\r\n }", "@Override\n\tpublic List<ProductDTO> viewAllProducts() throws ProductException {\n\t\tCollection<Product> products = ProductStore.map.values();\n\t\tList<ProductDTO> list = new ArrayList();\n\n\t\tfor (Product product : products) {\n\t\t\tProductDTO product1 = ProductUtil.convertToProductDto(product);\n\t\t\tlist.add(product1);\n\t\t}\n\n\t\treturn list;\n\t}", "List<Product> list();", "public List<Product> getProducts() {\n return products;\n }", "public List<Products> getProductsDetails() {\n\t\treturn productsRepo.findAll();\n\t}", "public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }", "@GetMapping(\"/retrieve\")\n public ResponseEntity<List<Product>> getProdAll(final HttpSession session) {\n log.info(session.getId() + \" : Retrieving all products\");\n return ResponseEntity.status(HttpStatus.OK).body(prodService.getAll());\n }", "public List<ProductDto> getProducts() {\n return tradingSystemFacade.getProducts();\n }", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "Product getPProducts();", "public List<Product> readAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<ProductVo> selectAll() {\n\t\tList<ProductVo> list = sqlSession.selectList(\"product.selectAll\");\n\t\treturn list;\n\t}", "@GetMapping(\"/productos\")\n @Timed\n public List<Producto> getAllProductos() {\n log.debug(\"REST request to get all Productos\");\n List<Producto> productos = productoRepository.findAll();\n return productos;\n }", "List<ProductDto> getProducts();", "@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}", "ArrayList<Product> ListOfProducts();", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public List<Product> getAllProducts() {\n return new ArrayList<Product>(this.products.values());\n }", "@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }", "public List<ProductWithSupplierTO> getAllProducts(long storeID) throws NotInDatabaseException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "@Override\n\tpublic List<Product> getAllProductByName(String name) {\n\t\treturn productRepository.findByName(name);\n\t}", "private List<Product> extractProducts() {\r\n\t\t//load products from hidden fields\r\n\t\tif (this.getListProduct() != null){\r\n\t\t\tfor(String p : this.getListProduct()){\r\n\t\t\t\tProduct product = new Product();\r\n\t\t\t\tproduct.setId(Long.valueOf(p));\r\n\t\t\t\tthis.products.add(product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.products;\r\n\t}", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();", "public List<Product> getAllProducts()\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n // Creates a comma-separated string of all columns in the shopping list table\n String values = TextUtils.join(\", \", ShoppingListTable.COLUMNS);\n\n // Constructs the SQL query\n String sql = String.format(\"SELECT %s FROM %s\", values, ShoppingListTable.TABLE_NAME);\n\n Cursor query = db.rawQuery(sql, null);\n\n Product product = null;\n List<Product> products = new ArrayList<>();\n\n // Check whether there are any products\n if (query.moveToFirst())\n {\n do\n {\n int tpnb = Integer.parseInt(query.getString(0));\n String name = query.getString(1);\n String description = query.getString(2);\n float cost = Float.parseFloat(query.getString(3));\n float quantity = Float.parseFloat(query.getString(4));\n String superDepartment = query.getString(5);\n String department = query.getString(6);\n String imageURL = query.getString(7);\n Boolean isChecked = query.getString(8).equals(\"1\");\n int amount = Integer.parseInt(query.getString(9));\n int position = Integer.parseInt(query.getString(10));\n\n product = new Product(tpnb, name, description, cost, quantity, superDepartment, department, imageURL);\n\n product.setChecked(isChecked);\n product.setAmount(amount);\n product.setPosition(position);\n\n products.add(product);\n }\n while (query.moveToNext());\n }\n\n return products;\n }", "List<Product> getProductPage(int pageNumber, int pageSize);", "public List<ProductDto> getProducts() {\n\t\tString url = URL_BASE + \"/list\";\n\n\t\tResponseEntity<List<ProductDto>> responseEntity = restTemplate.exchange(url, HttpMethod.GET, HttpEntity.EMPTY,\n\t\t\t\tnew ParameterizedTypeReference<List<ProductDto>>() {\n\t\t\t\t});\n\t\tList<ProductDto> playerList = responseEntity.getBody();\n\t\treturn playerList;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}", "public ObservableList<Product> getAllProduct()\n {\n ObservableList<Product> product =FXCollections.observableArrayList();\n try {\n state = ConnectionDB.openConnection().createStatement();\n ResultSet result = state.executeQuery(\"SELECT * FROM product\");\n \n \n \n while(result.next())\n {\n // if define object out while will store last row n time\n Product pr = new Product(); \n pr.setId(result.getInt(1));\n pr.setName(result.getString(2));\n pr.setNumber(result.getInt(3));\n pr.setPrice(result.getInt(4));\n product.add(pr); \n }\n } catch (SQLException ex) {\n Logger.getLogger(ProductControl.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return product;\n }", "List<CheckoutProduct> findAll();", "List<Product> getProductByCategory(String category) throws DataBaseException;", "public List<Product> list();", "@Override\n public List getAllSharingProduct() {\n \n List sharingProducts = new ArrayList();\n SharingProduct sharingProduct = null;\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n ResultSet result = null;\n try {\n connection = MySQLDAOFactory.createConnection();\n preparedStatement = connection.prepareStatement(Read_All_Query);\n preparedStatement.execute();\n result = preparedStatement.getResultSet();\n \n while (result.next()) {\n sharingProduct = new SharingProduct(result.getString(1), result.getInt(2) );\n sharingProducts.add(sharingProduct);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n result.close();\n } catch (Exception rse) {\n rse.printStackTrace();\n }\n try {\n preparedStatement.close();\n } catch (Exception sse) {\n sse.printStackTrace();\n }\n try {\n connection.close();\n } catch (Exception cse) {\n cse.printStackTrace();\n }\n }\n \n return sharingProducts;\n }", "@RequestMapping(value = \"/displayallproducts\",method=RequestMethod.POST)\r\n\tList<ProductBean> displayAllProducts() throws ProductNotFoundException {\r\n\t\t\r\n\t\t//try {\r\n\t\t\treturn service.displayAllProducts();\r\n\t\t//} catch (ProductNotFoundException e) {\r\n\t\t\t//throw e;\r\n\t\t//}\r\n\t\t\r\n\t}", "public interface ProductDao {\n List<Product> getAllSecretProduct();\n}", "@Override\n @Transactional(readOnly = true)\n public List<ProductPurchaseDTO> findAll() {\n log.debug(\"Solicitud para obtener todos ProductPurchases\");\n \n return productPurchaseMapper.productsPurchaseToProductPurchaseDTOs(productPurchaseRepository.findAll());\n }", "@Override\n public ArrayList<Product> getAllProducts(boolean retrieveAssociation) throws Exception\n {\n ArrayList<Product> returnList = new ArrayList<Product>();\n\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM Products\");\n _da.setSqlCommandText(query);\n ResultSet products = _da.callCommandGetResultSet();\n\n while(products.next())\n {\n Product product = buildProduct(products, retrieveAssociation);\n returnList.add(product);\n }\n\n return returnList;\n }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "@Override\n public List<ProjectproductDTO> findAll() {\n log.debug(\"Request to get all Projectproducts\");\n List<ProjectproductDTO> result = projectproductRepository.findAll().stream()\n .map(projectproductMapper::projectproductToProjectproductDTO)\n .collect(Collectors.toCollection(LinkedList::new));\n\n return result;\n }", "@Override\r\n\tpublic List<shopPet> getAll() {\n\t\treturn dao.getAll();\r\n\t}", "@GetMapping(\"/allProduct\")\n\tpublic ResponseEntity<Response> getAllProduct(){\n\t\treturn ResponseEntity.status(HttpStatus.OK)\n\t\t\t\t.body(new Response(productService.getProduct(), new Date()));\n\t}", "@GetMapping(\"buscarProductos\")\n\tpublic List<Producto> getProductos(){\n\t\treturn this.productoServicios.findAll();\n\t}" ]
[ "0.84966403", "0.847415", "0.847415", "0.847415", "0.84359145", "0.83920807", "0.8383724", "0.8334718", "0.82963246", "0.82327896", "0.8227682", "0.8185588", "0.81625384", "0.8133086", "0.8132874", "0.8117905", "0.8111954", "0.81102103", "0.8092732", "0.8092469", "0.8080038", "0.80423087", "0.8034736", "0.8034736", "0.80162996", "0.80162996", "0.8000118", "0.79874426", "0.79684716", "0.7950309", "0.7950309", "0.7937487", "0.7890565", "0.78813416", "0.7857706", "0.7852545", "0.7842232", "0.78141505", "0.77830976", "0.77793115", "0.7743073", "0.7721504", "0.7691411", "0.76867306", "0.7638981", "0.7619678", "0.7610052", "0.75938827", "0.75272465", "0.75163704", "0.748824", "0.74860775", "0.74649084", "0.74592626", "0.7447993", "0.74440944", "0.74431896", "0.74423575", "0.74142843", "0.73996186", "0.73956096", "0.73583794", "0.73543215", "0.73350906", "0.7303183", "0.72974986", "0.72938883", "0.7287802", "0.7263518", "0.7262852", "0.7254329", "0.722785", "0.7219586", "0.72042656", "0.719643", "0.71872264", "0.71852297", "0.71833915", "0.7182478", "0.7124147", "0.71072674", "0.7098956", "0.70894045", "0.70848775", "0.7081456", "0.7079729", "0.7077868", "0.70719665", "0.7069455", "0.7046323", "0.7023121", "0.7017293", "0.7014784", "0.700749", "0.69995755", "0.6995919", "0.6978654", "0.6973732", "0.6958628", "0.6958375", "0.6953866" ]
0.0
-1
To view All the appointment for searching the appointment
public ArrayList<Appointment> getAllAppointments() { ArrayList<Appointment> array_list = new ArrayList<Appointment>(); SQLiteDatabase db = this.getReadableDatabase(); Cursor res = db.rawQuery( "SELECT * FROM bus_table ", null ); res.moveToFirst(); while(res.isAfterLast() == false){ Integer id = res.getInt(res.getColumnIndex("ID")); String Busfrom = res.getString(res.getColumnIndex("BUSFROM")); String Busto = res.getString(res.getColumnIndex("BUSTO")); String BusTime = res.getString(res.getColumnIndex("BUSTIME")); String BusPrice = res.getString(res.getColumnIndex("BUSTICKET")); String BusSeats = res.getString(res.getColumnIndex("BUSSEATS")); Appointment appointment = new Appointment(id, Busfrom, Busto, BusTime, BusPrice,BusSeats); array_list.add(appointment); res.moveToNext(); } return array_list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Appointment> getAllAppointments() {\n\t\t\t\tList<Appointment> appointmentsList = new ArrayList<Appointment>();\n\t\t\t\ttry {\n\t\t\t\t\tappointmentsList = ar.findAll();\n\t\t\t\t}catch(Exception e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\tappointmentsList = null;\n\t\t\t\t}\n\t\t\t\treturn appointmentsList ;\n\t}", "@RequestMapping(path = \"/\", method = RequestMethod.GET)\n\tList<Appointment> findAll() {\n\t\treturn appointmentService.findAll();\n\t}", "public List<Appointment> getAllDetailsRecp();", "@FXML\n void OnActionViewAllAppointments(ActionEvent event) {\n getTableData();\n MSAppointmentsTableView.setItems(allAppointments);\n }", "public void showAppointments()\n {\n System.out.println(\"=== Day \" + dayNumber + \" ===\");\n int time = START_OF_DAY;\n for(Appointment appointment : appointments) {\n System.out.print(time + \": \");\n if(appointment != null) {\n System.out.println(appointment.getDescription());\n }\n else {\n System.out.println();\n }\n time++;\n }\n }", "public List<Appointment> getAppointments(){\n return appointments;\n }", "private void loadAppointmentList(){\n try {\n MyDBHandler dbHandler = new MyDBHandler(this);\n appointments.clear();\n ArrayList<String> myApps = new ArrayList<String>();\n\n appointments.addAll(dbHandler.getAllAppointmentFromServiceProvider(companyID));\n\n for(Appointment appointment: appointments)\n myApps.add(dbHandler.getServiceTypeName(appointment.getServiceType_id()) + \" / \" +\n getDayName(appointment.getDay_id()) + \" at \" +\n appointment.getStart_time() + \" to \" +\n appointment.getEnd_time()\n );\n\n if(myApps.size()==0) {\n myApps.add(EMPTY_TEXT_LV2);\n }\n ArrayAdapter<String> data = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myApps);\n lv_Appointment.setAdapter(data);\n\n }catch(Exception ex){\n Toast.makeText(this,ex.getMessage(),Toast.LENGTH_LONG).show();\n }\n }", "public Iterator<Appointment> appointments() {\n return appointments.iterator();\n }", "public Iterator<Appointment> appointments()\n {\n return this.agenda.iterator();\n }", "@GetMapping(\"/sys-appointments\")\n @Timed\n public List<SysAppointment> getAllSysAppointments() {\n log.debug(\"REST request to get all SysAppointments\");\n return sysAppointmentService.findAll();\n }", "ObservableList<Appointment> getFilteredAppointmentList();", "@GetMapping(\"/\")\n public String getIndex(Model model, @ModelAttribute Appointment appointment){\n model.addAttribute(\"aList\", da.getAppointment());\n //Send empty object to index.html\n model.addAttribute(\"appointment\", new Appointment());\n return \"index\";\n }", "List<Appointment> getCurrentlyAppointment();", "@Transactional\n\t@Override\n\tpublic List<ApplicantModel> viewAllApplicants() {\n\t\treturn applicantRepo.findAll().stream().map(course -> parser.parse(course))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "@Override\n\tpublic List<Appointment> findCarAppoinmentX() {\n\t\treturn appointmentMapper.findCarAppoinmentX();\n\t}", "@Override\r\n\tpublic List<Cita> getAppointmentList() {\r\n\r\n\t\t// find all users\r\n\t\tList<User> users = (List<User>) userService.findAll();\r\n\t\t// create a new arrayList of appointments\r\n\t\tList<Cita> appointments = new ArrayList<>();\r\n\r\n\t\t// iterate over the list of all the users\r\n\t\tfor (Iterator<User> user = users.iterator(); user.hasNext();) {\r\n\t\t\t// get the user from the forEach\r\n\t\t\tUser getUser = user.next();\r\n\r\n\t\t\t// iterate over the AppointmentList\r\n\t\t\tfor (Cita item : getUser.getCitas()) {\r\n\r\n\t\t\t\t// check if the class is not empty\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tappointments.add(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn appointments;\r\n\t}", "@GetMapping(\"/view/{appointment_id}\")\n\tprivate Appointment getAppointment(@PathVariable Integer appointment_id) {\n\n\t\treturn appointmentService.view(appointment_id);\n\t}", "public java.util.List<Reference> appointment() {\n return getList(Reference.class, FhirPropertyNames.PROPERTY_APPOINTMENT);\n }", "@FXML\r\n void onActionAll(ActionEvent event) {\r\n\r\n appointmentListType();\r\n\r\n }", "public ResultSet readAll() throws SQLException {\r\n String statement = \"SELECT * FROM appointments\";\r\n return conn.prepareStatement(statement).executeQuery();\r\n }", "@GetMapping(\"applicants\")\n public List<Applicant> readAll() {\n return applicantService.getAll();\n }", "@Override\n\tpublic List<Appointment> getUpcomingAppointments() {\n\t\treturn mobileDao.getUpcomingAppointments();\n\t}", "public final List<Appointment> getAppointmentsFor(LocalDate date) {\n List<Appointment> appts = new ArrayList<>();\n\n this.appointments.stream().filter(a -> {\n LocalDate startDate = a.getInterval().getStartDate();\n LocalDate endDate = a.getInterval().getEndDate();\n return startDate.equals(date) || endDate.equals(date);\n }).forEachOrdered(a -> {\n appts.add(a);\n });\n\n return appts;\n }", "@Override\n\tpublic int getCount() {\n\t\treturn appointments_model.size();\n\t}", "@RequestMapping(\"/lista-de-eventos\")\n\tpublic ModelAndView listarEventos() {\n\t\tModelAndView mv = new ModelAndView(\"eventos/lista-de-eventos\");\n\t\t\n\t\t// lista de eventos\n\t\tIterable<Evento> eventos = er.findAll();\n\t\t\n\t\t// passando pra view. O primeiro parametro\n\t\t// eh aquele definido na view, ${}\t\t\n\t\tmv.addObject(\"eventos\", eventos);\n\t\t\n\t\treturn mv;\t\n\t}", "public java.util.List<CsclAppointeeMaster> findAll();", "public void displayAppointmentsOnDate(Date date) {\n ArrayList<Appointment> appts = new ArrayList<>();\n String doctorID = getIntent().getStringExtra(\"doctorID\");\n\n // Get doctor's availableAppointmentIDs\n FirebaseDatabase.getInstance().getReference(Constants.FIREBASE_PATH_USERS)\n .child(doctorID)\n .child(Constants.FIREBASE_PATH_USERS_APPTS_AVAILABLE)\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot availableApptIDsSnapshot) {\n for (DataSnapshot availableApptIDChild : availableApptIDsSnapshot.getChildren()) { // Loop through all of doctor's availableApptIDs\n String availableApptID = availableApptIDChild.getValue(String.class);\n\n // For each availableAppointmentID, get the Appointment object\n FirebaseDatabase.getInstance().getReference(Constants.FIREBASE_PATH_APPOINTMENTS)\n .child(availableApptID)\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot availableApptSnapshot) {\n Appointment appt = availableApptSnapshot.getValue(Appointment.class);\n if (appt != null && !appt.isBooked() && !appt.isPassed() && DateUtility.isSameDay(appt.getDate(), date)) {\n appts.add(appt);\n displayAppointments(appts);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError error) { // Error: Appointment associated w/ availableAppointmentID not found\n Toast.makeText(getApplicationContext(), \"Error: Couldn't find available appointment\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError error) { // Error: No availableAppointmentIDs found\n Toast.makeText(getApplicationContext(), \"Error: No available appointments\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@FXML\n public void OADefault(ActionEvent event) {\n Appointments.setItems(Appointment.getAllAppointments());\n }", "@FXML\n public void OAMonthView(ActionEvent event) {\n Appointment.clearMonthlyAppointment();\n Appointment.setMonthAppointments();\n Appointments.setItems(Appointment.getMonthAppointments());\n\n }", "public void printApp(Date dat)\n {\n if(cal.containsKey(dat)){\n List x = [];\n x = cal.get(dat);\n System.out.println(\"Your appointments for \" + dat + \"are: \\n\");\n for(int i = 0; i<x.size(); i++){\n System.out.println(x.get(i).getStartTime() + x.get(i).getEndTime() + x.get(i).getDescription());\n }\n }else{\n System.out.println(\"No appointments\");\n }\n \n }", "@GetMapping(\"/appointments/consultant/{id}\")\n public List<Appointment> getAllAppointmentsByConsultantId(@PathVariable(\"id\")Long consultantId) {\n return appointmentService.findAllAppointmentsByConsultant(consultantId);\n }", "@GetMapping(\"/Appointments/{id}\")\n public List<Appointment> findAllAppointmentsForASession(@PathVariable(name=\"id\") Integer SessionId, Authentication authentication) {\n return providerServiceImpl.findAllAppointmentsForASession(SessionId, authentication.getName());\n }", "@Path(\"/showAll\")\n\t@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List<EventData> getAllEvent() throws JSONException {\n\t\tString today_frm = DateUtil.getNow(DateUtil.SHORT_FORMAT_TYPE);\n\t\tList<Event> list = eventService.getEventsByType(today_frm,\n\t\t\t\tEventType.EVENTTODAY);\n\t\tList<EventData> d = null;\n\t\tif (null != list && list.size() > 0) {\n\t\t\td = getEventsByDateList(list);\n\t\t} else {\n\t\t\td = new ArrayList<EventData>();\n\t\t}\n\t\treturn d;\n\t}", "public List<Appointment> findBypid(int pid) {\n\t\treturn appointmentDao.findBypid(pid);\n\t}", "@GetMapping(\"/anexlaborals\")\n @Timed\n public List<Anexlaboral> getAllAnexlaborals() {\n log.debug(\"REST request to get all Anexlaborals\");\n return anexlaboralRepository.findAll();\n }", "public void showByMonthBtn(ActionEvent event) throws IOException, Exception {\r\n\r\n appointments.clear();\r\n appointments.addAll(Appointment.getAppointmentsByMonth());\r\n\r\n }", "@RequestMapping(value = \"/allEvent\")\n\tpublic List<Events> getAllEvents() {\n\t\treturn eventDAO.getAllEventsList();\n\t}", "@Query(\"select a from Appointment a where a.schedule.doctor.id = ?1 and SUBSTRING(a.startMoment, 1, 10) = SUBSTRING(current_timestamp, 1, 10) order by a.startMoment asc\")\n\tCollection<Appointment> findAllTodayActiveByDoctor(int doctorId);", "public String outputAppointments() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Reminders:\\n\");\n if (reminders.size() < 1) {\n sb.append(\"No reminders found.\\n\");\n } else {\n Iterator it = reminders.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry) it.next();\n sb.append(pair.getKey() + \": for \" + pair.getValue() + \" days\\n\");\n }\n }\n sb.append(\"\\nFollow-ups:\\n\");\n if (followup.size() < 1) {\n sb.append(\"No follow-ups found.\\n\");\n } else {\n Iterator it = followup.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry) it.next();\n sb.append(pair.getKey() + \": in \" + pair.getValue() + \" days\\n\");\n }\n }\n return sb.toString();\n }", "public void viewAll() {\n click(viewAllLink);\n }", "public ObservableList<Appointment> getAppointmentsByContact(int contactId) throws SQLException {\r\n ObservableList<Appointment> matchedAppointments = FXCollections.observableArrayList();\r\n String statement = \"SELECT * FROM appointments WHERE Contact_ID = \" + contactId;\r\n ResultSet rs = conn.prepareStatement(statement).executeQuery();\r\n while (rs.next()) {\r\n Appointment a = new Appointment();\r\n a.setAppointmentId(rs.getInt(\"Appointment_ID\"));\r\n a.setTitle(rs.getString(\"Title\"));\r\n a.setType(rs.getString(\"Type\"));\r\n a.setDescription(rs.getString(\"Description\"));\r\n a.setStartTime(rs.getTimestamp(\"Start\").toLocalDateTime().atZone(ZoneId.systemDefault()));\r\n a.setEndTime(rs.getTimestamp(\"End\").toLocalDateTime().atZone(ZoneId.systemDefault()));\r\n a.setCustomer(SchedulingData.findCustomer(rs.getInt(\"Customer_ID\")));\r\n //SchedulingData.findCustomer(rs.getInt(\"Customer_ID\"))\r\n //rs.getTimestamp(\"Start\").toLocalDateTime().atZone(userZone)\r\n matchedAppointments.add(a);\r\n }\r\n return matchedAppointments;\r\n\r\n }", "@Override\n\tpublic List<Employee> viewAllEmployees() {\n\t\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\t\t CriteriaQuery<Employee> cq = cb.createQuery(Employee.class);\n\t\t Root<Employee> rootEntry = cq.from(Employee.class);\n\t\t CriteriaQuery<Employee> all = cq.select(rootEntry);\n\t \n\t\t TypedQuery<Employee> allQuery = em.createQuery(all);\n\t\t return allQuery.getResultList();\n\t}", "public List<String> getFormattedAppointments(){\n List formattedAppointments = new ArrayList();\n for (int i = 0; i < appointments.size(); i++) {\n Appointment a = appointments.get(i);\n String appInfo = (\"Date and time: \" + a.getFormattedDate() + \" Doctor: \" + a.getDoctor().getName() + \" Symptom: \" + a.getSympton() + \" Status: \" + a.getStatus());\n formattedAppointments.add(appInfo);\n }\n return formattedAppointments;\n }", "List<Appointment> getAppointmentByCustomerNumber(long customerNumber);", "@RequestMapping(value = \"/viewAllObjectLocationATM\", method = RequestMethod.GET)\n\tpublic List<ObjectLocationATM> viewAllObjectLocationATM() {\n\t\tAtmDAO ad = new AtmDAO();\n\t\tList<ObjectLocationATM> listObjLocationATM = ad.getAllObjectLocationATM();\n\t\treturn listObjLocationATM;\n\t}", "@GetMapping(value=\"/getAll\")\n\tpublic List<Question> getAll(){\n\t\tLOGGER.info(\"Viewing all questions\");\n\t\treturn questionObj.viewAllQuestions();\n\t}", "public static ObservableList<Appointment> getAppointmentsForMonth (int id) {\n ObservableList<Appointment> appointments = FXCollections.observableArrayList();\n Appointment appointment;\n LocalDate begin = LocalDate.now();\n LocalDate end = LocalDate.now().plusMonths(1);\n try(Connection conn =DriverManager.getConnection(DB_URL, user, pass);\n Statement statement = conn.createStatement()) {\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM appointment WHERE customerId = '\" + id + \"' AND \" + \n \"start >= '\" + begin + \"' AND start <= '\" + end + \"'\" );\n \n while(resultSet.next()) {\n appointment = new Appointment(resultSet.getInt(\"appointmentId\"),resultSet.getInt(\"customerId\"), resultSet.getString(\"title\"),\n resultSet.getString(\"description\"), resultSet.getString(\"location\"),resultSet.getString(\"contact\"),resultSet.getString(\"url\"), \n resultSet.getTimestamp(\"start\"), resultSet.getTimestamp(\"end\"), resultSet.getDate(\"start\"), \n resultSet.getDate(\"end\"),resultSet.getString(\"createdby\"));\n appointments.add(appointment);\n }\n statement.close();\n return appointments;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n }", "public java.util.List<CsclAppointeeMaster> findAll(int start, int end);", "@Test\n\tpublic void testShowAllAppointments() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\tHttpEntity<String> entity = new HttpEntity<String>(null, headers);\n\t\tResponseEntity<String> response = restTemplate.exchange(getRootUrl() + \"/app2\",HttpMethod.GET, entity, String.class);\n\t\tassertEquals(200, response.getStatusCodeValue());\n\t}", "@GetMapping\n public ResponseEntity<Iterable<TelephoneEntry>> getVacancies() {\n\n List<TelephoneEntry> entries = telephoneEntryService.findAll();\n if(entries.isEmpty()){\n return ResponseEntity.status(HttpStatus.NO_CONTENT).build();\n } else {\n return ResponseEntity.ok(entries);\n }\n }", "public static String showAll(){\n return resultsMap.toString();\n }", "public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public abstract List<LocationDto> viewAll();", "@FXML\n void OnActionWeeklyAppointments(ActionEvent event){\n getTableData();\n MSAppointmentsTableView.setItems(dbQuery.getWeeklyAppoinments());\n\n }", "@RequestMapping(value = \"/myTreatments/\",\r\n method = RequestMethod.GET,\r\n produces = MediaType.APPLICATION_JSON_VALUE)\r\n public ResponseEntity<Iterable<Treatment>> findAllTreatment() {\r\n Iterable<Treatment> appointment = treatmentService.readAll();\r\n if (appointment == null) {\r\n return new ResponseEntity<Iterable<Treatment>>(HttpStatus.INTERNAL_SERVER_ERROR);\r\n }\r\n return new ResponseEntity<Iterable<Treatment>>(appointment, HttpStatus.OK);\r\n }", "@FXML\n public void OAWeekView(ActionEvent event) {\n Appointment.clearWeeklyAppointments();\n Appointment.setWeekAppointments();\n Appointments.setItems(Appointment.getWeekAppointments());\n }", "@Override\n\tpublic List<AppointmentDto> getAllAppointmentHavingPitch() {\n\t\t// TODO Auto-generated method stub\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(FETCH_ALL_HAVING_PITCH, (rs, rownnum)->{\n\t\t\t\treturn new AppointmentDto(rs.getInt(\"appointmentId\"), rs.getTime(\"startTime\"), rs.getTime(\"endTime\"), rs.getDate(\"date\"), rs.getInt(\"physicianId\"), rs.getInt(\"userId\"), rs.getInt(\"productId\"), rs.getString(\"confirmationStatus\"), rs.getString(\"zip\"), rs.getString(\"cancellationReason\"), rs.getString(\"additionalNotes\"), rs.getBoolean(\"hasMeetingUpdate\"),rs.getBoolean(\"hasMeetingExperienceFromSR\"),rs.getBoolean(\"hasMeetingExperienceFromPH\"), rs.getBoolean(\"hasPitch\"));\n\t\t\t});\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public List<Appointment> getAllDetailsDoc(int dId) throws ClassNotFoundException;", "private void onUserSelection(){\n ObservableList<Appointment> appointments;\n //if all is selected, return all appointments\n if(consultantsField.getValue().equals(\"All\")){\n appointments = AppointmentDB.getAllAppointmentsAllUsers();\n }\n //else return user selected appointments\n else {\n appointments = AppointmentDB.getAppointmentsByUser(consultantsField.getValue());\n }\n apptTable.setItems(appointments);\n }", "public List<Empleado> getAll();", "public List<Appointment> getAppointmentByStatus(AppointmentStatus a){\n List<Appointment> appList = new ArrayList();\n try{\n appointments.stream().filter((app) -> (app.getStatus()==a)).forEachOrdered((app) -> {\n appList.add(app);\n });\n return appList;\n }\n catch(Exception e){\n return appList;\n }\n }", "public ObservableList<Appointment> getAppointmentList() {\n ObservableList<Appointment> appointmentList = FXCollections.observableArrayList();\n Iterator it = followup.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry) it.next();\n appointmentList.add(new Appointment(\"[F] \" + pair.getKey(), (int) pair.getValue()));\n }\n it = reminders.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry) it.next();\n appointmentList.add(new Appointment(\"[R] \" + pair.getKey(), (int) pair.getValue()));\n }\n\n return appointmentList;\n }", "public void clearAppointments(){\n appointments.clear();\n }", "public List<Ejemplar> getAll();", "@RequestMapping(value=\"/host/appointments/page/{pageno}/{pagesize}\",method=RequestMethod.GET)\n\tpublic String getUserAllHostAppointmentsWithPaging(Principal principal, @PathVariable int pageno, @PathVariable int pagesize){\n\t\tif(!Account.findRole(principal.getName()).equals(\"0\")) throw new PermissionErrorException();\n\t\tList<Appointment> appointments = appointmentService.getUserAllHostAppointmentsWithPaging(Account.findMobile(principal.getName()), pageno, pagesize);\n\t\treturn JsonConverterUtil.convertSetToJsonString(appointments);\t\n\t}", "@RequestMapping(value=\"/listar\", method=RequestMethod.GET)\r\n\tpublic String listar(Model model) {\t\t\r\n\t\tmodel.addAttribute(\"titulo\", \"Listado de Pacientes\");\r\n\t\tmodel.addAttribute(\"pacientes\", pacienteService.findAll());\r\n\t\treturn \"listar\";\r\n\t}", "@GetMapping(\"/GetAllEmployees\")\r\n public List<Employee> viewAllEmployees() {\r\n return admin.viewAllEmployees();\r\n }", "void showAll();", "@RequestMapping(value = \"/empregado/list_all\" , method = RequestMethod.GET)\n\tpublic List<EmpregadoDto> listAllEmpregados(){\n\t\treturn repoEmp.findAll();\n\t}", "@RequestMapping(value = \"/vacantrooms\", method = RequestMethod.GET)\n public ArrayList<Room> vacantRooms(){\n ArrayList<Room> listroom = DatabaseRoom.getVacantRooms();\n return listroom;\n }", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "@RequestMapping(value=\"/enroll/appointments/page/{pageno}/{pagesize}\",method=RequestMethod.GET)\n\tpublic String getUserAllEnrollAppointmentsWithPaging(Principal principal, @PathVariable int pageno, @PathVariable int pagesize){\n\t\tif(!Account.findRole(principal.getName()).equals(\"0\")) throw new PermissionErrorException();\n\t\tList<Appointment> appointments = appointmentService.getUserAllEnrollAppointmentsWithPaging(Account.findMobile(principal.getName()), pageno, pagesize);\n\t\treturn JsonConverterUtil.convertSetToJsonString(appointments);\t\n\t}", "public static ObservableList<Appointment> getAppoinmentsForWeek(int id) {\n ObservableList<Appointment> appointments = FXCollections.observableArrayList();\n Appointment appointment;\n LocalDate beginWeek = LocalDate.now();\n LocalDate endWeek = LocalDate.now().plusWeeks(1);\n try (Connection conn =DriverManager.getConnection(DB_URL, user, pass);\n Statement statement = conn.createStatement()) {\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM appointment WHERE customerId = '\" + id + \"' AND \" + \n \"start >= '\" + beginWeek + \"' AND start <= '\" + endWeek + \"'\");\n \n while(resultSet.next()) {\n appointment = new Appointment(resultSet.getInt(\"appointmentId\"),resultSet.getInt(\"customerId\"), resultSet.getString(\"title\"),\n resultSet.getString(\"description\"), resultSet.getString(\"location\"),resultSet.getString(\"contact\"),resultSet.getString(\"url\"), \n resultSet.getTimestamp(\"start\"), resultSet.getTimestamp(\"end\"), resultSet.getDate(\"start\"), \n resultSet.getDate(\"end\"),resultSet.getString(\"createdby\"));\n appointments.add(appointment);\n }\n \n statement.close();\n return appointments;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n }", "@CustomAnnotation(value = \"FIND_ALL_ACTIVITY\")\n\t@RequestMapping(\n\t\t\tvalue=\"/activities\",\n\t\t\tmethod=RequestMethod.GET\n\t\t\n\t\t\t)\n\tpublic ResponseEntity<Set<Activity>> findAcitities(){\n\t\treturn new ResponseEntity<Set<Activity>>(activityService.findAll(), HttpStatus.OK);\n\t}", "@RequestMapping(value = \"/\")\n public Map<String, Object> showAll() {\n// Get all invoices\n List<Invoice> invoices = invoiceService.findAll();\n// Build response\n Map<String, Object> response = new LinkedHashMap<String, Object>();\n response.put(\"totalInvoices\", invoices.size());\n response.put(\"invoices\", invoices);\n// Send to client\n return response;\n }", "@GetMapping(\"/_search/anexlaborals\")\n @Timed\n public List<Anexlaboral> searchAnexlaborals(@RequestParam String query) {\n log.debug(\"REST request to search Anexlaborals for query {}\", query);\n return StreamSupport\n .stream(anexlaboralSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "public void setupAppointments() {\n\n\t\t// // remember for animation\n\t\t// final List<AbstractClusteredDayAppointmentPane>\n\t\t// lOldClusteredDayAppointmentPanes = new\n\t\t// ArrayList<AbstractClusteredDayAppointmentPane>(\n\t\t// clusteredAppointmentPanes);\n\t\t// final List<WholedayAppointmentPane> lOldWholedayAppointmentPanes =\n\t\t// new ArrayList<WholedayAppointmentPane>(\n\t\t// wholedayAppointmentPanes);\n\t\t//\n\t\t// // clear\n\t\t// clusteredAppointmentPanes.clear();\n\t\t// wholedayAppointmentPanes.clear();\n\t\t// if (calendarObjectProperty.get() == null) {\n\t\t// return;\n\t\t// }\n\t\t//\n\t\t// // scan all appointments and filter the ones for this day\n\t\t// for (Agenda.Appointment lAppointment : getSkinnable().appointments())\n\t\t// {\n\t\t//\n\t\t// // different panes depending on the appointment time\n\t\t// if (lAppointment.isWholeDay()) {\n\t\t//\n\t\t// // if appointment falls on the same date as this day pane\n\t\t// if (isSameDay(calendarObjectProperty.get(),\n\t\t// lAppointment.getStartTime())) {\n\t\t// WholedayAppointmentPane lAppointmentPane = new\n\t\t// WholedayAppointmentPane(\n\t\t// lAppointment, this);\n\t\t// wholedayAppointmentPanes.add(lAppointmentPane);\n\t\t// lAppointmentPane.setId(lAppointmentPane.getClass()\n\t\t// .getSimpleName() + wholedayAppointmentPanes.size());\n\t\t// }\n\t\t// } else if (lAppointment.getEndTime() == null) {\n\t\t//\n\t\t// // an not-wholeday appointment without an enddate is a task\n\t\t// if (isSameDay(calendarObjectProperty.get(),\n\t\t// lAppointment.getStartTime())) {\n\t\t// TaskAppointmentPane lAppointmentPane = new TaskAppointmentPane(\n\t\t// lAppointment, this);\n\t\t// clusteredAppointmentPanes.add(lAppointmentPane);\n\t\t// lAppointmentPane\n\t\t// .setId(lAppointmentPane.getClass().getSimpleName()\n\t\t// + clusteredAppointmentPanes.size());\n\t\t// }\n\t\t// } else {\n\t\t// // appointments may span multiple days, but the appointment pane\n\t\t// // will clamp the start and end date\n\t\t// RegularAppointmentPane lAppointmentPane = new RegularAppointmentPane(\n\t\t// lAppointment, this);\n\t\t//\n\t\t// // check if the appointment falls in the same day as this day\n\t\t// // pane\n\t\t// if (isSameDay(calendarObjectProperty.get(),\n\t\t// lAppointmentPane.start)\n\t\t// && isSameDay(calendarObjectProperty.get(),\n\t\t// lAppointmentPane.end)) {\n\t\t// clusteredAppointmentPanes.add(lAppointmentPane);\n\t\t// lAppointmentPane\n\t\t// .setId(lAppointmentPane.getClass().getSimpleName()\n\t\t// + clusteredAppointmentPanes.size());\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t//\n\t\t// // sort on start time and then decreasing duration\n\t\t// Collections.sort(clusteredAppointmentPanes,\n\t\t// new Comparator<AbstractDayAppointmentPane>() {\n\t\t// @Override\n\t\t// public int compare(AbstractDayAppointmentPane o1,\n\t\t// AbstractDayAppointmentPane o2) {\n\t\t// if (o1.startAsString.equals(o2.startAsString) == false) {\n\t\t// return o1.startAsString.compareTo(o2.startAsString);\n\t\t// }\n\t\t// return o1.durationInMS > o2.durationInMS ? -1 : 1;\n\t\t// }\n\t\t// });\n\t\t//\n\t\t// // start placing appointments in the tracks\n\t\t// AbstractClusteredDayAppointmentPane lClusterOwner = null;\n\t\t// for (AbstractClusteredDayAppointmentPane lAppointmentPane :\n\t\t// clusteredAppointmentPanes) {\n\t\t// // if there is no cluster owner\n\t\t// if (lClusterOwner == null) {\n\t\t//\n\t\t// // than the current becomes an owner\n\t\t// // only create a minimal cluster, because it will be setup fully\n\t\t// // in the code below\n\t\t// lClusterOwner = lAppointmentPane;\n\t\t// lClusterOwner.clusterTracks = new\n\t\t// ArrayList<List<AbstractClusteredDayAppointmentPane>>();\n\t\t// }\n\t\t//\n\t\t// // in which track should it be added\n\t\t// int lTrackNr = determineTrackWhereAppointmentCanBeAdded(\n\t\t// lClusterOwner.clusterTracks, lAppointmentPane);\n\t\t// // if it can be added to track 0, then we have a \"situation\". Track\n\t\t// // 0 could mean\n\t\t// // - we must start a new cluster\n\t\t// // - the appointment is still linked to the running cluster by means\n\t\t// // of a linking appointment in the higher tracks\n\t\t// if (lTrackNr == 0) {\n\t\t//\n\t\t// // So let's see if there is a linking appointment higher up\n\t\t// boolean lOverlaps = false;\n\t\t// for (int i = 1; i < lClusterOwner.clusterTracks.size()\n\t\t// && lOverlaps == false; i++) {\n\t\t// lOverlaps =\n\t\t// checkIfTheAppointmentOverlapsAnAppointmentAlreadyInThisTrack(\n\t\t// lClusterOwner.clusterTracks, i, lAppointmentPane);\n\t\t// }\n\t\t//\n\t\t// // if it does not overlap, we start a new cluster\n\t\t// if (lOverlaps == false) {\n\t\t// lClusterOwner = lAppointmentPane;\n\t\t// lClusterOwner.clusterMembers = new\n\t\t// ArrayList<AbstractClusteredDayAppointmentPane>();\n\t\t// lClusterOwner.clusterTracks = new\n\t\t// ArrayList<List<AbstractClusteredDayAppointmentPane>>();\n\t\t// lClusterOwner.clusterTracks\n\t\t// .add(new ArrayList<AbstractClusteredDayAppointmentPane>());\n\t\t// }\n\t\t// }\n\t\t//\n\t\t// // add it to the track (and setup all other cluster data)\n\t\t// lClusterOwner.clusterMembers.add(lAppointmentPane);\n\t\t// lClusterOwner.clusterTracks.get(lTrackNr).add(lAppointmentPane);\n\t\t// lAppointmentPane.clusterOwner = lClusterOwner;\n\t\t// lAppointmentPane.clusterTrackIdx = lTrackNr;\n\t\t// // for debug System.out.println(\"----\"); for (int i = 0; i <\n\t\t// // lClusterOwner.clusterTracks.size(); i++) { System.out.println(i +\n\t\t// // \": \" + lClusterOwner.clusterTracks.get(i) ); }\n\t\t// // System.out.println(\"----\");\n\t\t// }\n\t\t//\n\t\t// // laying out the appointments is fairly complex, so we use listeners\n\t\t// // and a relayout method instead of binding\n\t\t// relayout();\n\t\t//\n\t\t// // and swap the appointments; old ones out, new ones in\n\t\t// // TODO: animation? we could move the old appointments to the\n\t\t// equivalent\n\t\t// // positions on the drag pane, then animate them to their new\n\t\t// positions,\n\t\t// // remove the old, and insert the new ones.\n\t\t// // however, this needs to be cross-days, so it cannot be done here\n\t\t// (this\n\t\t// // is only one day), but after the complete setupAppointments()\n\t\t// getChildren().removeAll(lOldClusteredDayAppointmentPanes);\n\t\t// getChildren().removeAll(lOldWholedayAppointmentPanes);\n\t\t// getChildren().addAll(wholedayAppointmentPanes);\n\t\t// getChildren().addAll(clusteredAppointmentPanes);\n\t\t//\n\t\t// // we're done, now have the header updated\n\t\t// dayHeaderPane.setupAppointments();\n\t}", "@Override\n\t@GET\n\t@Path(\"/airports\")\n @Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getAirports() {\n\t\t\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.addAll(mapAirportData.keySet());\n\t\tlog.debug(\"Resource requested to print all the known airports.\");\n\t\t log.debug(\"Success :\" + Response.Status.OK);\n\t\t return Response.status(Response.Status.OK).entity(list).build();\n\t}", "@Override\n\tpublic String showAll() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic ArrayList<Activitat> getAll() {\r\n\t\tint i = 0;\r\n\t\tqueryString = \"SELECT * FROM \" + ACTIVITATTABLENAME;\r\n\t\tArrayList<Activitat> llistaActivitats = null;\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\tResultSet rs = s.executeQuery();\r\n\t\t\tllistaActivitats = new ArrayList<Activitat>();\r\n\t\t\tActivitatFactory af = af = new ActivitatFactory();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tCalendar cal = new GregorianCalendar();\r\n\t\t\t\tcal.setTime(rs.getDate(4));\r\n\t\t\t\t\r\n\t\t\t\tllistaActivitats.add(af.creaActivitat(rs.getString(2), rs.getString(3), cal, rs.getTimestamp(5),rs.getString(6),rs.getBoolean(7)));\r\n\t\t\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn llistaActivitats;\r\n\t}", "private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }", "@Override\n\tpublic void takeAppointment() {\n\t\tsearchByMobile();\n\t\tif (count == 0) {\n\t\t\tnew ManagerServiceImplementation().addPatient();\n\t\t}\n\t\tnew DoctorServiceImplementation().showDoctorDetails();\n\t\tSystem.out.println(\"Enter doctor's ID:\");\n\t\tString dID = UtilityClinic.readString();\n\t\tfor (int i = 0; i < UtilityClinic.docJson.size(); i++) {\n\t\t\tJSONObject obj = (JSONObject) UtilityClinic.docJson.get(i);\n\t\t\tif (obj.get(\"Doctor's ID\").toString().equals(dID)) {\n\t\t\t\tif (UtilityClinic.docWisePatCounter.isEmpty()) {\n\t\t\t\t\tfor (int j = 0; j < UtilityClinic.docJson.size(); j++) {\n\t\t\t\t\t\tUtilityClinic.docWisePatCounter.add(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (UtilityClinic.docWisePatCounter.get(i) < 5) {\n\t\t\t\t\tnew Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tUtilityClinic.docWisePatCounter.add(i, UtilityClinic.docWisePatCounter.get(i) + 1);\n\n\t\t\t\t\tif (UtilityClinic.appFile == null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tutil.accessExistingAppJson();\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t\tutil.createAppJson();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tutil.readFromAppJson(util.appFile);\n\t\t\t\t\tJSONObject appObject = new JSONObject();\n\t\t\t\t\tAppointment app = new Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tappObject.put(\"Patient's name\", app.getPatientName());\n\t\t\t\t\tappObject.put(\"Patient's ID\", app.getPatientId());\n\t\t\t\t\tappObject.put(\"Doctor's name\", app.getDoctorName());\n\t\t\t\t\tappObject.put(\"Doctor's ID\", app.getDoctorId());\n\t\t\t\t\tappObject.put(\"Time stamp\", app.getTime());\n\t\t\t\t\tUtilityClinic.appJson.add(appObject);\n\t\t\t\t\tutil.writetoJson(UtilityClinic.appJson, util.getAppFileName());\n\t\t\t\t\tutil.readFromAppJson(util.getAppFileName());\n\t\t\t\t\tSystem.out.println(\"Appointment done.....\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Sorry!!! Doctor is not available....Please try on next day.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void appointmentList() throws Exception {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tlogger.debug(\"-------------Appointment-------------\");\n\t\t\tSystem.out.println(\"Press:- \" + \"\\n1.Create Appointment\" + \"\\n2.See Doctor list\" + \"\\n3.EXIT\");\n\t\t\tint input = sc.nextInt();\n\t\t\tswitch (input) {\n\t\t\tcase 1:\n\t\t\t\tcreate();\n\t\t\t\tlogger.debug(\"----------Appointment Created Successfully----------\");\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tcrudDoctor.read();\n\t\t\t\tlogger.debug(\"----------This is a List of Doctors----------\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tclinicManagementSystem.show();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic List<Appointment> findCarAppoinmentByCarIDX(int c_id) {\n\t\treturn appointmentMapper.findCarAppoinmentByCarIDX(c_id);\n\t}", "public Appointments(){\n\t\tsetDate(0);\n\t\tsetTime(0);\n\t\tsetClient(null);\n\t\tappointmentStatus = false;\n\t}", "List<ExamRoom> selectAll();", "@RequestMapping(method = RequestMethod.GET)\n\tpublic String getAll() {\n\t\treturn \"standardExam.\";\n\t}", "@Override\n\tpublic Iterable<Flight> viewAllFlight() {\n\t\treturn flightDao.findAll();\n\t}", "@GetMapping(\"/personas\")\n\tpublic List<Persona> allPersonas(){\n\t\treturn personaRepository.findAll();\n\t\t\n\t}", "@GetMapping(\"/appointments/date/{id}/{date}\")\n public List<Appointment> getAppointmentByConsultantAndDate(@PathVariable(\"id\")Long id,@PathVariable(\"date\") @DateTimeFormat(iso= DateTimeFormat.ISO.DATE) LocalDate date) {\n return (appointmentService.findAppsByConsultantAndDate(id,date));\n }", "private void aveApptTableFill(){\n ObservableList<AverageAppointments> aveAppointments = FXCollections.observableArrayList();\n try {\n //Query and get results\n aveAppointments = AppointmentDB.getAverageAppointments();\n }\n catch (SQLException e){\n dialog(\"ERROR\",\"SQL Error\",\"Error: \"+ e.getMessage());\n }\n aveApptTable.setItems(aveAppointments);\n }", "@Override\n public List<ReporteAccidente> getAll() {\n return (List<ReporteAccidente>) repr.findAll();\n }", "public Appointment()\r\n {\r\n // cView = new CalendarEventView(\"appointmentView\");\r\n }", "List<ApplicantDetailsResponse> getAllApplicants() throws ServiceException;", "public List<TimeSheet> showAllTimeSheet(){\n log.info(\"Inside TimeSheetService#ShowAllTimeSheet() Method\");\n List<TimeSheet> allTimeSheet = timeSheetRepository.findAll();\n return allTimeSheet;\n }", "@Override\r\n public List<Anggota> getAll() {\r\n List<Anggota> datas = new ArrayList<>();\r\n String query = \"SELECT *From Anggota\";\r\n try {\r\n\r\n PreparedStatement preparedStatement = connection.prepareStatement(query);\r\n ResultSet rs = preparedStatement.executeQuery();\r\n\r\n while (rs.next()) {\r\n Anggota anggota = new Anggota();\r\n anggota.setKdAnggota(rs.getString(1));\r\n anggota.setNmAnggota(rs.getString(2));\r\n anggota.setTelepon(rs.getString(3));\r\n anggota.setAlamat(rs.getString(4));\r\n datas.add(anggota);\r\n }\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return datas;\r\n\r\n }", "List<Hospital> listall();", "@GetMapping(\"getAll\")\n\tpublic Collection<JobApplication> getAll(){\n\t\treturn jobAppRepo.findAll();\n\t}", "List<Acquest> getAllAcquests();", "public final List<Meeting> listAllMeeting() {\n\t\tList<Meeting> results;\n\t\tfinal TypedQuery<Meeting> query;\n\t\tquery = em.createQuery(\"SELECT e FROM Meeting e \"\n\t\t\t\t+ \"ORDER BY e.startDate DESC \", Meeting.class);\n\t\tresults = query.getResultList();\n\t\treturn results;\n\t}" ]
[ "0.7686216", "0.7545265", "0.7161466", "0.6910763", "0.66870916", "0.6633396", "0.6431677", "0.6414161", "0.6398517", "0.6323606", "0.6251754", "0.6159315", "0.614281", "0.6130677", "0.60973054", "0.6095533", "0.607463", "0.60104007", "0.6009669", "0.5939371", "0.59142905", "0.5885862", "0.5867874", "0.5836654", "0.5823051", "0.58097696", "0.5808128", "0.5801459", "0.58013934", "0.58008313", "0.57987046", "0.5798147", "0.57878107", "0.5786582", "0.57797885", "0.5778474", "0.5767069", "0.57664853", "0.5744606", "0.57411087", "0.57351214", "0.57306767", "0.572511", "0.57130504", "0.57063234", "0.57000107", "0.5690944", "0.56833357", "0.5672593", "0.56612074", "0.5649331", "0.5643966", "0.56327134", "0.5622956", "0.56164765", "0.5615367", "0.5610352", "0.55953354", "0.55930424", "0.5591455", "0.5587314", "0.5562625", "0.55486554", "0.55455", "0.5532615", "0.5520683", "0.55181074", "0.55164903", "0.5515527", "0.5514985", "0.5508872", "0.54772115", "0.5475486", "0.54746956", "0.5467313", "0.5463437", "0.546005", "0.545955", "0.5453891", "0.5447727", "0.54465914", "0.54456127", "0.54375136", "0.54370624", "0.542833", "0.54185766", "0.541853", "0.54155046", "0.5415497", "0.54125154", "0.54112315", "0.5402752", "0.53999263", "0.5396452", "0.5394859", "0.53681934", "0.53674835", "0.5366879", "0.53653103", "0.53632694" ]
0.65635324
6
look at project 4 for min/mix
public static int findMin(){ int min = array[0]; for(int x = 1; x<array.length; x++ ){ if(array[x]<min){ min=array[x]; } } return min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Mix() {\n\t\tlinkedList = new LinkedList();\n\t\tclipboards = new BinarySearchTree();\n\t\tscanner = new Scanner(System.in);\n\t\trunning = true;\n\t\ttesting = false;\n\t\tcurMessage = \"\";\n\t\tunMixCode = \"\";\n\t}", "public static void main(String[] args) {\n\t\tMix mix = new Mix();\n\t\tmix.mixLoop();\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "public miniproject() {\n initComponents();\n }", "public void test642_smartLifting4() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl4Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl4_1 t = new Team642sl4_4();\\n\" +\n\t\t\t \" T642sl4_2 o = new T642sl4_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_4 extends Team642sl4_3 {\\n\" +\n\t\t\t \" public class Role642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_4.this.toString() + \\\".Role642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_3 extends Team642sl4_2 {\\n\" +\n\t\t\t \" public class Role642sl4_5 extends Role642sl4_3 playedBy T642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_3.this.toString() + \\\".Role642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_6 extends T642sl4_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl4_2 extends T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_3 extends T642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_1 {\\n\" +\n\t\t\t \" public class Role642sl4_1 extends T642sl4_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl4_2 extends Role642sl4_1 playedBy T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl4_3 extends Role642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_1.this.toString() + \\\".Role642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl4_2 as Role642sl4_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_4 extends T642sl4_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl4_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl4_2 extends Team642sl4_1 {\\n\" +\n\t\t\t \" public class Role642sl4_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_2.this.toString() + \\\".Role642sl4_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl4_4 extends Role642sl4_3 playedBy T642sl4_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl4_2.this.toString() + \\\".Role642sl4_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl4_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_5 extends T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl4_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl4_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl4_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl4_4.Role642sl4_4\");\n }", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "public void mo4359a() {\n }", "public static void main(String[] args) {\n\t\tProject h = new Project (\"Safiah\" , \"Dalal\");\r\n\t\tSystem.out.print(h.elevatorPitch());\r\n\t\t\r\n\r\n\t}", "public Superfluous() {\n\t\t//Give the checkFolder() files to work with\n\t\tfor (File toDo : myFile) {\n\t\t\tcheckFolder(toDo);\n\t\t}\n\t\t/*Print out the defective files*/\n\t\tSystem.out.println(\"**********************************\");\n\t\tfor (File guilty : guiltyFiles) {\n\t\t\t//System.out.println(guilty.getAbsolutePath());\n\t\t\tdesignFile(guilty);\n\t\t}\n\t\tSystem.out.println(\"The Number of files are: \" + guiltyFiles.size());\n\t}", "void mo57278c();", "public static void main(String[] args) {\n\t\textractedMain(JarFolders.SRC_FOLDER);\r\n\t}", "String getMinifiedMedia();", "public static void main(String[] args) {\n Part2_2 part2_2 = new Part2_2();\n part2_2.testHowMany();\n Part2_3 part_23 = new Part2_3();\n part_23.testHowManyGenes();\n Part3_1 part3_1 = new Part3_1();\n part3_1.testCgRatio();\n }", "public static void main(String[] args) {\n\t\tPartterns7(5);\r\n\t}", "public void setup() {\r\n\r\n\t}", "private static void m133350k() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"filesToDelete.name\");\n if (!C7634n.m23723c(name, \"-concat-v\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"filesToDelete.name\");\n if (!C7634n.m23723c(name2, \"-concat-a\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"filesToDelete.name\");\n if (!C7634n.m23723c(name3, \"_synthetise\", false)) {\n }\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"filesToDelete.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n file2.delete();\n }\n }\n }\n }", "public static void main(String[] args) {demo6();\r\n\t\t\r\n\t}", "private void m8d(Context context) {\n AssetManager assets = context.getAssets();\n String str = context.getApplicationInfo().sourceDir;\n try {\n System.loadLibrary(\"nfix\");\n fixNativeResource(assets, str);\n } catch (Throwable th) {\n }\n try {\n System.loadLibrary(\"ufix\");\n fixUnityResource(assets, str);\n } catch (Throwable th2) {\n }\n }", "private UsingSwig() {\n\t}", "public void test642_smartLifting3() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl3Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl3_1 t = new Team642sl3_3();\\n\" +\n\t\t\t \" T642sl3_2 o = new T642sl3_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_4 extends Team642sl3_3 {\\n\" +\n\t\t\t \" public class Role642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_4.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_3 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_1 extends T642sl3_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl3_2 extends Role642sl3_1 playedBy T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl3_3 extends Role642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl3_2 as Role642sl3_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_4 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_2 extends Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl3_4 extends Role642sl3_3 playedBy T642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_5 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_3 extends Team642sl3_2 {\\n\" +\n\t\t\t \" public class Role642sl3_5 extends Role642sl3_3 playedBy T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_3.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_6 extends T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl3_2 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl3_3.Role642sl3_4\");\n }", "Bundle mo7259g();", "void mo72114c();", "public static void main(String[] args) {\n CubeChaser1 app = new CubeChaser1();\n app.start();\n\n }", "void mo1941j();", "public static void main(String[] args){\n DotComBust game = new DotComBust();\n game.setUpGame();\n game.startPlaying();\n }", "public static void main(String[] args) {\n\t\t\tGameStore4(1); // Lab 5 Part 4\n\n\t}", "void rustAndMahem() {\n //TODO: See rules\n }", "public static void main(String[] args) {\n List<String> res = CompressStringToi18n.compress(\"careercup\");\n for(String str : res) {\n System.out.println(str);\n }\n }", "public void mo42331g() {\n mo42335f();\n }", "public void mo1406f() {\n }", "public static void main(String[] args) {\n int v [] = {6,1,2,7};\r\n System.out.println( rob_easyVersion(v));\r\n\t}", "public void test642_smartLifting5() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl5Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl5_1 t = new Team642sl5_1();\\n\" +\n\t\t\t \" T642sl5_2 o = new T642sl5_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl5_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl5_4 extends Team642sl5_3 {\\n\" +\n\t\t\t \" public class Role642sl5_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_4.this.toString() + \\\".Role642sl5_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl5_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl5_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl5_2 extends Team642sl5_1 {\\n\" +\n\t\t\t \" public class Role642sl5_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_2.this.toString() + \\\".Role642sl5_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl5_4 extends Role642sl5_3 playedBy T642sl5_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_2.this.toString() + \\\".Role642sl5_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl5_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_5 extends T642sl5_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl5_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl5_3 extends Team642sl5_2 {\\n\" +\n\t\t\t \" public class Role642sl5_5 extends Role642sl5_3 playedBy T642sl5_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_3.this.toString() + \\\".Role642sl5_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl5_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_6 extends T642sl5_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl5_2 extends T642sl5_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_3 extends T642sl5_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl5_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl5_1 {\\n\" +\n\t\t\t \" public class Role642sl5_1 extends T642sl5_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_1.this.toString() + \\\".Role642sl5_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl5_2 extends Role642sl5_1 playedBy T642sl5_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_1.this.toString() + \\\".Role642sl5_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl5_3 extends Role642sl5_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl5_1.this.toString() + \\\".Role642sl5_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl5_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl5_2 as Role642sl5_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl5_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl5_4 extends T642sl5_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl5_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl5_1.Role642sl5_3\");\n }", "public static void main(String[] args) {\n PAT1028 pat = new PAT1028();\r\n pat.run();\r\n \r\n }", "void mo4833b();", "void mo80457c();", "private static long m133353n() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n long j = 0;\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"undeleted.name\");\n if (!C7634n.m23721b(name, \"synthetise_\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"undeleted.name\");\n if (!C7634n.m23723c(name2, \"-concat-v\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"undeleted.name\");\n if (!C7634n.m23723c(name3, \"-concat-a\", false)) {\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"undeleted.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n j += file2.length();\n }\n }\n }\n }\n return j;\n }", "public static void main(String[] args) {\r\n\t\tSPECCompressCountingStarter sccs = new SPECCompressCountingStarter();\r\n\t\tsccs.runAll();\r\n\t}", "private void m5296a() {\n C2261g.m9760a(1052673, \"Android \" + VERSION.RELEASE);\n C2261g.m9760a(1052674, Build.BRAND);\n C2261g.m9760a(1052675, Build.MODEL);\n C2261g.m9760a(1056769, getResources().getConfiguration().locale.getCountry());\n C2261g.m9760a(1056770, getResources().getConfiguration().locale.getLanguage());\n C2261g.m9760a(1060865, m5297b());\n }", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"Submitted Fourth project -branch 2 shelve\");\r\n\t}", "void mo57277b();", "@Override\n protected TsArtifact composeApplication() {\n final TsQuarkusExt extH = new TsQuarkusExt(\"ext-h\");\n install(extH);\n final TsQuarkusExt extIConditional = new TsQuarkusExt(\"ext-i-conditional\");\n extIConditional.setDependencyCondition(extH);\n install(extIConditional);\n\n final TsQuarkusExt extGConditional = new TsQuarkusExt(\"ext-g-conditional\");\n\n final TsQuarkusExt extA = new TsQuarkusExt(\"ext-a\");\n extA.setConditionalDeps(extGConditional);\n\n final TsQuarkusExt extB = new TsQuarkusExt(\"ext-b\");\n extB.addDependency(extA);\n\n final TsQuarkusExt extC = new TsQuarkusExt(\"ext-c\");\n extC.addDependency(extB);\n\n final TsQuarkusExt extD = new TsQuarkusExt(\"ext-d\");\n extD.addDependency(extB);\n\n final TsQuarkusExt extEConditional = new TsQuarkusExt(\"ext-e-conditional\");\n extEConditional.setDependencyCondition(extB);\n install(extEConditional);\n\n final TsQuarkusExt extF = new TsQuarkusExt(\"ext-f\");\n extF.setConditionalDeps(extEConditional, extIConditional);\n\n extGConditional.setDependencyCondition(extC);\n extGConditional.addDependency(extF);\n install(extGConditional);\n\n addToExpectedLib(extA.getRuntime());\n addToExpectedLib(extB.getRuntime());\n addToExpectedLib(extC.getRuntime());\n addToExpectedLib(extD.getRuntime());\n addToExpectedLib(extEConditional.getRuntime());\n addToExpectedLib(extF.getRuntime());\n addToExpectedLib(extGConditional.getRuntime());\n\n return TsArtifact.jar(\"app\")\n .addManagedDependency(platformDescriptor())\n .addManagedDependency(platformProperties())\n .addDependency(extC)\n .addDependency(extD);\n }", "@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }", "void mo1637a();", "public static void main(String[] args) {\n System.out.println(canPack(6, 2, 17));\n\n }", "public void setup()\n {\n }", "void mo67924c();", "public static void main(String[] args) {\n\t\t\n\t\tlog.fatal(\"2-this comes under default config file\");\n\t\tlog.error(\"2-this 2 \");\nlog.debug(\"2-doesnot\");\nlog.info(\"2-nopes\");\n\t}", "private IEngineExecutor m10438d() {\n return m10434a(new MixSynthesizer());\n }", "void mo21072c();", "boolean optimizeBundle();", "public void setup() {\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello world from master and jtulip3\");\n\t\tSystem.out.println(\"Hello line 1\");\n\t\tSystem.out.println(\"Hello line 3\");\n\t\t\n\n\t}", "public void test642_smartLifting7() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl7Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl7_1 t = new Team642sl7_3();\\n\" +\n\t\t\t \" T642sl7_2 o = new T642sl7_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_4 extends Team642sl7_3 {\\n\" +\n\t\t\t \" public class Role642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_4.this.toString() + \\\".Role642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_3 extends T642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_1 {\\n\" +\n\t\t\t \" public class Role642sl7_1 extends T642sl7_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl7_2 extends Role642sl7_1 playedBy T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl7_3 extends Role642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl7_2 as Role642sl7_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_4 extends T642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_2 extends Team642sl7_1 {\\n\" +\n\t\t\t \" public class Role642sl7_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_2.this.toString() + \\\".Role642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl7_4 extends Role642sl7_3 playedBy T642sl7_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_2.this.toString() + \\\".Role642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_5 extends T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_3 extends Team642sl7_2 {\\n\" +\n\t\t\t \" public class Role642sl7_5 extends Role642sl7_3 playedBy T642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_3.this.toString() + \\\".Role642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_6 extends T642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl7_2 extends T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl7_3.Role642sl7_3\");\n }", "public String getPackaging();", "public static void main(String[] args) {\n basePath = MatcherTest.class.getClassLoader().getResource(\"\").getPath() + \"/\";\n\n String russianPath = basePath + \"russianArticlesTokenizedShort-2.txt\";\n String ruOriginalPath = basePath + \"newRussianArticles.json\";\n String englishPath = basePath + \"englishArticlesTokenized.txt\";\n String enOriginalPath = basePath + \"englishArticles.txt\";\n\n String titleExpert = basePath + \"titleExpert.json\";\n String expertPath = basePath + \"matchExpert.json\";\n String articlePath = basePath + \"testMatchRussian3.json\";\n\n getRussianTokenized(russianPath);\n getRussianOriginal(ruOriginalPath);\n getEnglishTokenized(englishPath);\n getEnglishOriginal(enOriginalPath);\n// matchTitles(titleExpert);\n// matchArticles(articlePath);\n// matchTest(expertPath, articlePath);\n matchArticlesRussian(articlePath);\n ArticleClass.PlayMusic();\n }", "public static void main(String[] args) {\n\t\tint[] arr = {940,950,1100,1500,1800,900};\n\t\tint[] dep = {1200,1120,1130,1900,2000,910};\n\t\tSystem.out.println(new minplatforms().minplatform(arr, dep));\n\t}", "public void setChipOnExistingProjectBurnSZTTwice(Subproject project) {\n\t\tcurrent.raiseScore(project.setChip(current.removeChip()).getAmountSZT()*2);\n\t}", "protected void mo6255a() {\n }", "private final boolean shouldProposeGenerics(IJavaProject project) {\n\t\treturn true;\n\t\t/*\n\t\tString sourceVersion;\n\t\tif (project != null)\n\t\t\tsourceVersion= project.getOption(JavaCore.COMPILER_SOURCE, true);\n\t\telse\n\t\t\tsourceVersion= JavaCore.getOption(JavaCore.COMPILER_SOURCE);\n\n\t\treturn sourceVersion != null && JavaCore.VERSION_1_5.compareTo(sourceVersion) <= 0;\n\t\t*/\n\t}", "public static void main(String[] args) {\n demo2();\n demo3();\n demo4();\n demo5();\n }", "private XIncluder() {}", "void mo12638c();", "public static void main(String[] args) {\n\t\t\n\t\tMultitonV2 instance1 = MultitonV2.getInstance();\n\t\tMultitonV2 instance2 = MultitonV2.getInstance(); \n\t\tMultitonV2 instance3 = MultitonV2.getInstance();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMultitonV2 instance4 = MultitonV2.getInstance(); \n\t\tMultitonV2 instance5 = MultitonV2.getInstance();\n\t\t\n\t\t\n\t\t\n\t\tif(instance1==instance4) System.out.println(\"올바르게 동작중\");\n\t\tif(instance2==instance5) System.out.println(\"올바르게 동작중2\");\n\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Hola en Clase2 de Paquete2\");\r\n\t\tSystem.out.println(\"Hola 2 en Clase2 de Paquete2\");\n\t\tSystem.out.println(\"Cambio en Clase2 en repoGitHub1\");\n\t\tSystem.out.println(\"Cambio en Clase2 en repoGitHub2\");\n\t}", "void mo21073d();", "public static void intro() {\n System.out.println(\"-----------------------------------------------------------------------\");\n System.out.println(\"Project Phase One\\nCPSC 377\\nVincent Tennant\\n230099844\");\n System.out.println(\"A simple interface to do unit testsing, perform the XOR problem, and give an example of a\\n\" +\n \"rubix cube neural network. The XOR problem and the rubix cube problems will be performed using neural\\n\" +\n \"networks, and trained by stochastic backpropagation.\");\n }", "Info mo7564ix();", "public static void main(String[] args) {\n\t\tSystem.out.println(\"hello facebook by dev1\");\n\t\tSystem.out.println(\"how are you by dev1\");\n\t\tSystem.out.println(\"hello dev2\");\n\t\tSystem.out.println(\"changes through eclips by dev3\");\n\t\t\n\t\tSystem.out.println(\"changes made by upi feature branch\");\n\t\t\n\t\tSystem.out.println(\"changes made by upi feature branch\");\n\n\t}", "void mo17012c();", "static void feladat4() {\n\t}", "public static void main(String[] args) {\n\t\tquestion3();\n\n\t}", "public static void main(String[] args) {\n\t\tint min1 = getMin3(3,1,1);\n\t\tSystem.out.println(min1);\n\t\t\n\t}", "public void test642_smartLifting6() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl6Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl6_1 t = new Team642sl6_2();\\n\" +\n\t\t\t \" T642sl6_2 o = new T642sl6_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_4 extends Team642sl6_3 {\\n\" +\n\t\t\t \" public class Role642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_4.this.toString() + \\\".Role642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_1 {\\n\" +\n\t\t\t \" public class Role642sl6_1 extends T642sl6_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl6_2 extends Role642sl6_1 playedBy T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl6_3 extends Role642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl6_2 as Role642sl6_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_4 extends T642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_2 extends Team642sl6_1 {\\n\" +\n\t\t\t \" public class Role642sl6_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_2.this.toString() + \\\".Role642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl6_4 extends Role642sl6_3 playedBy T642sl6_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_2.this.toString() + \\\".Role642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_5 extends T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_3 extends Team642sl6_2 {\\n\" +\n\t\t\t \" public class Role642sl6_5 extends Role642sl6_3 playedBy T642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_3.this.toString() + \\\".Role642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_6 extends T642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl6_2 extends T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_3 extends T642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl6_2.Role642sl6_3\");\n }", "private static C1442g m23466b() {\n return C1442g.m5949a(\"StartApp\", GeneratedConstants.INAPP_VERSION);\n }", "private void level4() {\n }", "public static void main(String[] args){\r\n Language myLang = new Language(\"Willish\", 5, \"Mars\", \"verb-noun-verb-adjective\");\r\n Mayan mayan = new Mayan(\"Ki'che'\", 2330000);\r\n SinoTibetan sino1 = new SinoTibetan(\"Chinese Tibetan\", 100000);\r\n SinoTibetan sino2 = new SinoTibetan(\"Tibetan\", 200000);\r\n ArrayList<Language> langList = new ArrayList<Language>();\r\n langList.add(myLang);\r\n langList.add(mayan);\r\n langList.add(sino1);\r\n langList.add(sino2);\r\n \r\n for (Language allLangs : langList){\r\n allLangs.getInfo();\r\n }\r\n }", "public static void main(String[] args) {\n\t\tjflex.Main.generate(new File(\"especificacoes/miniC.lex\"));\n\t}", "public static void main(String[] args) {\n\t\tfullProjectUpdate(\"218.90.120.43\", 22, \"pro\",\"18962211182!189.cn\", \"/usr/local\",\"nicemq_node\");\n\t}", "private void level7() {\n }", "public static void main(String [] args){\n \n \tpart1();\n \n \tpart2();\n \n\t}", "public void test642_smartLifting1() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl1Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl1_1 t = new Team642sl1_1();\\n\" +\n\t\t\t \" T642sl1_2 o = new T642sl1_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_4 extends Team642sl1_3 {\\n\" +\n\t\t\t \" public class Role642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_4.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_2 extends Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl1_4 extends Role642sl1_3 playedBy T642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_5 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_3 extends Team642sl1_2 {\\n\" +\n\t\t\t \" public class Role642sl1_5 extends Role642sl1_3 playedBy T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_3.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_6 extends T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl1_2 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_3 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_1 extends T642sl1_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl1_2 extends Role642sl1_1 playedBy T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl1_3 extends Role642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl1_2 as Role642sl1_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_4 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl1_1.Role642sl1_3\");\n }", "public static void main666666(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\n _project _sc = _project.of();\n //reads from a maven-central jar file\n _downloadArchiveConsumer.of(\"https://search.maven.org/remotecontent?filepath=com/github/javaparser/javaparser-core/3.15.18/javaparser-core-3.15.18-sources.jar\",\n (ZipEntry ze, InputStream is)-> {\n if( ze.getName().endsWith(\".java\")){\n _sc.add( _codeUnit.of(is) );\n }\n });\n System.out.println( _sc.size() );\n\n _project _src = _githubProject.of(\"https://github.com/edefazio/bincat\").load();\n //_sources _src = _sources.of();\n //_downloadArchive _da = _downloadArchive.of(url, (ZipEntry ze,InputStream is)-> {\n // if( ze.getName().endsWith(\".java\")){\n // _src.add( _codeUnit.of(is) );\n // }\n //});\n /*\n try( InputStream inputStream = url.openStream();\n ZipInputStream zis = new ZipInputStream(inputStream) ) {\n\n byte[] buffer = new byte[2048];\n\n while (zis.available() > 0) {\n ZipEntry ze = zis.getNextEntry();\n System.out.println(\"reading \" + ze.getName());\n\n if( ze.isDirectory() ){\n ze.\n } else if( ze.)\n\n if (!ze.isDirectory() && ze.getName().endsWith(\".java\")) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int len;\n while ((len = zis.read(buffer)) > 0) {\n baos.write(buffer, 0, len);\n }\n try {\n System.out.println(\"adding\" + ze.getName());\n _src.add(_codeUnit.of(baos.toString()));\n } catch (Exception e) {\n throw new _ioException(\"could not read from entry \" + ze.getName());\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n */\n\n System.out.println( \"finished reading \"+ _src.size());\n }", "protected String method_4266() {\r\n String[] var10000 = field_3418;\r\n return \"mob.enderdragon.growl\";\r\n }", "void mo28306a();", "public static void main(String[] args) {\n String level = getLevel(\"./levels/original/lvl-1.txt\");\n MarioWorld setupWorld = new MarioWorld(null);\n setupWorld.visuals = false;\n setupWorld.initializeLevel(level, 1000 * 200);\n setupWorld.mario.isLarge = false;\n setupWorld.mario.isFire = false;\n setupWorld.update(new boolean[MarioActions.numberOfActions()]);\n\n // set level cutout width (0 means it will be set automatically)\n int levelCutoutTileWidth = 0;\n\n // create original OOP forward model\n MarioForwardModel originalModel = new MarioForwardModel(setupWorld.clone());\n\n // convert to slim OOP forward model\n MarioForwardModelSlim slimModel = Converter.originalToSlim(originalModel, levelCutoutTileWidth);\n\n // convert to bin model\n MarioForwardModelBin binModel = Converter.slimToBin(slimModel);\n }", "void mo27575a();", "public static void main(String[] args) {\n\t\tString[] FB = MixedBowl();\n\t\tString Bowl1 = FB[0];\n\t\tString Bowl2 = FB[1];\n\t\tString Bowl3 = FB[2];\n\t\tSystem.out.println(\"Bowl 1 contains: \" +Bowl1);\n\t\tSystem.out.println(\"Bowl 2 contains: \" +Bowl2);\n\t\tSystem.out.println(\"Bowl 3 contains: \" +Bowl3);\n\t}", "private void checkBuild() {\n count++;\n if (count == 5) {\n if (Constant.build_version.equals(\"qa\")) {\n Toast.makeText(context, \"This is a Test Build\", Toast.LENGTH_LONG).show();\n } else if (Constant.build_version.equals(\"prod\")) {\n Toast.makeText(context, \"This is a Live Build\", Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n public void setup() {\n this.savePath(\".\");\n Minim minim = new Minim(this);\n\n //Charger la chanson\n song = minim.loadFile(\"song.mp3\");\n //Créer l'objet FFT pour analyser la chanson\n fft = new FFT(song.bufferSize(), song.sampleRate());\n\n //Un cube par bande de fréquence\n nbCubes = (int) (fft.specSize() * specHi);\n cubes = new Cube[nbCubes];\n\n //Autant de murs qu'on veux\n murs = new Mur[nbMurs];\n\n //Créer tous les objets\n //Créer les objets cubes\n for (int i = 0; i < nbCubes; i++) {\n cubes[i] = new Cube(this);\n }\n\n //Créer les objets murs\n //Murs gauches\n for (int i = 0; i < nbMurs; i += 4) {\n murs[i] = new Mur(0, height / 2f, 10, height, this);\n }\n\n //Murs droits\n for (int i = 1; i < nbMurs; i += 4) {\n murs[i] = new Mur(width, height / 2f, 10, height, this);\n }\n\n //Murs bas\n for (int i = 2; i < nbMurs; i += 4) {\n murs[i] = new Mur(width / 2f, height, width, 10, this);\n }\n\n //Murs haut\n for (int i = 3; i < nbMurs; i += 4) {\n murs[i] = new Mur(width / 2f, 0, width, 10, this);\n }\n\n //Fond noir\n\n //Commencer la chanson\n// song.play(0);\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate static CountingResult runStufe3pretest4(SPECCompressCountingStarter sccs) {\r\n\t\treturn sccs.count(\r\n\t\t\t\tfalse, //use inline version of SPEC\r\n\t\t\t\t\"Stufe3pretest4\",\r\n\t\t\t\ttrue,\t//use caller\r\n\t\t\t\ttrue,\t//useCallee1_CodeTable_of\r\n\t\t\t\ttrue,\t//useCallee2_CodeTable_set\r\n\t\t\t\ttrue,\t//useCallee3_HashTable_clear\r\n\t\t\t\ttrue,\t//useCallee4_HashTable_hsize\r\n\t\t\t\ttrue,\t//useCallee5_HashTable_of_hash\r\n\t\t\t\ttrue,\t//useCallee6_HashTable_set_hash\r\n\t\t\t\ttrue,\t//useCallee7_Compressor_clblock\r\n\t\t\t\ttrue,\t//useCallee8_Compressor_output\r\n\t\t\t\ttrue,\t//useCallee9_InputBuffer_readByte\r\n\t\t\t\tfalse,\t//useCalleeA_Compressor_getMaxCode\r\n\t\t\t\ttrue,\t//useCalleeB_OutputBuffer_writeByte\r\n\t\t\t\ttrue\t//useCalleeC_OutputBuffer_writeBytes\r\n\t\t\t\t);\r\n\t}", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "public static void m3983a(String[] args) {\n }", "public abstract boolean mo2163j();", "public interface 多渠道打包 {\n /**\n * 所谓友盟打包,简单的有点郁闷。\n * 友盟打包如下:\n * 1.项目清单文件添加 meta-data 属性,里面的内容如下:\n * <meta-data android:name=\"UMENG_CHANNEL\"\n * android:value=\"${UMENG_CHANNEL_VALUE}\"/>\n * 备注:其实就是添加一个占位符。\n * 2.Project structrue中,在flavor属性,添加渠道如:wandoujia,baidu,anzhi等等;\n * 3.项目build.gradle的productFlavors属性中,添加占位符需要填写的内容,如下:\n * wandoujia {\n * manifestPlaceholders = [UMENG_CHANNEL_VALUE: \"wangdoujia\"]\n * }\n * 4.build-->generate signed apk,开始打包。 \n */\n}", "void mo21076g();", "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "public String getDisplayName() {\n return \"Rhapsody Build\";\n }", "private static int compile(String filename) throws Exception {\n\t\tInputStream inp = new BufferedInputStream(new FileInputStream(filename));\n\t\tParser parser = new Parser(inp);\n\t\tjava_cup.runtime.Symbol parseTree = null;\n\t\ttry {\n\t\t\tparseTree = parser.parse();\n\t\t} catch (Throwable e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new Error(e.toString());\n\t\t} finally {\n\t\t\tinp.close();\n\t\t}\n\t\t\n\t\tDecls tree = (Decls) parseTree.value;\n\t\t\n\t\tSemantic semant = new Semantic();\n\t\tsemant.checkProg(tree);\n\t\tif (semant.hasError()) {\n\t\t\tsemant.printErrors();\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t//System.out.println(\"Semant: OK\");\n\t\t\tLabel.fcount = 0;\n\t\t\t\n\t\t\tLabel topLabel = new Label(\"main\");\n\t\t\tLevel topLevel = new Level();\n\t\t\tTranslate translate = new Translate();\n\t\t\ttranslate.transProg(tree, topLabel, topLevel);\n\t\t\tList<CompileUnit> units = translate.getUnits();\n\t\t\t\n\t\t\t//=============================== Optimize =================================\n\t\t\tAnalyzer analyzer = new Analyzer();\n\t\t\tLabelEliminator le = new LabelEliminator();\n\t\t\t\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\t//System.out.println(u.getQuads().get(0));\n\t\t\t\tu.replaceBranches(analyzer);\n\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\tu.findLiveness(analyzer);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (CompileUnit u: units) {\n\t\t\t\tList<Quad> qs = u.getQuads();\n\t\t\t\tfor (Quad q: qs) {\n\t\t\t\t\tif (q instanceof MoveL)\n\t\t\t\t\t\t((MoveL)q).src.used = true;\n\t\t\t\t}\n\t\t\t\tGotoCompression.process(u);\n\t\t\t}\n\t\t\t\n\t\t\tLocalCopyPropagation lcp = new LocalCopyPropagation();\n\t\t\tDeadCodeEliminator dce = new DeadCodeEliminator();\n\t\t\tAvailableExpressionAnalyzer aea = new AvailableExpressionAnalyzer();\n\t\t\tCommonExpressionEliminator cse = new CommonExpressionEliminator();\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\tList<Quad> oldQuads = new LinkedList<Quad>();\n\t\t\t\t//int cnt = 0;\n\t\t\t\tdo {\n\t\t\t\t\toldQuads.clear();\n\t\t\t\t\toldQuads.addAll(u.getQuads());\n\t\t\t\t\t\n\t\t\t\t\tdo {\n\t\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\t\taea.analyze(u.getBasicBlocks());\n\t\t\t\t\t\t//System.out.println(++cnt);\n\t\t\t\t\t}\n\t\t\t\t\twhile (cse.eliminate(u));\n\n\t\t\t\t\tfor (BasicBlock bb : u.getBasicBlocks()) {\n\t\t\t\t\t\tlcp.process(bb);\n\t\t\t\t\t}\n\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\tdce.process(u);\n\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\twhile (le.eliminate(u));\n\t\t\t\t}\n\t\t\t\twhile (!u.getQuads().equals(oldQuads));\n\t\t\t}\n\t\t\t\n\t\t\t//========================================================================\n\t\t\tCodegen codegen = new Codegen();\n\t\t\tcodegen.gen(new Assem(\".data\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl args\"));\n\t\t\tcodegen.gen(new Assem(\"!args:\\t.space %\", (Translate.maxArgc + 1) * 4));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tfor (DataFrag df: translate.getDataFrags())\n\t\t\t\tif (df.label.used)\n\t\t\t\t\tcodegen.gen(df.gen());\n\t\t\t\n\t\t\tcodegen.gen(new Assem(\".text\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl main\"));\n\t\t\t\n\t\t\tfor (CompileUnit u: units)\n\t\t\t\tcodegen.gen(u, new LinearScan(u, analyzer));/**/\n\n\t\t\t//System.out.println((System.nanoTime() - start) / 1000000 + \" ms\");\n\t\t\t//PrintStream out = System.out;\n\t\t\tPrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(\"assem.s\")));\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############### CODE GEN ###############\");\n\t\t\tout.println(\"########################################\");\n\t\t\tcodegen.flush(out);\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############# RUNTIME CODE #############\");\n\t\t\tout.println(\"########################################\");\n\t\t\t//Scanner scanner = new Scanner(new FileInputStream(new File(\"runtime.s\")));\n\t\t\t//while (scanner.hasNextLine()) {\n\t\t\t//\tout.println(scanner.nextLine());\n\t\t\t//}\n\t\t\t//scanner.close();\n\t\t\tout.close();\n\t\t\treturn 0;\n\t\t}\n\t}", "public ChameleonProjectNature getProjectNature(){\r\n \t\treturn _projectNature;\r\n \t}" ]
[ "0.5302548", "0.5142963", "0.51069057", "0.5020641", "0.4976754", "0.49643207", "0.49451435", "0.49261546", "0.49142054", "0.49083254", "0.4895304", "0.48891556", "0.48882157", "0.4884884", "0.48818293", "0.48719087", "0.48639426", "0.48427185", "0.4817592", "0.48168403", "0.48161554", "0.4809395", "0.48071975", "0.48057154", "0.47937217", "0.47822988", "0.47816536", "0.47744143", "0.47734576", "0.47724742", "0.47691658", "0.47671312", "0.47627926", "0.47603855", "0.47598925", "0.47578755", "0.4755438", "0.47523695", "0.47498977", "0.47498214", "0.47495455", "0.47444576", "0.4734034", "0.47338733", "0.47313693", "0.47313118", "0.47199067", "0.47192517", "0.47155532", "0.47119373", "0.47085586", "0.4708497", "0.47018993", "0.46947193", "0.4691961", "0.46888083", "0.4687335", "0.46864137", "0.46816933", "0.46798572", "0.46775422", "0.4675608", "0.46750546", "0.46739846", "0.4673539", "0.4673267", "0.46732238", "0.46684858", "0.46650058", "0.46638018", "0.46620214", "0.4658031", "0.46554172", "0.46506083", "0.46486288", "0.46443948", "0.46427274", "0.4642662", "0.4639992", "0.4637633", "0.46355498", "0.4631498", "0.46300033", "0.46270207", "0.46230716", "0.4620327", "0.46183392", "0.46150345", "0.4614501", "0.4613271", "0.4606428", "0.46018922", "0.46018922", "0.46013984", "0.46008286", "0.45983925", "0.45964283", "0.4590811", "0.4587744", "0.45870596", "0.45867416" ]
0.0
-1
Created by BFTECH on 2016/12/8.
public interface KProgressDismissClickLister { void onDismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "public void mo4359a() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private void init() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void init() {}", "@Override\n protected void initialize() \n {\n \n }", "public void mo6081a() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void mo55254a() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo12628c() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "protected void mo6255a() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}" ]
[ "0.5931431", "0.5862001", "0.5862001", "0.5803537", "0.57770544", "0.57456154", "0.5730077", "0.5686693", "0.56712514", "0.56267333", "0.56048965", "0.5580834", "0.5555412", "0.5542314", "0.5533186", "0.5523613", "0.5521796", "0.5521796", "0.5521796", "0.5521796", "0.5521796", "0.55205715", "0.5519206", "0.5509229", "0.54946804", "0.5485573", "0.54742795", "0.54618686", "0.5457829", "0.54504746", "0.54388547", "0.5432304", "0.5432304", "0.5432304", "0.5432304", "0.5432304", "0.5432304", "0.5432304", "0.54300773", "0.5428495", "0.54238206", "0.54232544", "0.54228747", "0.5410193", "0.54061997", "0.5406057", "0.540246", "0.540246", "0.540246", "0.5396959", "0.53904426", "0.53904426", "0.53904426", "0.53847545", "0.5383211", "0.5373189", "0.536922", "0.53684086", "0.53684086", "0.53683263", "0.5368224", "0.5368224", "0.536805", "0.536805", "0.536805", "0.53670025", "0.5364933", "0.5364696", "0.53566086", "0.53566086", "0.53521216", "0.53471196", "0.53471196", "0.53471196", "0.53471196", "0.53471196", "0.53471196", "0.53408784", "0.53330463", "0.53165627", "0.53095496", "0.53088856", "0.530523", "0.53016216", "0.52969056", "0.5295467", "0.52939546", "0.5293181", "0.5292099", "0.5282482", "0.5273746", "0.5258297", "0.52582675", "0.5253576", "0.52527", "0.5243295", "0.5227996", "0.5227593", "0.5221346", "0.5219501", "0.5218483" ]
0.0
-1